Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[GIT-239 | GIT-240] refactor: hooks and constants consolidation to core (#9204)

Rahul Cheryala90ae8457d07c
diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/page.tsx
index f2c5aea1aa..427e43fc9d 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/page.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/page.tsx
@@ -27,7 +27,7 @@ import { useAppRouter } from "@/hooks/use-app-router";
// layouts
import { ProjectAuthWrapper } from "@/layouts/auth-layout/project-wrapper";
// plane web imports
-import { useWorkItemProperties } from "@/plane-web/hooks/use-issue-properties";
+import { useWorkItemProperties } from "@/hooks/use-issue-properties";
import { WorkItemDetailRoot } from "@/plane-web/components/browse/workItem-detail";
import type { Route } from "./+types/page";
diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/profile/[userId]/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/profile/[userId]/layout.tsx
index a07a9e3119..f5e2d66632 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(projects)/profile/[userId]/layout.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/profile/[userId]/layout.tsx
@@ -15,7 +15,7 @@ import { AppHeader } from "@/components/core/app-header";
import { ContentWrapper } from "@/components/core/content-wrapper";
import { ProfileSidebar } from "@/components/profile/sidebar";
// constants
-import { USER_PROFILE_PROJECT_SEGREGATION } from "@/constants/fetch-keys";
+import { USER_PROFILE_PROJECT_SEGREGATION } from "@plane/constants";
// hooks
import { useUserPermissions } from "@/hooks/store/user";
import useSize from "@/hooks/use-window-size";
diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/profile/[userId]/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/profile/[userId]/page.tsx
index 0fac006625..6118a867ab 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(projects)/profile/[userId]/page.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/profile/[userId]/page.tsx
@@ -18,7 +18,7 @@ import { ProfileStateDistribution } from "@/components/profile/overview/state-di
import { ProfileStats } from "@/components/profile/overview/stats";
import { ProfileWorkload } from "@/components/profile/overview/workload";
// constants
-import { USER_PROFILE_DATA } from "@/constants/fetch-keys";
+import { USER_PROFILE_DATA } from "@plane/constants";
// services
import { UserService } from "@/services/user.service";
import type { Route } from "./+types/page";
diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/issues/(detail)/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/issues/(detail)/header.tsx
index e8324c2f63..4217bae906 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/issues/(detail)/header.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/issues/(detail)/header.tsx
@@ -14,7 +14,7 @@ import { Breadcrumbs, Header } from "@plane/ui";
import { BreadcrumbLink } from "@/components/common/breadcrumb-link";
import { IssueDetailQuickActions } from "@/components/issues/issue-detail/issue-detail-quick-actions";
// constants
-import { ISSUE_DETAILS } from "@/constants/fetch-keys";
+import { ISSUE_DETAILS } from "@plane/constants";
// hooks
import { useProject } from "@/hooks/store/use-project";
// plane web
diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx
index ec332bbe10..fc1f76aa5d 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx
@@ -27,7 +27,7 @@ import { useEditorAsset } from "@/hooks/store/use-editor-asset";
import { useWorkspace } from "@/hooks/store/use-workspace";
import { useAppRouter } from "@/hooks/use-app-router";
// plane web hooks
-import { EPageStoreType, usePage, usePageStore } from "@/plane-web/hooks/store";
+import { EPageStoreType, usePage, usePageStore } from "@/hooks/store";
// plane web services
import { WorkspaceService } from "@/services/workspace.service";
// services
diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/header.tsx
index 271d0a159d..0d2b77e94d 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/header.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/header.tsx
@@ -23,7 +23,7 @@ import { useAppRouter } from "@/hooks/use-app-router";
// plane web imports
import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common";
import { PageDetailsHeaderExtraActions } from "@/plane-web/components/pages";
-import { EPageStoreType, usePage, usePageStore } from "@/plane-web/hooks/store";
+import { EPageStoreType, usePage, usePageStore } from "@/hooks/store";
export interface IPagesHeaderProps {
showButton?: boolean;
diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/layout.tsx
index 0ba3728ce5..b8f408091b 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/layout.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/layout.tsx
@@ -10,7 +10,7 @@ import useSWR from "swr";
import { AppHeader } from "@/components/core/app-header";
import { ContentWrapper } from "@/components/core/content-wrapper";
// plane web hooks
-import { EPageStoreType, usePageStore } from "@/plane-web/hooks/store";
+import { EPageStoreType, usePageStore } from "@/hooks/store";
// local components
import type { Route } from "./+types/layout";
import { PageDetailsHeader } from "./header";
diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(list)/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(list)/header.tsx
index e76f55b9a8..3ff7364161 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(list)/header.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(list)/header.tsx
@@ -22,7 +22,7 @@ import { BreadcrumbLink } from "@/components/common/breadcrumb-link";
import { useProject } from "@/hooks/store/use-project";
// plane web imports
import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common";
-import { EPageStoreType, usePageStore } from "@/plane-web/hooks/store";
+import { EPageStoreType, usePageStore } from "@/hooks/store";
export const PagesListHeader = observer(function PagesListHeader() {
// states
diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(list)/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(list)/page.tsx
index e5e1de9ded..540e87cc17 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(list)/page.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(list)/page.tsx
@@ -25,7 +25,7 @@ import { useProject } from "@/hooks/store/use-project";
import { useUserPermissions } from "@/hooks/store/user";
import { useAppRouter } from "@/hooks/use-app-router";
// plane web hooks
-import { EPageStoreType } from "@/plane-web/hooks/store";
+import { EPageStoreType } from "@/hooks/store";
import type { Route } from "./+types/page";
const getPageType = (pageType?: string | null): TPageNavigationTabs => {
diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/integrations/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/integrations/page.tsx
index ea32086874..1636bc8ae0 100644
--- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/integrations/page.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/integrations/page.tsx
@@ -14,7 +14,7 @@ import { SingleIntegrationCard } from "@/components/integration/single-integrati
import { IntegrationAndImportExportBanner } from "@/components/ui/integration-and-import-export-banner";
import { IntegrationsSettingsLoader } from "@/components/ui/loader/settings/integration";
// constants
-import { APP_INTEGRATIONS } from "@/constants/fetch-keys";
+import { APP_INTEGRATIONS } from "@plane/constants";
// hooks
import { useWorkspace } from "@/hooks/store/use-workspace";
import { useUserPermissions } from "@/hooks/store/user";
diff --git a/apps/web/app/(all)/[workspaceSlug]/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/layout.tsx
index 293688673a..f093efe76d 100644
--- a/apps/web/app/(all)/[workspaceSlug]/layout.tsx
+++ b/apps/web/app/(all)/[workspaceSlug]/layout.tsx
@@ -7,7 +7,7 @@
import { Outlet } from "react-router";
import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper";
import { WorkspaceContentWrapper } from "@/plane-web/components/workspace/content-wrapper";
-import { AppRailVisibilityProvider } from "@/plane-web/hooks/app-rail";
+import { AppRailVisibilityProvider } from "@/lib/app-rail";
import { GlobalModals } from "@/plane-web/components/common/modal/global";
import { WorkspaceAuthWrapper } from "@/layouts/auth-layout/workspace-wrapper";
import type { Route } from "./+types/layout";
diff --git a/apps/web/app/(all)/invitations/page.tsx b/apps/web/app/(all)/invitations/page.tsx
index dc1e45cc2d..0da54f0a88 100644
--- a/apps/web/app/(all)/invitations/page.tsx
+++ b/apps/web/app/(all)/invitations/page.tsx
@@ -24,7 +24,7 @@ import emptyInvitation from "@/app/assets/empty-state/invitation.svg?url";
// components
import { EmptyState } from "@/components/common/empty-state";
import { WorkspaceLogo } from "@/components/workspace/logo";
-import { USER_WORKSPACES_LIST } from "@/constants/fetch-keys";
+import { USER_WORKSPACES_LIST } from "@plane/constants";
// hooks
import { useWorkspace } from "@/hooks/store/use-workspace";
import { useUser, useUserProfile } from "@/hooks/store/user";
diff --git a/apps/web/app/(all)/onboarding/page.tsx b/apps/web/app/(all)/onboarding/page.tsx
index 28e677e227..86ef1b1f72 100644
--- a/apps/web/app/(all)/onboarding/page.tsx
+++ b/apps/web/app/(all)/onboarding/page.tsx
@@ -11,7 +11,7 @@ import useSWR from "swr";
import { LogoSpinner } from "@/components/common/logo-spinner";
import { OnboardingRoot } from "@/components/onboarding";
// constants
-import { USER_WORKSPACES_LIST } from "@/constants/fetch-keys";
+import { USER_WORKSPACES_LIST } from "@plane/constants";
// helpers
import { EPageTypes } from "@/helpers/authentication.helper";
// hooks
diff --git a/apps/web/app/(all)/workspace-invitations/page.tsx b/apps/web/app/(all)/workspace-invitations/page.tsx
index 4ab9b02eb8..d6267d1888 100644
--- a/apps/web/app/(all)/workspace-invitations/page.tsx
+++ b/apps/web/app/(all)/workspace-invitations/page.tsx
@@ -13,7 +13,7 @@ import { CheckIcon, CloseIcon } from "@plane/propel/icons";
import { LogoSpinner } from "@/components/common/logo-spinner";
import { EmptySpace, EmptySpaceItem } from "@/components/ui/empty-space";
// constants
-import { WORKSPACE_INVITATION } from "@/constants/fetch-keys";
+import { WORKSPACE_INVITATION } from "@plane/constants";
// helpers
import { EPageTypes } from "@/helpers/authentication.helper";
// hooks
diff --git a/apps/web/ce/components/command-palette/modals/project-level.tsx b/apps/web/ce/components/command-palette/modals/project-level.tsx
index e01b002efd..5555104bba 100644
--- a/apps/web/ce/components/command-palette/modals/project-level.tsx
+++ b/apps/web/ce/components/command-palette/modals/project-level.tsx
@@ -13,7 +13,7 @@ import { CreateUpdateProjectViewModal } from "@/components/views/modal";
// hooks
import { useCommandPalette } from "@/hooks/store/use-command-palette";
// plane web hooks
-import { EPageStoreType } from "@/plane-web/hooks/store";
+import { EPageStoreType } from "@/hooks/store";
export type TProjectLevelModalsProps = {
workspaceSlug: string;
diff --git a/apps/web/ce/components/pages/editor/ai/menu.tsx b/apps/web/ce/components/pages/editor/ai/menu.tsx
index 284af138ab..36d417a560 100644
--- a/apps/web/ce/components/pages/editor/ai/menu.tsx
+++ b/apps/web/ce/components/pages/editor/ai/menu.tsx
@@ -16,7 +16,7 @@ import { Tooltip } from "@plane/propel/tooltip";
import { cn } from "@plane/utils";
import { RichTextEditor } from "@/components/editor/rich-text";
// plane web constants
-import { AI_EDITOR_TASKS, LOADING_TEXTS } from "@/constants/ai";
+import { AI_EDITOR_TASKS, LOADING_TEXTS } from "@plane/constants";
// plane web services
import type { TTaskPayload } from "@/services/ai.service";
import { AIService } from "@/services/ai.service";
diff --git a/apps/web/ce/components/pages/extra-actions.tsx b/apps/web/ce/components/pages/extra-actions.tsx
index a6eaee6335..b89ef9bf56 100644
--- a/apps/web/ce/components/pages/extra-actions.tsx
+++ b/apps/web/ce/components/pages/extra-actions.tsx
@@ -5,7 +5,7 @@
*/
// store
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
import type { TPageInstance } from "@/store/pages/base-page";
export type TPageHeaderExtraActionsProps = {
diff --git a/apps/web/ce/components/pages/header/share-control.tsx b/apps/web/ce/components/pages/header/share-control.tsx
index d84ee26bdc..ea4cb0ae41 100644
--- a/apps/web/ce/components/pages/header/share-control.tsx
+++ b/apps/web/ce/components/pages/header/share-control.tsx
@@ -4,7 +4,7 @@
* See the LICENSE file for details.
*/
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
// store
import type { TPageInstance } from "@/store/pages/base-page";
diff --git a/apps/web/ce/components/pages/modals/modals.tsx b/apps/web/ce/components/pages/modals/modals.tsx
index 84952fbf40..6720c8bbb2 100644
--- a/apps/web/ce/components/pages/modals/modals.tsx
+++ b/apps/web/ce/components/pages/modals/modals.tsx
@@ -6,7 +6,7 @@
import { observer } from "mobx-react";
// components
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
// store
import type { TPageInstance } from "@/store/pages/base-page";
diff --git a/apps/web/ce/components/workspace/billing/comparison/plan-detail.tsx b/apps/web/ce/components/workspace/billing/comparison/plan-detail.tsx
index c253244c59..27d2b8cf14 100644
--- a/apps/web/ce/components/workspace/billing/comparison/plan-detail.tsx
+++ b/apps/web/ce/components/workspace/billing/comparison/plan-detail.tsx
@@ -18,7 +18,7 @@ import { EProductSubscriptionEnum } from "@plane/types";
import { getSubscriptionName } from "@plane/utils";
// components
import { DiscountInfo } from "@/components/license/modal/card/discount-info";
-import type { TPlanDetail } from "@/constants/plans";
+import type { TPlanDetail } from "@/components/workspace/billing/comparison/plans";
// local imports
import { PlanFrequencyToggle } from "./frequency-toggle";
diff --git a/apps/web/ce/components/workspace/billing/comparison/root.tsx b/apps/web/ce/components/workspace/billing/comparison/root.tsx
index 7ff2178840..1c04554d75 100644
--- a/apps/web/ce/components/workspace/billing/comparison/root.tsx
+++ b/apps/web/ce/components/workspace/billing/comparison/root.tsx
@@ -9,8 +9,8 @@ import { observer } from "mobx-react";
import type { EProductSubscriptionEnum, TBillingFrequency } from "@plane/types";
// components
import { PlansComparisonBase, shouldRenderPlanDetail } from "@/components/workspace/billing/comparison/base";
-import type { TPlanePlans } from "@/constants/plans";
-import { PLANE_PLANS } from "@/constants/plans";
+import type { TPlanePlans } from "@/components/workspace/billing/comparison/plans";
+import { PLANE_PLANS } from "@/components/workspace/billing/comparison/plans";
// plane web imports
import { PlanDetail } from "./plan-detail";
diff --git a/apps/web/ce/hooks/app-rail/index.ts b/apps/web/ce/hooks/app-rail/index.ts
deleted file mode 100644
index d46b5c917e..0000000000
--- a/apps/web/ce/hooks/app-rail/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-export * from "./provider";
diff --git a/apps/web/ce/hooks/app-rail/provider.tsx b/apps/web/ce/hooks/app-rail/provider.tsx
deleted file mode 100644
index 029f5a8353..0000000000
--- a/apps/web/ce/hooks/app-rail/provider.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-import React from "react";
-import { observer } from "mobx-react";
-import { AppRailVisibilityProvider as CoreProvider } from "@/lib/app-rail";
-
-interface AppRailVisibilityProviderProps {
- children: React.ReactNode;
-}
-
-/**
- * CE AppRailVisibilityProvider
- * Wraps core provider with isEnabled hardcoded to false
- */
-export const AppRailVisibilityProvider = observer(function AppRailVisibilityProvider({
- children,
-}: AppRailVisibilityProviderProps) {
- return <CoreProvider isEnabled={false}>{children}</CoreProvider>;
-});
diff --git a/apps/web/ce/hooks/use-additional-favorite-item-details.ts b/apps/web/ce/hooks/use-additional-favorite-item-details.ts
deleted file mode 100644
index 7bf502ea11..0000000000
--- a/apps/web/ce/hooks/use-additional-favorite-item-details.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-// plane imports
-import type { IFavorite } from "@plane/types";
-// components
-import { getFavoriteItemIcon } from "@/components/workspace/sidebar/favorites/favorite-items/common";
-
-export const useAdditionalFavoriteItemDetails = () => {
- const getAdditionalFavoriteItemDetails = (_workspaceSlug: string, favorite: IFavorite) => {
- const { entity_type: favoriteItemEntityType } = favorite;
- const favoriteItemName = favorite?.entity_data?.name || favorite?.name;
-
- let itemIcon;
- let itemTitle;
-
- switch (favoriteItemEntityType) {
- default:
- itemTitle = favoriteItemName;
- itemIcon = getFavoriteItemIcon(favoriteItemEntityType);
- break;
- }
- return { itemIcon, itemTitle };
- };
-
- return {
- getAdditionalFavoriteItemDetails,
- };
-};
diff --git a/apps/web/ce/hooks/use-issue-embed.tsx b/apps/web/ce/hooks/use-issue-embed.tsx
deleted file mode 100644
index 6ffbec7cdb..0000000000
--- a/apps/web/ce/hooks/use-issue-embed.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-// editor
-import type { TEmbedConfig } from "@plane/editor";
-// plane types
-import type { TSearchEntityRequestPayload, TSearchResponse } from "@plane/types";
-// plane web components
-import { IssueEmbedUpgradeCard } from "@/plane-web/components/pages";
-
-export type TIssueEmbedHookProps = {
- fetchEmbedSuggestions?: (payload: TSearchEntityRequestPayload) => Promise<TSearchResponse>;
- projectId?: string;
- workspaceSlug?: string;
-};
-
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
-export const useIssueEmbed = (props: TIssueEmbedHookProps) => {
- const widgetCallback = () => <IssueEmbedUpgradeCard />;
-
- const issueEmbedProps: TEmbedConfig["issue"] = {
- widgetCallback,
- };
-
- return {
- issueEmbedProps,
- };
-};
diff --git a/apps/web/ce/hooks/use-timeline-chart.ts b/apps/web/ce/hooks/use-timeline-chart.ts
deleted file mode 100644
index 2deaae2542..0000000000
--- a/apps/web/ce/hooks/use-timeline-chart.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-// types
-import type { TTimelineTypeCore } from "@plane/types";
-import { GANTT_TIMELINE_TYPE } from "@plane/types";
-// Plane-web
-
-import type { IBaseTimelineStore } from "@/plane-web/store/timeline/base-timeline.store";
-import type { ITimelineStore } from "../store/timeline";
-
-export const getTimelineStore = (
- timelineStore: ITimelineStore,
- timelineType: TTimelineTypeCore
-): IBaseTimelineStore => {
- if (timelineType === GANTT_TIMELINE_TYPE.ISSUE) {
- return timelineStore.issuesTimeLineStore as IBaseTimelineStore;
- }
- if (timelineType === GANTT_TIMELINE_TYPE.MODULE) {
- return timelineStore.modulesTimeLineStore as IBaseTimelineStore;
- }
- if (timelineType === GANTT_TIMELINE_TYPE.PROJECT) {
- return timelineStore.projectTimeLineStore;
- }
- if (timelineType === GANTT_TIMELINE_TYPE.GROUPED) {
- return timelineStore.groupedTimeLineStore;
- }
- throw new Error(`Unknown timeline type: ${timelineType}`);
-};
diff --git a/apps/web/core/components/api-token/delete-token-modal.tsx b/apps/web/core/components/api-token/delete-token-modal.tsx
index d2c9d653a4..58a93394c1 100644
--- a/apps/web/core/components/api-token/delete-token-modal.tsx
+++ b/apps/web/core/components/api-token/delete-token-modal.tsx
@@ -14,7 +14,7 @@ import type { IApiToken } from "@plane/types";
// ui
import { AlertModalCore } from "@plane/ui";
// fetch-keys
-import { API_TOKENS_LIST } from "@/constants/fetch-keys";
+import { API_TOKENS_LIST } from "@plane/constants";
type Props = {
isOpen: boolean;
diff --git a/apps/web/core/components/api-token/modal/create-token-modal.tsx b/apps/web/core/components/api-token/modal/create-token-modal.tsx
index 9ea6055daf..f9d4872d3f 100644
--- a/apps/web/core/components/api-token/modal/create-token-modal.tsx
+++ b/apps/web/core/components/api-token/modal/create-token-modal.tsx
@@ -13,7 +13,7 @@ import type { IApiToken } from "@plane/types";
import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
import { renderFormattedDate, csvDownload } from "@plane/utils";
// constants
-import { API_TOKENS_LIST } from "@/constants/fetch-keys";
+import { API_TOKENS_LIST } from "@plane/constants";
// local imports
import { CreateApiTokenForm } from "./form";
import { GeneratedTokenDetails } from "./generated-token-details";
diff --git a/apps/web/core/components/cycles/active-cycle/use-cycles-details.ts b/apps/web/core/components/cycles/active-cycle/use-cycles-details.ts
index d404520c59..d9cd8c0c96 100644
--- a/apps/web/core/components/cycles/active-cycle/use-cycles-details.ts
+++ b/apps/web/core/components/cycles/active-cycle/use-cycles-details.ts
@@ -11,7 +11,7 @@ import useSWR from "swr";
import type { TWorkItemFilterCondition } from "@plane/shared-state";
import { EIssuesStoreType } from "@plane/types";
// constants
-import { CYCLE_ISSUES_WITH_PARAMS } from "@/constants/fetch-keys";
+import { CYCLE_ISSUES_WITH_PARAMS } from "@plane/constants";
// hooks
import { useCycle } from "@/hooks/store/use-cycle";
import { useIssues } from "@/hooks/store/use-issues";
diff --git a/apps/web/core/components/editor/document/editor.tsx b/apps/web/core/components/editor/document/editor.tsx
index dd653e45ef..730719f78d 100644
--- a/apps/web/core/components/editor/document/editor.tsx
+++ b/apps/web/core/components/editor/document/editor.tsx
@@ -14,8 +14,7 @@ import { cn } from "@plane/utils";
import { useEditorConfig, useEditorMention } from "@/hooks/editor";
import { useMember } from "@/hooks/store/use-member";
import { useParseEditorContent } from "@/hooks/use-parse-editor-content";
-// plane web hooks
-import { useEditorFlagging } from "@/plane-web/hooks/use-editor-flagging";
+import { useEditorFlagging } from "@/hooks/use-editor-flagging";
// local imports
import { EditorMentionsRoot } from "../embeds/mentions";
diff --git a/apps/web/core/components/editor/lite-text/editor.tsx b/apps/web/core/components/editor/lite-text/editor.tsx
index 257f106f8c..e09d6d197e 100644
--- a/apps/web/core/components/editor/lite-text/editor.tsx
+++ b/apps/web/core/components/editor/lite-text/editor.tsx
@@ -21,7 +21,7 @@ import { useEditorConfig, useEditorMention } from "@/hooks/editor";
import { useMember } from "@/hooks/store/use-member";
import { useParseEditorContent } from "@/hooks/use-parse-editor-content";
// plane web hooks
-import { useEditorFlagging } from "@/plane-web/hooks/use-editor-flagging";
+import { useEditorFlagging } from "@/hooks/use-editor-flagging";
// plane web service
import { WorkspaceService } from "@/services/workspace.service";
import { LiteToolbar } from "./lite-toolbar";
diff --git a/apps/web/core/components/editor/lite-text/lite-toolbar.tsx b/apps/web/core/components/editor/lite-text/lite-toolbar.tsx
index 99efb2f2a5..3245196f77 100644
--- a/apps/web/core/components/editor/lite-text/lite-toolbar.tsx
+++ b/apps/web/core/components/editor/lite-text/lite-toolbar.tsx
@@ -7,8 +7,8 @@
import React from "react";
import { ArrowUp, Paperclip } from "lucide-react";
// constants
-import type { ToolbarMenuItem } from "@/constants/editor";
-import { IMAGE_ITEM } from "@/constants/editor";
+import type { ToolbarMenuItem } from "@plane/editor";
+import { IMAGE_ITEM } from "@plane/editor";
type LiteToolbarProps = {
onSubmit: (e: React.KeyboardEvent<HTMLDivElement> | React.MouseEvent<HTMLButtonElement>) => void;
diff --git a/apps/web/core/components/editor/lite-text/toolbar.tsx b/apps/web/core/components/editor/lite-text/toolbar.tsx
index d23100a8d7..dc955cdded 100644
--- a/apps/web/core/components/editor/lite-text/toolbar.tsx
+++ b/apps/web/core/components/editor/lite-text/toolbar.tsx
@@ -19,8 +19,8 @@ import type { ISvgIcons } from "@plane/propel/icons";
import { Tooltip } from "@plane/propel/tooltip";
// constants
import { cn } from "@plane/utils";
-import type { ToolbarMenuItem } from "@/constants/editor";
-import { TOOLBAR_ITEMS } from "@/constants/editor";
+import type { ToolbarMenuItem } from "@plane/editor";
+import { TOOLBAR_ITEMS } from "@plane/editor";
// helpers
type Props = {
diff --git a/apps/web/core/components/editor/pdf/document.tsx b/apps/web/core/components/editor/pdf/document.tsx
index 1c439bfae1..bda85bba2f 100644
--- a/apps/web/core/components/editor/pdf/document.tsx
+++ b/apps/web/core/components/editor/pdf/document.tsx
@@ -4,8 +4,8 @@
* See the LICENSE file for details.
*/
-import type { PageProps } from "@react-pdf/renderer";
-import { Document, Font, Page } from "@react-pdf/renderer";
+import type { PageProps, Styles } from "@react-pdf/renderer";
+import { Document, Font, Page, StyleSheet } from "@react-pdf/renderer";
import { Html } from "react-pdf-html";
// assets
import interBold from "@/app/assets/fonts/inter/bold.ttf?url";
@@ -17,8 +17,177 @@ import interSemibold from "@/app/assets/fonts/inter/semibold.ttf?url";
import interThin from "@/app/assets/fonts/inter/thin.ttf?url";
import interUltraBold from "@/app/assets/fonts/inter/ultrabold.ttf?url";
import interUltraLight from "@/app/assets/fonts/inter/ultralight.ttf?url";
-// constants
-import { EDITOR_PDF_DOCUMENT_STYLESHEET } from "@/constants/editor";
+// plane imports
+import { convertRemToPixel } from "@plane/utils";
+
+const EDITOR_PDF_FONT_FAMILY_STYLES: Styles = {
+ "*:not(.courier, .courier-bold)": { fontFamily: "Inter" },
+ ".courier": { fontFamily: "Courier" },
+ ".courier-bold": { fontFamily: "Courier-Bold" },
+};
+
+const EDITOR_PDF_TYPOGRAPHY_STYLES: Styles = {
+ // page title
+ "h1.page-title": {
+ fontSize: convertRemToPixel(1.6),
+ fontWeight: "bold",
+ marginTop: 0,
+ marginBottom: convertRemToPixel(2),
+ },
+ // headings
+ "h1:not(.page-title)": {
+ fontSize: convertRemToPixel(1.4),
+ fontWeight: "semibold",
+ marginTop: convertRemToPixel(2),
+ marginBottom: convertRemToPixel(0.25),
+ },
+ h2: {
+ fontSize: convertRemToPixel(1.2),
+ fontWeight: "semibold",
+ marginTop: convertRemToPixel(1.4),
+ marginBottom: convertRemToPixel(0.0625),
+ },
+ h3: {
+ fontSize: convertRemToPixel(1.1),
+ fontWeight: "semibold",
+ marginTop: convertRemToPixel(1),
+ marginBottom: convertRemToPixel(0.0625),
+ },
+ h4: {
+ fontSize: convertRemToPixel(1),
+ fontWeight: "semibold",
+ marginTop: convertRemToPixel(1),
+ marginBottom: convertRemToPixel(0.0625),
+ },
+ h5: {
+ fontSize: convertRemToPixel(0.9),
+ fontWeight: "semibold",
+ marginTop: convertRemToPixel(1),
+ marginBottom: convertRemToPixel(0.0625),
+ },
+ h6: {
+ fontSize: convertRemToPixel(0.8),
+ fontWeight: "semibold",
+ marginTop: convertRemToPixel(1),
+ marginBottom: convertRemToPixel(0.0625),
+ },
+ // paragraph
+ "p:not(table p)": {
+ fontSize: convertRemToPixel(0.8),
+ },
+ "p:not(ol p, ul p)": {
+ marginTop: convertRemToPixel(0.25),
+ marginBottom: convertRemToPixel(0.0625),
+ },
+};
+
+const EDITOR_PDF_LIST_STYLES: Styles = {
+ "ul, ol": {
+ fontSize: convertRemToPixel(0.8),
+ marginHorizontal: -20,
+ },
+ "ol p, ul p": {
+ marginVertical: 0,
+ },
+ "ol li, ul li": {
+ marginTop: convertRemToPixel(0.45),
+ },
+ "ul ul, ul ol, ol ol, ol ul": {
+ marginVertical: 0,
+ },
+ "ul[data-type='taskList']": {
+ position: "relative",
+ },
+ "div.input-checkbox": {
+ position: "absolute",
+ top: convertRemToPixel(0.15),
+ left: -convertRemToPixel(1.2),
+ height: convertRemToPixel(0.75),
+ width: convertRemToPixel(0.75),
+ borderWidth: "1.5px",
+ borderStyle: "solid",
+ borderRadius: convertRemToPixel(0.125),
+ },
+ "div.input-checkbox:not(.checked)": {
+ backgroundColor: "#ffffff",
+ borderColor: "#171717",
+ },
+ "div.input-checkbox.checked": {
+ backgroundColor: "#3f76ff",
+ borderColor: "#3f76ff",
+ },
+ "ul li[data-checked='true'] p": {
+ color: "#a3a3a3",
+ },
+};
+
+const EDITOR_PDF_CODE_STYLES: Styles = {
+ // code block
+ "[data-node-type='code-block']": {
+ marginVertical: convertRemToPixel(0.5),
+ padding: convertRemToPixel(1),
+ borderRadius: convertRemToPixel(0.5),
+ backgroundColor: "#f7f7f7",
+ fontSize: convertRemToPixel(0.7),
+ },
+ // inline code block
+ "[data-node-type='inline-code-block']": {
+ margin: 0,
+ paddingVertical: convertRemToPixel(0.25 / 4 + 0.25 / 8),
+ paddingHorizontal: convertRemToPixel(0.375),
+ border: "0.5px solid #e5e5e5",
+ borderRadius: convertRemToPixel(0.25),
+ backgroundColor: "#e8e8e8",
+ color: "#f97316",
+ fontSize: convertRemToPixel(0.7),
+ },
+};
+
+const EDITOR_PDF_DOCUMENT_STYLESHEET = StyleSheet.create({
+ ...EDITOR_PDF_FONT_FAMILY_STYLES,
+ ...EDITOR_PDF_TYPOGRAPHY_STYLES,
+ ...EDITOR_PDF_LIST_STYLES,
+ ...EDITOR_PDF_CODE_STYLES,
+ // quote block
+ blockquote: {
+ borderLeft: "3px solid gray",
+ paddingLeft: convertRemToPixel(1),
+ marginTop: convertRemToPixel(0.625),
+ marginBottom: 0,
+ marginHorizontal: 0,
+ },
+ img: {
+ marginVertical: 0,
+ borderRadius: convertRemToPixel(0.375),
+ },
+ // divider
+ "div[data-type='horizontalRule']": {
+ marginVertical: convertRemToPixel(1),
+ height: 1,
+ width: "100%",
+ backgroundColor: "gray",
+ },
+ // mention block
+ "[data-node-type='mention-block']": {
+ margin: 0,
+ color: "#3f76ff",
+ backgroundColor: "#3f76ff33",
+ paddingHorizontal: convertRemToPixel(0.375),
+ },
+ // table
+ table: {
+ marginTop: convertRemToPixel(0.5),
+ marginBottom: convertRemToPixel(1),
+ marginHorizontal: 0,
+ },
+ "table td": {
+ padding: convertRemToPixel(0.625),
+ border: "1px solid #e5e5e5",
+ },
+ "table p": {
+ fontSize: convertRemToPixel(0.7),
+ },
+});
Font.register({
family: "Inter",
diff --git a/apps/web/core/components/editor/rich-text/editor.tsx b/apps/web/core/components/editor/rich-text/editor.tsx
index 5a429b039f..cb2172bdee 100644
--- a/apps/web/core/components/editor/rich-text/editor.tsx
+++ b/apps/web/core/components/editor/rich-text/editor.tsx
@@ -17,7 +17,7 @@ import { useEditorConfig, useEditorMention } from "@/hooks/editor";
import { useMember } from "@/hooks/store/use-member";
import { useParseEditorContent } from "@/hooks/use-parse-editor-content";
// plane web hooks
-import { useEditorFlagging } from "@/plane-web/hooks/use-editor-flagging";
+import { useEditorFlagging } from "@/hooks/use-editor-flagging";
type RichTextEditorWrapperProps = MakeOptional<
Omit<IRichTextEditorProps, "fileHandler" | "mentionHandler" | "extendedEditorProps">,
diff --git a/apps/web/core/components/editor/sticky-editor/editor.tsx b/apps/web/core/components/editor/sticky-editor/editor.tsx
index 544ea3b35b..75d67cd1af 100644
--- a/apps/web/core/components/editor/sticky-editor/editor.tsx
+++ b/apps/web/core/components/editor/sticky-editor/editor.tsx
@@ -18,7 +18,7 @@ import { cn } from "@plane/utils";
import { useEditorConfig } from "@/hooks/editor";
import { useParseEditorContent } from "@/hooks/use-parse-editor-content";
// plane web hooks
-import { useEditorFlagging } from "@/plane-web/hooks/use-editor-flagging";
+import { useEditorFlagging } from "@/hooks/use-editor-flagging";
import { StickyEditorToolbar } from "./toolbar";
interface StickyEditorWrapperProps extends Omit<
diff --git a/apps/web/core/components/editor/sticky-editor/toolbar.tsx b/apps/web/core/components/editor/sticky-editor/toolbar.tsx
index efd2fc1696..459b4d0142 100644
--- a/apps/web/core/components/editor/sticky-editor/toolbar.tsx
+++ b/apps/web/core/components/editor/sticky-editor/toolbar.tsx
@@ -15,8 +15,8 @@ import { Tooltip } from "@plane/propel/tooltip";
import type { TSticky } from "@plane/types";
// constants
import { cn } from "@plane/utils";
-import type { ToolbarMenuItem } from "@/constants/editor";
-import { TOOLBAR_ITEMS } from "@/constants/editor";
+import type { ToolbarMenuItem } from "@plane/editor";
+import { TOOLBAR_ITEMS } from "@plane/editor";
// helpers
import { ColorPalette } from "./color-palette";
diff --git a/apps/web/core/components/exporter/guide.tsx b/apps/web/core/components/exporter/guide.tsx
index f6a212d904..35aba499d3 100644
--- a/apps/web/core/components/exporter/guide.tsx
+++ b/apps/web/core/components/exporter/guide.tsx
@@ -9,7 +9,7 @@ import { observer } from "mobx-react";
import { useParams, useSearchParams } from "next/navigation";
import { mutate } from "swr";
// constants
-import { EXPORT_SERVICES_LIST } from "@/constants/fetch-keys";
+import { EXPORT_SERVICES_LIST } from "@plane/constants";
// local imports
import { ExportForm } from "./export-form";
import { PrevExports } from "./prev-exports";
diff --git a/apps/web/core/components/exporter/prev-exports.tsx b/apps/web/core/components/exporter/prev-exports.tsx
index 2d747e00bd..2334a6c159 100644
--- a/apps/web/core/components/exporter/prev-exports.tsx
+++ b/apps/web/core/components/exporter/prev-exports.tsx
@@ -17,7 +17,7 @@ import { Table } from "@plane/ui";
// components
import { ImportExportSettingsLoader } from "@/components/ui/loader/settings/import-and-export";
// constants
-import { EXPORT_SERVICES_LIST } from "@/constants/fetch-keys";
+import { EXPORT_SERVICES_LIST } from "@plane/constants";
// services
import { IntegrationService } from "@/services/integrations";
// local imports
diff --git a/apps/web/core/components/gantt-chart/chart/main-content.tsx b/apps/web/core/components/gantt-chart/chart/main-content.tsx
index e7de61089d..16f1109dfa 100644
--- a/apps/web/core/components/gantt-chart/chart/main-content.tsx
+++ b/apps/web/core/components/gantt-chart/chart/main-content.tsx
@@ -31,9 +31,8 @@ import {
import { GanttChartRowList } from "@/plane-web/components/gantt-chart/blocks/block-row-list";
import { GanttChartBlocksList } from "@/plane-web/components/gantt-chart/blocks/blocks-list";
import { IssueBulkOperationsRoot } from "@/plane-web/components/issues/bulk-operations";
-// plane web hooks
-import { useBulkOperationStatus } from "@/plane-web/hooks/use-bulk-operation-status";
-//
+import { useBulkOperationStatus } from "@/hooks/use-bulk-operation-status";
+// local imports
import { DEFAULT_BLOCK_WIDTH, GANTT_SELECT_GROUP, HEADER_HEIGHT } from "../constants";
import { getItemPositionWidth } from "../views";
import { TimelineDragHelper } from "./timeline-drag-helper";
diff --git a/apps/web/core/components/inbox/content/issue-root.tsx b/apps/web/core/components/inbox/content/issue-root.tsx
index 172693b922..e4c4010396 100644
--- a/apps/web/core/components/inbox/content/issue-root.tsx
+++ b/apps/web/core/components/inbox/content/issue-root.tsx
@@ -31,7 +31,7 @@ import { useUser } from "@/hooks/store/user";
import useReloadConfirmations from "@/hooks/use-reload-confirmation";
// store types
import { DeDupeIssuePopoverRoot } from "@/plane-web/components/de-dupe/duplicate-popover";
-import { useDebouncedDuplicateIssues } from "@/plane-web/hooks/use-debounced-duplicate-issues";
+import { useDebouncedDuplicateIssues } from "@/hooks/use-debounced-duplicate-issues";
// services
import { IntakeWorkItemVersionService } from "@/services/inbox";
// stores
@@ -64,14 +64,14 @@ export const InboxIssueMainContent = observer(function InboxIssueMainContent(pro
const { setShowAlert } = useReloadConfirmations(isSubmitting === "submitting");
useEffect(() => {
+ let timer: ReturnType<typeof setTimeout>;
if (isSubmitting === "submitted") {
setShowAlert(false);
- setTimeout(async () => {
- setIsSubmitting("saved");
- }, 3000);
+ timer = setTimeout(() => setIsSubmitting("saved"), 3000);
} else if (isSubmitting === "submitting") {
setShowAlert(true);
}
+ return () => clearTimeout(timer);
}, [isSubmitting, setShowAlert, setIsSubmitting]);
// derived values
diff --git a/apps/web/core/components/inbox/modals/create-modal/create-root.tsx b/apps/web/core/components/inbox/modals/create-modal/create-root.tsx
index e31e8da127..32963204dd 100644
--- a/apps/web/core/components/inbox/modals/create-modal/create-root.tsx
+++ b/apps/web/core/components/inbox/modals/create-modal/create-root.tsx
@@ -26,7 +26,7 @@ import { usePlatformOS } from "@/hooks/use-platform-os";
// plane web imports
import { DeDupeButtonRoot } from "@/plane-web/components/de-dupe/de-dupe-button";
import { DuplicateModalRoot } from "@/plane-web/components/de-dupe/duplicate-modal";
-import { useDebouncedDuplicateIssues } from "@/plane-web/hooks/use-debounced-duplicate-issues";
+import { useDebouncedDuplicateIssues } from "@/hooks/use-debounced-duplicate-issues";
// services
import { FileService } from "@/services/file.service";
// local imports
diff --git a/apps/web/core/components/integration/single-integration-card.tsx b/apps/web/core/components/integration/single-integration-card.tsx
index d4224eb224..c6773bb92d 100644
--- a/apps/web/core/components/integration/single-integration-card.tsx
+++ b/apps/web/core/components/integration/single-integration-card.tsx
@@ -20,7 +20,7 @@ import { Loader } from "@plane/ui";
import GithubLogo from "@/app/assets/services/github.png?url";
import SlackLogo from "@/app/assets/services/slack.png?url";
// constants
-import { WORKSPACE_INTEGRATIONS } from "@/constants/fetch-keys";
+import { WORKSPACE_INTEGRATIONS } from "@plane/constants";
// hooks
import { useInstance } from "@/hooks/store/use-instance";
import { useUserPermissions } from "@/hooks/store/user";
diff --git a/apps/web/core/components/integration/slack/select-channel.tsx b/apps/web/core/components/integration/slack/select-channel.tsx
index af38111a36..3838329220 100644
--- a/apps/web/core/components/integration/slack/select-channel.tsx
+++ b/apps/web/core/components/integration/slack/select-channel.tsx
@@ -13,7 +13,7 @@ import type { IWorkspaceIntegration, ISlackIntegration } from "@plane/types";
// ui
import { Loader } from "@plane/ui";
// fetch-keys
-import { SLACK_CHANNEL_INFO } from "@/constants/fetch-keys";
+import { SLACK_CHANNEL_INFO } from "@plane/constants";
// hooks
import { useInstance } from "@/hooks/store/use-instance";
import useIntegrationPopup from "@/hooks/use-integration-popup";
diff --git a/apps/web/core/components/issues/attachment/attachment-item-list.tsx b/apps/web/core/components/issues/attachment/attachment-item-list.tsx
index 0ac4db84f2..4341e5c951 100644
--- a/apps/web/core/components/issues/attachment/attachment-item-list.tsx
+++ b/apps/web/core/components/issues/attachment/attachment-item-list.tsx
@@ -16,7 +16,7 @@ import { EIssueServiceType } from "@plane/types";
// hooks
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
// plane web hooks
-import { useFileSize } from "@/plane-web/hooks/use-file-size";
+import { useFileSize } from "@/hooks/use-file-size";
// types
import type { TAttachmentHelpers } from "../issue-detail-widgets/attachments/helper";
// components
diff --git a/apps/web/core/components/issues/attachment/attachment-upload.tsx b/apps/web/core/components/issues/attachment/attachment-upload.tsx
index c537361ef9..2a37b3b985 100644
--- a/apps/web/core/components/issues/attachment/attachment-upload.tsx
+++ b/apps/web/core/components/issues/attachment/attachment-upload.tsx
@@ -8,7 +8,7 @@ import { useCallback, useState } from "react";
import { observer } from "mobx-react";
import { useDropzone } from "react-dropzone";
// plane web hooks
-import { useFileSize } from "@/plane-web/hooks/use-file-size";
+import { useFileSize } from "@/hooks/use-file-size";
// types
import type { TAttachmentOperations } from "../issue-detail-widgets/attachments/helper";
diff --git a/apps/web/core/components/issues/issue-detail-widgets/attachments/quick-action-button.tsx b/apps/web/core/components/issues/issue-detail-widgets/attachments/quick-action-button.tsx
index 7853b3b4e4..dc6155550f 100644
--- a/apps/web/core/components/issues/issue-detail-widgets/attachments/quick-action-button.tsx
+++ b/apps/web/core/components/issues/issue-detail-widgets/attachments/quick-action-button.tsx
@@ -15,7 +15,7 @@ import type { TIssueServiceType } from "@plane/types";
// hooks
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
// plane web hooks
-import { useFileSize } from "@/plane-web/hooks/use-file-size";
+import { useFileSize } from "@/hooks/use-file-size";
// local imports
import { useAttachmentOperations } from "./helper";
diff --git a/apps/web/core/components/issues/issue-detail/main-content.tsx b/apps/web/core/components/issues/issue-detail/main-content.tsx
index d14bd35396..34140963ae 100644
--- a/apps/web/core/components/issues/issue-detail/main-content.tsx
+++ b/apps/web/core/components/issues/issue-detail/main-content.tsx
@@ -24,7 +24,7 @@ import useSize from "@/hooks/use-window-size";
// plane web components
import { DeDupeIssuePopoverRoot } from "@/plane-web/components/de-dupe/duplicate-popover";
import { IssueTypeSwitcher } from "@/plane-web/components/issues/issue-details/issue-type-switcher";
-import { useDebouncedDuplicateIssues } from "@/plane-web/hooks/use-debounced-duplicate-issues";
+import { useDebouncedDuplicateIssues } from "@/hooks/use-debounced-duplicate-issues";
// services
import { WorkItemVersionService } from "@/services/issue";
// local imports
@@ -80,10 +80,12 @@ export const IssueMainContent = observer(function IssueMainContent(props: Props)
);
useEffect(() => {
+ let timer: ReturnType<typeof setTimeout>;
if (isSubmitting === "submitted") {
setShowAlert(false);
- setTimeout(async () => setIsSubmitting("saved"), 2000);
+ timer = setTimeout(() => setIsSubmitting("saved"), 2000);
} else if (isSubmitting === "submitting") setShowAlert(true);
+ return () => clearTimeout(timer);
}, [isSubmitting, setShowAlert, setIsSubmitting]);
if (!issue || !issue.project_id) return <></>;
diff --git a/apps/web/core/components/issues/issue-layouts/calendar/calendar.tsx b/apps/web/core/components/issues/issue-layouts/calendar/calendar.tsx
index 1d1ed88603..1edd03f746 100644
--- a/apps/web/core/components/issues/issue-layouts/calendar/calendar.tsx
+++ b/apps/web/core/components/issues/issue-layouts/calendar/calendar.tsx
@@ -24,7 +24,7 @@ import { EIssuesStoreType, EIssueLayoutTypes } from "@plane/types";
import { Spinner } from "@plane/ui";
import { renderFormattedPayloadDate, cn } from "@plane/utils";
// constants
-import { MONTHS_LIST } from "@/constants/calendar";
+import { MONTHS_LIST } from "@plane/constants";
// helpers
// hooks
import { useIssues } from "@/hooks/store/use-issues";
diff --git a/apps/web/core/components/issues/issue-layouts/calendar/day-tile.tsx b/apps/web/core/components/issues/issue-layouts/calendar/day-tile.tsx
index 78a5523006..eaf99f2080 100644
--- a/apps/web/core/components/issues/issue-layouts/calendar/day-tile.tsx
+++ b/apps/web/core/components/issues/issue-layouts/calendar/day-tile.tsx
@@ -17,7 +17,7 @@ import type { TGroupedIssues, TIssue, TIssueMap, TPaginationData, ICalendarDate
import { cn, renderFormattedPayloadDate } from "@plane/utils";
import { highlightIssueOnDrop } from "@/components/issues/issue-layouts/utils";
// helpers
-import { MONTHS_LIST } from "@/constants/calendar";
+import { MONTHS_LIST } from "@plane/constants";
// helpers
// types
import type { ICycleIssuesFilter } from "@/store/issue/cycle";
diff --git a/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/months-dropdown.tsx b/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/months-dropdown.tsx
index 9539c5dd5c..199a54881c 100644
--- a/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/months-dropdown.tsx
+++ b/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/months-dropdown.tsx
@@ -13,7 +13,7 @@ import { ChevronLeftIcon, ChevronRightIcon } from "@plane/propel/icons";
// icons
// constants
import { getDate } from "@plane/utils";
-import { MONTHS_LIST } from "@/constants/calendar";
+import { MONTHS_LIST } from "@plane/constants";
import { useCalendarView } from "@/hooks/store/use-calendar-view";
import type { ICycleIssuesFilter } from "@/store/issue/cycle";
import type { IModuleIssuesFilter } from "@/store/issue/module";
diff --git a/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/options-dropdown.tsx b/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/options-dropdown.tsx
index 2917da0697..89e15d136c 100644
--- a/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/options-dropdown.tsx
+++ b/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/options-dropdown.tsx
@@ -21,7 +21,7 @@ import type { TCalendarLayouts, TSupportedFilterForUpdate } from "@plane/types";
import { ToggleSwitch } from "@plane/ui";
// types
// constants
-import { CALENDAR_LAYOUTS } from "@/constants/calendar";
+import { CALENDAR_LAYOUTS } from "@plane/constants";
import { useCalendarView } from "@/hooks/store/use-calendar-view";
import useSize from "@/hooks/use-window-size";
import type { ICycleIssuesFilter } from "@/store/issue/cycle";
diff --git a/apps/web/core/components/issues/issue-layouts/calendar/week-header.tsx b/apps/web/core/components/issues/issue-layouts/calendar/week-header.tsx
index bc5a3a0e6b..bcc8b870e3 100644
--- a/apps/web/core/components/issues/issue-layouts/calendar/week-header.tsx
+++ b/apps/web/core/components/issues/issue-layouts/calendar/week-header.tsx
@@ -7,7 +7,7 @@
import { observer } from "mobx-react";
import { EStartOfTheWeek } from "@plane/types";
import { getOrderedDays } from "@plane/utils";
-import { DAYS_LIST } from "@/constants/calendar";
+import { DAYS_LIST } from "@plane/constants";
// helpers
// hooks
import { useUserProfile } from "@/hooks/store/user";
diff --git a/apps/web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx b/apps/web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx
index 3404b438ca..6eff5cdffb 100644
--- a/apps/web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx
+++ b/apps/web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx
@@ -24,9 +24,8 @@ import { useUserPermissions } from "@/hooks/store/user";
import { useIssueStoreType } from "@/hooks/use-issue-layout-store";
import { useIssuesActions } from "@/hooks/use-issues-actions";
import { useTimeLineChart } from "@/hooks/use-timeline-chart";
-// plane web hooks
-import { useBulkOperationStatus } from "@/plane-web/hooks/use-bulk-operation-status";
-
+import { useBulkOperationStatus } from "@/hooks/use-bulk-operation-status";
+// local imports
import { IssueLayoutHOC } from "../issue-layout-HOC";
import { GanttQuickAddIssueButton, QuickAddIssueRoot } from "../quick-add";
import { IssueGanttBlock } from "./blocks";
diff --git a/apps/web/core/components/issues/issue-layouts/list/default.tsx b/apps/web/core/components/issues/issue-layouts/list/default.tsx
index 28db68addc..1d255a72c8 100644
--- a/apps/web/core/components/issues/issue-layouts/list/default.tsx
+++ b/apps/web/core/components/issues/issue-layouts/list/default.tsx
@@ -29,7 +29,7 @@ import { useIssueStoreType } from "@/hooks/use-issue-layout-store";
// plane web components
import { IssueBulkOperationsRoot } from "@/plane-web/components/issues/bulk-operations";
// plane web hooks
-import { useBulkOperationStatus } from "@/plane-web/hooks/use-bulk-operation-status";
+import { useBulkOperationStatus } from "@/hooks/use-bulk-operation-status";
// utils
import type { GroupDropLocation } from "../utils";
import { getGroupByColumns, isWorkspaceLevel, isSubGrouped } from "../utils";
diff --git a/apps/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx b/apps/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx
index f3f143db4e..4111fa3c6b 100644
--- a/apps/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx
+++ b/apps/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx
@@ -15,10 +15,9 @@ import { EIssueLayoutTypes } from "@plane/types";
import { MultipleSelectGroup } from "@/components/core/multiple-select";
// hooks
import { useProject } from "@/hooks/store/use-project";
+import { useBulkOperationStatus } from "@/hooks/use-bulk-operation-status";
// plane web components
import { IssueBulkOperationsRoot } from "@/plane-web/components/issues/bulk-operations";
-// plane web hooks
-import { useBulkOperationStatus } from "@/plane-web/hooks/use-bulk-operation-status";
// local imports
import type { TRenderQuickActions } from "../list/list-view-types";
import { QuickAddIssueRoot, SpreadsheetAddIssueButton } from "../quick-add";
diff --git a/apps/web/core/components/issues/issue-modal/form.tsx b/apps/web/core/components/issues/issue-modal/form.tsx
index 33d7c59931..53aded4387 100644
--- a/apps/web/core/components/issues/issue-modal/form.tsx
+++ b/apps/web/core/components/issues/issue-modal/form.tsx
@@ -48,7 +48,7 @@ import { DeDupeButtonRoot } from "@/plane-web/components/de-dupe/de-dupe-button"
import { DuplicateModalRoot } from "@/plane-web/components/de-dupe/duplicate-modal";
import { IssueTypeSelect, WorkItemTemplateSelect } from "@/plane-web/components/issues/issue-modal";
import { WorkItemModalAdditionalProperties } from "@/plane-web/components/issues/issue-modal/modal-additional-properties";
-import { useDebouncedDuplicateIssues } from "@/plane-web/hooks/use-debounced-duplicate-issues";
+import { useDebouncedDuplicateIssues } from "@/hooks/use-debounced-duplicate-issues";
export interface IssueFormProps {
data?: Partial<TIssue>;
diff --git a/apps/web/core/components/issues/peek-overview/issue-detail.tsx b/apps/web/core/components/issues/peek-overview/issue-detail.tsx
index 6bd89124b6..96054b02fc 100644
--- a/apps/web/core/components/issues/peek-overview/issue-detail.tsx
+++ b/apps/web/core/components/issues/peek-overview/issue-detail.tsx
@@ -25,7 +25,7 @@ import useReloadConfirmations from "@/hooks/use-reload-confirmation";
import { DeDupeIssuePopoverRoot } from "@/plane-web/components/de-dupe/duplicate-popover";
import { IssueTypeSwitcher } from "@/plane-web/components/issues/issue-details/issue-type-switcher";
// plane web hooks
-import { useDebouncedDuplicateIssues } from "@/plane-web/hooks/use-debounced-duplicate-issues";
+import { useDebouncedDuplicateIssues } from "@/hooks/use-debounced-duplicate-issues";
// services
import { WorkItemVersionService } from "@/services/issue";
// local components
@@ -62,14 +62,14 @@ export const PeekOverviewIssueDetails = observer(function PeekOverviewIssueDetai
const { setShowAlert } = useReloadConfirmations(isSubmitting === "submitting");
useEffect(() => {
+ let timer: ReturnType<typeof setTimeout>;
if (isSubmitting === "submitted") {
setShowAlert(false);
- setTimeout(async () => {
- setIsSubmitting("saved");
- }, 2000);
+ timer = setTimeout(() => setIsSubmitting("saved"), 2000);
} else if (isSubmitting === "submitting") {
setShowAlert(true);
}
+ return () => clearTimeout(timer);
}, [isSubmitting, setShowAlert, setIsSubmitting]);
// derived values
diff --git a/apps/web/core/components/issues/peek-overview/root.tsx b/apps/web/core/components/issues/peek-overview/root.tsx
index 421aaebbdb..b607158d80 100644
--- a/apps/web/core/components/issues/peek-overview/root.tsx
+++ b/apps/web/core/components/issues/peek-overview/root.tsx
@@ -19,7 +19,7 @@ import { useIssueDetail } from "@/hooks/store/use-issue-detail";
import { useIssues } from "@/hooks/store/use-issues";
import { useUserPermissions } from "@/hooks/store/user";
import { useIssueStoreType } from "@/hooks/use-issue-layout-store";
-import { useWorkItemProperties } from "@/plane-web/hooks/use-issue-properties";
+import { useWorkItemProperties } from "@/hooks/use-issue-properties";
// local imports
import type { TIssueOperations } from "../issue-detail";
import { IssueView } from "./view";
diff --git a/apps/web/core/components/pages/dropdowns/actions.tsx b/apps/web/core/components/pages/dropdowns/actions.tsx
index aec992c403..e11d25f8c4 100644
--- a/apps/web/core/components/pages/dropdowns/actions.tsx
+++ b/apps/web/core/components/pages/dropdowns/actions.tsx
@@ -23,8 +23,8 @@ import { usePageOperations } from "@/hooks/use-page-operations";
// plane web components
import { MovePageModal } from "@/plane-web/components/pages";
// plane web hooks
-import type { EPageStoreType } from "@/plane-web/hooks/store";
-import { usePageFlag } from "@/plane-web/hooks/use-page-flag";
+import type { EPageStoreType } from "@/hooks/store";
+import { usePageFlag } from "@/hooks/use-page-flag";
// store types
import type { TPageInstance } from "@/store/pages/base-page";
diff --git a/apps/web/core/components/pages/editor/editor-body.tsx b/apps/web/core/components/pages/editor/editor-body.tsx
index 9270386dc0..561d048e44 100644
--- a/apps/web/core/components/pages/editor/editor-body.tsx
+++ b/apps/web/core/components/pages/editor/editor-body.tsx
@@ -36,9 +36,9 @@ import { useParseEditorContent } from "@/hooks/use-parse-editor-content";
import type { TCustomEventHandlers } from "@/hooks/use-realtime-page-events";
import { useRealtimePageEvents } from "@/hooks/use-realtime-page-events";
import { EditorAIMenu } from "@/plane-web/components/pages";
-import type { TExtendedEditorExtensionsConfig } from "@/plane-web/hooks/pages";
-import type { EPageStoreType } from "@/plane-web/hooks/store";
-import { useEditorFlagging } from "@/plane-web/hooks/use-editor-flagging";
+import type { TExtendedEditorExtensionsConfig } from "@/hooks/pages";
+import type { EPageStoreType } from "@/hooks/store";
+import { useEditorFlagging } from "@/hooks/use-editor-flagging";
// store
import type { TPageInstance } from "@/store/pages/base-page";
// local imports
diff --git a/apps/web/core/components/pages/editor/page-root.tsx b/apps/web/core/components/pages/editor/page-root.tsx
index 728b47fe9a..2ffb04148a 100644
--- a/apps/web/core/components/pages/editor/page-root.tsx
+++ b/apps/web/core/components/pages/editor/page-root.tsx
@@ -14,8 +14,8 @@ import { usePageFallback } from "@/hooks/use-page-fallback";
// plane web import
import type { PageUpdateHandler, TCustomEventHandlers } from "@/hooks/use-realtime-page-events";
import { PageModals } from "@/plane-web/components/pages";
-import { usePagesPaneExtensions, useExtendedEditorProps } from "@/plane-web/hooks/pages";
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import { usePagesPaneExtensions, useExtendedEditorProps } from "@/hooks/pages";
+import type { EPageStoreType } from "@/hooks/store";
// store
import type { TPageInstance } from "@/store/pages/base-page";
// local imports
@@ -91,9 +91,8 @@ export const PageRoot = observer(function PageRoot(props: TPageRootProps) {
);
useEffect(() => {
- setTimeout(() => {
- setEditorRef(editorRef.current);
- }, 0);
+ const timer = setTimeout(() => setEditorRef(editorRef.current), 0);
+ return () => clearTimeout(timer);
}, [isContentEditable, setEditorRef]);
// Get extensions and navigation logic from hook
diff --git a/apps/web/core/components/pages/editor/toolbar/options-dropdown.tsx b/apps/web/core/components/pages/editor/toolbar/options-dropdown.tsx
index a1c62bba10..44b4430421 100644
--- a/apps/web/core/components/pages/editor/toolbar/options-dropdown.tsx
+++ b/apps/web/core/components/pages/editor/toolbar/options-dropdown.tsx
@@ -16,7 +16,7 @@ import { usePageFilters } from "@/hooks/use-page-filters";
import { useQueryParams } from "@/hooks/use-query-params";
// plane web imports
import type { TPageNavigationPaneTab } from "@/plane-web/components/pages/navigation-pane";
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
// store
import type { TPageInstance } from "@/store/pages/base-page";
// local imports
diff --git a/apps/web/core/components/pages/editor/toolbar/toolbar.tsx b/apps/web/core/components/pages/editor/toolbar/toolbar.tsx
index d1c4109e13..b2fbb4277b 100644
--- a/apps/web/core/components/pages/editor/toolbar/toolbar.tsx
+++ b/apps/web/core/components/pages/editor/toolbar/toolbar.tsx
@@ -12,8 +12,8 @@ import { Tooltip } from "@plane/propel/tooltip";
import { CustomMenu } from "@plane/ui";
import { cn } from "@plane/utils";
// constants
-import type { ToolbarMenuItem } from "@/constants/editor";
-import { TOOLBAR_ITEMS, TYPOGRAPHY_ITEMS } from "@/constants/editor";
+import type { ToolbarMenuItem } from "@plane/editor";
+import { TOOLBAR_ITEMS, TYPOGRAPHY_ITEMS } from "@plane/editor";
// local imports
import { ColorDropdown } from "./color-dropdown";
diff --git a/apps/web/core/components/pages/header/actions.tsx b/apps/web/core/components/pages/header/actions.tsx
index 7ebad8adce..ab3809a37f 100644
--- a/apps/web/core/components/pages/header/actions.tsx
+++ b/apps/web/core/components/pages/header/actions.tsx
@@ -10,7 +10,7 @@ import { PageLockControl } from "@/plane-web/components/pages/header/lock-contro
import { PageMoveControl } from "@/plane-web/components/pages/header/move-control";
import { PageShareControl } from "@/plane-web/components/pages/header/share-control";
// plane web hooks
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
// store
import type { TPageInstance } from "@/store/pages/base-page";
// local imports
diff --git a/apps/web/core/components/pages/header/root.tsx b/apps/web/core/components/pages/header/root.tsx
index 1223b97dbb..e86053289f 100644
--- a/apps/web/core/components/pages/header/root.tsx
+++ b/apps/web/core/components/pages/header/root.tsx
@@ -16,9 +16,8 @@ import { calculateTotalFilters } from "@plane/utils";
import { FiltersDropdown } from "@/components/issues/issue-layouts/filters";
// hooks
import { useMember } from "@/hooks/store/use-member";
-// plane web hooks
-import type { EPageStoreType } from "@/plane-web/hooks/store";
-import { usePageStore } from "@/plane-web/hooks/store";
+import { usePageStore } from "@/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
// local imports
import { PageAppliedFiltersList } from "../list/applied-filters";
import { PageFiltersSelection } from "../list/filters";
diff --git a/apps/web/core/components/pages/list/block-item-action.tsx b/apps/web/core/components/pages/list/block-item-action.tsx
index b62b97ee9f..2d58545b37 100644
--- a/apps/web/core/components/pages/list/block-item-action.tsx
+++ b/apps/web/core/components/pages/list/block-item-action.tsx
@@ -15,7 +15,7 @@ import { renderFormattedDate, getFileURL } from "@plane/utils";
import { useMember } from "@/hooks/store/use-member";
import { usePageOperations } from "@/hooks/use-page-operations";
// plane web hooks
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
// store
import type { TPageInstance } from "@/store/pages/base-page";
// local imports
diff --git a/apps/web/core/components/pages/list/block.tsx b/apps/web/core/components/pages/list/block.tsx
index 5d658a42e2..8ceec0d6a1 100644
--- a/apps/web/core/components/pages/list/block.tsx
+++ b/apps/web/core/components/pages/list/block.tsx
@@ -16,8 +16,8 @@ import { BlockItemAction } from "@/components/pages/list/block-item-action";
// hooks
import { usePlatformOS } from "@/hooks/use-platform-os";
// plane web hooks
-import type { EPageStoreType } from "@/plane-web/hooks/store";
-import { usePage } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
+import { usePage } from "@/hooks/store";
type TPageListBlock = {
pageId: string;
diff --git a/apps/web/core/components/pages/list/root.tsx b/apps/web/core/components/pages/list/root.tsx
index 3764e5bc19..2c42221b01 100644
--- a/apps/web/core/components/pages/list/root.tsx
+++ b/apps/web/core/components/pages/list/root.tsx
@@ -10,8 +10,8 @@ import type { TPageNavigationTabs } from "@plane/types";
// components
import { ListLayout } from "@/components/core/list";
// plane web hooks
-import type { EPageStoreType } from "@/plane-web/hooks/store";
-import { usePageStore } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
+import { usePageStore } from "@/hooks/store";
// local imports
import { PageListBlock } from "./block";
diff --git a/apps/web/core/components/pages/modals/create-page-modal.tsx b/apps/web/core/components/pages/modals/create-page-modal.tsx
index 493cb84e3e..027ea7d65f 100644
--- a/apps/web/core/components/pages/modals/create-page-modal.tsx
+++ b/apps/web/core/components/pages/modals/create-page-modal.tsx
@@ -13,8 +13,8 @@ import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";
// hooks
import { useAppRouter } from "@/hooks/use-app-router";
// plane web hooks
-import type { EPageStoreType } from "@/plane-web/hooks/store";
-import { usePageStore } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
+import { usePageStore } from "@/hooks/store";
// local imports
import { PageForm } from "./page-form";
diff --git a/apps/web/core/components/pages/modals/delete-page-modal.tsx b/apps/web/core/components/pages/modals/delete-page-modal.tsx
index 937409be65..d498bbb0bb 100644
--- a/apps/web/core/components/pages/modals/delete-page-modal.tsx
+++ b/apps/web/core/components/pages/modals/delete-page-modal.tsx
@@ -14,8 +14,8 @@ import { getPageName } from "@plane/utils";
// constants
// plane web hooks
import { useAppRouter } from "@/hooks/use-app-router";
-import type { EPageStoreType } from "@/plane-web/hooks/store";
-import { usePageStore } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
+import { usePageStore } from "@/hooks/store";
// store
import type { TPageInstance } from "@/store/pages/base-page";
diff --git a/apps/web/core/components/pages/navigation-pane/root.tsx b/apps/web/core/components/pages/navigation-pane/root.tsx
index 079cf8b5f6..1aa3d2d605 100644
--- a/apps/web/core/components/pages/navigation-pane/root.tsx
+++ b/apps/web/core/components/pages/navigation-pane/root.tsx
@@ -17,7 +17,7 @@ import { useQueryParams } from "@/hooks/use-query-params";
// plane web components
import type { TPageNavigationPaneTab } from "@/plane-web/components/pages/navigation-pane";
// store
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
import type { TPageInstance } from "@/store/pages/base-page";
// local imports
import type { TPageRootHandlers } from "../editor/page-root";
diff --git a/apps/web/core/components/pages/navigation-pane/types/extensions.ts b/apps/web/core/components/pages/navigation-pane/types/extensions.ts
index e24a049577..89cd3b1833 100644
--- a/apps/web/core/components/pages/navigation-pane/types/extensions.ts
+++ b/apps/web/core/components/pages/navigation-pane/types/extensions.ts
@@ -5,7 +5,7 @@
*/
import type { ReactNode } from "react";
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
import type { TPageInstance } from "@/store/pages/base-page";
export interface INavigationPaneExtensionProps<T = Record<string, unknown>> {
diff --git a/apps/web/core/components/pages/pages-list-main-content.tsx b/apps/web/core/components/pages/pages-list-main-content.tsx
index adfce6b910..d835df658a 100644
--- a/apps/web/core/components/pages/pages-list-main-content.tsx
+++ b/apps/web/core/components/pages/pages-list-main-content.tsx
@@ -19,7 +19,7 @@ import { PageLoader } from "@/components/pages/loaders/page-loader";
import { useProject } from "@/hooks/store/use-project";
import { useUserPermissions } from "@/hooks/store/user";
// plane web hooks
-import { EPageStoreType, usePageStore } from "@/plane-web/hooks/store";
+import { EPageStoreType, usePageStore } from "@/hooks/store";
type Props = {
children: React.ReactNode;
diff --git a/apps/web/core/components/pages/pages-list-view.tsx b/apps/web/core/components/pages/pages-list-view.tsx
index 1468430a53..0a90546617 100644
--- a/apps/web/core/components/pages/pages-list-view.tsx
+++ b/apps/web/core/components/pages/pages-list-view.tsx
@@ -7,9 +7,9 @@
import { observer } from "mobx-react";
import useSWR from "swr";
import type { TPageNavigationTabs } from "@plane/types";
-// plane web hooks
-import type { EPageStoreType } from "@/plane-web/hooks/store";
-import { usePageStore } from "@/plane-web/hooks/store";
+// hooks
+import type { EPageStoreType } from "@/hooks/store";
+import { usePageStore } from "@/hooks/store";
// local imports
import { PagesListHeaderRoot } from "./header";
import { PagesListMainContent } from "./pages-list-main-content";
diff --git a/apps/web/core/components/pages/version/editor.tsx b/apps/web/core/components/pages/version/editor.tsx
index 4543af5b02..e9b36ebdd4 100644
--- a/apps/web/core/components/pages/version/editor.tsx
+++ b/apps/web/core/components/pages/version/editor.tsx
@@ -17,7 +17,7 @@ import { DocumentEditor } from "@/components/editor/document/editor";
import { useWorkspace } from "@/hooks/store/use-workspace";
import { usePageFilters } from "@/hooks/use-page-filters";
// plane web hooks
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
export type TVersionEditorProps = {
activeVersion: string | null;
diff --git a/apps/web/core/components/pages/version/main-content.tsx b/apps/web/core/components/pages/version/main-content.tsx
index 9c3a502a1b..5cd3b76794 100644
--- a/apps/web/core/components/pages/version/main-content.tsx
+++ b/apps/web/core/components/pages/version/main-content.tsx
@@ -14,7 +14,7 @@ import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import type { TPageVersion } from "@plane/types";
import { renderFormattedDate, renderFormattedTime } from "@plane/utils";
// helpers
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
// local imports
import type { TVersionEditorProps } from "./editor";
diff --git a/apps/web/core/components/pages/version/root.tsx b/apps/web/core/components/pages/version/root.tsx
index 81e1b61c66..775a583cd8 100644
--- a/apps/web/core/components/pages/version/root.tsx
+++ b/apps/web/core/components/pages/version/root.tsx
@@ -13,7 +13,7 @@ import { cn } from "@plane/utils";
// hooks
import { useQueryParams } from "@/hooks/use-query-params";
// plane web imports
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
// local imports
import { PAGE_NAVIGATION_PANE_VERSION_QUERY_PARAM, PAGE_NAVIGATION_PANE_WIDTH } from "../navigation-pane";
import type { TVersionEditorProps } from "./editor";
diff --git a/apps/web/core/components/power-k/hooks/use-context-indicator.ts b/apps/web/core/components/power-k/hooks/use-context-indicator.ts
index 047d2fb4a0..d8ae42a83b 100644
--- a/apps/web/core/components/power-k/hooks/use-context-indicator.ts
+++ b/apps/web/core/components/power-k/hooks/use-context-indicator.ts
@@ -12,7 +12,7 @@ import { useCycle } from "@/hooks/store/use-cycle";
import { useModule } from "@/hooks/store/use-module";
// plane web imports
import { useExtendedContextIndicator } from "@/plane-web/components/command-palette/power-k/hooks/use-extended-context-indicator";
-import { EPageStoreType, usePageStore } from "@/plane-web/hooks/store";
+import { EPageStoreType, usePageStore } from "@/hooks/store";
// local imports
import type { TPowerKContextType } from "../core/types";
diff --git a/apps/web/core/components/power-k/ui/pages/context-based/page/commands.ts b/apps/web/core/components/power-k/ui/pages/context-based/page/commands.ts
index 162ab5406a..7bbea53782 100644
--- a/apps/web/core/components/power-k/ui/pages/context-based/page/commands.ts
+++ b/apps/web/core/components/power-k/ui/pages/context-based/page/commands.ts
@@ -16,7 +16,7 @@ import { copyTextToClipboard } from "@plane/utils";
// components
import type { TPowerKCommandConfig } from "@/components/power-k/core/types";
// plane web imports
-import { EPageStoreType, usePageStore } from "@/plane-web/hooks/store";
+import { EPageStoreType, usePageStore } from "@/hooks/store";
export const usePowerKPageContextBasedActions = (): TPowerKCommandConfig[] => {
// navigation
diff --git a/apps/web/core/components/profile/activity/workspace-activity-list.tsx b/apps/web/core/components/profile/activity/workspace-activity-list.tsx
index c1e0a32d9c..fb90b35f3d 100644
--- a/apps/web/core/components/profile/activity/workspace-activity-list.tsx
+++ b/apps/web/core/components/profile/activity/workspace-activity-list.tsx
@@ -8,7 +8,7 @@ import { useEffect } from "react";
import { useParams } from "next/navigation";
import useSWR from "swr";
// services
-import { USER_PROFILE_ACTIVITY } from "@/constants/fetch-keys";
+import { USER_PROFILE_ACTIVITY } from "@plane/constants";
import { UserService } from "@/services/user.service";
// components
import { ActivityList } from "./activity-list";
diff --git a/apps/web/core/components/profile/overview/activity.tsx b/apps/web/core/components/profile/overview/activity.tsx
index 23bb961f77..0b089ba5ca 100644
--- a/apps/web/core/components/profile/overview/activity.tsx
+++ b/apps/web/core/components/profile/overview/activity.tsx
@@ -16,7 +16,7 @@ import { calculateTimeAgo, getFileURL } from "@plane/utils";
// components
import { ActivityMessage, IssueLink } from "@/components/core/activity";
// constants
-import { USER_PROFILE_ACTIVITY } from "@/constants/fetch-keys";
+import { USER_PROFILE_ACTIVITY } from "@plane/constants";
// helpers
// hooks
import { useUser } from "@/hooks/store/user";
diff --git a/apps/web/core/components/project/integration-card.tsx b/apps/web/core/components/project/integration-card.tsx
index 79322e3fae..e4cd4e0534 100644
--- a/apps/web/core/components/project/integration-card.tsx
+++ b/apps/web/core/components/project/integration-card.tsx
@@ -15,7 +15,7 @@ import SlackLogo from "@/app/assets/services/slack.png?url";
import { SelectChannel } from "@/components/integration/slack/select-channel";
import { SelectRepository } from "@/components/integration/github/select-repository";
// constants
-import { PROJECT_GITHUB_REPOSITORY } from "@/constants/fetch-keys";
+import { PROJECT_GITHUB_REPOSITORY } from "@plane/constants";
// services
import { ProjectService } from "@/services/project";
diff --git a/apps/web/core/components/project/project-settings-member-defaults.tsx b/apps/web/core/components/project/project-settings-member-defaults.tsx
index e505b7beb0..23184e9f41 100644
--- a/apps/web/core/components/project/project-settings-member-defaults.tsx
+++ b/apps/web/core/components/project/project-settings-member-defaults.tsx
@@ -16,7 +16,7 @@ import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import type { IProject, IUserLite, IWorkspace } from "@plane/types";
import { Loader, ToggleSwitch } from "@plane/ui";
// constants
-import { PROJECT_DETAILS } from "@/constants/fetch-keys";
+import { PROJECT_DETAILS } from "@plane/constants";
// hooks
import { useProject } from "@/hooks/store/use-project";
import { useUserPermissions } from "@/hooks/store/user";
diff --git a/apps/web/core/components/settings/profile/content/pages/api-tokens.tsx b/apps/web/core/components/settings/profile/content/pages/api-tokens.tsx
index 39bd19bc90..0d7217373a 100644
--- a/apps/web/core/components/settings/profile/content/pages/api-tokens.tsx
+++ b/apps/web/core/components/settings/profile/content/pages/api-tokens.tsx
@@ -18,7 +18,7 @@ import { ApiTokenListItem } from "@/components/api-token/token-list-item";
import { ProfileSettingsHeading } from "@/components/settings/profile/heading";
import { APITokenSettingsLoader } from "@/components/ui/loader/settings/api-token";
// constants
-import { API_TOKENS_LIST } from "@/constants/fetch-keys";
+import { API_TOKENS_LIST } from "@plane/constants";
const apiTokenService = new APITokenService();
diff --git a/apps/web/core/components/work-item-filters/filters-hoc/base.tsx b/apps/web/core/components/work-item-filters/filters-hoc/base.tsx
index 58df7f06e6..4d36116367 100644
--- a/apps/web/core/components/work-item-filters/filters-hoc/base.tsx
+++ b/apps/web/core/components/work-item-filters/filters-hoc/base.tsx
@@ -14,8 +14,8 @@ import type { IIssueFilters, TWorkItemFilterExpression } from "@plane/types";
// store hooks
import { useWorkItemFilters } from "@/hooks/store/work-item-filters/use-work-item-filters";
// plane web imports
-import type { TWorkItemFiltersEntityProps } from "@/plane-web/hooks/work-item-filters/use-work-item-filters-config";
-import { useWorkItemFiltersConfig } from "@/plane-web/hooks/work-item-filters/use-work-item-filters-config";
+import type { TWorkItemFiltersEntityProps } from "@/hooks/work-item-filters/use-work-item-filters-config";
+import { useWorkItemFiltersConfig } from "@/hooks/work-item-filters/use-work-item-filters-config";
// local imports
import type { TSharedWorkItemFiltersHOCProps, TSharedWorkItemFiltersProps } from "./shared";
diff --git a/apps/web/core/components/workspace-notifications/root.tsx b/apps/web/core/components/workspace-notifications/root.tsx
index 8dd077c4dc..6a9012021c 100644
--- a/apps/web/core/components/workspace-notifications/root.tsx
+++ b/apps/web/core/components/workspace-notifications/root.tsx
@@ -18,8 +18,7 @@ import { useWorkspaceNotifications } from "@/hooks/store/notifications";
import { useWorkspace } from "@/hooks/store/use-workspace";
import { useUserPermissions } from "@/hooks/store/user";
import { useWorkspaceIssueProperties } from "@/hooks/use-workspace-issue-properties";
-// plane web imports
-import { useNotificationPreview } from "@/plane-web/hooks/use-notification-preview";
+import { useNotificationPreview } from "@/hooks/use-notification-preview";
// local imports
import { InboxContentRoot } from "../inbox/content";
diff --git a/apps/web/core/components/workspace/billing/comparison/base.tsx b/apps/web/core/components/workspace/billing/comparison/base.tsx
index 9d830d9a73..b09965a028 100644
--- a/apps/web/core/components/workspace/billing/comparison/base.tsx
+++ b/apps/web/core/components/workspace/billing/comparison/base.tsx
@@ -10,8 +10,8 @@ import { ArrowDown, ArrowUp } from "lucide-react";
import { Button } from "@plane/propel/button";
import { cn } from "@plane/utils";
// constants
-import type { TPlanePlans } from "@/constants/plans";
-import { ComingSoonBadge, PLANE_PLANS, PLANS_LIST } from "@/constants/plans";
+import type { TPlanePlans } from "@/components/workspace/billing/comparison/plans";
+import { ComingSoonBadge, PLANE_PLANS, PLANS_LIST } from "@/components/workspace/billing/comparison/plans";
// local imports
import { PlanFeatureDetail } from "./feature-detail";
diff --git a/apps/web/core/components/workspace/billing/comparison/feature-detail.tsx b/apps/web/core/components/workspace/billing/comparison/feature-detail.tsx
index b3335f3454..b8bcadc07f 100644
--- a/apps/web/core/components/workspace/billing/comparison/feature-detail.tsx
+++ b/apps/web/core/components/workspace/billing/comparison/feature-detail.tsx
@@ -8,7 +8,7 @@ import { CheckCircle2, Minus, MinusCircle } from "lucide-react";
import type { EProductSubscriptionEnum } from "@plane/types";
// plane imports
// constants
-import type { TPlanFeatureData } from "@/constants/plans";
+import type { TPlanFeatureData } from "@/components/workspace/billing/comparison/plans";
type TPlanFeatureDetailProps = {
subscriptionType: EProductSubscriptionEnum;
diff --git a/apps/web/core/components/workspace/billing/comparison/index.ts b/apps/web/core/components/workspace/billing/comparison/index.ts
index d109057541..df6fd75743 100644
--- a/apps/web/core/components/workspace/billing/comparison/index.ts
+++ b/apps/web/core/components/workspace/billing/comparison/index.ts
@@ -5,3 +5,4 @@
*/
export * from "./base";
+export * from "./plans";
diff --git a/apps/web/core/constants/plans.tsx b/apps/web/core/components/workspace/billing/comparison/plans.tsx
similarity index 100%
rename from apps/web/core/constants/plans.tsx
rename to apps/web/core/components/workspace/billing/comparison/plans.tsx
diff --git a/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-icon.tsx b/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-icon.tsx
new file mode 100644
index 0000000000..64c3a4ae6c
--- /dev/null
+++ b/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-icon.tsx
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) 2023-present Plane Software, Inc. and contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ * See the LICENSE file for details.
+ */
+
+import type { LucideIcon } from "lucide-react";
+// plane imports
+import type { TLogoProps } from "@plane/types";
+import { CycleIcon, FavoriteFolderIcon, ModuleIcon, PageIcon, ProjectIcon, ViewsIcon } from "@plane/propel/icons";
+import type { ISvgIcons } from "@plane/propel/icons";
+import { Logo } from "@plane/propel/emoji-icon-picker";
+
+const ICON_MAP: Record<string, React.FC<ISvgIcons> | LucideIcon> = {
+ page: PageIcon,
+ project: ProjectIcon,
+ view: ViewsIcon,
+ module: ModuleIcon,
+ cycle: CycleIcon,
+ folder: FavoriteFolderIcon,
+};
+
+type Props = {
+ type: string;
+ logo?: TLogoProps;
+};
+
+export const FavoriteItemIcon = ({ type, logo }: Props) => {
+ const Icon = ICON_MAP[type] ?? PageIcon;
+
+ return (
+ <>
+ <div className="hidden size-5 items-center justify-center group-hover:flex">
+ <Icon className="m-auto size-4 flex-shrink-0 stroke-[1.5]" />
+ </div>
+ <div className="flex size-5 items-center justify-center group-hover:hidden">
+ {logo?.in_use ? (
+ <Logo logo={logo} size={16} type={type === "project" ? "material" : "lucide"} />
+ ) : (
+ <Icon className="m-auto size-4 flex-shrink-0 stroke-[1.5]" />
+ )}
+ </div>
+ </>
+ );
+};
diff --git a/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/helper.tsx b/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/helper.tsx
index f7de5b9214..ae4bb44cfa 100644
--- a/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/helper.tsx
+++ b/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/helper.tsx
@@ -4,32 +4,8 @@
* See the LICENSE file for details.
*/
-import { Logo } from "@plane/propel/emoji-icon-picker";
-import { PageIcon } from "@plane/propel/icons";
-// plane imports
-import type { IFavorite, TLogoProps } from "@plane/types";
-// components
-// plane web constants
-import { FAVORITE_ITEM_ICONS, FAVORITE_ITEM_LINKS } from "@/constants/sidebar-favorites";
-
-export const getFavoriteItemIcon = (type: string, logo?: TLogoProps) => {
- const Icon = FAVORITE_ITEM_ICONS[type] || PageIcon;
-
- return (
- <>
- <div className="hidden size-5 items-center justify-center group-hover:flex">
- <Icon className="m-auto size-4 flex-shrink-0 stroke-[1.5]" />
- </div>
- <div className="flex size-5 items-center justify-center group-hover:hidden">
- {logo?.in_use ? (
- <Logo logo={logo} size={16} type={type === "project" ? "material" : "lucide"} />
- ) : (
- <Icon className="m-auto size-4 flex-shrink-0 stroke-[1.5]" />
- )}
- </div>
- </>
- );
-};
+import { FAVORITE_ITEM_LINKS } from "@plane/constants";
+import type { IFavorite } from "@plane/types";
export const generateFavoriteItemLink = (workspaceSlug: string, favorite: IFavorite) => {
const entityLinkDetails = FAVORITE_ITEM_LINKS[favorite.entity_type];
diff --git a/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/index.ts b/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/index.ts
index c044bec246..4e13083a93 100644
--- a/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/index.ts
+++ b/apps/web/core/components/workspace/sidebar/favorites/favorite-items/common/index.ts
@@ -5,6 +5,7 @@
*/
export * from "./favorite-item-drag-handle";
+export * from "./favorite-item-icon";
export * from "./favorite-item-quick-action";
export * from "./favorite-item-wrapper";
export * from "./favorite-item-title";
diff --git a/apps/web/core/constants/ai.ts b/apps/web/core/constants/ai.ts
deleted file mode 100644
index 7c670e311d..0000000000
--- a/apps/web/core/constants/ai.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-export enum AI_EDITOR_TASKS {
- ASK_ANYTHING = "ASK_ANYTHING",
-}
-
-export const LOADING_TEXTS: {
- [key in AI_EDITOR_TASKS]: string;
-} = {
- [AI_EDITOR_TASKS.ASK_ANYTHING]: "Pi is generating response",
-};
diff --git a/apps/web/core/constants/editor.ts b/apps/web/core/constants/editor.ts
deleted file mode 100644
index 5cd8b929cd..0000000000
--- a/apps/web/core/constants/editor.ts
+++ /dev/null
@@ -1,403 +0,0 @@
-/**
- * Copyright (c) 2023-present Plane Software, Inc. and contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- * See the LICENSE file for details.
- */
-
-import type { Styles } from "@react-pdf/renderer";
-import { StyleSheet } from "@react-pdf/renderer";
-import type { LucideIcon } from "lucide-react";
-import {
- AlignCenter,
- AlignLeft,
- AlignRight,
- Bold,
- CaseSensitive,
- Code2,
- Heading1,
- Heading2,
- Heading3,
- Heading4,
- Heading5,
- Heading6,
- Image,
- Italic,
- List,
- ListOrdered,
- ListTodo,
- Strikethrough,
- Table,
- TextQuote,
- Underline,
-} from "lucide-react";
-// plane imports
-import type { TCommandExtraProps, TEditorCommands, TEditorFontStyle } from "@plane/editor";
-import { MonospaceIcon, SansSerifIcon, SerifIcon } from "@plane/propel/icons";
-import { convertRemToPixel } from "@plane/utils";
-
-type TEditorTypes = "lite" | "document" | "sticky";
-
-// Utility type to enforce the necessary extra props or make extraProps optional
-type ExtraPropsForCommand<T extends TEditorCommands> = T extends keyof TCommandExtraProps
- ? TCommandExtraProps[T]
- : object; // Default to empty object for commands without extra props
-
-export type ToolbarMenuItem<T extends TEditorCommands = TEditorCommands> = {
- itemKey: T;
- renderKey: string;
- name: string;
- icon: LucideIcon;
- shortcut?: string[];
- editors: TEditorTypes[];
- extraProps?: ExtraPropsForCommand<T>;
-};
-
-export const TYPOGRAPHY_ITEMS: ToolbarMenuItem<"text" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6">[] = [
- { itemKey: "text", renderKey: "text", name: "Text", icon: CaseSensitive, editors: ["document"] },
- { itemKey: "h1", renderKey: "h1", name: "Heading 1", icon: Heading1, editors: ["document"] },
- { itemKey: "h2", renderKey: "h2", name: "Heading 2", icon: Heading2, editors: ["document"] },
- { itemKey: "h3", renderKey: "h3", name: "Heading 3", icon: Heading3, editors: ["document"] },
- { itemKey: "h4", renderKey: "h4", name: "Heading 4", icon: Heading4, editors: ["document"] },
- { itemKey: "h5", renderKey: "h5", name: "Heading 5", icon: Heading5, editors: ["document"] },
- { itemKey: "h6", renderKey: "h6", name: "Heading 6", icon: Heading6, editors: ["document"] },
-];
-
-export const TEXT_ALIGNMENT_ITEMS: ToolbarMenuItem<"text-align">[] = [
- {
- itemKey: "text-align",
- renderKey: "text-align-left",
- name: "Left align",
- icon: AlignLeft,
- shortcut: ["Cmd", "Shift", "L"],
- editors: ["lite", "document"],
- extraProps: {
- alignment: "left",
- },
- },
- {
- itemKey: "text-align",
- renderKey: "text-align-center",
- name: "Center align",
- icon: AlignCenter,
- shortcut: ["Cmd", "Shift", "E"],
- editors: ["lite", "document"],
- extraProps: {
- alignment: "center",
- },
- },
- {
- itemKey: "text-align",
- renderKey: "text-align-right",
- name: "Right align",
- icon: AlignRight,
- shortcut: ["Cmd", "Shift", "R"],
- editors: ["lite", "document"],
- extraProps: {
- alignment: "right",
- },
- },
-];
-
-const BASIC_MARK_ITEMS: ToolbarMenuItem<"bold" | "italic" | "underline" | "strikethrough">[] = [
- {
- itemKey: "bold",
- renderKey: "bold",
- name: "Bold",
- icon: Bold,
- shortcut: ["Cmd", "B"],
- editors: ["lite", "document"],
- },
- {
- itemKey: "italic",
- renderKey: "italic",
- name: "Italic",
- icon: Italic,
- shortcut: ["Cmd", "I"],
- editors: ["lite", "document"],
- },
- {
- itemKey: "underline",
- renderKey: "underline",
- name: "Underline",
- icon: Underline,
- shortcut: ["Cmd", "U"],
- editors: ["lite", "document"],
- },
- {
- itemKey: "strikethrough",
- renderKey: "strikethrough",
- name: "Strikethrough",
- icon: Strikethrough,
- shortcut: ["Cmd", "Shift", "S"],
- editors: ["lite", "document"],
- },
-];
-
-const LIST_ITEMS: ToolbarMenuItem<"bulleted-list" | "numbered-list" | "to-do-list">[] = [
- {
- itemKey: "numbered-list",
- renderKey: "numbered-list",
- name: "Numbered list",
- icon: ListOrdered,
- shortcut: ["Cmd", "Shift", "7"],
- editors: ["lite", "document"],
- },
- {
- itemKey: "bulleted-list",
- renderKey: "bulleted-list",
- name: "Bulleted list",
- icon: List,
- shortcut: ["Cmd", "Shift", "8"],
- editors: ["lite", "document"],
- },
- {
- itemKey: "to-do-list",
- renderKey: "to-do-list",
- name: "To-do list",
- icon: ListTodo,
- shortcut: ["Cmd", "Shift", "9"],
- editors: ["lite", "document"],
- },
-];
-
-const USER_ACTION_ITEMS: ToolbarMenuItem<"quote" | "code">[] = [
- { itemKey: "quote", renderKey: "quote", name: "Quote", icon: TextQuote, editors: ["lite", "document"] },
- { itemKey: "code", renderKey: "code", name: "Code", icon: Code2, editors: ["lite", "document"] },
-];
-
-export const IMAGE_ITEM = {
- itemKey: "image",
- renderKey: "image",
- name: "Image",
- icon: Image,
- editors: ["lite", "document"],
- extraProps: {},
-} as ToolbarMenuItem<"image">;
-
-const COMPLEX_ITEMS: ToolbarMenuItem<"table" | "image">[] = [
- { itemKey: "table", renderKey: "table", name: "Table", icon: Table, editors: ["document"] },
- IMAGE_ITEM,
-];
-
-export const TOOLBAR_ITEMS: {
- [editorType in TEditorTypes]: {
- [key: string]: ToolbarMenuItem<TEditorCommands>[];
- };
-} = {
- lite: {
- basic: BASIC_MARK_ITEMS.filter((item) => item.editors.includes("lite")),
- alignment: TEXT_ALIGNMENT_ITEMS.filter((item) => item.editors.includes("lite")),
- list: LIST_ITEMS.filter((item) => item.editors.includes("lite")),
- userAction: USER_ACTION_ITEMS.filter((item) => item.editors.includes("lite")),
- complex: COMPLEX_ITEMS.filter((item) => item.editors.includes("lite")),
- },
- document: {
- basic: BASIC_MARK_ITEMS.filter((item) => item.editors.includes("document")),
- alignment: TEXT_ALIGNMENT_ITEMS.filter((item) => item.editors.includes("document")),
- list: LIST_ITEMS.filter((item) => item.editors.includes("document")),
- userAction: USER_ACTION_ITEMS.filter((item) => item.editors.includes("document")),
- complex: COMPLEX_ITEMS.filter((item) => item.editors.includes("document")),
- },
- sticky: {
- basic: BASIC_MARK_ITEMS.filter((item) => ["Bold", "Italic"].includes(item.name)),
- list: LIST_ITEMS.filter((item) => ["To-do list"].includes(item.name)),
- },
-};
-
-export const EDITOR_FONT_STYLES: {
- key: TEditorFontStyle;
- label: string;
- icon: any;
-}[] = [
- {
- key: "sans-serif",
- label: "Sans serif",
- icon: SansSerifIcon,
- },
- {
- key: "serif",
- label: "Serif",
- icon: SerifIcon,
- },
- {
- key: "monospace",
- label: "Mono",
- icon: MonospaceIcon,
- },
-];
-
-const EDITOR_PDF_FONT_FAMILY_STYLES: Styles = {
- "*:not(.courier, .courier-bold)": {
- fontFamily: "Inter",
- },
- ".courier": {
- fontFamily: "Courier",
- },
- ".courier-bold": {
- fontFamily: "Courier-Bold",
- },
-};
-
-const EDITOR_PDF_TYPOGRAPHY_STYLES: Styles = {
- // page title
- "h1.page-title": {
- fontSize: convertRemToPixel(1.6),
- fontWeight: "bold",
- marginTop: 0,
- marginBottom: convertRemToPixel(2),
- },
- // headings
- "h1:not(.page-title)": {
- fontSize: convertRemToPixel(1.4),
- fontWeight: "semibold",
- marginTop: convertRemToPixel(2),
- marginBottom: convertRemToPixel(0.25),
- },
- h2: {
- fontSize: convertRemToPixel(1.2),
- fontWeight: "semibold",
- marginTop: convertRemToPixel(1.4),
- marginBottom: convertRemToPixel(0.0625),
- },
- h3: {
- fontSize: convertRemToPixel(1.1),
- fontWeight: "semibold",
- marginTop: convertRemToPixel(1),
- marginBottom: convertRemToPixel(0.0625),
- },
- h4: {
- fontSize: convertRemToPixel(1),
- fontWeight: "semibold",
- marginTop: convertRemToPixel(1),
- marginBottom: convertRemToPixel(0.0625),
- },
- h5: {
- fontSize: convertRemToPixel(0.9),
- fontWeight: "semibold",
- marginTop: convertRemToPixel(1),
- marginBottom: convertRemToPixel(0.0625),
- },
- h6: {
- fontSize: convertRemToPixel(0.8),
- fontWeight: "semibold",
- marginTop: convertRemToPixel(1),
- marginBottom: convertRemToPixel(0.0625),
- },
- // paragraph
- "p:not(table p)": {
- fontSize: convertRemToPixel(0.8),
- },
- "p:not(ol p, ul p)": {
- marginTop: convertRemToPixel(0.25),
- marginBottom: convertRemToPixel(0.0625),
- },
-};
-
-const EDITOR_PDF_LIST_STYLES: Styles = {
- "ul, ol": {
- fontSize: convertRemToPixel(0.8),
- marginHorizontal: -20,
- },
- "ol p, ul p": {
- marginVertical: 0,
- },
- "ol li, ul li": {
- marginTop: convertRemToPixel(0.45),
- },
- "ul ul, ul ol, ol ol, ol ul": {
- marginVertical: 0,
- },
- "ul[data-type='taskList']": {
- position: "relative",
- },
- "div.input-checkbox": {
- position: "absolute",
- top: convertRemToPixel(0.15),
- left: -convertRemToPixel(1.2),
- height: convertRemToPixel(0.75),
- width: convertRemToPixel(0.75),
- borderWidth: "1.5px",
- borderStyle: "solid",
- borderRadius: convertRemToPixel(0.125),
- },
- "div.input-checkbox:not(.checked)": {
- backgroundColor: "#ffffff",
- borderColor: "#171717",
- },
- "div.input-checkbox.checked": {
- backgroundColor: "#3f76ff",
- borderColor: "#3f76ff",
- },
- "ul li[data-checked='true'] p": {
- color: "#a3a3a3",
- },
-};
-
-const EDITOR_PDF_CODE_STYLES: Styles = {
- // code block
- "[data-node-type='code-block']": {
- marginVertical: convertRemToPixel(0.5),
- padding: convertRemToPixel(1),
- borderRadius: convertRemToPixel(0.5),
- backgroundColor: "#f7f7f7",
- fontSize: convertRemToPixel(0.7),
- },
- // inline code block
- "[data-node-type='inline-code-block']": {
- margin: 0,
- paddingVertical: convertRemToPixel(0.25 / 4 + 0.25 / 8),
- paddingHorizontal: convertRemToPixel(0.375),
- border: "0.5px solid #e5e5e5",
- borderRadius: convertRemToPixel(0.25),
- backgroundColor: "#e8e8e8",
- color: "#f97316",
- fontSize: convertRemToPixel(0.7),
- },
-};
-
-export const EDITOR_PDF_DOCUMENT_STYLESHEET = StyleSheet.create({
- ...EDITOR_PDF_FONT_FAMILY_STYLES,
- ...EDITOR_PDF_TYPOGRAPHY_STYLES,
- ...EDITOR_PDF_LIST_STYLES,
- ...EDITOR_PDF_CODE_STYLES,
- // quote block
- blockquote: {
- borderLeft: "3px solid gray",
- paddingLeft: convertRemToPixel(1),
- marginTop: convertRemToPixel(0.625),
- marginBottom: 0,
- marginHorizontal: 0,
- },
- // image
- img: {
- marginVertical: 0,
- borderRadius: convertRemToPixel(0.375),
- },
- // divider
- "div[data-type='horizontalRule']": {
- marginVertical: convertRemToPixel(1),
- height: 1,
- width: "100%",
- backgroundColor: "gray",
- },
- // mention block
- "[data-node-type='mention-block']": {
- margin: 0,
- color: "#3f76ff",
- backgroundColor: "#3f76ff33",
- paddingHorizontal: convertRemToPixel(0.375),
- },
- // table
- table: {
- marginTop: convertRemToPixel(0.5),
- marginBottom: convertRemToPixel(1),
- marginHorizontal: 0,
- },
- "table td": {
- padding: convertRemToPixel(0.625),
- border: "1px solid #e5e5e5",
- },
- "table p": {
- fontSize: convertRemToPixel(0.7),
- },
-});
diff --git a/apps/web/core/hooks/editor/use-editor-config.ts b/apps/web/core/hooks/editor/use-editor-config.ts
index 98eb92c753..ecc98769f1 100644
--- a/apps/web/core/hooks/editor/use-editor-config.ts
+++ b/apps/web/core/hooks/editor/use-editor-config.ts
@@ -11,8 +11,8 @@ import { getEditorAssetDownloadSrc, getEditorAssetSrc } from "@plane/utils";
// hooks
import { useEditorAsset } from "@/hooks/store/use-editor-asset";
// plane web hooks
-import { useExtendedEditorConfig } from "@/plane-web/hooks/editor/use-extended-editor-config";
-import { useFileSize } from "@/plane-web/hooks/use-file-size";
+import { useExtendedEditorConfig } from "@/hooks/editor/use-extended-editor-config";
+import { useFileSize } from "@/hooks/use-file-size";
// services
import { FileService } from "@/services/file.service";
const fileService = new FileService();
diff --git a/apps/web/core/hooks/editor/use-editor-mention.tsx b/apps/web/core/hooks/editor/use-editor-mention.tsx
index 46aa85229b..910accae6a 100644
--- a/apps/web/core/hooks/editor/use-editor-mention.tsx
+++ b/apps/web/core/hooks/editor/use-editor-mention.tsx
@@ -14,7 +14,7 @@ import { Avatar } from "@plane/ui";
// helpers
import { getFileURL } from "@plane/utils";
// plane web hooks
-import { useAdditionalEditorMention } from "@/plane-web/hooks/use-additional-editor-mention";
+import { useAdditionalEditorMention } from "@/hooks/use-additional-editor-mention";
type TArgs = {
enableAdvancedMentions?: boolean;
diff --git a/apps/web/ce/hooks/editor/use-extended-editor-config.ts b/apps/web/core/hooks/editor/use-extended-editor-config.ts
similarity index 100%
rename from apps/web/ce/hooks/editor/use-extended-editor-config.ts
rename to apps/web/core/hooks/editor/use-extended-editor-config.ts
diff --git a/apps/web/ce/hooks/pages/index.ts b/apps/web/core/hooks/pages/index.ts
similarity index 100%
rename from apps/web/ce/hooks/pages/index.ts
rename to apps/web/core/hooks/pages/index.ts
index bc7999e282..564955b511 100644
--- a/apps/web/ce/hooks/pages/index.ts
+++ b/apps/web/core/hooks/pages/index.ts
@@ -4,5 +4,5 @@
* See the LICENSE file for details.
*/
-export * from "./use-pages-pane-extensions";
export * from "./use-extended-editor-extensions";
+export * from "./use-pages-pane-extensions";
diff --git a/apps/web/ce/hooks/pages/use-extended-editor-extensions.ts b/apps/web/core/hooks/pages/use-extended-editor-extensions.ts
similarity index 94%
rename from apps/web/ce/hooks/pages/use-extended-editor-extensions.ts
rename to apps/web/core/hooks/pages/use-extended-editor-extensions.ts
index cc3b0a213e..e64837db4a 100644
--- a/apps/web/ce/hooks/pages/use-extended-editor-extensions.ts
+++ b/apps/web/core/hooks/pages/use-extended-editor-extensions.ts
@@ -7,7 +7,7 @@
import type { IEditorPropsExtended } from "@plane/editor";
import type { TSearchEntityRequestPayload, TSearchResponse } from "@plane/types";
import type { TPageInstance } from "@/store/pages/base-page";
-import type { EPageStoreType } from "../store";
+import type { EPageStoreType } from "@/hooks/store";
export type TExtendedEditorExtensionsHookParams = {
workspaceSlug: string;
diff --git a/apps/web/ce/hooks/pages/use-pages-pane-extensions.ts b/apps/web/core/hooks/pages/use-pages-pane-extensions.ts
similarity index 100%
rename from apps/web/ce/hooks/pages/use-pages-pane-extensions.ts
rename to apps/web/core/hooks/pages/use-pages-pane-extensions.ts
diff --git a/apps/web/ce/hooks/rich-filters/use-filters-operator-configs.ts b/apps/web/core/hooks/rich-filters/use-filters-operator-configs.ts
similarity index 100%
rename from apps/web/ce/hooks/rich-filters/use-filters-operator-configs.ts
rename to apps/web/core/hooks/rich-filters/use-filters-operator-configs.ts
diff --git a/apps/web/ce/hooks/store/index.ts b/apps/web/core/hooks/store/index.ts
similarity index 100%
rename from apps/web/ce/hooks/store/index.ts
rename to apps/web/core/hooks/store/index.ts
diff --git a/apps/web/ce/hooks/store/use-page-store.ts b/apps/web/core/hooks/store/use-page-store.ts
similarity index 100%
rename from apps/web/ce/hooks/store/use-page-store.ts
rename to apps/web/core/hooks/store/use-page-store.ts
diff --git a/apps/web/ce/hooks/store/use-page.ts b/apps/web/core/hooks/store/use-page.ts
similarity index 86%
rename from apps/web/ce/hooks/store/use-page.ts
rename to apps/web/core/hooks/store/use-page.ts
index 7b588321e8..2afe8b7ae9 100644
--- a/apps/web/ce/hooks/store/use-page.ts
+++ b/apps/web/core/hooks/store/use-page.ts
@@ -8,8 +8,8 @@ import { useContext } from "react";
// mobx store
import { StoreContext } from "@/lib/store-context";
// plane web hooks
-import type { EPageStoreType } from "@/plane-web/hooks/store";
-import { usePageStore } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "./use-page-store";
+import { usePageStore } from "./use-page-store";
export type TArgs = {
pageId: string;
diff --git a/apps/web/ce/hooks/use-additional-editor-mention.tsx b/apps/web/core/hooks/use-additional-editor-mention.tsx
similarity index 100%
rename from apps/web/ce/hooks/use-additional-editor-mention.tsx
rename to apps/web/core/hooks/use-additional-editor-mention.tsx
diff --git a/apps/web/core/hooks/use-additional-favorite-item-details.tsx b/apps/web/core/hooks/use-additional-favorite-item-details.tsx
new file mode 100644
index 0000000000..6f39212005
--- /dev/null
+++ b/apps/web/core/hooks/use-additional-favorite-item-details.tsx
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) 2023-present Plane Software, Inc. and contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ * See the LICENSE file for details.
+ */
+
+// plane imports
+import type { IFavorite } from "@plane/types";
+// components
+import { FavoriteItemIcon } from "@/components/workspace/sidebar/favorites/favorite-items/common";
+
+const getAdditionalFavoriteItemDetails = (_workspaceSlug: string, favorite: IFavorite) => {
+ const { entity_type: favoriteItemEntityType } = favorite;
+ const favoriteItemName = favorite?.entity_data?.name || favorite?.name;
+
+ let itemIcon;
+ let itemTitle;
+
+ switch (favoriteItemEntityType) {
+ default:
+ itemTitle = favoriteItemName;
+ itemIcon = <FavoriteItemIcon type={favoriteItemEntityType} logo={favorite.entity_data?.logo_props} />;
+ break;
+ }
+ return { itemIcon, itemTitle };
+};
+
+export const useAdditionalFavoriteItemDetails = () => ({
+ getAdditionalFavoriteItemDetails,
+});
diff --git a/apps/web/ce/hooks/use-bulk-operation-status.ts b/apps/web/core/hooks/use-bulk-operation-status.ts
similarity index 100%
rename from apps/web/ce/hooks/use-bulk-operation-status.ts
rename to apps/web/core/hooks/use-bulk-operation-status.ts
diff --git a/apps/web/ce/hooks/use-debounced-duplicate-issues.tsx b/apps/web/core/hooks/use-debounced-duplicate-issues.tsx
similarity index 100%
rename from apps/web/ce/hooks/use-debounced-duplicate-issues.tsx
rename to apps/web/core/hooks/use-debounced-duplicate-issues.tsx
diff --git a/apps/web/ce/hooks/use-editor-flagging.ts b/apps/web/core/hooks/use-editor-flagging.ts
similarity index 94%
rename from apps/web/ce/hooks/use-editor-flagging.ts
rename to apps/web/core/hooks/use-editor-flagging.ts
index e1841ff666..019c62bf54 100644
--- a/apps/web/ce/hooks/use-editor-flagging.ts
+++ b/apps/web/core/hooks/use-editor-flagging.ts
@@ -6,7 +6,7 @@
// editor
import type { TExtensions } from "@plane/editor";
-import type { EPageStoreType } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
export type TEditorFlaggingHookReturnType = {
document: {
diff --git a/apps/web/core/hooks/use-favorite-item-details.tsx b/apps/web/core/hooks/use-favorite-item-details.tsx
index b3c9468e39..18b3d56897 100644
--- a/apps/web/core/hooks/use-favorite-item-details.tsx
+++ b/apps/web/core/hooks/use-favorite-item-details.tsx
@@ -9,8 +9,8 @@ import type { IFavorite } from "@plane/types";
// components
import { getPageName } from "@plane/utils";
import {
+ FavoriteItemIcon,
generateFavoriteItemLink,
- getFavoriteItemIcon,
} from "@/components/workspace/sidebar/favorites/favorite-items/common";
// helpers
// hooks
@@ -19,8 +19,8 @@ import { useModule } from "@/hooks/store/use-module";
import { useProject } from "@/hooks/store/use-project";
import { useProjectView } from "@/hooks/store/use-project-view";
// plane web hooks
-import { EPageStoreType, usePage } from "@/plane-web/hooks/store";
-import { useAdditionalFavoriteItemDetails } from "@/plane-web/hooks/use-additional-favorite-item-details";
+import { EPageStoreType, usePage } from "@/hooks/store";
+import { useAdditionalFavoriteItemDetails } from "@/hooks/use-additional-favorite-item-details";
export const useFavoriteItemDetails = (workspaceSlug: string, favorite: IFavorite) => {
const {
@@ -53,23 +53,23 @@ export const useFavoriteItemDetails = (workspaceSlug: string, favorite: IFavorit
switch (favoriteItemEntityType) {
case "project":
itemTitle = currentProjectDetails?.name ?? favoriteItemName;
- itemIcon = getFavoriteItemIcon("project", currentProjectDetails?.logo_props || favoriteItemLogoProps);
+ itemIcon = <FavoriteItemIcon type="project" logo={currentProjectDetails?.logo_props || favoriteItemLogoProps} />;
break;
case "page":
itemTitle = getPageName(pageDetail?.name ?? favoriteItemName);
- itemIcon = getFavoriteItemIcon("page", pageDetail?.logo_props ?? favoriteItemLogoProps);
+ itemIcon = <FavoriteItemIcon type="page" logo={pageDetail?.logo_props ?? favoriteItemLogoProps} />;
break;
case "view":
itemTitle = viewDetails?.name ?? favoriteItemName;
- itemIcon = getFavoriteItemIcon("view", viewDetails?.logo_props || favoriteItemLogoProps);
+ itemIcon = <FavoriteItemIcon type="view" logo={viewDetails?.logo_props || favoriteItemLogoProps} />;
break;
case "cycle":
itemTitle = cycleDetail?.name ?? favoriteItemName;
- itemIcon = getFavoriteItemIcon("cycle");
+ itemIcon = <FavoriteItemIcon type="cycle" />;
break;
case "module":
itemTitle = moduleDetail?.name ?? favoriteItemName;
- itemIcon = getFavoriteItemIcon("module");
+ itemIcon = <FavoriteItemIcon type="module" />;
break;
default: {
const additionalDetails = getAdditionalFavoriteItemDetails(workspaceSlug, favorite);
diff --git a/apps/web/ce/hooks/use-file-size.ts b/apps/web/core/hooks/use-file-size.ts
similarity index 100%
rename from apps/web/ce/hooks/use-file-size.ts
rename to apps/web/core/hooks/use-file-size.ts
diff --git a/apps/web/ce/hooks/use-issue-properties.tsx b/apps/web/core/hooks/use-issue-properties.tsx
similarity index 100%
rename from apps/web/ce/hooks/use-issue-properties.tsx
rename to apps/web/core/hooks/use-issue-properties.tsx
diff --git a/apps/web/ce/hooks/use-notification-preview.tsx b/apps/web/core/hooks/use-notification-preview.tsx
similarity index 100%
rename from apps/web/ce/hooks/use-notification-preview.tsx
rename to apps/web/core/hooks/use-notification-preview.tsx
diff --git a/apps/web/ce/hooks/use-page-flag.ts b/apps/web/core/hooks/use-page-flag.ts
similarity index 100%
rename from apps/web/ce/hooks/use-page-flag.ts
rename to apps/web/core/hooks/use-page-flag.ts
diff --git a/apps/web/core/hooks/use-parse-editor-content.ts b/apps/web/core/hooks/use-parse-editor-content.ts
index 2bd1b82080..c4b969d24e 100644
--- a/apps/web/core/hooks/use-parse-editor-content.ts
+++ b/apps/web/core/hooks/use-parse-editor-content.ts
@@ -13,7 +13,7 @@ import type { TCustomComponentsMetaData } from "@plane/utils";
// hooks
import { useMember } from "@/hooks/store/use-member";
// plane web hooks
-import { useAdditionalEditorMention } from "@/plane-web/hooks/use-additional-editor-mention";
+import { useAdditionalEditorMention } from "@/hooks/use-additional-editor-mention";
type TArgs = {
projectId?: string;
diff --git a/apps/web/core/hooks/use-realtime-page-events.tsx b/apps/web/core/hooks/use-realtime-page-events.tsx
index 949fe0397d..ac0cbdc2da 100644
--- a/apps/web/core/hooks/use-realtime-page-events.tsx
+++ b/apps/web/core/hooks/use-realtime-page-events.tsx
@@ -15,8 +15,8 @@ import type { TEditorBodyHandlers } from "@/components/pages/editor/editor-body"
// hooks
import { useUser } from "@/hooks/store/user";
import { useAppRouter } from "@/hooks/use-app-router";
-import type { EPageStoreType } from "@/plane-web/hooks/store";
-import { usePageStore } from "@/plane-web/hooks/store";
+import type { EPageStoreType } from "@/hooks/store";
+import { usePageStore } from "@/hooks/store";
// store
import type { TPageInstance } from "@/store/pages/base-page";
diff --git a/apps/web/core/hooks/use-timeline-chart.ts b/apps/web/core/hooks/use-timeline-chart.ts
index ec8b4f1a0b..ce9d1d88f0 100644
--- a/apps/web/core/hooks/use-timeline-chart.ts
+++ b/apps/web/core/hooks/use-timeline-chart.ts
@@ -6,14 +6,33 @@
import { useContext } from "react";
// types
-import type { TTimelineType } from "@plane/types";
+import { GANTT_TIMELINE_TYPE, type TTimelineTypeCore, type TTimelineType } from "@plane/types";
// lib
import { StoreContext } from "@/lib/store-context";
-// Plane-web
-import { getTimelineStore } from "@/plane-web/hooks/use-timeline-chart";
+// plane-web store types
import type { IBaseTimelineStore } from "@/plane-web/store/timeline/base-timeline.store";
+import type { ITimelineStore } from "@/plane-web/store/timeline";
import { useTimeLineType } from "../components/gantt-chart/contexts";
+export const getTimelineStore = (
+ timelineStore: ITimelineStore,
+ timelineType: TTimelineTypeCore
+): IBaseTimelineStore => {
+ if (timelineType === GANTT_TIMELINE_TYPE.ISSUE) {
+ return timelineStore.issuesTimeLineStore as IBaseTimelineStore;
+ }
+ if (timelineType === GANTT_TIMELINE_TYPE.MODULE) {
+ return timelineStore.modulesTimeLineStore as IBaseTimelineStore;
+ }
+ if (timelineType === GANTT_TIMELINE_TYPE.PROJECT) {
+ return timelineStore.projectTimeLineStore;
+ }
+ if (timelineType === GANTT_TIMELINE_TYPE.GROUPED) {
+ return timelineStore.groupedTimeLineStore;
+ }
+ throw new Error(`Unknown timeline type: ${timelineType}`);
+};
+
export const useTimeLineChart = (timelineType: TTimelineType): IBaseTimelineStore => {
const context = useContext(StoreContext);
if (!context) throw new Error("useTimeLineChart must be used within StoreProvider");
diff --git a/apps/web/ce/hooks/use-workspace-issue-properties-extended.tsx b/apps/web/core/hooks/use-workspace-issue-properties-extended.tsx
similarity index 100%
rename from apps/web/ce/hooks/use-workspace-issue-properties-extended.tsx
rename to apps/web/core/hooks/use-workspace-issue-properties-extended.tsx
diff --git a/apps/web/core/hooks/use-workspace-issue-properties.ts b/apps/web/core/hooks/use-workspace-issue-properties.ts
index 3c71503d54..9ee1099087 100644
--- a/apps/web/core/hooks/use-workspace-issue-properties.ts
+++ b/apps/web/core/hooks/use-workspace-issue-properties.ts
@@ -6,8 +6,8 @@
import useSWR from "swr";
// plane web imports
-import { WORKSPACE_ESTIMATES, WORKSPACE_CYCLES, WORKSPACE_LABELS, WORKSPACE_MODULES } from "@/constants/fetch-keys";
-import { useWorkspaceIssuePropertiesExtended } from "@/plane-web/hooks/use-workspace-issue-properties-extended";
+import { WORKSPACE_ESTIMATES, WORKSPACE_CYCLES, WORKSPACE_LABELS, WORKSPACE_MODULES } from "@plane/constants";
+import { useWorkspaceIssuePropertiesExtended } from "@/hooks/use-workspace-issue-properties-extended";
// plane imports
import { useProjectEstimates } from "./store/estimates";
import { useCycle } from "./store/use-cycle";
diff --git a/apps/web/ce/hooks/work-item-filters/use-work-item-filters-config.tsx b/apps/web/core/hooks/work-item-filters/use-work-item-filters-config.tsx
similarity index 99%
rename from apps/web/ce/hooks/work-item-filters/use-work-item-filters-config.tsx
rename to apps/web/core/hooks/work-item-filters/use-work-item-filters-config.tsx
index c4b6f3f0b2..78ac8242b7 100644
--- a/apps/web/ce/hooks/work-item-filters/use-work-item-filters-config.tsx
+++ b/apps/web/core/hooks/work-item-filters/use-work-item-filters-config.tsx
@@ -61,7 +61,7 @@ import { useModule } from "@/hooks/store/use-module";
import { useProject } from "@/hooks/store/use-project";
import { useProjectState } from "@/hooks/store/use-project-state";
// plane web imports
-import { useFiltersOperatorConfigs } from "@/plane-web/hooks/rich-filters/use-filters-operator-configs";
+import { useFiltersOperatorConfigs } from "@/hooks/rich-filters/use-filters-operator-configs";
export type TWorkItemFiltersEntityProps = {
workspaceSlug: string;
diff --git a/apps/web/core/layouts/auth-layout/project-wrapper.tsx b/apps/web/core/layouts/auth-layout/project-wrapper.tsx
index 1c4fac1b50..1a0a441474 100644
--- a/apps/web/core/layouts/auth-layout/project-wrapper.tsx
+++ b/apps/web/core/layouts/auth-layout/project-wrapper.tsx
@@ -25,7 +25,7 @@ import {
PROJECT_MODULES,
PROJECT_VIEWS,
PROJECT_INTAKE_STATE,
-} from "@/constants/fetch-keys";
+} from "@plane/constants";
// hooks
import { useProjectEstimates } from "@/hooks/store/estimates";
import { useCycle } from "@/hooks/store/use-cycle";
diff --git a/apps/web/core/layouts/auth-layout/workspace-wrapper.tsx b/apps/web/core/layouts/auth-layout/workspace-wrapper.tsx
index ac8c34fb36..e74dfd55db 100644
--- a/apps/web/core/layouts/auth-layout/workspace-wrapper.tsx
+++ b/apps/web/core/layouts/auth-layout/workspace-wrapper.tsx
@@ -31,7 +31,7 @@ import {
WORKSPACE_STATES,
WORKSPACE_SIDEBAR_PREFERENCES,
WORKSPACE_PROJECT_NAVIGATION_PREFERENCES,
-} from "@/constants/fetch-keys";
+} from "@plane/constants";
// hooks
import { useFavorite } from "@/hooks/store/use-favorite";
import { useMember } from "@/hooks/store/use-member";
diff --git a/apps/web/core/services/ai.service.ts b/apps/web/core/services/ai.service.ts
index 4c7612dfe6..c529ca3565 100644
--- a/apps/web/core/services/ai.service.ts
+++ b/apps/web/core/services/ai.service.ts
@@ -6,8 +6,7 @@
// helpers
import { API_BASE_URL } from "@plane/constants";
-// plane web constants
-import type { AI_EDITOR_TASKS } from "@/constants/ai";
+import type { AI_EDITOR_TASKS } from "@plane/constants";
// services
import { APIService } from "@/services/api.service";
// types
diff --git a/apps/web/core/store/issue/issue-details/relation.store.ts b/apps/web/core/store/issue/issue-details/relation.store.ts
index d8ac0a96c2..ed58247012 100644
--- a/apps/web/core/store/issue/issue-details/relation.store.ts
+++ b/apps/web/core/store/issue/issue-details/relation.store.ts
@@ -11,7 +11,7 @@ import { computedFn } from "mobx-utils";
import type { TIssueRelationIdMap, TIssueRelationMap, TIssueRelation, TIssue, TIssueRelationTypes } from "@plane/types";
// components
import type { TRelationObject } from "@/components/issues/issue-detail-widgets/relations";
-import { REVERSE_RELATIONS } from "@/constants/gantt-chart";
+import { REVERSE_RELATIONS } from "@plane/constants";
// services
import { IssueRelationService } from "@/services/issue";
// types
diff --git a/packages/constants/src/ai.ts b/packages/constants/src/ai.ts
index 94c8592221..42fafe9504 100644
--- a/packages/constants/src/ai.ts
+++ b/packages/constants/src/ai.ts
@@ -7,3 +7,7 @@
export enum AI_EDITOR_TASKS {
ASK_ANYTHING = "ASK_ANYTHING",
}
+
+export const LOADING_TEXTS = {
+ [AI_EDITOR_TASKS.ASK_ANYTHING]: "Pi is generating response",
+} satisfies { [key in AI_EDITOR_TASKS]: string };
diff --git a/apps/web/core/constants/calendar.ts b/packages/constants/src/calendar.ts
similarity index 100%
rename from apps/web/core/constants/calendar.ts
rename to packages/constants/src/calendar.ts
diff --git a/apps/web/core/constants/fetch-keys.ts b/packages/constants/src/fetch-keys.ts
similarity index 93%
rename from apps/web/core/constants/fetch-keys.ts
rename to packages/constants/src/fetch-keys.ts
index abcbcf2bf4..e0db8181ee 100644
--- a/apps/web/core/constants/fetch-keys.ts
+++ b/packages/constants/src/fetch-keys.ts
@@ -40,15 +40,15 @@ const paramsToKey = (params: any) => {
const layoutKey = layout ? layout.toUpperCase() : "";
// sorting each keys in ascending order
- projectKey = projectKey.sort().join("_");
- stateKey = stateKey.sort().join("_");
- stateGroupKey = stateGroupKey.sort().join("_");
- priorityKey = priorityKey.sort().join("_");
- assigneesKey = assigneesKey.sort().join("_");
- mentionsKey = mentionsKey.sort().join("_");
- createdByKey = createdByKey.sort().join("_");
- labelsKey = labelsKey.sort().join("_");
- subscriberKey = subscriberKey.sort().join("_");
+ projectKey = projectKey.toSorted().join("_");
+ stateKey = stateKey.toSorted().join("_");
+ stateGroupKey = stateGroupKey.toSorted().join("_");
+ priorityKey = priorityKey.toSorted().join("_");
+ assigneesKey = assigneesKey.toSorted().join("_");
+ mentionsKey = mentionsKey.toSorted().join("_");
+ createdByKey = createdByKey.toSorted().join("_");
+ labelsKey = labelsKey.toSorted().join("_");
+ subscriberKey = subscriberKey.toSorted().join("_");
return `${layoutKey}_${projectKey}_${stateGroupKey}_${stateKey}_${priorityKey}_${assigneesKey}_${mentionsKey}_${createdByKey}_${type}_${groupBy}_${orderBy}_${labelsKey}_${startDateKey}_${targetDateKey}_${sub_issue}_${subscriberKey}`;
};
@@ -160,10 +160,10 @@ export const APPLICATION_BY_CLIENT_ID = (clientId: string) => `APPLICATION_BY_CL
export const APPLICATION_CATEGORIES_LIST = () => `APPLICATION_CATEGORIES_LIST`;
// project level keys
-export const PROJECT_DETAILS = (workspaceSlug: string, projectId: string) =>
+export const PROJECT_DETAILS = (_workspaceSlug: string, projectId: string) =>
`PROJECT_DETAILS_${projectId.toString().toUpperCase()}`;
-export const PROJECT_ME_INFORMATION = (workspaceSlug: string, projectId: string) =>
+export const PROJECT_ME_INFORMATION = (_workspaceSlug: string, projectId: string) =>
`PROJECT_ME_INFORMATION_${projectId.toString().toUpperCase()}`;
export const PROJECT_LABELS = (projectId: string, projectRole: EUserPermissions | undefined) =>
diff --git a/apps/web/core/constants/gantt-chart.ts b/packages/constants/src/gantt-chart.ts
similarity index 100%
rename from apps/web/core/constants/gantt-chart.ts
rename to packages/constants/src/gantt-chart.ts
diff --git a/packages/constants/src/index.ts b/packages/constants/src/index.ts
index 822c4e770c..e55a3dbe23 100644
--- a/packages/constants/src/index.ts
+++ b/packages/constants/src/index.ts
@@ -7,6 +7,7 @@
export * from "./ai";
export * from "./analytics";
export * from "./auth";
+export * from "./calendar";
export * from "./chart";
export * from "./cycle";
export * from "./dashboard";
@@ -15,7 +16,9 @@ export * from "./endpoints";
export * from "./estimates";
export * from "./event-tracker";
export * from "./file";
+export * from "./fetch-keys";
export * from "./filter";
+export * from "./gantt-chart";
export * from "./graph";
export * from "./icon";
export * from "./instance";
@@ -32,6 +35,7 @@ export * from "./profile";
export * from "./project";
export * from "./rich-filters";
export * from "./settings";
+export * from "./sidebar-favorites";
export * from "./sidebar";
export * from "./spreadsheet";
export * from "./state";
diff --git a/apps/web/core/constants/sidebar-favorites.ts b/packages/constants/src/sidebar-favorites.ts
similarity index 65%
rename from apps/web/core/constants/sidebar-favorites.ts
rename to packages/constants/src/sidebar-favorites.ts
index e2935a6a5a..af8d740749 100644
--- a/apps/web/core/constants/sidebar-favorites.ts
+++ b/packages/constants/src/sidebar-favorites.ts
@@ -4,21 +4,8 @@
* See the LICENSE file for details.
*/
-import type { LucideIcon } from "lucide-react";
-// plane imports
-import type { ISvgIcons } from "@plane/propel/icons";
-import { CycleIcon, FavoriteFolderIcon, ModuleIcon, PageIcon, ProjectIcon, ViewsIcon } from "@plane/propel/icons";
import type { IFavorite } from "@plane/types";
-export const FAVORITE_ITEM_ICONS: Record<string, React.FC<ISvgIcons> | LucideIcon> = {
- page: PageIcon,
- project: ProjectIcon,
- view: ViewsIcon,
- module: ModuleIcon,
- cycle: CycleIcon,
- folder: FavoriteFolderIcon,
-};
-
export const FAVORITE_ITEM_LINKS: {
[key: string]: {
itemLevel: "project" | "workspace";
diff --git a/packages/editor/src/core/constants/common.ts b/packages/editor/src/core/constants/common.ts
index b0617ec791..b90069944c 100644
--- a/packages/editor/src/core/constants/common.ts
+++ b/packages/editor/src/core/constants/common.ts
@@ -28,9 +28,10 @@ import {
TextQuote,
Underline,
} from "lucide-react";
-import type { TCommandExtraProps, TEditorCommands } from "@/types/editor";
+import { MonospaceIcon, SansSerifIcon, SerifIcon } from "@plane/propel/icons";
+import type { TCommandExtraProps, TEditorCommands, TEditorFontStyle } from "@/types";
-export type TEditorTypes = "lite" | "document";
+export type TEditorTypes = "lite" | "document" | "sticky";
// Utility type to enforce the necessary extra props or make extraProps optional
export type ExtraPropsForCommand<T extends TEditorCommands> = T extends keyof TCommandExtraProps
@@ -165,6 +166,8 @@ export const COMPLEX_ITEMS: ToolbarMenuItem<"table" | "image">[] = [
{ itemKey: "image", renderKey: "image", name: "Image", icon: Image, editors: ["lite", "document"] },
];
+export const IMAGE_ITEM = COMPLEX_ITEMS.find((item): item is ToolbarMenuItem<"image"> => item.itemKey === "image")!;
+
export const TOOLBAR_ITEMS: {
[editorType in TEditorTypes]: {
[key: string]: ToolbarMenuItem[];
@@ -184,6 +187,10 @@ export const TOOLBAR_ITEMS: {
userAction: USER_ACTION_ITEMS.filter((item) => item.editors.includes("document")),
complex: COMPLEX_ITEMS.filter((item) => item.editors.includes("document")),
},
+ sticky: {
+ basic: BASIC_MARK_ITEMS.filter((item) => ["bold", "italic"].includes(item.itemKey)),
+ list: LIST_ITEMS.filter((item) => ["to-do-list"].includes(item.itemKey)),
+ },
};
export const COLORS_LIST: {
@@ -247,3 +254,13 @@ export const COLORS_LIST: {
// backgroundColor: "var(--editor-colors-pink-blue-gradient-background)",
// },
];
+
+export const EDITOR_FONT_STYLES: {
+ key: TEditorFontStyle;
+ label: string;
+ icon: React.FC;
+}[] = [
+ { key: "sans-serif", label: "Sans serif", icon: SansSerifIcon },
+ { key: "serif", label: "Serif", icon: SerifIcon },
+ { key: "monospace", label: "Mono", icon: MonospaceIcon },
+];