diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/active-cycles/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/active-cycles/header.tsx index 82fe31cce4..baee20f82b 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/active-cycles/header.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/active-cycles/header.tsx @@ -12,7 +12,7 @@ import { Breadcrumbs, Header } from "@plane/ui"; // components import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; // plane web components -import { UpgradeBadge } from "@/plane-web/components/workspace/upgrade-badge"; +import { UpgradeBadge } from "@/components/workspace/upgrade-badge"; export const WorkspaceActiveCycleHeader = observer(function WorkspaceActiveCycleHeader() { const { t } = useTranslation(); diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/active-cycles/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/active-cycles/page.tsx index 222fa03c99..12e3afe53c 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/active-cycles/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/active-cycles/page.tsx @@ -9,8 +9,8 @@ import { observer } from "mobx-react"; import { PageHead } from "@/components/core/page-title"; // hooks import { useWorkspace } from "@/hooks/store/use-workspace"; -// plane web components -import { WorkspaceActiveCyclesRoot } from "@/plane-web/components/active-cycles"; +// local imports +import { WorkspaceActiveCyclesUpgrade } from "@/components/active-cycles/workspace-active-cycles-upgrade"; function WorkspaceActiveCyclesPage() { const { currentWorkspace } = useWorkspace(); @@ -20,7 +20,7 @@ function WorkspaceActiveCyclesPage() { return ( <> - + > ); } diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/analytics/[tabId]/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/analytics/[tabId]/page.tsx index 63321351df..3d4735b657 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/analytics/[tabId]/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/analytics/[tabId]/page.tsx @@ -21,7 +21,7 @@ import { useCommandPalette } from "@/hooks/store/use-command-palette"; import { useProject } from "@/hooks/store/use-project"; import { useWorkspace } from "@/hooks/store/use-workspace"; import { useUserPermissions } from "@/hooks/store/user"; -import { useAnalyticsTabs } from "@/plane-web/components/analytics/use-analytics-tabs"; +import { useAnalyticsTabs } from "@/components/analytics/use-analytics-tabs"; import type { Route } from "./+types/page"; function AnalyticsPage({ params }: Route.ComponentProps) { 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 427e43fc9d..a644c40b6e 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/page.tsx @@ -28,7 +28,7 @@ import { useAppRouter } from "@/hooks/use-app-router"; import { ProjectAuthWrapper } from "@/layouts/auth-layout/project-wrapper"; // plane web imports import { useWorkItemProperties } from "@/hooks/use-issue-properties"; -import { WorkItemDetailRoot } from "@/plane-web/components/browse/workItem-detail"; +import { WorkItemDetailRoot } from "@/components/browse/workItem-detail"; import type { Route } from "./+types/page"; diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/work-item-header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/work-item-header.tsx index dd7978fe55..f8f18b1fc6 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/work-item-header.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/work-item-header.tsx @@ -18,7 +18,7 @@ import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useProject } from "@/hooks/store/use-project"; import { useAppRouter } from "@/hooks/use-app-router"; // plane web imports -import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common"; +import { CommonProjectBreadcrumbs } from "@/components/breadcrumbs/common"; export const WorkItemDetailsHeader = observer(function WorkItemDetailsHeader() { // router diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/extended-sidebar.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/extended-sidebar.tsx index 0b8ad77aae..c8f5eb82f5 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/extended-sidebar.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/extended-sidebar.tsx @@ -14,8 +14,8 @@ import type { EUserWorkspaceRoles } from "@plane/types"; import { useAppTheme } from "@/hooks/store/use-app-theme"; import { useUserPermissions } from "@/hooks/store/user"; import { useWorkspaceNavigationPreferences } from "@/hooks/use-navigation-preferences"; -// plane-web imports -import { ExtendedSidebarItem } from "@/plane-web/components/workspace/sidebar/extended-sidebar-item"; +// components +import { ExtendedSidebarItem } from "@/components/workspace/sidebar/extended-sidebar-item"; import { ExtendedSidebarWrapper } from "./extended-sidebar-wrapper"; export const ExtendedAppSidebar = observer(function ExtendedAppSidebar() { @@ -34,32 +34,37 @@ export const ExtendedAppSidebar = observer(function ExtendedAppSidebar() { const sortedNavigationItems = useMemo(() => { const slug = workspaceSlug.toString(); - return WORKSPACE_SIDEBAR_DYNAMIC_NAVIGATION_ITEMS_LINKS.filter((item) => { - // Permission check - const hasPermission = allowPermissions(item.access, EUserPermissionsLevel.WORKSPACE, slug); + return ( + WORKSPACE_SIDEBAR_DYNAMIC_NAVIGATION_ITEMS_LINKS.filter((item) => { + // Permission check + const hasPermission = allowPermissions(item.access, EUserPermissionsLevel.WORKSPACE, slug); - return hasPermission; - }) - .map((item) => { - const preference = currentWorkspaceNavigationPreferences?.[item.key]; - return { - ...item, - sort_order: preference?.sort_order ?? 0, - is_pinned: preference?.is_pinned ?? false, - }; + return hasPermission; }) - .sort((a, b) => { - // First sort by pinned status (pinned items first) - if (a.is_pinned !== b.is_pinned) { - return b.is_pinned ? 1 : -1; - } - // Then sort by sort_order within each group - return a.sort_order - b.sort_order; - }); + // oxlint-disable-next-line oxc/no-map-spread + .map((item) => { + const preference = currentWorkspaceNavigationPreferences?.[item.key]; + return { + ...item, + sort_order: preference?.sort_order ?? 0, + is_pinned: preference?.is_pinned ?? false, + }; + }) + // oxlint-disable-next-line unicorn/no-array-sort + .sort((a, b) => { + // First sort by pinned status (pinned items first) + if (a.is_pinned !== b.is_pinned) { + return b.is_pinned ? 1 : -1; + } + // Then sort by sort_order within each group + return a.sort_order - b.sort_order; + }) + ); }, [workspaceSlug, currentWorkspaceNavigationPreferences, allowPermissions]); const sortedNavigationItemsKeys = sortedNavigationItems.map((item) => item.key); + // oxlint-disable-next-line unicorn/consistent-function-scoping const orderNavigationItem = ( sourceIndex: number, destinationIndex: number, diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/header.tsx index f7b5e90e59..c158c18998 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/header.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/header.tsx @@ -19,7 +19,7 @@ import { useProject } from "@/hooks/store/use-project"; import { useAppRouter } from "@/hooks/use-app-router"; import { usePlatformOS } from "@/hooks/use-platform-os"; // plane web imports -import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common"; +import { CommonProjectBreadcrumbs } from "@/components/breadcrumbs/common"; type TProps = { activeTab: "issues" | "cycles" | "modules"; 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 4217bae906..8fb15fe5ac 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 @@ -18,7 +18,7 @@ import { ISSUE_DETAILS } from "@plane/constants"; // hooks import { useProject } from "@/hooks/store/use-project"; // plane web -import { ProjectBreadcrumb } from "@/plane-web/components/breadcrumbs/project"; +import { ProjectBreadcrumb } from "@/components/breadcrumbs/project"; // services import { IssueService } from "@/services/issue"; diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/header.tsx index 05f4cca2d0..c4fe7bba45 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/header.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/header.tsx @@ -48,7 +48,7 @@ import { useUserPermissions } from "@/hooks/store/user"; import { useAppRouter } from "@/hooks/use-app-router"; import useLocalStorage from "@/hooks/use-local-storage"; // plane web imports -import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common"; +import { CommonProjectBreadcrumbs } from "@/components/breadcrumbs/common"; export const CycleIssuesHeader = observer(function CycleIssuesHeader() { // refs @@ -75,7 +75,7 @@ export const CycleIssuesHeader = observer(function CycleIssuesHeader() { const { setValue, storedValue } = useLocalStorage("cycle_sidebar_collapsed", false); - const isSidebarCollapsed = storedValue ? (storedValue === true ? true : false) : false; + const isSidebarCollapsed = storedValue === true; const toggleSidebar = () => { setValue(!isSidebarCollapsed); }; diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(list)/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(list)/header.tsx index 62cac65eaf..8f97d3ed9f 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(list)/header.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(list)/header.tsx @@ -21,7 +21,7 @@ import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; import { useAppRouter } from "@/hooks/use-app-router"; // plane web imports -import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common"; +import { CommonProjectBreadcrumbs } from "@/components/breadcrumbs/common"; export const CyclesListHeader = observer(function CyclesListHeader() { // router diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/intake/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/intake/layout.tsx index 267226e550..99c88f98e0 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/intake/layout.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/intake/layout.tsx @@ -8,7 +8,7 @@ import { Outlet } from "react-router"; // components import { AppHeader } from "@/components/core/app-header"; import { ContentWrapper } from "@/components/core/content-wrapper"; -import { ProjectInboxHeader } from "@/plane-web/components/projects/settings/intake/header"; +import { ProjectInboxHeader } from "@/components/projects/settings/intake/header"; export default function ProjectInboxIssuesLayout() { return ( diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/issues/(list)/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/issues/(list)/header.tsx index eb82758b1f..f350dbf87b 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/issues/(list)/header.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/issues/(list)/header.tsx @@ -4,7 +4,7 @@ * See the LICENSE file for details. */ -import { IssuesHeader } from "@/plane-web/components/issues/header"; +import { IssuesHeader } from "@/components/issues/header"; export function ProjectIssuesHeader() { return ; diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(detail)/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(detail)/header.tsx index 5524626e04..297d69be5e 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(detail)/header.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(detail)/header.tsx @@ -47,7 +47,7 @@ import { useIssuesActions } from "@/hooks/use-issues-actions"; import useLocalStorage from "@/hooks/use-local-storage"; import { usePlatformOS } from "@/hooks/use-platform-os"; // plane web imports -import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common"; +import { CommonProjectBreadcrumbs } from "@/components/breadcrumbs/common"; import { IconButton } from "@plane/propel/icon-button"; export const ModuleIssuesHeader = observer(function ModuleIssuesHeader() { @@ -74,7 +74,7 @@ export const ModuleIssuesHeader = observer(function ModuleIssuesHeader() { // local storage const { setValue, storedValue } = useLocalStorage("module_sidebar_collapsed", "false"); // derived values - const isSidebarCollapsed = storedValue ? (storedValue === "true" ? true : false) : false; + const isSidebarCollapsed = storedValue ? storedValue === "true" : false; const activeLayout = issueFilters?.displayFilters?.layout; const moduleDetails = moduleId ? getModuleById(moduleId) : undefined; const canUserCreateIssue = allowPermissions( diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(list)/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(list)/header.tsx index 67688828b7..7e2f7dea74 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(list)/header.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(list)/header.tsx @@ -22,7 +22,7 @@ import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; import { useAppRouter } from "@/hooks/use-app-router"; // plane web imports -import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common"; +import { CommonProjectBreadcrumbs } from "@/components/breadcrumbs/common"; export const ModulesListHeader = observer(function ModulesListHeader() { // router 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 0d2b77e94d..f43c36accc 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 @@ -17,12 +17,10 @@ import { PageAccessIcon } from "@/components/common/page-access-icon"; import { SwitcherIcon, SwitcherLabel } from "@/components/common/switcher-label"; import { PageHeaderActions } from "@/components/pages/header/actions"; import { PageSyncingBadge } from "@/components/pages/header/syncing-badge"; +import { CommonProjectBreadcrumbs } from "@/components/breadcrumbs/common"; // hooks import { useProject } from "@/hooks/store/use-project"; 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 "@/hooks/store"; export interface IPagesHeaderProps { @@ -103,7 +101,6 @@ export const PageDetailsHeader = observer(function PageDetailsHeader() { - 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 3ff7364161..a26a539dd6 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 @@ -21,7 +21,7 @@ import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; // hooks import { useProject } from "@/hooks/store/use-project"; // plane web imports -import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common"; +import { CommonProjectBreadcrumbs } from "@/components/breadcrumbs/common"; import { EPageStoreType, usePageStore } from "@/hooks/store"; export const PagesListHeader = observer(function PagesListHeader() { @@ -44,6 +44,7 @@ export const PagesListHeader = observer(function PagesListHeader() { }; await createPage(payload) + // oxlint-disable-next-line promise/always-return .then((res) => { const pageId = `/${workspaceSlug}/projects/${currentProjectDetails?.id}/pages/${res?.id}`; router.push(pageId); diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(detail)/[viewId]/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(detail)/[viewId]/header.tsx index 3393257eeb..7dfc3d15e1 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(detail)/[viewId]/header.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(detail)/[viewId]/header.tsx @@ -36,7 +36,7 @@ import { useProjectView } from "@/hooks/store/use-project-view"; import { useUserPermissions } from "@/hooks/store/user"; import { useAppRouter } from "@/hooks/use-app-router"; // plane web imports -import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common"; +import { CommonProjectBreadcrumbs } from "@/components/breadcrumbs/common"; export const ProjectViewIssuesHeader = observer(function ProjectViewIssuesHeader() { // refs diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(list)/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(list)/header.tsx index 4cf703cc92..2cc0c0b9ce 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(list)/header.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/views/(list)/header.tsx @@ -18,7 +18,7 @@ import { ViewListHeader } from "@/components/views/view-list-header"; import { useCommandPalette } from "@/hooks/store/use-command-palette"; import { useProject } from "@/hooks/store/use-project"; // plane web imports -import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common"; +import { CommonProjectBreadcrumbs } from "@/components/breadcrumbs/common"; export const ProjectViewsHeader = observer(function ProjectViewsHeader() { const { workspaceSlug, projectId } = useParams(); diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/archives/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/archives/layout.tsx index 1e81fe89e2..219d9dbc0c 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/archives/layout.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/archives/layout.tsx @@ -8,14 +8,13 @@ import { Outlet } from "react-router"; import { AppHeader } from "@/components/core/app-header"; import { ContentWrapper } from "@/components/core/content-wrapper"; -// local components -import { ProjectsListHeader } from "@/plane-web/components/projects/header"; -import { ProjectsListMobileHeader } from "@/plane-web/components/projects/mobile-header"; +import { ProjectsListMobileHeader } from "@/components/projects/mobile-header"; +import { ProjectsBaseHeader } from "@/components/project/header"; export default function ProjectListLayout() { return ( <> - } mobileHeader={} /> + } mobileHeader={} /> diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/archives/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/archives/page.tsx index 3706d80308..70a471fad2 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/archives/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/archives/page.tsx @@ -4,7 +4,7 @@ * See the LICENSE file for details. */ -import { ProjectPageRoot } from "@/plane-web/components/projects/page"; +import { ProjectPageRoot } from "@/components/projects/page"; function ProjectsPage() { return ; diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(list)/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(list)/layout.tsx index 53308d88f5..0f39520b29 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(list)/layout.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(list)/layout.tsx @@ -8,14 +8,13 @@ import { Outlet } from "react-router"; // components import { AppHeader } from "@/components/core/app-header"; import { ContentWrapper } from "@/components/core/content-wrapper"; -// local components -import { ProjectsListHeader } from "@/plane-web/components/projects/header"; -import { ProjectsListMobileHeader } from "@/plane-web/components/projects/mobile-header"; +import { ProjectsListMobileHeader } from "@/components/projects/mobile-header"; +import { ProjectsBaseHeader } from "@/components/project/header"; export default function ProjectListLayout() { return ( <> - } mobileHeader={} /> + } mobileHeader={} /> diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(list)/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(list)/page.tsx index 3706d80308..70a471fad2 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(list)/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(list)/page.tsx @@ -4,7 +4,7 @@ * See the LICENSE file for details. */ -import { ProjectPageRoot } from "@/plane-web/components/projects/page"; +import { ProjectPageRoot } from "@/components/projects/page"; function ProjectsPage() { return ; diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/sidebar.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/sidebar.tsx index c529c4efe9..c94b1090cd 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/sidebar.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/sidebar.tsx @@ -17,8 +17,6 @@ import { SidebarMenuItems } from "@/components/workspace/sidebar/sidebar-menu-it // hooks import { useFavorite } from "@/hooks/store/use-favorite"; import { useUserPermissions } from "@/hooks/store/user"; -// plane web components -import { SidebarTeamsList } from "@/plane-web/components/workspace/sidebar/teams-sidebar-list"; export const AppSidebar = observer(function AppSidebar() { // store hooks @@ -38,8 +36,6 @@ export const AppSidebar = observer(function AppSidebar() { {/* Favorites Menu */} {canPerformWorkspaceMemberActions && !isFavoriteEmpty && } - {/* Teams List */} - {/* Projects List */} diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/workspace-views/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/workspace-views/header.tsx index 0c6ebe3095..07f8ee9d9e 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/workspace-views/header.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/workspace-views/header.tsx @@ -32,7 +32,6 @@ import { WorkspaceViewQuickActions } from "@/components/workspace/views/quick-ac import { useGlobalView } from "@/hooks/store/use-global-view"; import { useIssues } from "@/hooks/store/use-issues"; import { useAppRouter } from "@/hooks/use-app-router"; -import { GlobalViewLayoutSelection } from "@/plane-web/components/views/helper"; export const GlobalIssuesHeader = observer(function GlobalIssuesHeader() { // states @@ -75,20 +74,6 @@ export const GlobalIssuesHeader = observer(function GlobalIssuesHeader() { [workspaceSlug, updateFilters, globalViewId] ); - const handleLayoutChange = useCallback( - (layout: EIssueLayoutTypes) => { - if (!workspaceSlug || !globalViewId) return; - updateFilters( - workspaceSlug.toString(), - undefined, - EIssueFilterType.DISPLAY_FILTERS, - { layout: layout }, - globalViewId - ); - }, - [workspaceSlug, updateFilters, globalViewId] - ); - const isLocked = viewDetails?.is_locked; const isDefaultView = DEFAULT_GLOBAL_VIEWS_LIST.find((view) => view.key === globalViewId); @@ -151,13 +136,6 @@ export const GlobalIssuesHeader = observer(function GlobalIssuesHeader() { - {!isLocked && ( - - )} {globalViewId && } {!isLocked && ( diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/billing/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/billing/page.tsx index 85d59618f1..3f9383f960 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/billing/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/billing/page.tsx @@ -13,10 +13,9 @@ import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; // hooks import { useWorkspace } from "@/hooks/store/use-workspace"; import { useUserPermissions } from "@/hooks/store/user"; -// plane web components -import { BillingRoot } from "@/plane-web/components/workspace/billing"; // local imports import { BillingWorkspaceSettingsHeader } from "./header"; +import { BillingRoot } from "@/components/workspace/billing"; function BillingSettingsPage() { // store hooks diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/members/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/members/page.tsx index 1e09ef32b1..0c7ea4e12a 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/members/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/members/page.tsx @@ -20,14 +20,12 @@ import { CountChip } from "@/components/common/count-chip"; import { PageHead } from "@/components/core/page-title"; import { MemberListFiltersDropdown } from "@/components/project/dropdowns/filters/member-list"; import { WorkspaceMembersList } from "@/components/workspace/settings/members-list"; +import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; +import { SendWorkspaceInvitationModal } from "@/components/workspace/members"; // hooks import { useMember } from "@/hooks/store/use-member"; import { useWorkspace } from "@/hooks/store/use-workspace"; import { useUserPermissions } from "@/hooks/store/user"; -// plane web components -import { BillingActionsButton } from "@/plane-web/components/workspace/billing/billing-actions-button"; -import { SendWorkspaceInvitationModal, MembersActivityButton } from "@/plane-web/components/workspace/members"; -import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; // local imports import type { Route } from "./+types/page"; import { MembersWorkspaceSettingsHeader } from "./header"; @@ -137,13 +135,11 @@ const WorkspaceMembersSettingsPage = observer(function WorkspaceMembersSettingsP handleUpdate={handleRoleFilterUpdate} memberType="workspace" /> - {canPerformWorkspaceAdminActions && ( setInviteModal(true)}> {t("workspace_settings.settings.members.add_member")} )} - diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/layout.tsx index a4d766c539..d2be455ea2 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/layout.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/layout.tsx @@ -6,18 +6,9 @@ import { observer } from "mobx-react"; import { Outlet } from "react-router"; -// plane web imports -import { AutomationsListWrapper } from "@/plane-web/components/automations/list/wrapper"; -import type { Route } from "./+types/layout"; -function AutomationsListLayout({ params }: Route.ComponentProps) { - const { projectId, workspaceSlug } = params; - - return ( - - - - ); +function AutomationsListLayout() { + return ; } export default observer(AutomationsListLayout); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/page.tsx index b591e91b1a..3a8b98631c 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/page.tsx @@ -18,8 +18,6 @@ import { SettingsHeading } from "@/components/settings/heading"; // hooks import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; -// plane web imports -import { CustomAutomationsRoot } from "@/plane-web/components/automations/root"; // local imports import type { Route } from "./+types/page"; import { AutomationsProjectSettingsHeader } from "./header"; @@ -70,7 +68,6 @@ function AutomationSettingsPage({ params }: Route.ComponentProps) { - ); } diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/members/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/members/page.tsx index 61abee5ff2..7df00fc526 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/members/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/members/page.tsx @@ -18,8 +18,6 @@ import { SettingsHeading } from "@/components/settings/heading"; // hooks import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; -// plane web imports -import { ProjectTeamspaceList } from "@/plane-web/components/projects/teamspaces/teamspace-list"; // local imports import type { Route } from "./+types/page"; import { MembersProjectSettingsHeader } from "./header"; @@ -50,7 +48,6 @@ function MembersSettingsPage({ params }: Route.ComponentProps) { - ); diff --git a/apps/web/app/(all)/[workspaceSlug]/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/layout.tsx index f093efe76d..1c295eeee7 100644 --- a/apps/web/app/(all)/[workspaceSlug]/layout.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/layout.tsx @@ -6,9 +6,9 @@ import { Outlet } from "react-router"; import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper"; -import { WorkspaceContentWrapper } from "@/plane-web/components/workspace/content-wrapper"; +import { WorkspaceContentWrapper } from "@/components/workspace/content-wrapper"; import { AppRailVisibilityProvider } from "@/lib/app-rail"; -import { GlobalModals } from "@/plane-web/components/common/modal/global"; +import { GlobalModals } from "@/components/common/modal/global"; import { WorkspaceAuthWrapper } from "@/layouts/auth-layout/workspace-wrapper"; import type { Route } from "./+types/layout"; diff --git a/apps/web/ce/components/active-cycles/root.tsx b/apps/web/ce/components/active-cycles/root.tsx deleted file mode 100644 index 81805656b3..0000000000 --- a/apps/web/ce/components/active-cycles/root.tsx +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// local imports -import { WorkspaceActiveCyclesUpgrade } from "./workspace-active-cycles-upgrade"; - -export function WorkspaceActiveCyclesRoot() { - return ; -} diff --git a/apps/web/ce/components/app-rail/index.ts b/apps/web/ce/components/app-rail/index.ts deleted file mode 100644 index 8b6ba42a4c..0000000000 --- a/apps/web/ce/components/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 "./app-rail-hoc"; diff --git a/apps/web/ce/components/automations/list/wrapper.tsx b/apps/web/ce/components/automations/list/wrapper.tsx deleted file mode 100644 index f884b403fd..0000000000 --- a/apps/web/ce/components/automations/list/wrapper.tsx +++ /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. - */ - -type Props = { - projectId: string; - workspaceSlug: string; - children: React.ReactNode; -}; - -export function AutomationsListWrapper(props: Props) { - return <>{props.children}>; -} diff --git a/apps/web/ce/components/automations/root.tsx b/apps/web/ce/components/automations/root.tsx deleted file mode 100644 index 1baeeb8b0b..0000000000 --- a/apps/web/ce/components/automations/root.tsx +++ /dev/null @@ -1,16 +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"; - -export type TCustomAutomationsRootProps = { - projectId: string; - workspaceSlug: string; -}; - -export function CustomAutomationsRoot(_props: TCustomAutomationsRootProps) { - return <>>; -} diff --git a/apps/web/ce/components/breadcrumbs/project-feature.tsx b/apps/web/ce/components/breadcrumbs/project-feature.tsx deleted file mode 100644 index 4b076a7abd..0000000000 --- a/apps/web/ce/components/breadcrumbs/project-feature.tsx +++ /dev/null @@ -1,66 +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 { ReactNode } from "react"; -import { observer } from "mobx-react"; -// plane imports -import type { EProjectFeatureKey } from "@plane/constants"; -import { Breadcrumbs } from "@plane/ui"; -// components -import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; -import type { TNavigationItem } from "@/components/workspace/sidebar/project-navigation"; -// hooks -import { useProject } from "@/hooks/store/use-project"; -// local imports -import { getProjectFeatureNavigation } from "../projects/navigation/helper"; - -type TProjectFeatureBreadcrumbProps = { - workspaceSlug: string; - projectId: string; - featureKey: EProjectFeatureKey; - isLast?: boolean; - additionalNavigationItems?: TNavigationItem[]; -}; - -export const ProjectFeatureBreadcrumb = observer(function ProjectFeatureBreadcrumb( - props: TProjectFeatureBreadcrumbProps -) { - const { workspaceSlug, projectId, featureKey, isLast = false, additionalNavigationItems } = props; - // store hooks - const { getPartialProjectById } = useProject(); - // derived values - const project = getPartialProjectById(projectId); - - if (!project) return null; - - const navigationItems = getProjectFeatureNavigation(workspaceSlug, projectId, project); - - // if additional navigation items are provided, add them to the navigation items - const allNavigationItems = [...(additionalNavigationItems || []), ...navigationItems]; - - const currentNavigationItem = allNavigationItems.find((item) => item.key === featureKey); - const icon = currentNavigationItem?.icon as ReactNode; - const name = currentNavigationItem?.name; - const href = currentNavigationItem?.href; - - return ( - <> - {icon}} - /> - } - showSeparator={false} - isLast={isLast} - /> - > - ); -}); diff --git a/apps/web/ce/components/command-palette/actions/index.ts b/apps/web/ce/components/command-palette/actions/index.ts deleted file mode 100644 index a6961e2387..0000000000 --- a/apps/web/ce/components/command-palette/actions/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 "./work-item-actions"; diff --git a/apps/web/ce/components/command-palette/actions/work-item-actions/change-state-list.tsx b/apps/web/ce/components/command-palette/actions/work-item-actions/change-state-list.tsx deleted file mode 100644 index 69e4aed88e..0000000000 --- a/apps/web/ce/components/command-palette/actions/work-item-actions/change-state-list.tsx +++ /dev/null @@ -1,55 +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 { Command } from "cmdk"; -import { observer } from "mobx-react"; -import { EIconSize } from "@plane/constants"; -// plane imports -import { CheckIcon, StateGroupIcon } from "@plane/propel/icons"; -import { Spinner } from "@plane/ui"; -// store hooks -import { useProjectState } from "@/hooks/store/use-project-state"; - -export type TChangeWorkItemStateListProps = { - projectId: string | null; - currentStateId: string | null; - handleStateChange: (stateId: string) => void; -}; - -export const ChangeWorkItemStateList = observer(function ChangeWorkItemStateList(props: TChangeWorkItemStateListProps) { - const { projectId, currentStateId, handleStateChange } = props; - // store hooks - const { getProjectStates } = useProjectState(); - // derived values - const projectStates = getProjectStates(projectId); - - return ( - <> - {projectStates ? ( - projectStates.length > 0 ? ( - projectStates.map((state) => ( - handleStateChange(state.id)} className="focus:outline-none"> - - - {state.name} - - {state.id === currentStateId && } - - )) - ) : ( - No states found - ) - ) : ( - - )} - > - ); -}); diff --git a/apps/web/ce/components/command-palette/helpers.tsx b/apps/web/ce/components/command-palette/helpers.tsx deleted file mode 100644 index d691579226..0000000000 --- a/apps/web/ce/components/command-palette/helpers.tsx +++ /dev/null @@ -1,116 +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 { LayoutGrid } from "lucide-react"; -// plane imports -import { CycleIcon, ModuleIcon, PageIcon, ProjectIcon, ViewsIcon } from "@plane/propel/icons"; -import type { - IWorkspaceDefaultSearchResult, - IWorkspaceIssueSearchResult, - IWorkspacePageSearchResult, - IWorkspaceProjectSearchResult, - IWorkspaceSearchResult, -} from "@plane/types"; -import { generateWorkItemLink } from "@plane/utils"; -// plane web components -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; - -export type TCommandGroups = { - [key: string]: { - icon: React.ReactNode | null; - itemName: (item: any) => React.ReactNode; - path: (item: any, projectId: string | undefined) => string; - title: string; - }; -}; - -export const commandGroups: TCommandGroups = { - cycle: { - icon: , - itemName: (cycle: IWorkspaceDefaultSearchResult) => ( - - {cycle.project__identifier} {cycle.name} - - ), - path: (cycle: IWorkspaceDefaultSearchResult) => - `/${cycle?.workspace__slug}/projects/${cycle?.project_id}/cycles/${cycle?.id}`, - title: "Cycles", - }, - issue: { - icon: null, - itemName: (issue: IWorkspaceIssueSearchResult) => ( - - {" "} - {issue.name} - - ), - path: (issue: IWorkspaceIssueSearchResult) => - generateWorkItemLink({ - workspaceSlug: issue?.workspace__slug, - projectId: issue?.project_id, - issueId: issue?.id, - projectIdentifier: issue.project__identifier, - sequenceId: issue?.sequence_id, - }), - title: "Work items", - }, - issue_view: { - icon: , - itemName: (view: IWorkspaceDefaultSearchResult) => ( - - {view.project__identifier} {view.name} - - ), - path: (view: IWorkspaceDefaultSearchResult) => - `/${view?.workspace__slug}/projects/${view?.project_id}/views/${view?.id}`, - title: "Views", - }, - module: { - icon: , - itemName: (module: IWorkspaceDefaultSearchResult) => ( - - {module.project__identifier} {module.name} - - ), - path: (module: IWorkspaceDefaultSearchResult) => - `/${module?.workspace__slug}/projects/${module?.project_id}/modules/${module?.id}`, - title: "Modules", - }, - page: { - icon: , - itemName: (page: IWorkspacePageSearchResult) => ( - - {page.project__identifiers?.[0]} {page.name} - - ), - path: (page: IWorkspacePageSearchResult, projectId: string | undefined) => { - let redirectProjectId = page?.project_ids?.[0]; - if (!!projectId && page?.project_ids?.includes(projectId)) redirectProjectId = projectId; - return redirectProjectId - ? `/${page?.workspace__slug}/projects/${redirectProjectId}/pages/${page?.id}` - : `/${page?.workspace__slug}/wiki/${page?.id}`; - }, - title: "Pages", - }, - project: { - icon: , - itemName: (project: IWorkspaceProjectSearchResult) => project?.name, - path: (project: IWorkspaceProjectSearchResult) => `/${project?.workspace__slug}/projects/${project?.id}/issues/`, - title: "Projects", - }, - workspace: { - icon: , - itemName: (workspace: IWorkspaceSearchResult) => workspace?.name, - path: (workspace: IWorkspaceSearchResult) => `/${workspace?.slug}/`, - title: "Workspaces", - }, -}; diff --git a/apps/web/ce/components/command-palette/index.ts b/apps/web/ce/components/command-palette/index.ts deleted file mode 100644 index 128f77fb15..0000000000 --- a/apps/web/ce/components/command-palette/index.ts +++ /dev/null @@ -1,8 +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 "./actions"; -export * from "./helpers"; diff --git a/apps/web/ce/components/command-palette/power-k/constants.ts b/apps/web/ce/components/command-palette/power-k/constants.ts deleted file mode 100644 index 870a4f46ba..0000000000 --- a/apps/web/ce/components/command-palette/power-k/constants.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// core -import type { TPowerKModalPageDetails } from "@/components/power-k/ui/modal/constants"; -// local imports -import type { TPowerKPageTypeExtended } from "./types"; - -export const POWER_K_MODAL_PAGE_DETAILS_EXTENDED: Record = {}; diff --git a/apps/web/ce/components/command-palette/power-k/context-detector.ts b/apps/web/ce/components/command-palette/power-k/context-detector.ts deleted file mode 100644 index 42dcc201a4..0000000000 --- a/apps/web/ce/components/command-palette/power-k/context-detector.ts +++ /dev/null @@ -1,11 +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 { Params } from "react-router"; -// local imports -import type { TPowerKContextTypeExtended } from "./types"; - -export const detectExtendedContextFromURL = (_params: Params): TPowerKContextTypeExtended | null => null; diff --git a/apps/web/ce/components/command-palette/power-k/hooks/use-extended-context-indicator.ts b/apps/web/ce/components/command-palette/power-k/hooks/use-extended-context-indicator.ts deleted file mode 100644 index e24bc08aa1..0000000000 --- a/apps/web/ce/components/command-palette/power-k/hooks/use-extended-context-indicator.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// local imports -import type { TPowerKContextType } from "@/components/power-k/core/types"; - -type TArgs = { - activeContext: TPowerKContextType | null; -}; - -export const useExtendedContextIndicator = (_args: TArgs): string | null => null; diff --git a/apps/web/ce/components/command-palette/power-k/pages/context-based/root.tsx b/apps/web/ce/components/command-palette/power-k/pages/context-based/root.tsx deleted file mode 100644 index 1cac3d3f0c..0000000000 --- a/apps/web/ce/components/command-palette/power-k/pages/context-based/root.tsx +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// components -import type { TPowerKCommandConfig } from "@/components/power-k/core/types"; -import type { ContextBasedActionsProps, TContextEntityMap } from "@/components/power-k/ui/pages/context-based"; -// local imports -import type { TPowerKContextTypeExtended } from "../../types"; - -export const CONTEXT_ENTITY_MAP_EXTENDED: Record = {}; - -export function PowerKContextBasedActionsExtended(_props: ContextBasedActionsProps) { - return null; -} - -export const usePowerKContextBasedExtendedActions = (): TPowerKCommandConfig[] => []; diff --git a/apps/web/ce/components/command-palette/power-k/search/search-results-map.tsx b/apps/web/ce/components/command-palette/power-k/search/search-results-map.tsx deleted file mode 100644 index c137f6f779..0000000000 --- a/apps/web/ce/components/command-palette/power-k/search/search-results-map.tsx +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// components -import type { TPowerKSearchResultGroupDetails } from "@/components/power-k/ui/modal/search-results-map"; -// local imports -import type { TPowerKSearchResultsKeysExtended } from "../types"; - -type TSearchResultsGroupsMapExtended = Record; - -export const SEARCH_RESULTS_GROUPS_MAP_EXTENDED: TSearchResultsGroupsMapExtended = {}; diff --git a/apps/web/ce/components/command-palette/power-k/types.ts b/apps/web/ce/components/command-palette/power-k/types.ts deleted file mode 100644 index 9d0086f70f..0000000000 --- a/apps/web/ce/components/command-palette/power-k/types.ts +++ /dev/null @@ -1,11 +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 type TPowerKContextTypeExtended = never; - -export type TPowerKPageTypeExtended = never; - -export type TPowerKSearchResultsKeysExtended = never; diff --git a/apps/web/ce/components/comments/index.ts b/apps/web/ce/components/comments/index.ts deleted file mode 100644 index 3bbc477fb9..0000000000 --- a/apps/web/ce/components/comments/index.ts +++ /dev/null @@ -1,8 +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 "./comment-block"; -export { CommentCardDisplay } from "@/components/comments/card/display"; diff --git a/apps/web/ce/components/common/quick-actions-factory.tsx b/apps/web/ce/components/common/quick-actions-factory.tsx deleted file mode 100644 index 9f94c8ddf1..0000000000 --- a/apps/web/ce/components/common/quick-actions-factory.tsx +++ /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 { useQuickActionsFactory } from "@/components/common/quick-actions-factory"; diff --git a/apps/web/ce/components/common/subscription/subscription-pill.tsx b/apps/web/ce/components/common/subscription/subscription-pill.tsx deleted file mode 100644 index 89efebe83b..0000000000 --- a/apps/web/ce/components/common/subscription/subscription-pill.tsx +++ /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. - */ - -import type { IWorkspace } from "@plane/types"; - -type TProps = { - workspace?: IWorkspace; -}; - -export function SubscriptionPill(_props: TProps) { - return <>>; -} diff --git a/apps/web/ce/components/cycles/active-cycle/index.ts b/apps/web/ce/components/cycles/active-cycle/index.ts deleted file mode 100644 index d980334597..0000000000 --- a/apps/web/ce/components/cycles/active-cycle/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 "./root"; diff --git a/apps/web/ce/components/cycles/additional-actions.tsx b/apps/web/ce/components/cycles/additional-actions.tsx deleted file mode 100644 index 45bc7b5cd5..0000000000 --- a/apps/web/ce/components/cycles/additional-actions.tsx +++ /dev/null @@ -1,14 +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 { observer } from "mobx-react"; -type Props = { - cycleId: string; - projectId: string; -}; -export const CycleAdditionalActions = observer(function CycleAdditionalActions(_props: Props) { - return <>>; -}); diff --git a/apps/web/ce/components/cycles/analytics-sidebar/root.tsx b/apps/web/ce/components/cycles/analytics-sidebar/root.tsx deleted file mode 100644 index 17501e01d8..0000000000 --- a/apps/web/ce/components/cycles/analytics-sidebar/root.tsx +++ /dev/null @@ -1,19 +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"; -// components -import { SidebarChart } from "./base"; - -type Props = { - workspaceSlug: string; - projectId: string; - cycleId: string; -}; - -export function SidebarChartRoot(props: Props) { - return ; -} diff --git a/apps/web/ce/components/cycles/end-cycle/modal.tsx b/apps/web/ce/components/cycles/end-cycle/modal.tsx deleted file mode 100644 index 98c906942b..0000000000 --- a/apps/web/ce/components/cycles/end-cycle/modal.tsx +++ /dev/null @@ -1,21 +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"; - -interface Props { - isOpen: boolean; - handleClose: () => void; - cycleId: string; - projectId: string; - workspaceSlug: string; - transferrableIssuesCount: number; - cycleName: string; -} - -export function EndCycleModal(_props: Props) { - return <>>; -} diff --git a/apps/web/ce/components/cycles/index.ts b/apps/web/ce/components/cycles/index.ts deleted file mode 100644 index defcd502a9..0000000000 --- a/apps/web/ce/components/cycles/index.ts +++ /dev/null @@ -1,10 +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 "./active-cycle"; -export * from "./analytics-sidebar"; -export * from "./additional-actions"; -export * from "./end-cycle"; diff --git a/apps/web/ce/components/de-dupe/de-dupe-button.tsx b/apps/web/ce/components/de-dupe/de-dupe-button.tsx deleted file mode 100644 index cfeeeb82ad..0000000000 --- a/apps/web/ce/components/de-dupe/de-dupe-button.tsx +++ /dev/null @@ -1,19 +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"; -// local components - -type TDeDupeButtonRoot = { - workspaceSlug: string; - isDuplicateModalOpen: boolean; - handleOnClick: () => void; - label: string; -}; - -export function DeDupeButtonRoot(_props: TDeDupeButtonRoot) { - return <>>; -} diff --git a/apps/web/ce/components/de-dupe/duplicate-modal/index.ts b/apps/web/ce/components/de-dupe/duplicate-modal/index.ts deleted file mode 100644 index d980334597..0000000000 --- a/apps/web/ce/components/de-dupe/duplicate-modal/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 "./root"; diff --git a/apps/web/ce/components/de-dupe/duplicate-modal/root.tsx b/apps/web/ce/components/de-dupe/duplicate-modal/root.tsx deleted file mode 100644 index 4afbdeca08..0000000000 --- a/apps/web/ce/components/de-dupe/duplicate-modal/root.tsx +++ /dev/null @@ -1,18 +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 { TDeDupeIssue } from "@plane/types"; - -type TDuplicateModalRootProps = { - workspaceSlug: string; - issues: TDeDupeIssue[]; - handleDuplicateIssueModal: (value: boolean) => void; -}; - -export function DuplicateModalRoot(_props: TDuplicateModalRootProps) { - return <>>; -} diff --git a/apps/web/ce/components/de-dupe/duplicate-popover/index.ts b/apps/web/ce/components/de-dupe/duplicate-popover/index.ts deleted file mode 100644 index d980334597..0000000000 --- a/apps/web/ce/components/de-dupe/duplicate-popover/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 "./root"; diff --git a/apps/web/ce/components/de-dupe/duplicate-popover/root.tsx b/apps/web/ce/components/de-dupe/duplicate-popover/root.tsx deleted file mode 100644 index 146d6b4bc8..0000000000 --- a/apps/web/ce/components/de-dupe/duplicate-popover/root.tsx +++ /dev/null @@ -1,27 +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"; -// types -import type { TDeDupeIssue } from "@plane/types"; -import type { TIssueOperations } from "@/components/issues/issue-detail"; - -type TDeDupeIssuePopoverRootProps = { - workspaceSlug: string; - projectId: string; - rootIssueId: string; - issues: TDeDupeIssue[]; - issueOperations: TIssueOperations; - disabled?: boolean; - renderDeDupeActionModals?: boolean; - isIntakeIssue?: boolean; -}; - -export const DeDupeIssuePopoverRoot = observer(function DeDupeIssuePopoverRoot(props: TDeDupeIssuePopoverRootProps) { - const {} = props; - return <>>; -}); diff --git a/apps/web/ce/components/de-dupe/issue-block/button-label.tsx b/apps/web/ce/components/de-dupe/issue-block/button-label.tsx deleted file mode 100644 index ae89c7797f..0000000000 --- a/apps/web/ce/components/de-dupe/issue-block/button-label.tsx +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -type TDeDupeIssueButtonLabelProps = { - isOpen: boolean; - buttonLabel: string; -}; - -export function DeDupeIssueButtonLabel(_props: TDeDupeIssueButtonLabelProps) { - return <>>; -} diff --git a/apps/web/ce/components/desktop/helper.ts b/apps/web/ce/components/desktop/helper.ts deleted file mode 100644 index cae74441f4..0000000000 --- a/apps/web/ce/components/desktop/helper.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 const isSidebarToggleVisible = () => true; diff --git a/apps/web/ce/components/desktop/index.ts b/apps/web/ce/components/desktop/index.ts deleted file mode 100644 index 8b7f5878ec..0000000000 --- a/apps/web/ce/components/desktop/index.ts +++ /dev/null @@ -1,8 +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 "./helper"; -export * from "./sidebar-workspace-menu"; diff --git a/apps/web/ce/components/desktop/sidebar-workspace-menu.tsx b/apps/web/ce/components/desktop/sidebar-workspace-menu.tsx deleted file mode 100644 index 9dadb9ef2e..0000000000 --- a/apps/web/ce/components/desktop/sidebar-workspace-menu.tsx +++ /dev/null @@ -1,9 +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 function DesktopSidebarWorkspaceMenu() { - return null; -} diff --git a/apps/web/ce/components/editor/embeds/mentions/index.ts b/apps/web/ce/components/editor/embeds/mentions/index.ts deleted file mode 100644 index d980334597..0000000000 --- a/apps/web/ce/components/editor/embeds/mentions/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 "./root"; diff --git a/apps/web/ce/components/editor/embeds/mentions/root.tsx b/apps/web/ce/components/editor/embeds/mentions/root.tsx deleted file mode 100644 index 21802e0a6d..0000000000 --- a/apps/web/ce/components/editor/embeds/mentions/root.tsx +++ /dev/null @@ -1,14 +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 { TCallbackMentionComponentProps } from "@plane/editor"; - -export type TEditorMentionComponentProps = TCallbackMentionComponentProps; - -export function EditorAdditionalMentionsRoot(_props: TEditorMentionComponentProps) { - return null; -} diff --git a/apps/web/ce/components/epics/epic-modal/index.ts b/apps/web/ce/components/epics/epic-modal/index.ts deleted file mode 100644 index dd65a9ec34..0000000000 --- a/apps/web/ce/components/epics/epic-modal/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 "./modal"; diff --git a/apps/web/ce/components/estimates/index.ts b/apps/web/ce/components/estimates/index.ts deleted file mode 100644 index 7fd8f88cfd..0000000000 --- a/apps/web/ce/components/estimates/index.ts +++ /dev/null @@ -1,10 +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 "./estimate-list-item-buttons"; -export * from "./update"; -export * from "./points"; -export * from "./helper"; diff --git a/apps/web/ce/components/estimates/inputs/index.ts b/apps/web/ce/components/estimates/inputs/index.ts deleted file mode 100644 index 778cadf32f..0000000000 --- a/apps/web/ce/components/estimates/inputs/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 "./time-input"; diff --git a/apps/web/ce/components/estimates/inputs/time-input.tsx b/apps/web/ce/components/estimates/inputs/time-input.tsx deleted file mode 100644 index 6eadf41838..0000000000 --- a/apps/web/ce/components/estimates/inputs/time-input.tsx +++ /dev/null @@ -1,14 +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 type TEstimateTimeInputProps = { - value?: number; - handleEstimateInputValue: (value: string) => void; -}; - -export function EstimateTimeInput(_props: TEstimateTimeInputProps) { - return <>>; -} diff --git a/apps/web/ce/components/estimates/points/delete.tsx b/apps/web/ce/components/estimates/points/delete.tsx deleted file mode 100644 index c64ee12c1a..0000000000 --- a/apps/web/ce/components/estimates/points/delete.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 type { TEstimatePointsObject, TEstimateSystemKeys, TEstimateTypeErrorObject } from "@plane/types"; - -export type TEstimatePointDelete = { - workspaceSlug: string; - projectId: string; - estimateId: string; - estimatePointId: string; - estimatePoints: TEstimatePointsObject[]; - callback: () => void; - estimatePointError?: TEstimateTypeErrorObject | undefined; - handleEstimatePointError?: (newValue: string, message: string | undefined, mode?: "add" | "delete") => void; - estimateSystem: TEstimateSystemKeys; -}; - -export function EstimatePointDelete(_props: TEstimatePointDelete) { - return <>>; -} diff --git a/apps/web/ce/components/estimates/points/index.ts b/apps/web/ce/components/estimates/points/index.ts deleted file mode 100644 index c83c4600f4..0000000000 --- a/apps/web/ce/components/estimates/points/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 "./delete"; diff --git a/apps/web/ce/components/estimates/update/index.ts b/apps/web/ce/components/estimates/update/index.ts deleted file mode 100644 index dd65a9ec34..0000000000 --- a/apps/web/ce/components/estimates/update/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 "./modal"; diff --git a/apps/web/ce/components/estimates/update/modal.tsx b/apps/web/ce/components/estimates/update/modal.tsx deleted file mode 100644 index e0600f32d3..0000000000 --- a/apps/web/ce/components/estimates/update/modal.tsx +++ /dev/null @@ -1,19 +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 { observer } from "mobx-react"; - -type TUpdateEstimateModal = { - workspaceSlug: string; - projectId: string; - estimateId: string | undefined; - isOpen: boolean; - handleClose: () => void; -}; - -export const UpdateEstimateModal = observer(function UpdateEstimateModal(_props: TUpdateEstimateModal) { - return <>>; -}); diff --git a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/index.ts b/apps/web/ce/components/gantt-chart/dependency/blockDraggables/index.ts deleted file mode 100644 index 47ac85d92b..0000000000 --- a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/index.ts +++ /dev/null @@ -1,8 +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 "./left-draggable"; -export * from "./right-draggable"; diff --git a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/left-draggable.tsx b/apps/web/ce/components/gantt-chart/dependency/blockDraggables/left-draggable.tsx deleted file mode 100644 index 34a8aac7d4..0000000000 --- a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/left-draggable.tsx +++ /dev/null @@ -1,17 +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 { RefObject } from "react"; -import type { IGanttBlock } from "@plane/types"; - -type LeftDependencyDraggableProps = { - block: IGanttBlock; - ganttContainerRef: RefObject; -}; - -export function LeftDependencyDraggable(_props: LeftDependencyDraggableProps) { - return <>>; -} diff --git a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/right-draggable.tsx b/apps/web/ce/components/gantt-chart/dependency/blockDraggables/right-draggable.tsx deleted file mode 100644 index d6badd067d..0000000000 --- a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/right-draggable.tsx +++ /dev/null @@ -1,16 +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 { RefObject } from "react"; -import type { IGanttBlock } from "@plane/types"; - -type RightDependencyDraggableProps = { - block: IGanttBlock; - ganttContainerRef: RefObject; -}; -export function RightDependencyDraggable(_props: RightDependencyDraggableProps) { - return <>>; -} diff --git a/apps/web/ce/components/gantt-chart/dependency/dependency-paths.tsx b/apps/web/ce/components/gantt-chart/dependency/dependency-paths.tsx deleted file mode 100644 index 6332a71cb2..0000000000 --- a/apps/web/ce/components/gantt-chart/dependency/dependency-paths.tsx +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -type Props = { - isEpic?: boolean; -}; -export function TimelineDependencyPaths(_props: Props) { - return <>>; -} diff --git a/apps/web/ce/components/gantt-chart/dependency/draggable-dependency-path.tsx b/apps/web/ce/components/gantt-chart/dependency/draggable-dependency-path.tsx deleted file mode 100644 index 0f73549ef1..0000000000 --- a/apps/web/ce/components/gantt-chart/dependency/draggable-dependency-path.tsx +++ /dev/null @@ -1,9 +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 function TimelineDraggablePath() { - return <>>; -} diff --git a/apps/web/ce/components/gantt-chart/dependency/index.ts b/apps/web/ce/components/gantt-chart/dependency/index.ts deleted file mode 100644 index d92fa43db6..0000000000 --- a/apps/web/ce/components/gantt-chart/dependency/index.ts +++ /dev/null @@ -1,9 +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 "./blockDraggables"; -export * from "./dependency-paths"; -export * from "./draggable-dependency-path"; diff --git a/apps/web/ce/components/gantt-chart/index.ts b/apps/web/ce/components/gantt-chart/index.ts deleted file mode 100644 index cebec203cb..0000000000 --- a/apps/web/ce/components/gantt-chart/index.ts +++ /dev/null @@ -1,8 +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 "./dependency"; -export * from "./layers"; diff --git a/apps/web/ce/components/gantt-chart/layers/additional-layers.tsx b/apps/web/ce/components/gantt-chart/layers/additional-layers.tsx deleted file mode 100644 index 0a5ced219e..0000000000 --- a/apps/web/ce/components/gantt-chart/layers/additional-layers.tsx +++ /dev/null @@ -1,14 +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 { FC } from "react"; - -type Props = { - itemsContainerWidth: number; - blockCount: number; -}; - -export const GanttAdditionalLayers: FC = () => null; diff --git a/apps/web/ce/components/gantt-chart/layers/index.ts b/apps/web/ce/components/gantt-chart/layers/index.ts deleted file mode 100644 index 84012f80a4..0000000000 --- a/apps/web/ce/components/gantt-chart/layers/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 { GanttAdditionalLayers } from "./additional-layers"; diff --git a/apps/web/ce/components/global/index.ts b/apps/web/ce/components/global/index.ts deleted file mode 100644 index 1d62fc2cfe..0000000000 --- a/apps/web/ce/components/global/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 "./version-number"; diff --git a/apps/web/ce/components/home/header.tsx b/apps/web/ce/components/home/header.tsx deleted file mode 100644 index 5fab957355..0000000000 --- a/apps/web/ce/components/home/header.tsx +++ /dev/null @@ -1,9 +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 function HomePageHeader() { - return <>>; -} diff --git a/apps/web/ce/components/home/index.ts b/apps/web/ce/components/home/index.ts deleted file mode 100644 index 9a89775602..0000000000 --- a/apps/web/ce/components/home/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 "./peek-overviews"; diff --git a/apps/web/ce/components/inbox/source-pill.tsx b/apps/web/ce/components/inbox/source-pill.tsx deleted file mode 100644 index 6d7763f8ba..0000000000 --- a/apps/web/ce/components/inbox/source-pill.tsx +++ /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. - */ - -import type { EInboxIssueSource } from "@plane/types"; - -export type TInboxSourcePill = { - source: EInboxIssueSource; -}; - -export function InboxSourcePill(_props: TInboxSourcePill) { - return <>>; -} diff --git a/apps/web/ce/components/instance/index.ts b/apps/web/ce/components/instance/index.ts deleted file mode 100644 index 78624d0ec5..0000000000 --- a/apps/web/ce/components/instance/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 "./maintenance-message"; diff --git a/apps/web/ce/components/issues/bulk-operations/index.ts b/apps/web/ce/components/issues/bulk-operations/index.ts deleted file mode 100644 index d980334597..0000000000 --- a/apps/web/ce/components/issues/bulk-operations/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 "./root"; diff --git a/apps/web/ce/components/issues/filters/applied-filters/issue-types.tsx b/apps/web/ce/components/issues/filters/applied-filters/issue-types.tsx deleted file mode 100644 index 09ff7737f5..0000000000 --- a/apps/web/ce/components/issues/filters/applied-filters/issue-types.tsx +++ /dev/null @@ -1,17 +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 { observer } from "mobx-react"; - -type Props = { - handleRemove: (val: string) => void; - values: string[]; - editable: boolean | undefined; -}; - -export const AppliedIssueTypeFilters = observer(function AppliedIssueTypeFilters(_props: Props) { - return null; -}); diff --git a/apps/web/ce/components/issues/filters/issue-types.tsx b/apps/web/ce/components/issues/filters/issue-types.tsx deleted file mode 100644 index db7b06f77f..0000000000 --- a/apps/web/ce/components/issues/filters/issue-types.tsx +++ /dev/null @@ -1,17 +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 { observer } from "mobx-react"; - -type Props = { - appliedFilters: string[] | null; - handleUpdate: (val: string) => void; - searchQuery: string; -}; - -export const FilterIssueTypes = observer(function FilterIssueTypes(_props: Props) { - return null; -}); diff --git a/apps/web/ce/components/issues/filters/team-project.tsx b/apps/web/ce/components/issues/filters/team-project.tsx deleted file mode 100644 index f838f4c948..0000000000 --- a/apps/web/ce/components/issues/filters/team-project.tsx +++ /dev/null @@ -1,17 +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 { observer } from "mobx-react"; - -type Props = { - appliedFilters: string[] | null; - handleUpdate: (val: string) => void; - searchQuery: string; -}; - -export const FilterTeamProjects = observer(function FilterTeamProjects(_props: Props) { - return null; -}); diff --git a/apps/web/ce/components/issues/issue-detail-widgets/action-buttons.tsx b/apps/web/ce/components/issues/issue-detail-widgets/action-buttons.tsx deleted file mode 100644 index 4c17d1be12..0000000000 --- a/apps/web/ce/components/issues/issue-detail-widgets/action-buttons.tsx +++ /dev/null @@ -1,21 +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 types -import type { TIssueServiceType, TWorkItemWidgets } from "@plane/types"; - -export type TWorkItemAdditionalWidgetActionButtonsProps = { - disabled: boolean; - hideWidgets: TWorkItemWidgets[]; - issueServiceType: TIssueServiceType; - projectId: string; - workItemId: string; - workspaceSlug: string; -}; - -export function WorkItemAdditionalWidgetActionButtons(_props: TWorkItemAdditionalWidgetActionButtonsProps) { - return null; -} diff --git a/apps/web/ce/components/issues/issue-detail-widgets/collapsibles.tsx b/apps/web/ce/components/issues/issue-detail-widgets/collapsibles.tsx deleted file mode 100644 index 626107cdb2..0000000000 --- a/apps/web/ce/components/issues/issue-detail-widgets/collapsibles.tsx +++ /dev/null @@ -1,21 +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 types -import type { TIssueServiceType, TWorkItemWidgets } from "@plane/types"; - -export type TWorkItemAdditionalWidgetCollapsiblesProps = { - disabled: boolean; - hideWidgets: TWorkItemWidgets[]; - issueServiceType: TIssueServiceType; - projectId: string; - workItemId: string; - workspaceSlug: string; -}; - -export function WorkItemAdditionalWidgetCollapsibles(_props: TWorkItemAdditionalWidgetCollapsiblesProps) { - return null; -} diff --git a/apps/web/ce/components/issues/issue-detail-widgets/modals.tsx b/apps/web/ce/components/issues/issue-detail-widgets/modals.tsx deleted file mode 100644 index 9356b77270..0000000000 --- a/apps/web/ce/components/issues/issue-detail-widgets/modals.tsx +++ /dev/null @@ -1,20 +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 types -import type { TIssueServiceType, TWorkItemWidgets } from "@plane/types"; - -export type TWorkItemAdditionalWidgetModalsProps = { - hideWidgets: TWorkItemWidgets[]; - issueServiceType: TIssueServiceType; - projectId: string; - workItemId: string; - workspaceSlug: string; -}; - -export function WorkItemAdditionalWidgetModals(_props: TWorkItemAdditionalWidgetModalsProps) { - return null; -} diff --git a/apps/web/ce/components/issues/issue-details/additional-activity-root.tsx b/apps/web/ce/components/issues/issue-details/additional-activity-root.tsx deleted file mode 100644 index 95804501ab..0000000000 --- a/apps/web/ce/components/issues/issue-details/additional-activity-root.tsx +++ /dev/null @@ -1,18 +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 { observer } from "mobx-react"; - -export type TAdditionalActivityRoot = { - activityId: string; - showIssue?: boolean; - ends: "top" | "bottom" | undefined; - field: string | undefined; -}; - -export const AdditionalActivityRoot = observer(function AdditionalActivityRoot(_props: TAdditionalActivityRoot) { - return <>>; -}); diff --git a/apps/web/ce/components/issues/issue-details/additional-properties.tsx b/apps/web/ce/components/issues/issue-details/additional-properties.tsx deleted file mode 100644 index a169a8863a..0000000000 --- a/apps/web/ce/components/issues/issue-details/additional-properties.tsx +++ /dev/null @@ -1,21 +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"; -// plane imports - -export type TWorkItemAdditionalSidebarProperties = { - workItemId: string; - workItemTypeId: string | null; - projectId: string; - workspaceSlug: string; - isEditable: boolean; - isPeekView?: boolean; -}; - -export function WorkItemAdditionalSidebarProperties(_props: TWorkItemAdditionalSidebarProperties) { - return <>>; -} diff --git a/apps/web/ce/components/issues/issue-details/index.ts b/apps/web/ce/components/issues/issue-details/index.ts deleted file mode 100644 index abd9df1638..0000000000 --- a/apps/web/ce/components/issues/issue-details/index.ts +++ /dev/null @@ -1,13 +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 "./issue-identifier"; -export * from "./issue-properties-activity"; -export * from "./issue-type-switcher"; -export * from "./issue-type-activity"; -export * from "./parent-select-root"; -export * from "./issue-creator"; -export * from "./additional-activity-root"; diff --git a/apps/web/ce/components/issues/issue-details/issue-properties-activity/index.ts b/apps/web/ce/components/issues/issue-details/issue-properties-activity/index.ts deleted file mode 100644 index d980334597..0000000000 --- a/apps/web/ce/components/issues/issue-details/issue-properties-activity/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 "./root"; diff --git a/apps/web/ce/components/issues/issue-details/issue-properties-activity/root.tsx b/apps/web/ce/components/issues/issue-details/issue-properties-activity/root.tsx deleted file mode 100644 index c6a50531ee..0000000000 --- a/apps/web/ce/components/issues/issue-details/issue-properties-activity/root.tsx +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -type TIssueAdditionalPropertiesActivity = { - activityId: string; - ends: "top" | "bottom" | undefined; -}; - -export function IssueAdditionalPropertiesActivity(_props: TIssueAdditionalPropertiesActivity) { - return <>>; -} diff --git a/apps/web/ce/components/issues/issue-details/issue-type-activity.tsx b/apps/web/ce/components/issues/issue-details/issue-type-activity.tsx deleted file mode 100644 index 08b499f823..0000000000 --- a/apps/web/ce/components/issues/issue-details/issue-type-activity.tsx +++ /dev/null @@ -1,13 +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 { observer } from "mobx-react"; - -export type TIssueTypeActivity = { activityId: string; showIssue?: boolean; ends: "top" | "bottom" | undefined }; - -export const IssueTypeActivity = observer(function IssueTypeActivity(_props: TIssueTypeActivity) { - return <>>; -}); diff --git a/apps/web/ce/components/issues/issue-details/sidebar/date-alert.tsx b/apps/web/ce/components/issues/issue-details/sidebar/date-alert.tsx deleted file mode 100644 index 6d5459f53d..0000000000 --- a/apps/web/ce/components/issues/issue-details/sidebar/date-alert.tsx +++ /dev/null @@ -1,17 +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 { TIssue } from "@plane/types"; - -export type TDateAlertProps = { - date: string; - workItem: TIssue; - projectId: string; -}; -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function DateAlert(props: TDateAlertProps) { - return <>>; -} diff --git a/apps/web/ce/components/issues/issue-details/sidebar/transfer-hop-info.tsx b/apps/web/ce/components/issues/issue-details/sidebar/transfer-hop-info.tsx deleted file mode 100644 index 071c8476e9..0000000000 --- a/apps/web/ce/components/issues/issue-details/sidebar/transfer-hop-info.tsx +++ /dev/null @@ -1,11 +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 { TIssue } from "@plane/types"; -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function TransferHopInfo({ workItem }: { workItem: TIssue }) { - return <>>; -} diff --git a/apps/web/ce/components/issues/issue-layouts/additional-properties.tsx b/apps/web/ce/components/issues/issue-layouts/additional-properties.tsx deleted file mode 100644 index 35c62fed4a..0000000000 --- a/apps/web/ce/components/issues/issue-layouts/additional-properties.tsx +++ /dev/null @@ -1,17 +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 type { IIssueDisplayProperties, TIssue } from "@plane/types"; - -export type TWorkItemLayoutAdditionalProperties = { - displayProperties: IIssueDisplayProperties; - issue: TIssue; -}; - -export function WorkItemLayoutAdditionalProperties(_props: TWorkItemLayoutAdditionalProperties) { - return <>>; -} diff --git a/apps/web/ce/components/issues/issue-layouts/empty-states/index.ts b/apps/web/ce/components/issues/issue-layouts/empty-states/index.ts deleted file mode 100644 index 27407dd37b..0000000000 --- a/apps/web/ce/components/issues/issue-layouts/empty-states/index.ts +++ /dev/null @@ -1,8 +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 "./team-issues"; -export * from "./team-view-issues"; diff --git a/apps/web/ce/components/issues/issue-layouts/empty-states/team-issues.tsx b/apps/web/ce/components/issues/issue-layouts/empty-states/team-issues.tsx deleted file mode 100644 index fbd6d73dce..0000000000 --- a/apps/web/ce/components/issues/issue-layouts/empty-states/team-issues.tsx +++ /dev/null @@ -1,11 +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 { observer } from "mobx-react"; - -export const TeamEmptyState = observer(function TeamEmptyState() { - return <>>; -}); diff --git a/apps/web/ce/components/issues/issue-layouts/empty-states/team-project.tsx b/apps/web/ce/components/issues/issue-layouts/empty-states/team-project.tsx deleted file mode 100644 index b221f01086..0000000000 --- a/apps/web/ce/components/issues/issue-layouts/empty-states/team-project.tsx +++ /dev/null @@ -1,11 +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 { observer } from "mobx-react"; - -export const TeamProjectWorkItemEmptyState = observer(function TeamProjectWorkItemEmptyState() { - return <>>; -}); diff --git a/apps/web/ce/components/issues/issue-layouts/empty-states/team-view-issues.tsx b/apps/web/ce/components/issues/issue-layouts/empty-states/team-view-issues.tsx deleted file mode 100644 index 8453b37697..0000000000 --- a/apps/web/ce/components/issues/issue-layouts/empty-states/team-view-issues.tsx +++ /dev/null @@ -1,11 +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 { observer } from "mobx-react"; - -export const TeamViewEmptyState = observer(function TeamViewEmptyState() { - return <>>; -}); diff --git a/apps/web/ce/components/issues/issue-layouts/issue-stats.tsx b/apps/web/ce/components/issues/issue-layouts/issue-stats.tsx deleted file mode 100644 index fc6fbc0a02..0000000000 --- a/apps/web/ce/components/issues/issue-layouts/issue-stats.tsx +++ /dev/null @@ -1,19 +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"; - -type Props = { - issueId: string; - className?: string; - size?: number; - showProgressText?: boolean; - showLabel?: boolean; -}; - -export function IssueStats(_props: Props) { - return <>>; -} diff --git a/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/duplicate-modal.tsx b/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/duplicate-modal.tsx deleted file mode 100644 index b8b142f740..0000000000 --- a/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/duplicate-modal.tsx +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -type TDuplicateWorkItemModalProps = { - workItemId: string; - onClose: () => void; - isOpen: boolean; - workspaceSlug: string; - projectId: string; -}; - -export function DuplicateWorkItemModal(_props: TDuplicateWorkItemModalProps) { - return <>>; -} diff --git a/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/index.ts b/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/index.ts deleted file mode 100644 index e99ab1e46d..0000000000 --- a/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/index.ts +++ /dev/null @@ -1,8 +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 "./duplicate-modal"; -export * from "./copy-menu-helper"; diff --git a/apps/web/ce/components/issues/issue-layouts/utils.tsx b/apps/web/ce/components/issues/issue-layouts/utils.tsx deleted file mode 100644 index 0a0ddf7f72..0000000000 --- a/apps/web/ce/components/issues/issue-layouts/utils.tsx +++ /dev/null @@ -1,122 +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 { FC } from "react"; -import { CalendarDays, LayersIcon, Paperclip } from "lucide-react"; -// types -import { ISSUE_GROUP_BY_OPTIONS } from "@plane/constants"; -import type { ISvgIcons } from "@plane/propel/icons"; -import { - LinkIcon, - CycleIcon, - StatePropertyIcon, - ModuleIcon, - MembersPropertyIcon, - DueDatePropertyIcon, - EstimatePropertyIcon, - LabelPropertyIcon, - PriorityPropertyIcon, - StartDatePropertyIcon, -} from "@plane/propel/icons"; -import type { - IGroupByColumn, - IIssueDisplayProperties, - TGetColumns, - TIssueGroupByOptions, - TSpreadsheetColumn, -} from "@plane/types"; -// components -import { - SpreadsheetAssigneeColumn, - SpreadsheetAttachmentColumn, - SpreadsheetCreatedOnColumn, - SpreadsheetDueDateColumn, - SpreadsheetEstimateColumn, - SpreadsheetLabelColumn, - SpreadsheetModuleColumn, - SpreadsheetCycleColumn, - SpreadsheetLinkColumn, - SpreadsheetPriorityColumn, - SpreadsheetStartDateColumn, - SpreadsheetStateColumn, - SpreadsheetSubIssueColumn, - SpreadsheetUpdatedOnColumn, -} from "@/components/issues/issue-layouts/spreadsheet/columns"; -// store -import { store } from "@/lib/store-context"; - -export type TGetScopeMemberIdsResult = { - memberIds: string[]; - includeNone: boolean; -}; - -export const getScopeMemberIds = ({ isWorkspaceLevel, projectId }: TGetColumns): TGetScopeMemberIdsResult => { - // store values - const { workspaceMemberIds } = store.memberRoot.workspace; - const { projectMemberIds } = store.memberRoot.project; - // derived values - const memberIds = workspaceMemberIds; - - if (isWorkspaceLevel) { - return { memberIds: memberIds ?? [], includeNone: true }; - } - - if (projectId || (projectMemberIds && projectMemberIds.length > 0)) { - const { getProjectMemberIds } = store.memberRoot.project; - const _projectMemberIds = projectId ? getProjectMemberIds(projectId, false) : projectMemberIds; - return { - memberIds: _projectMemberIds ?? [], - includeNone: true, - }; - } - - return { memberIds: [], includeNone: true }; -}; - -export const getTeamProjectColumns = (): IGroupByColumn[] | undefined => undefined; - -export const SpreadSheetPropertyIconMap: Record> = { - MembersPropertyIcon: MembersPropertyIcon, - CalenderDays: CalendarDays, - DueDatePropertyIcon: DueDatePropertyIcon, - EstimatePropertyIcon: EstimatePropertyIcon, - LabelPropertyIcon: LabelPropertyIcon, - ModuleIcon: ModuleIcon, - ContrastIcon: CycleIcon, - PriorityPropertyIcon: PriorityPropertyIcon, - StartDatePropertyIcon: StartDatePropertyIcon, - StatePropertyIcon: StatePropertyIcon, - Link2: LinkIcon, - Paperclip: Paperclip, - LayersIcon: LayersIcon, -}; - -export const SPREADSHEET_COLUMNS: { [key in keyof IIssueDisplayProperties]: TSpreadsheetColumn } = { - assignee: SpreadsheetAssigneeColumn, - created_on: SpreadsheetCreatedOnColumn, - due_date: SpreadsheetDueDateColumn, - estimate: SpreadsheetEstimateColumn, - labels: SpreadsheetLabelColumn, - modules: SpreadsheetModuleColumn, - cycle: SpreadsheetCycleColumn, - link: SpreadsheetLinkColumn, - priority: SpreadsheetPriorityColumn, - start_date: SpreadsheetStartDateColumn, - state: SpreadsheetStateColumn, - sub_issue_count: SpreadsheetSubIssueColumn, - updated_on: SpreadsheetUpdatedOnColumn, - attachment_count: SpreadsheetAttachmentColumn, -}; - -export const useGroupByOptions = ( - options: TIssueGroupByOptions[] -): { - key: TIssueGroupByOptions; - titleTranslationKey: string; -}[] => { - const groupByOptions = ISSUE_GROUP_BY_OPTIONS.filter((option) => options.includes(option.key)); - return groupByOptions; -}; diff --git a/apps/web/ce/components/issues/issue-modal/index.ts b/apps/web/ce/components/issues/issue-modal/index.ts deleted file mode 100644 index 006cc1c829..0000000000 --- a/apps/web/ce/components/issues/issue-modal/index.ts +++ /dev/null @@ -1,9 +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"; -export * from "./issue-type-select"; -export * from "./template-select"; diff --git a/apps/web/ce/components/issues/issue-modal/issue-type-select.tsx b/apps/web/ce/components/issues/issue-modal/issue-type-select.tsx deleted file mode 100644 index dd4c29cca8..0000000000 --- a/apps/web/ce/components/issues/issue-modal/issue-type-select.tsx +++ /dev/null @@ -1,34 +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 { Control } from "react-hook-form"; -// plane imports -import type { EditorRefApi } from "@plane/editor"; -// types -import type { TBulkIssueProperties, TIssue } from "@plane/types"; - -export type TIssueFields = TIssue & TBulkIssueProperties; - -export type TIssueTypeDropdownVariant = "xs" | "sm"; - -export type TIssueTypeSelectProps> = { - control: Control; - projectId: string | null; - editorRef?: React.MutableRefObject; - disabled?: boolean; - variant?: TIssueTypeDropdownVariant; - placeholder?: string; - isRequired?: boolean; - renderChevron?: boolean; - dropDownContainerClassName?: string; - showMandatoryFieldInfo?: boolean; // Show info about mandatory fields - handleFormChange?: () => void; -}; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function IssueTypeSelect>(props: TIssueTypeSelectProps) { - return <>>; -} diff --git a/apps/web/ce/components/issues/issue-modal/modal-additional-properties.tsx b/apps/web/ce/components/issues/issue-modal/modal-additional-properties.tsx deleted file mode 100644 index 0255407ae6..0000000000 --- a/apps/web/ce/components/issues/issue-modal/modal-additional-properties.tsx +++ /dev/null @@ -1,16 +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 type TWorkItemModalAdditionalPropertiesProps = { - isDraft?: boolean; - projectId: string | null; - workItemId: string | undefined; - workspaceSlug: string; -}; - -export function WorkItemModalAdditionalProperties(_props: TWorkItemModalAdditionalPropertiesProps) { - return null; -} diff --git a/apps/web/ce/components/issues/issue-modal/template-select.tsx b/apps/web/ce/components/issues/issue-modal/template-select.tsx deleted file mode 100644 index ee0a081c6d..0000000000 --- a/apps/web/ce/components/issues/issue-modal/template-select.tsx +++ /dev/null @@ -1,24 +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 type TWorkItemTemplateDropdownSize = "xs" | "sm"; - -export type TWorkItemTemplateSelect = { - projectId: string | null; - typeId: string | null; - disabled?: boolean; - size?: TWorkItemTemplateDropdownSize; - placeholder?: string; - renderChevron?: boolean; - dropDownContainerClassName?: string; - handleModalClose: () => void; - handleFormChange?: () => void; -}; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function WorkItemTemplateSelect(props: TWorkItemTemplateSelect) { - return <>>; -} diff --git a/apps/web/ce/components/issues/quick-add/index.ts b/apps/web/ce/components/issues/quick-add/index.ts deleted file mode 100644 index d980334597..0000000000 --- a/apps/web/ce/components/issues/quick-add/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 "./root"; diff --git a/apps/web/ce/components/issues/worklog/activity/index.ts b/apps/web/ce/components/issues/worklog/activity/index.ts deleted file mode 100644 index d980334597..0000000000 --- a/apps/web/ce/components/issues/worklog/activity/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 "./root"; diff --git a/apps/web/ce/components/issues/worklog/activity/root.tsx b/apps/web/ce/components/issues/worklog/activity/root.tsx deleted file mode 100644 index 3b3d33729b..0000000000 --- a/apps/web/ce/components/issues/worklog/activity/root.tsx +++ /dev/null @@ -1,19 +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 { TIssueActivityComment } from "@plane/types"; - -type TIssueActivityWorklog = { - workspaceSlug: string; - projectId: string; - issueId: string; - activityComment: TIssueActivityComment; - ends?: "top" | "bottom"; -}; - -export function IssueActivityWorklog(_props: TIssueActivityWorklog) { - return <>>; -} diff --git a/apps/web/ce/components/issues/worklog/activity/worklog-create-button.tsx b/apps/web/ce/components/issues/worklog/activity/worklog-create-button.tsx deleted file mode 100644 index 5ded8d02bb..0000000000 --- a/apps/web/ce/components/issues/worklog/activity/worklog-create-button.tsx +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -type TIssueActivityWorklogCreateButton = { - workspaceSlug: string; - projectId: string; - issueId: string; - disabled: boolean; -}; - -export function IssueActivityWorklogCreateButton(_props: TIssueActivityWorklogCreateButton) { - return <>>; -} diff --git a/apps/web/ce/components/issues/worklog/property/index.ts b/apps/web/ce/components/issues/worklog/property/index.ts deleted file mode 100644 index d980334597..0000000000 --- a/apps/web/ce/components/issues/worklog/property/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 "./root"; diff --git a/apps/web/ce/components/issues/worklog/property/root.tsx b/apps/web/ce/components/issues/worklog/property/root.tsx deleted file mode 100644 index 7eff7d6a8a..0000000000 --- a/apps/web/ce/components/issues/worklog/property/root.tsx +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -type TIssueWorklogProperty = { - workspaceSlug: string; - projectId: string; - issueId: string; - disabled: boolean; -}; - -export function IssueWorklogProperty(_props: TIssueWorklogProperty) { - return <>>; -} diff --git a/apps/web/ce/components/license/index.ts b/apps/web/ce/components/license/index.ts deleted file mode 100644 index dd65a9ec34..0000000000 --- a/apps/web/ce/components/license/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 "./modal"; diff --git a/apps/web/ce/components/license/modal/index.ts b/apps/web/ce/components/license/modal/index.ts deleted file mode 100644 index c255805ae8..0000000000 --- a/apps/web/ce/components/license/modal/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 "./upgrade-modal"; diff --git a/apps/web/ce/components/navigations/index.ts b/apps/web/ce/components/navigations/index.ts deleted file mode 100644 index b4131e9325..0000000000 --- a/apps/web/ce/components/navigations/index.ts +++ /dev/null @@ -1,8 +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 "./use-navigation-items"; -export * from "./top-navigation-root"; diff --git a/apps/web/ce/components/pages/editor/embed/index.ts b/apps/web/ce/components/pages/editor/embed/index.ts deleted file mode 100644 index 7ab6ada6b6..0000000000 --- a/apps/web/ce/components/pages/editor/embed/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 "./issue-embed-upgrade-card"; diff --git a/apps/web/ce/components/pages/editor/embed/issue-embed-upgrade-card.tsx b/apps/web/ce/components/pages/editor/embed/issue-embed-upgrade-card.tsx deleted file mode 100644 index bcd5cebc40..0000000000 --- a/apps/web/ce/components/pages/editor/embed/issue-embed-upgrade-card.tsx +++ /dev/null @@ -1,39 +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 { getButtonStyling } from "@plane/propel/button"; -import { cn } from "@plane/utils"; -// components -import { ProIcon } from "@/components/common/pro-icon"; - -export function IssueEmbedUpgradeCard(props: any) { - return ( - - - - - Embed and access issues in pages seamlessly, upgrade to Plane Pro now. - - - - Upgrade - - - ); -} diff --git a/apps/web/ce/components/pages/editor/index.ts b/apps/web/ce/components/pages/editor/index.ts deleted file mode 100644 index d95ce40f04..0000000000 --- a/apps/web/ce/components/pages/editor/index.ts +++ /dev/null @@ -1,8 +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 "./ai"; -export * from "./embed"; diff --git a/apps/web/ce/components/pages/extra-actions.tsx b/apps/web/ce/components/pages/extra-actions.tsx deleted file mode 100644 index b89ef9bf56..0000000000 --- a/apps/web/ce/components/pages/extra-actions.tsx +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// store -import type { EPageStoreType } from "@/hooks/store"; -import type { TPageInstance } from "@/store/pages/base-page"; - -export type TPageHeaderExtraActionsProps = { - page: TPageInstance; - storeType: EPageStoreType; -}; - -export function PageDetailsHeaderExtraActions(_props: TPageHeaderExtraActionsProps) { - return null; -} diff --git a/apps/web/ce/components/pages/header/collaborators-list.tsx b/apps/web/ce/components/pages/header/collaborators-list.tsx deleted file mode 100644 index 1deaf46760..0000000000 --- a/apps/web/ce/components/pages/header/collaborators-list.tsx +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// store -import type { TPageInstance } from "@/store/pages/base-page"; - -export type TPageCollaboratorsListProps = { - page: TPageInstance; -}; - -export function PageCollaboratorsList({}: TPageCollaboratorsListProps) { - return null; -} diff --git a/apps/web/ce/components/pages/header/move-control.tsx b/apps/web/ce/components/pages/header/move-control.tsx deleted file mode 100644 index 744893dbb6..0000000000 --- a/apps/web/ce/components/pages/header/move-control.tsx +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// store -import type { TPageInstance } from "@/store/pages/base-page"; - -export type TPageMoveControlProps = { - page: TPageInstance; -}; - -export function PageMoveControl({}: TPageMoveControlProps) { - return null; -} diff --git a/apps/web/ce/components/pages/header/share-control.tsx b/apps/web/ce/components/pages/header/share-control.tsx deleted file mode 100644 index ea4cb0ae41..0000000000 --- a/apps/web/ce/components/pages/header/share-control.tsx +++ /dev/null @@ -1,18 +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 { EPageStoreType } from "@/hooks/store"; -// store -import type { TPageInstance } from "@/store/pages/base-page"; - -export type TPageShareControlProps = { - page: TPageInstance; - storeType: EPageStoreType; -}; - -export function PageShareControl({}: TPageShareControlProps) { - return null; -} diff --git a/apps/web/ce/components/pages/index.ts b/apps/web/ce/components/pages/index.ts deleted file mode 100644 index 12beee9cd3..0000000000 --- a/apps/web/ce/components/pages/index.ts +++ /dev/null @@ -1,9 +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 "./editor"; -export * from "./modals"; -export * from "./extra-actions"; diff --git a/apps/web/ce/components/pages/modals/index.ts b/apps/web/ce/components/pages/modals/index.ts deleted file mode 100644 index ee765fe166..0000000000 --- a/apps/web/ce/components/pages/modals/index.ts +++ /dev/null @@ -1,8 +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 "./move-page-modal"; -export * from "./modals"; diff --git a/apps/web/ce/components/pages/modals/modals.tsx b/apps/web/ce/components/pages/modals/modals.tsx deleted file mode 100644 index 6720c8bbb2..0000000000 --- a/apps/web/ce/components/pages/modals/modals.tsx +++ /dev/null @@ -1,20 +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 { observer } from "mobx-react"; -// components -import type { EPageStoreType } from "@/hooks/store"; -// store -import type { TPageInstance } from "@/store/pages/base-page"; - -export type TPageModalsProps = { - page: TPageInstance; - storeType: EPageStoreType; -}; - -export const PageModals = observer(function PageModals(_props: TPageModalsProps) { - return null; -}); diff --git a/apps/web/ce/components/pages/modals/move-page-modal.tsx b/apps/web/ce/components/pages/modals/move-page-modal.tsx deleted file mode 100644 index 39c3a02225..0000000000 --- a/apps/web/ce/components/pages/modals/move-page-modal.tsx +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// store types -import type { TPageInstance } from "@/store/pages/base-page"; - -export type TMovePageModalProps = { - isOpen: boolean; - onClose: () => void; - page: TPageInstance; -}; - -export function MovePageModal(_props: TMovePageModalProps) { - return null; -} diff --git a/apps/web/ce/components/pages/navigation-pane/tab-panels/assets.tsx b/apps/web/ce/components/pages/navigation-pane/tab-panels/assets.tsx deleted file mode 100644 index 68487f9c66..0000000000 --- a/apps/web/ce/components/pages/navigation-pane/tab-panels/assets.tsx +++ /dev/null @@ -1,21 +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 { TEditorAsset } from "@plane/editor"; -// store -import type { TPageInstance } from "@/store/pages/base-page"; - -export type TAdditionalPageNavigationPaneAssetItemProps = { - asset: TEditorAsset; - assetSrc: string; - assetDownloadSrc: string; - page: TPageInstance; -}; - -export function AdditionalPageNavigationPaneAssetItem(_props: TAdditionalPageNavigationPaneAssetItemProps) { - return null; -} diff --git a/apps/web/ce/components/pages/navigation-pane/tab-panels/root.tsx b/apps/web/ce/components/pages/navigation-pane/tab-panels/root.tsx deleted file mode 100644 index 14b19476bf..0000000000 --- a/apps/web/ce/components/pages/navigation-pane/tab-panels/root.tsx +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// store -import type { TPageInstance } from "@/store/pages/base-page"; -// local imports -import type { TPageNavigationPaneTab } from ".."; - -export type TPageNavigationPaneAdditionalTabPanelsRootProps = { - activeTab: TPageNavigationPaneTab; - page: TPageInstance; -}; - -export function PageNavigationPaneAdditionalTabPanelsRoot(_props: TPageNavigationPaneAdditionalTabPanelsRootProps) { - return null; -} diff --git a/apps/web/ce/components/preferences/theme-switcher.tsx b/apps/web/ce/components/preferences/theme-switcher.tsx deleted file mode 100644 index b335b99b34..0000000000 --- a/apps/web/ce/components/preferences/theme-switcher.tsx +++ /dev/null @@ -1,102 +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 { useCallback, useMemo } from "react"; -import { observer } from "mobx-react"; -import { useTheme } from "next-themes"; -// plane imports -import type { I_THEME_OPTION } from "@plane/constants"; -import { THEME_OPTIONS } from "@plane/constants"; -import { useTranslation } from "@plane/i18n"; -import { setPromiseToast } from "@plane/propel/toast"; -import { applyCustomTheme } from "@plane/utils"; -// components -import { CustomThemeSelector } from "@/components/core/theme/custom-theme-selector"; -import { ThemeSwitch } from "@/components/core/theme/theme-switch"; -import { SettingsControlItem } from "@/components/settings/control-item"; -// hooks -import { useUserProfile } from "@/hooks/store/user"; - -export const ThemeSwitcher = observer(function ThemeSwitcher(props: { - option: { - id: string; - title: string; - description: string; - }; -}) { - // store hooks - const { data: userProfile, updateUserTheme } = useUserProfile(); - // theme - const { setTheme } = useTheme(); - // translation - const { t } = useTranslation(); - // derived values - const currentTheme = useMemo(() => { - const userThemeOption = THEME_OPTIONS.find((t) => t.value === userProfile?.theme?.theme); - return userThemeOption || null; - }, [userProfile?.theme?.theme]); - - const handleThemeChange = useCallback( - async (themeOption: I_THEME_OPTION) => { - try { - setTheme(themeOption.value); - - // If switching to custom theme and user has saved custom colors, apply them immediately - if ( - themeOption.value === "custom" && - userProfile?.theme?.primary && - userProfile?.theme?.background && - userProfile?.theme?.darkPalette !== undefined - ) { - applyCustomTheme( - userProfile.theme.primary, - userProfile.theme.background, - userProfile.theme.darkPalette ? "dark" : "light" - ); - } - - const updatePromise = updateUserTheme({ theme: themeOption.value }); - setPromiseToast(updatePromise, { - loading: "Updating theme...", - success: { - title: "Theme updated", - message: () => "Reloading to apply changes...", - }, - error: { - title: "Error!", - message: () => "Failed to update theme. Please try again.", - }, - }); - // Wait for the promise to resolve, then reload after showing toast - await updatePromise; - window.location.reload(); - } catch (error) { - console.error("Error updating theme:", error); - } - }, - [setTheme, updateUserTheme, userProfile] - ); - - if (!userProfile) return null; - - return ( - <> - { - void handleThemeChange(themeOption); - }} - /> - } - /> - {userProfile.theme?.theme === "custom" && } - > - ); -}); diff --git a/apps/web/ce/components/projects/create/template-select.tsx b/apps/web/ce/components/projects/create/template-select.tsx deleted file mode 100644 index 84c089cad1..0000000000 --- a/apps/web/ce/components/projects/create/template-select.tsx +++ /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 type TProjectTemplateSelect = { - disabled?: boolean; - onClick?: () => void; -}; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function ProjectTemplateSelect(props: TProjectTemplateSelect) { - return <>>; -} diff --git a/apps/web/ce/components/projects/header.tsx b/apps/web/ce/components/projects/header.tsx deleted file mode 100644 index 08e10d013f..0000000000 --- a/apps/web/ce/components/projects/header.tsx +++ /dev/null @@ -1,11 +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 { ProjectsBaseHeader } from "@/components/project/header"; - -export function ProjectsListHeader() { - return ; -} diff --git a/apps/web/ce/components/projects/navigation/helper.tsx b/apps/web/ce/components/projects/navigation/helper.tsx deleted file mode 100644 index 26baffb3f7..0000000000 --- a/apps/web/ce/components/projects/navigation/helper.tsx +++ /dev/null @@ -1,84 +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 { EUserPermissions, EProjectFeatureKey } from "@plane/constants"; -import { CycleIcon, IntakeIcon, ModuleIcon, PageIcon, ViewsIcon, WorkItemsIcon } from "@plane/propel/icons"; -// components -import type { TNavigationItem } from "@/components/workspace/sidebar/project-navigation"; - -export const getProjectFeatureNavigation = ( - workspaceSlug: string, - projectId: string, - project: { - cycle_view: boolean; - module_view: boolean; - issue_views_view: boolean; - page_view: boolean; - inbox_view: boolean; - } -): TNavigationItem[] => [ - { - i18n_key: "sidebar.work_items", - key: EProjectFeatureKey.WORK_ITEMS, - name: "Work items", - href: `/${workspaceSlug}/projects/${projectId}/issues`, - icon: WorkItemsIcon, - access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER, EUserPermissions.GUEST], - shouldRender: true, - sortOrder: 1, - }, - { - i18n_key: "sidebar.cycles", - key: EProjectFeatureKey.CYCLES, - name: "Cycles", - href: `/${workspaceSlug}/projects/${projectId}/cycles`, - icon: CycleIcon, - access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER], - shouldRender: project.cycle_view, - sortOrder: 2, - }, - { - i18n_key: "sidebar.modules", - key: EProjectFeatureKey.MODULES, - name: "Modules", - href: `/${workspaceSlug}/projects/${projectId}/modules`, - icon: ModuleIcon, - access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER], - shouldRender: project.module_view, - sortOrder: 3, - }, - { - i18n_key: "sidebar.views", - key: EProjectFeatureKey.VIEWS, - name: "Views", - href: `/${workspaceSlug}/projects/${projectId}/views`, - icon: ViewsIcon, - access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER, EUserPermissions.GUEST], - shouldRender: project.issue_views_view, - sortOrder: 4, - }, - { - i18n_key: "sidebar.pages", - key: EProjectFeatureKey.PAGES, - name: "Pages", - href: `/${workspaceSlug}/projects/${projectId}/pages`, - icon: PageIcon, - access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER, EUserPermissions.GUEST], - shouldRender: project.page_view, - sortOrder: 5, - }, - { - i18n_key: "sidebar.intake", - key: EProjectFeatureKey.INTAKE, - name: "Intake", - href: `/${workspaceSlug}/projects/${projectId}/intake`, - icon: IntakeIcon, - access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER, EUserPermissions.GUEST], - shouldRender: project.inbox_view, - sortOrder: 6, - }, -]; diff --git a/apps/web/ce/components/projects/settings/features-list.tsx b/apps/web/ce/components/projects/settings/features-list.tsx deleted file mode 100644 index f256288ae1..0000000000 --- a/apps/web/ce/components/projects/settings/features-list.tsx +++ /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 { ProjectFeaturesList } from "@/components/project/settings/features-list"; diff --git a/apps/web/ce/components/projects/teamspaces/teamspace-list.tsx b/apps/web/ce/components/projects/teamspaces/teamspace-list.tsx deleted file mode 100644 index 2f62c53e11..0000000000 --- a/apps/web/ce/components/projects/teamspaces/teamspace-list.tsx +++ /dev/null @@ -1,14 +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 type TProjectTeamspaceList = { - workspaceSlug: string; - projectId: string; -}; - -export function ProjectTeamspaceList(_props: TProjectTeamspaceList) { - return null; -} diff --git a/apps/web/ce/components/rich-filters/filter-value-input/root.tsx b/apps/web/ce/components/rich-filters/filter-value-input/root.tsx deleted file mode 100644 index 374bf279ff..0000000000 --- a/apps/web/ce/components/rich-filters/filter-value-input/root.tsx +++ /dev/null @@ -1,24 +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"; -// plane imports -import type { TFilterValue, TFilterProperty } from "@plane/types"; -// local imports -import type { TFilterValueInputProps } from "@/components/rich-filters/shared"; - -export const AdditionalFilterValueInput = observer(function AdditionalFilterValueInput< - P extends TFilterProperty, - V extends TFilterValue, ->(_props: TFilterValueInputProps) { - return ( - // Fallback - - Filter type not supported - - ); -}); diff --git a/apps/web/ce/components/sidebar/app-switcher.tsx b/apps/web/ce/components/sidebar/app-switcher.tsx deleted file mode 100644 index 80cc87797f..0000000000 --- a/apps/web/ce/components/sidebar/app-switcher.tsx +++ /dev/null @@ -1,9 +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 function SidebarAppSwitcher() { - return null; -} diff --git a/apps/web/ce/components/sidebar/index.ts b/apps/web/ce/components/sidebar/index.ts deleted file mode 100644 index 4f6ed0ef8d..0000000000 --- a/apps/web/ce/components/sidebar/index.ts +++ /dev/null @@ -1,8 +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 "./app-switcher"; -export * from "./project-navigation-root"; diff --git a/apps/web/ce/components/sidebar/project-navigation-root.tsx b/apps/web/ce/components/sidebar/project-navigation-root.tsx deleted file mode 100644 index fd5249c01f..0000000000 --- a/apps/web/ce/components/sidebar/project-navigation-root.tsx +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// components -import { ProjectNavigation } from "@/components/workspace/sidebar/project-navigation"; - -type TProjectItemsRootProps = { - workspaceSlug: string; - projectId: string; -}; - -export function ProjectNavigationRoot(props: TProjectItemsRootProps) { - const { workspaceSlug, projectId } = props; - return ; -} diff --git a/apps/web/ce/components/views/access-controller.tsx b/apps/web/ce/components/views/access-controller.tsx deleted file mode 100644 index 5491770507..0000000000 --- a/apps/web/ce/components/views/access-controller.tsx +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function AccessController(props: any) { - return <>>; -} diff --git a/apps/web/ce/components/views/filters/access-filter.tsx b/apps/web/ce/components/views/filters/access-filter.tsx deleted file mode 100644 index 65ef98c538..0000000000 --- a/apps/web/ce/components/views/filters/access-filter.tsx +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function FilterByAccess(props: any) { - return <>>; -} diff --git a/apps/web/ce/components/views/helper.tsx b/apps/web/ce/components/views/helper.tsx deleted file mode 100644 index dda72e6ed0..0000000000 --- a/apps/web/ce/components/views/helper.tsx +++ /dev/null @@ -1,27 +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 { EIssueLayoutTypes, IProjectView } from "@plane/types"; -import type { TWorkspaceLayoutProps } from "@/components/views/helper"; - -export type TLayoutSelectionProps = { - onChange: (layout: EIssueLayoutTypes) => void; - selectedLayout: EIssueLayoutTypes; - workspaceSlug: string; -}; - -export function GlobalViewLayoutSelection(_props: TLayoutSelectionProps) { - return <>>; -} - -export function WorkspaceAdditionalLayouts(_props: TWorkspaceLayoutProps) { - return <>>; -} - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function AdditionalHeaderItems(view: IProjectView) { - return <>>; -} diff --git a/apps/web/ce/components/views/publish/modal.tsx b/apps/web/ce/components/views/publish/modal.tsx deleted file mode 100644 index 7be8c47da5..0000000000 --- a/apps/web/ce/components/views/publish/modal.tsx +++ /dev/null @@ -1,18 +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 { IProjectView } from "@plane/types"; - -type Props = { - isOpen: boolean; - view: IProjectView; - onClose: () => void; -}; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function PublishViewModal(props: Props) { - return <>>; -} diff --git a/apps/web/ce/components/workflow/index.ts b/apps/web/ce/components/workflow/index.ts deleted file mode 100644 index 4bdac48e5c..0000000000 --- a/apps/web/ce/components/workflow/index.ts +++ /dev/null @@ -1,11 +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 "./state-option"; -export * from "./use-workflow-drag-n-drop"; -export * from "./workflow-disabled-message"; -export * from "./workflow-group-tree"; -export * from "./workflow-disabled-overlay"; diff --git a/apps/web/ce/components/workflow/workflow-disabled-message.tsx b/apps/web/ce/components/workflow/workflow-disabled-message.tsx deleted file mode 100644 index dad8cf36e9..0000000000 --- a/apps/web/ce/components/workflow/workflow-disabled-message.tsx +++ /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. - */ - -/* eslint-disable @typescript-eslint/no-unused-vars */ -type Props = { - parentStateId: string; - className?: string; -}; - -export function WorkFlowDisabledMessage(props: Props) { - return <>>; -} diff --git a/apps/web/ce/components/workflow/workflow-disabled-overlay.tsx b/apps/web/ce/components/workflow/workflow-disabled-overlay.tsx deleted file mode 100644 index a5f22da0a1..0000000000 --- a/apps/web/ce/components/workflow/workflow-disabled-overlay.tsx +++ /dev/null @@ -1,18 +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 { observer } from "mobx-react"; - -export type TWorkflowDisabledOverlayProps = { - messageContainerRef: React.RefObject; - workflowDisabledSource: string; - shouldOverlayBeVisible: boolean; -}; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export const WorkFlowDisabledOverlay = observer(function WorkFlowDisabledOverlay(props: TWorkflowDisabledOverlayProps) { - return <>>; -}); diff --git a/apps/web/ce/components/workflow/workflow-group-tree.tsx b/apps/web/ce/components/workflow/workflow-group-tree.tsx deleted file mode 100644 index 9767e6c892..0000000000 --- a/apps/web/ce/components/workflow/workflow-group-tree.tsx +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -/* eslint-disable @typescript-eslint/no-unused-vars */ -import type { TIssueGroupByOptions } from "@plane/types"; - -type Props = { - groupBy?: TIssueGroupByOptions; - groupId: string | undefined; -}; - -export function WorkFlowGroupTree(props: Props) { - return <>>; -} diff --git a/apps/web/ce/components/workspace-notifications/index.ts b/apps/web/ce/components/workspace-notifications/index.ts deleted file mode 100644 index 1c9404afa7..0000000000 --- a/apps/web/ce/components/workspace-notifications/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 "./list-root"; diff --git a/apps/web/ce/components/workspace-notifications/list-root.tsx b/apps/web/ce/components/workspace-notifications/list-root.tsx deleted file mode 100644 index 1edb479d1f..0000000000 --- a/apps/web/ce/components/workspace-notifications/list-root.tsx +++ /dev/null @@ -1,16 +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 { NotificationCardListRoot } from "./notification-card/root"; - -export type TNotificationListRoot = { - workspaceSlug: string; - workspaceId: string; -}; - -export function NotificationListRoot(props: TNotificationListRoot) { - return ; -} diff --git a/apps/web/ce/components/workspace/app-switcher.tsx b/apps/web/ce/components/workspace/app-switcher.tsx deleted file mode 100644 index 4c1779e375..0000000000 --- a/apps/web/ce/components/workspace/app-switcher.tsx +++ /dev/null @@ -1,11 +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"; - -export function WorkspaceAppSwitcher() { - return <>>; -} diff --git a/apps/web/ce/components/workspace/billing/billing-actions-button.tsx b/apps/web/ce/components/workspace/billing/billing-actions-button.tsx deleted file mode 100644 index 99aeecae49..0000000000 --- a/apps/web/ce/components/workspace/billing/billing-actions-button.tsx +++ /dev/null @@ -1,16 +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 { observer } from "mobx-react"; - -export type TBillingActionsButtonProps = { - canPerformWorkspaceAdminActions: boolean; -}; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export const BillingActionsButton = observer(function BillingActionsButton(props: TBillingActionsButtonProps) { - return <>>; -}); diff --git a/apps/web/ce/components/workspace/billing/index.ts b/apps/web/ce/components/workspace/billing/index.ts deleted file mode 100644 index d980334597..0000000000 --- a/apps/web/ce/components/workspace/billing/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 "./root"; diff --git a/apps/web/ce/components/workspace/members/index.ts b/apps/web/ce/components/workspace/members/index.ts deleted file mode 100644 index 7511bfeedb..0000000000 --- a/apps/web/ce/components/workspace/members/index.ts +++ /dev/null @@ -1,8 +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 "./invite-modal"; -export * from "./members-activity-button"; diff --git a/apps/web/ce/components/workspace/members/members-activity-button.tsx b/apps/web/ce/components/workspace/members/members-activity-button.tsx deleted file mode 100644 index a078b1960e..0000000000 --- a/apps/web/ce/components/workspace/members/members-activity-button.tsx +++ /dev/null @@ -1,12 +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 { observer } from "mobx-react"; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export const MembersActivityButton = observer(function MembersActivityButton(props: { workspaceSlug: string }) { - return <>>; -}); diff --git a/apps/web/ce/components/workspace/sidebar/sidebar-item.tsx b/apps/web/ce/components/workspace/sidebar/sidebar-item.tsx deleted file mode 100644 index c6fbc8f9fe..0000000000 --- a/apps/web/ce/components/workspace/sidebar/sidebar-item.tsx +++ /dev/null @@ -1,16 +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 { IWorkspaceSidebarNavigationItem } from "@plane/constants"; -import { SidebarItemBase } from "@/components/workspace/sidebar/sidebar-item"; - -type Props = { - item: IWorkspaceSidebarNavigationItem; -}; - -export function SidebarItem({ item }: Props) { - return ; -} diff --git a/apps/web/ce/components/workspace/sidebar/teams-sidebar-list.tsx b/apps/web/ce/components/workspace/sidebar/teams-sidebar-list.tsx deleted file mode 100644 index 3d6a97d14e..0000000000 --- a/apps/web/ce/components/workspace/sidebar/teams-sidebar-list.tsx +++ /dev/null @@ -1,9 +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 function SidebarTeamsList() { - return null; -} diff --git a/apps/web/ce/store/analytics.store.ts b/apps/web/ce/store/analytics.store.ts deleted file mode 100644 index 9ae14f9b65..0000000000 --- a/apps/web/ce/store/analytics.store.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. - */ - -import type { IBaseAnalyticsStore } from "@/store/analytics.store"; -import { BaseAnalyticsStore } from "@/store/analytics.store"; - -// eslint-disable-next-line @typescript-eslint/no-empty-object-type -export interface IAnalyticsStore extends IBaseAnalyticsStore { - //observables -} - -export class AnalyticsStore extends BaseAnalyticsStore {} diff --git a/apps/web/ce/store/command-palette.store.ts b/apps/web/ce/store/command-palette.store.ts deleted file mode 100644 index 9d5ff8a01d..0000000000 --- a/apps/web/ce/store/command-palette.store.ts +++ /dev/null @@ -1,33 +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 { computed, makeObservable } from "mobx"; -// types / constants -import type { IBaseCommandPaletteStore } from "@/store/base-command-palette.store"; -import { BaseCommandPaletteStore } from "@/store/base-command-palette.store"; - -export interface ICommandPaletteStore extends IBaseCommandPaletteStore { - // computed - isAnyModalOpen: boolean; -} - -export class CommandPaletteStore extends BaseCommandPaletteStore implements ICommandPaletteStore { - constructor() { - super(); - makeObservable(this, { - // computed - isAnyModalOpen: computed, - }); - } - - /** - * Checks whether any modal is open or not in the base command palette. - * @returns boolean - */ - get isAnyModalOpen(): boolean { - return Boolean(super.getCoreModalsState()); - } -} diff --git a/apps/web/ce/store/cycle/index.ts b/apps/web/ce/store/cycle/index.ts deleted file mode 100644 index 884a0e71b8..0000000000 --- a/apps/web/ce/store/cycle/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 type { ICycleStore } from "@/store/cycle.store"; diff --git a/apps/web/ce/store/global-view.store.ts b/apps/web/ce/store/global-view.store.ts deleted file mode 100644 index 069b4fcd35..0000000000 --- a/apps/web/ce/store/global-view.store.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 "@/store/global-view.store"; diff --git a/apps/web/ce/store/issue/epic/filter.store.ts b/apps/web/ce/store/issue/epic/filter.store.ts deleted file mode 100644 index be441707cb..0000000000 --- a/apps/web/ce/store/issue/epic/filter.store.ts +++ /dev/null @@ -1,22 +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 { IProjectIssuesFilter } from "@/store/issue/project"; -import { ProjectIssuesFilter } from "@/store/issue/project"; -import type { IIssueRootStore } from "@/store/issue/root.store"; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export type IProjectEpicsFilter = IProjectIssuesFilter; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export class ProjectEpicsFilter extends ProjectIssuesFilter implements IProjectEpicsFilter { - constructor(_rootStore: IIssueRootStore) { - super(_rootStore); - - // root store - this.rootIssueStore = _rootStore; - } -} diff --git a/apps/web/ce/store/issue/epic/index.ts b/apps/web/ce/store/issue/epic/index.ts deleted file mode 100644 index a21a791fef..0000000000 --- a/apps/web/ce/store/issue/epic/index.ts +++ /dev/null @@ -1,8 +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 "./filter.store"; -export * from "./issue.store"; diff --git a/apps/web/ce/store/issue/epic/issue.store.ts b/apps/web/ce/store/issue/epic/issue.store.ts deleted file mode 100644 index b6761eac89..0000000000 --- a/apps/web/ce/store/issue/epic/issue.store.ts +++ /dev/null @@ -1,21 +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 { IProjectIssues } from "@/store/issue/project"; -import { ProjectIssues } from "@/store/issue/project"; -import type { IIssueRootStore } from "@/store/issue/root.store"; -import type { IProjectEpicsFilter } from "./filter.store"; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors - -export type IProjectEpics = IProjectIssues; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export class ProjectEpics extends ProjectIssues implements IProjectEpics { - constructor(_rootStore: IIssueRootStore, issueFilterStore: IProjectEpicsFilter) { - super(_rootStore, issueFilterStore); - } -} diff --git a/apps/web/ce/store/issue/helpers/base-issue-store.ts b/apps/web/ce/store/issue/helpers/base-issue-store.ts deleted file mode 100644 index 236235a825..0000000000 --- a/apps/web/ce/store/issue/helpers/base-issue-store.ts +++ /dev/null @@ -1,10 +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 { TIssue } from "@plane/types"; -import { getIssueIds } from "@/store/issue/helpers/base-issues-utils"; - -export const workItemSortWithOrderByExtended = (array: TIssue[], _key?: string) => getIssueIds(array); diff --git a/apps/web/ce/store/issue/helpers/base-issue.store.ts b/apps/web/ce/store/issue/helpers/base-issue.store.ts deleted file mode 100644 index 236235a825..0000000000 --- a/apps/web/ce/store/issue/helpers/base-issue.store.ts +++ /dev/null @@ -1,10 +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 { TIssue } from "@plane/types"; -import { getIssueIds } from "@/store/issue/helpers/base-issues-utils"; - -export const workItemSortWithOrderByExtended = (array: TIssue[], _key?: string) => getIssueIds(array); diff --git a/apps/web/ce/store/issue/helpers/filter-utils.ts b/apps/web/ce/store/issue/helpers/filter-utils.ts deleted file mode 100644 index 66ce743550..0000000000 --- a/apps/web/ce/store/issue/helpers/filter-utils.ts +++ /dev/null @@ -1,9 +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 { IIssueDisplayFilterOptions } from "@plane/types"; - -export const getEnabledDisplayFilters = (displayFilters: IIssueDisplayFilterOptions) => displayFilters; diff --git a/apps/web/ce/store/issue/issue-details/root.store.ts b/apps/web/ce/store/issue/issue-details/root.store.ts deleted file mode 100644 index 1b96b49e1d..0000000000 --- a/apps/web/ce/store/issue/issue-details/root.store.ts +++ /dev/null @@ -1,22 +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 { makeObservable } from "mobx"; -import type { TIssueServiceType } from "@plane/types"; -import type { IIssueDetail as IIssueDetailCore } from "@/store/issue/issue-details/root.store"; -import { IssueDetail as IssueDetailCore } from "@/store/issue/issue-details/root.store"; -import type { IIssueRootStore } from "@/store/issue/root.store"; - -export type IIssueDetail = IIssueDetailCore; - -export class IssueDetail extends IssueDetailCore { - constructor(rootStore: IIssueRootStore, serviceType: TIssueServiceType) { - super(rootStore, serviceType); - makeObservable(this, { - // observables - }); - } -} diff --git a/apps/web/ce/store/issue/team-project/filter.store.ts b/apps/web/ce/store/issue/team-project/filter.store.ts deleted file mode 100644 index 45d5324c89..0000000000 --- a/apps/web/ce/store/issue/team-project/filter.store.ts +++ /dev/null @@ -1,19 +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 { IProjectIssuesFilter } from "@/store/issue/project"; -import { ProjectIssuesFilter } from "@/store/issue/project"; -import type { IIssueRootStore } from "@/store/issue/root.store"; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export type ITeamProjectWorkItemsFilter = IProjectIssuesFilter; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export class TeamProjectWorkItemsFilter extends ProjectIssuesFilter implements ITeamProjectWorkItemsFilter { - constructor(_rootStore: IIssueRootStore) { - super(_rootStore); - } -} diff --git a/apps/web/ce/store/issue/team-project/index.ts b/apps/web/ce/store/issue/team-project/index.ts deleted file mode 100644 index a21a791fef..0000000000 --- a/apps/web/ce/store/issue/team-project/index.ts +++ /dev/null @@ -1,8 +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 "./filter.store"; -export * from "./issue.store"; diff --git a/apps/web/ce/store/issue/team-project/issue.store.ts b/apps/web/ce/store/issue/team-project/issue.store.ts deleted file mode 100644 index fa27134901..0000000000 --- a/apps/web/ce/store/issue/team-project/issue.store.ts +++ /dev/null @@ -1,20 +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 { IProjectIssues } from "@/store/issue/project"; -import { ProjectIssues } from "@/store/issue/project"; -import type { IIssueRootStore } from "@/store/issue/root.store"; -import type { ITeamProjectWorkItemsFilter } from "./filter.store"; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export type ITeamProjectWorkItems = IProjectIssues; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export class TeamProjectWorkItems extends ProjectIssues implements ITeamProjectWorkItems { - constructor(_rootStore: IIssueRootStore, teamProjectWorkItemsFilterStore: ITeamProjectWorkItemsFilter) { - super(_rootStore, teamProjectWorkItemsFilterStore); - } -} diff --git a/apps/web/ce/store/issue/team-views/filter.store.ts b/apps/web/ce/store/issue/team-views/filter.store.ts deleted file mode 100644 index 133f98da4d..0000000000 --- a/apps/web/ce/store/issue/team-views/filter.store.ts +++ /dev/null @@ -1,19 +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 { IProjectViewIssuesFilter } from "@/store/issue/project-views"; -import { ProjectViewIssuesFilter } from "@/store/issue/project-views"; -import type { IIssueRootStore } from "@/store/issue/root.store"; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export type ITeamViewIssuesFilter = IProjectViewIssuesFilter; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export class TeamViewIssuesFilter extends ProjectViewIssuesFilter implements IProjectViewIssuesFilter { - constructor(_rootStore: IIssueRootStore) { - super(_rootStore); - } -} diff --git a/apps/web/ce/store/issue/team-views/index.ts b/apps/web/ce/store/issue/team-views/index.ts deleted file mode 100644 index a21a791fef..0000000000 --- a/apps/web/ce/store/issue/team-views/index.ts +++ /dev/null @@ -1,8 +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 "./filter.store"; -export * from "./issue.store"; diff --git a/apps/web/ce/store/issue/team-views/issue.store.ts b/apps/web/ce/store/issue/team-views/issue.store.ts deleted file mode 100644 index 610520007f..0000000000 --- a/apps/web/ce/store/issue/team-views/issue.store.ts +++ /dev/null @@ -1,20 +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 { IProjectViewIssues } from "@/store/issue/project-views"; -import { ProjectViewIssues } from "@/store/issue/project-views"; -import type { IIssueRootStore } from "@/store/issue/root.store"; -import type { ITeamViewIssuesFilter } from "./filter.store"; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export type ITeamViewIssues = IProjectViewIssues; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export class TeamViewIssues extends ProjectViewIssues implements IProjectViewIssues { - constructor(_rootStore: IIssueRootStore, teamViewFilterStore: ITeamViewIssuesFilter) { - super(_rootStore, teamViewFilterStore); - } -} diff --git a/apps/web/ce/store/issue/team/filter.store.ts b/apps/web/ce/store/issue/team/filter.store.ts deleted file mode 100644 index 20842d2a32..0000000000 --- a/apps/web/ce/store/issue/team/filter.store.ts +++ /dev/null @@ -1,19 +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 { IProjectIssuesFilter } from "@/store/issue/project"; -import { ProjectIssuesFilter } from "@/store/issue/project"; -import type { IIssueRootStore } from "@/store/issue/root.store"; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export type ITeamIssuesFilter = IProjectIssuesFilter; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export class TeamIssuesFilter extends ProjectIssuesFilter implements IProjectIssuesFilter { - constructor(_rootStore: IIssueRootStore) { - super(_rootStore); - } -} diff --git a/apps/web/ce/store/issue/team/index.ts b/apps/web/ce/store/issue/team/index.ts deleted file mode 100644 index a21a791fef..0000000000 --- a/apps/web/ce/store/issue/team/index.ts +++ /dev/null @@ -1,8 +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 "./filter.store"; -export * from "./issue.store"; diff --git a/apps/web/ce/store/issue/team/issue.store.ts b/apps/web/ce/store/issue/team/issue.store.ts deleted file mode 100644 index a24515c23c..0000000000 --- a/apps/web/ce/store/issue/team/issue.store.ts +++ /dev/null @@ -1,20 +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 { IProjectIssues } from "@/store/issue/project"; -import { ProjectIssues } from "@/store/issue/project"; -import type { IIssueRootStore } from "@/store/issue/root.store"; -import type { ITeamIssuesFilter } from "./filter.store"; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export type ITeamIssues = IProjectIssues; - -// @ts-nocheck - This class will never be used, extending similar class to avoid type errors -export class TeamIssues extends ProjectIssues implements IProjectIssues { - constructor(_rootStore: IIssueRootStore, teamIssueFilterStore: ITeamIssuesFilter) { - super(_rootStore, teamIssueFilterStore); - } -} diff --git a/apps/web/ce/store/issue/workspace/issue.store.ts b/apps/web/ce/store/issue/workspace/issue.store.ts deleted file mode 100644 index 0862be70c1..0000000000 --- a/apps/web/ce/store/issue/workspace/issue.store.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 "@/store/issue/workspace/issue.store"; diff --git a/apps/web/ce/store/member/project-member.store.ts b/apps/web/ce/store/member/project-member.store.ts deleted file mode 100644 index 6f534a150f..0000000000 --- a/apps/web/ce/store/member/project-member.store.ts +++ /dev/null @@ -1,50 +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 { computedFn } from "mobx-utils"; -import type { EUserProjectRoles } from "@plane/types"; -// plane imports -// plane web imports -import type { RootStore } from "@/plane-web/store/root.store"; -// store -import type { IMemberRootStore } from "@/store/member"; -import type { IBaseProjectMemberStore } from "@/store/member/project/base-project-member.store"; -import { BaseProjectMemberStore } from "@/store/member/project/base-project-member.store"; - -export type IProjectMemberStore = IBaseProjectMemberStore; - -export class ProjectMemberStore extends BaseProjectMemberStore implements IProjectMemberStore { - constructor(_memberRoot: IMemberRootStore, rootStore: RootStore) { - super(_memberRoot, rootStore); - } - - /** - * @description Returns the highest role from the project membership - * @param { string } userId - * @param { string } projectId - * @returns { EUserProjectRoles | undefined } - */ - getUserProjectRole = computedFn((userId: string, projectId: string): EUserProjectRoles | undefined => - this.getRoleFromProjectMembership(userId, projectId) - ); - - /** - * @description Returns the role from the project membership - * @param projectId - * @param userId - * @param role - */ - getProjectMemberRoleForUpdate = (_projectId: string, _userId: string, role: EUserProjectRoles): EUserProjectRoles => - role; - - /** - * @description Processes the removal of a member from a project - * This method handles the cleanup of member data from the project member map - * @param projectId - The ID of the project to remove the member from - * @param userId - The ID of the user to remove from the project - */ - processMemberRemoval = (projectId: string, userId: string) => this.handleMemberRemoval(projectId, userId); -} diff --git a/apps/web/ce/store/power-k.store.ts b/apps/web/ce/store/power-k.store.ts deleted file mode 100644 index 9528c5e166..0000000000 --- a/apps/web/ce/store/power-k.store.ts +++ /dev/null @@ -1,19 +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 { makeObservable } from "mobx"; -// types -import type { IBasePowerKStore } from "@/store/base-power-k.store"; -import { BasePowerKStore } from "@/store/base-power-k.store"; - -export type IPowerKStore = IBasePowerKStore; - -export class PowerKStore extends BasePowerKStore implements IPowerKStore { - constructor() { - super(); - makeObservable(this, {}); - } -} diff --git a/apps/web/ce/store/project-inbox.store.ts b/apps/web/ce/store/project-inbox.store.ts deleted file mode 100644 index 3adbb18627..0000000000 --- a/apps/web/ce/store/project-inbox.store.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 "@/store/inbox/project-inbox.store"; diff --git a/apps/web/ce/store/project-view.store.ts b/apps/web/ce/store/project-view.store.ts deleted file mode 100644 index 0763fb6653..0000000000 --- a/apps/web/ce/store/project-view.store.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 "@/store/project-view.store"; diff --git a/apps/web/ce/store/root.store.ts b/apps/web/ce/store/root.store.ts deleted file mode 100644 index 9eadadf725..0000000000 --- a/apps/web/ce/store/root.store.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// store -import { CoreRootStore } from "@/store/root.store"; -import type { ITimelineStore } from "./timeline"; -import { TimeLineStore } from "./timeline"; - -export class RootStore extends CoreRootStore { - timelineStore: ITimelineStore; - - constructor() { - super(); - - this.timelineStore = new TimeLineStore(this); - } -} diff --git a/apps/web/ce/store/state.store.ts b/apps/web/ce/store/state.store.ts deleted file mode 100644 index b27221268a..0000000000 --- a/apps/web/ce/store/state.store.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 "@/store/state.store"; diff --git a/apps/web/ce/store/user/permission.store.ts b/apps/web/ce/store/user/permission.store.ts deleted file mode 100644 index 42b5dd4cca..0000000000 --- a/apps/web/ce/store/user/permission.store.ts +++ /dev/null @@ -1,34 +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 { computedFn } from "mobx-utils"; -import type { EUserPermissions } from "@plane/constants"; -import type { RootStore } from "@/plane-web/store/root.store"; -import { BaseUserPermissionStore } from "@/store/user/base-permissions.store"; -import type { IBaseUserPermissionStore } from "@/store/user/base-permissions.store"; - -export type IUserPermissionStore = IBaseUserPermissionStore; - -export class UserPermissionStore extends BaseUserPermissionStore implements IUserPermissionStore { - constructor(store: RootStore) { - super(store); - } - - /** - * @description Returns the project role from the workspace - * @param { string } workspaceSlug - * @param { string } projectId - * @returns { EUserPermissions | undefined } - */ - getProjectRoleByWorkspaceSlugAndProjectId = computedFn( - (workspaceSlug: string, projectId?: string): EUserPermissions | undefined => - this.getProjectRole(workspaceSlug, projectId) - ); - - fetchWorkspaceLevelProjectEntities = (workspaceSlug: string, projectId: string): void => { - void this.store.projectRoot.project.fetchProjectDetails(workspaceSlug, projectId); - }; -} diff --git a/apps/web/ce/store/workspace/index.ts b/apps/web/ce/store/workspace/index.ts deleted file mode 100644 index b274563645..0000000000 --- a/apps/web/ce/store/workspace/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -// store -import { BaseWorkspaceRootStore } from "@/store/workspace"; -import type { RootStore } from "@/plane-web/store/root.store"; - -export class WorkspaceRootStore extends BaseWorkspaceRootStore { - constructor(_rootStore: RootStore) { - super(_rootStore); - } - - // actions - /** - * Mutate workspace members activity - * @param workspaceSlug - */ - mutateWorkspaceMembersActivity = async (_workspaceSlug: string) => { - // No-op in default/CE version - }; -} diff --git a/apps/web/ce/components/active-cycles/workspace-active-cycles-upgrade.tsx b/apps/web/core/components/active-cycles/workspace-active-cycles-upgrade.tsx similarity index 100% rename from apps/web/ce/components/active-cycles/workspace-active-cycles-upgrade.tsx rename to apps/web/core/components/active-cycles/workspace-active-cycles-upgrade.tsx diff --git a/apps/web/ce/components/analytics/tabs.tsx b/apps/web/core/components/analytics/tabs.tsx similarity index 100% rename from apps/web/ce/components/analytics/tabs.tsx rename to apps/web/core/components/analytics/tabs.tsx diff --git a/apps/web/ce/components/analytics/use-analytics-tabs.tsx b/apps/web/core/components/analytics/use-analytics-tabs.tsx similarity index 100% rename from apps/web/ce/components/analytics/use-analytics-tabs.tsx rename to apps/web/core/components/analytics/use-analytics-tabs.tsx diff --git a/apps/web/core/components/appearance/theme-switcher.tsx b/apps/web/core/components/appearance/theme-switcher.tsx index 4ec2eba432..38cecb644e 100644 --- a/apps/web/core/components/appearance/theme-switcher.tsx +++ b/apps/web/core/components/appearance/theme-switcher.tsx @@ -12,6 +12,7 @@ import type { I_THEME_OPTION } from "@plane/constants"; import { THEME_OPTIONS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { setPromiseToast } from "@plane/propel/toast"; +import { applyCustomTheme } from "@plane/utils"; // components import { CustomThemeSelector } from "@/components/core/theme/custom-theme-selector"; import { ThemeSwitch } from "@/components/core/theme/theme-switch"; @@ -34,31 +35,50 @@ export const ThemeSwitcher = observer(function ThemeSwitcher(props: { const { t } = useTranslation(); // derived values const currentTheme = useMemo(() => { + // oxlint-disable-next-line no-shadow const userThemeOption = THEME_OPTIONS.find((t) => t.value === userProfile?.theme?.theme); return userThemeOption || null; }, [userProfile?.theme?.theme]); const handleThemeChange = useCallback( - (themeOption: I_THEME_OPTION) => { + async (themeOption: I_THEME_OPTION) => { try { setTheme(themeOption.value); + + // If switching to custom theme and user has saved custom colors, apply them immediately + if ( + themeOption.value === "custom" && + userProfile?.theme?.primary && + userProfile?.theme?.background && + userProfile?.theme?.darkPalette !== undefined + ) { + applyCustomTheme( + userProfile.theme.primary, + userProfile.theme.background, + userProfile.theme.darkPalette ? "dark" : "light" + ); + } + const updatePromise = updateUserTheme({ theme: themeOption.value }); setPromiseToast(updatePromise, { loading: "Updating theme...", success: { - title: "Success!", - message: () => "Theme updated successfully!", + title: "Theme updated", + message: () => "Reloading to apply changes...", }, error: { title: "Error!", - message: () => "Failed to update the theme", + message: () => "Failed to update theme. Please try again.", }, }); + // Wait for the promise to resolve, then reload after showing toast + await updatePromise; + window.location.reload(); } catch (error) { console.error("Error updating theme:", error); } }, - [updateUserTheme] + [setTheme, updateUserTheme, userProfile] ); if (!userProfile) return null; @@ -68,7 +88,14 @@ export const ThemeSwitcher = observer(function ThemeSwitcher(props: { } + control={ + { + void handleThemeChange(themeOption); + }} + /> + } /> {userProfile.theme?.theme === "custom" && } > diff --git a/apps/web/ce/components/breadcrumbs/common.tsx b/apps/web/core/components/breadcrumbs/common.tsx similarity index 100% rename from apps/web/ce/components/breadcrumbs/common.tsx rename to apps/web/core/components/breadcrumbs/common.tsx diff --git a/apps/web/ce/components/breadcrumbs/project.tsx b/apps/web/core/components/breadcrumbs/project.tsx similarity index 96% rename from apps/web/ce/components/breadcrumbs/project.tsx rename to apps/web/core/components/breadcrumbs/project.tsx index 0a43d91e34..b997ad5fac 100644 --- a/apps/web/ce/components/breadcrumbs/project.tsx +++ b/apps/web/core/components/breadcrumbs/project.tsx @@ -36,6 +36,7 @@ export const ProjectBreadcrumb = observer(function ProjectBreadcrumb(props: TPro // derived values const switcherOptions = joinedProjectIds + // oxlint-disable-next-line no-shadow .map((projectId) => { const project = getPartialProjectById(projectId); return { @@ -54,6 +55,7 @@ export const ProjectBreadcrumb = observer(function ProjectBreadcrumb(props: TPro .filter((option) => option !== undefined) as ICustomSearchSelectOption[]; // helpers + // oxlint-disable-next-line unicorn/consistent-function-scoping const renderIcon = (projectDetails: TProject) => ( diff --git a/apps/web/ce/components/browse/workItem-detail.tsx b/apps/web/core/components/browse/workItem-detail.tsx similarity index 100% rename from apps/web/ce/components/browse/workItem-detail.tsx rename to apps/web/core/components/browse/workItem-detail.tsx diff --git a/apps/web/core/components/comments/card/root.tsx b/apps/web/core/components/comments/card/root.tsx index 006a365dd2..b7837c4c59 100644 --- a/apps/web/core/components/comments/card/root.tsx +++ b/apps/web/core/components/comments/card/root.tsx @@ -9,10 +9,10 @@ import { observer } from "mobx-react"; // plane imports import type { EditorRefApi } from "@plane/editor"; import type { TIssueComment, TCommentsOperations } from "@plane/types"; -// plane web imports -import { CommentBlock, CommentCardDisplay } from "@/plane-web/components/comments"; // local imports import { CommentQuickActions } from "../quick-actions"; +import { CommentBlock } from "../comment-block"; +import { CommentCardDisplay } from "./display"; type TCommentCard = { workspaceSlug: string; diff --git a/apps/web/ce/components/comments/comment-block.tsx b/apps/web/core/components/comments/comment-block.tsx similarity index 100% rename from apps/web/ce/components/comments/comment-block.tsx rename to apps/web/core/components/comments/comment-block.tsx diff --git a/apps/web/ce/components/common/extended-app-header.tsx b/apps/web/core/components/common/extended-app-header.tsx similarity index 100% rename from apps/web/ce/components/common/extended-app-header.tsx rename to apps/web/core/components/common/extended-app-header.tsx diff --git a/apps/web/ce/components/common/modal/global.tsx b/apps/web/core/components/common/modal/global.tsx similarity index 100% rename from apps/web/ce/components/common/modal/global.tsx rename to apps/web/core/components/common/modal/global.tsx diff --git a/apps/web/core/components/common/quick-actions-helper.tsx b/apps/web/core/components/common/quick-actions-helper.tsx index 4b9af1dadd..a79b440248 100644 --- a/apps/web/core/components/common/quick-actions-helper.tsx +++ b/apps/web/core/components/common/quick-actions-helper.tsx @@ -8,7 +8,7 @@ import type { ICycle, IModule, IProjectView, IWorkspaceView } from "@plane/types"; import type { TContextMenuItem } from "@plane/ui"; // hooks -import { useQuickActionsFactory } from "@/plane-web/components/common/quick-actions-factory"; +import { useQuickActionsFactory } from "@/components/common/quick-actions-factory"; // Types interface UseCycleMenuItemsProps { diff --git a/apps/web/core/components/core/app-header.tsx b/apps/web/core/components/core/app-header.tsx index 4ea58e3696..13d1371205 100644 --- a/apps/web/core/components/core/app-header.tsx +++ b/apps/web/core/components/core/app-header.tsx @@ -10,7 +10,7 @@ import { observer } from "mobx-react"; import { Row } from "@plane/ui"; // components import { cn } from "@plane/utils"; -import { ExtendedAppHeader } from "@/plane-web/components/common/extended-app-header"; +import { ExtendedAppHeader } from "@/components/common/extended-app-header"; export interface AppHeaderProps { header: ReactNode; @@ -27,6 +27,7 @@ export const AppHeader = observer(function AppHeader(props: AppHeaderProps) { + {/* eslint-disable-next-line oxc/const-comparisons */} {mobileHeader && mobileHeader} ); diff --git a/apps/web/core/components/core/modals/bulk-delete-issues-modal-item.tsx b/apps/web/core/components/core/modals/bulk-delete-issues-modal-item.tsx index f76cb4cba9..51f7c04285 100644 --- a/apps/web/core/components/core/modals/bulk-delete-issues-modal-item.tsx +++ b/apps/web/core/components/core/modals/bulk-delete-issues-modal-item.tsx @@ -8,8 +8,8 @@ import { observer } from "mobx-react"; import { Combobox } from "@headlessui/react"; // hooks import type { ISearchIssueResponse } from "@plane/types"; -// plane web hooks -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; +// components +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; interface Props { issue: ISearchIssueResponse; diff --git a/apps/web/core/components/core/modals/existing-issues-list-modal.tsx b/apps/web/core/components/core/modals/existing-issues-list-modal.tsx index 7183643518..1c5122f179 100644 --- a/apps/web/core/components/core/modals/existing-issues-list-modal.tsx +++ b/apps/web/core/components/core/modals/existing-issues-list-modal.tsx @@ -22,11 +22,10 @@ import { generateWorkItemLink, getTabIndex } from "@plane/utils"; // hooks import useDebounce from "@/hooks/use-debounce"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web components -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; // services import { ProjectService } from "@/services/project"; // components +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; import { IssueSearchModalEmptyState } from "./issue-search-modal-empty-state"; type Props = { diff --git a/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx b/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx index f6ea00ba6c..56dc05860e 100644 --- a/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx +++ b/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx @@ -33,13 +33,12 @@ import userImage from "@/app/assets/user.png?url"; import { SingleProgressStats } from "@/components/core/sidebar/single-progress-stats"; import { StateDropdown } from "@/components/dropdowns/state/dropdown"; import { SimpleEmptyState } from "@/components/empty-state/simple-empty-state-root"; +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useIssues } from "@/hooks/store/use-issues"; import { useIntersectionObserver } from "@/hooks/use-intersection-observer"; import useLocalStorage from "@/hooks/use-local-storage"; -// plane web components -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; // store import type { ActiveCycleIssueDetails } from "@/store/issue/cycle"; diff --git a/apps/web/ce/components/cycles/active-cycle/root.tsx b/apps/web/core/components/cycles/active-cycle/root.tsx similarity index 100% rename from apps/web/ce/components/cycles/active-cycle/root.tsx rename to apps/web/core/components/cycles/active-cycle/root.tsx diff --git a/apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx b/apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx index 738856d20e..5d2806154e 100644 --- a/apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx +++ b/apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx @@ -19,9 +19,9 @@ import { getDate } from "@plane/utils"; import { useCycle } from "@/hooks/store/use-cycle"; // plane web components import { useWorkItemFilters } from "@/hooks/store/work-item-filters/use-work-item-filters"; -import { SidebarChartRoot } from "@/plane-web/components/cycles"; // local imports import { CycleProgressStats } from "./progress-stats"; +import { SidebarChart } from "./sidebar-chart"; type TCycleAnalyticsProgress = { workspaceSlug: string; @@ -131,7 +131,7 @@ export const CycleAnalyticsProgress = observer(function CycleAnalyticsProgress(p {cycleStartDate && cycleEndDate ? ( <> {isCycleDateValid && ( - + )} {/* progress detailed view */} {chartDistributionData && ( diff --git a/apps/web/ce/components/cycles/analytics-sidebar/base.tsx b/apps/web/core/components/cycles/analytics-sidebar/sidebar-chart.tsx similarity index 100% rename from apps/web/ce/components/cycles/analytics-sidebar/base.tsx rename to apps/web/core/components/cycles/analytics-sidebar/sidebar-chart.tsx diff --git a/apps/web/core/components/cycles/list/cycle-list-item-action.tsx b/apps/web/core/components/cycles/list/cycle-list-item-action.tsx index adade682f7..17b9c31453 100644 --- a/apps/web/core/components/cycles/list/cycle-list-item-action.tsx +++ b/apps/web/core/components/cycles/list/cycle-list-item-action.tsx @@ -31,8 +31,6 @@ import { useUserPermissions } from "@/hooks/store/user"; import { useAppRouter } from "@/hooks/use-app-router"; import { usePlatformOS } from "@/hooks/use-platform-os"; import { useTimeZoneConverter } from "@/hooks/use-timezone-converter"; -// plane web components -import { CycleAdditionalActions } from "@/plane-web/components/cycles"; // local imports import { CycleQuickActions } from "../quick-actions"; import { TransferIssuesModal } from "../transfer-issues-modal"; @@ -109,6 +107,7 @@ export const CycleListItemAction = observer(function CycleListItemAction(props: if (!workspaceSlug || !projectId) return; const addToFavoritePromise = addCycleToFavorites(workspaceSlug?.toString(), projectId.toString(), cycleId).then( + // oxlint-disable-next-line promise/always-return () => { if (!isFavoriteMenuOpen) toggleFavoriteMenu(true); } @@ -192,8 +191,8 @@ export const CycleListItemAction = observer(function CycleListItemAction(props: {cycleDetails.total_issues} )} - {showTransferIssues && ( + // oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions { diff --git a/apps/web/core/components/cycles/list/root.tsx b/apps/web/core/components/cycles/list/root.tsx index 07351decfb..6831f616e9 100644 --- a/apps/web/core/components/cycles/list/root.tsx +++ b/apps/web/core/components/cycles/list/root.tsx @@ -11,11 +11,11 @@ import { Disclosure } from "@headlessui/react"; import { useTranslation } from "@plane/i18n"; import { ContentWrapper, ERowVariant } from "@plane/ui"; import { ListLayout } from "@/components/core/list"; -import { ActiveCycleRoot } from "@/plane-web/components/cycles"; // local imports import { CyclePeekOverview } from "../cycle-peek-overview"; import { CycleListGroupHeader } from "./cycle-list-group-header"; import { CyclesListMap } from "./cycles-list-map"; +import { ActiveCycleRoot } from "../active-cycle/root"; export interface ICyclesList { completedCycleIds: string[]; diff --git a/apps/web/core/components/dropdowns/intake-state/base.tsx b/apps/web/core/components/dropdowns/intake-state/base.tsx index 1dbf7bc2fb..c18379ce48 100644 --- a/apps/web/core/components/dropdowns/intake-state/base.tsx +++ b/apps/web/core/components/dropdowns/intake-state/base.tsx @@ -22,7 +22,7 @@ import type { TDropdownProps } from "@/components/dropdowns/types"; // hooks import { useDropdown } from "@/hooks/use-dropdown"; // plane web imports -import { StateOption } from "@/plane-web/components/workflow"; +import { StateOption } from "@/components/workflow"; export type TWorkItemStateDropdownBaseProps = TDropdownProps & { alwaysAllowStateChange?: boolean; @@ -202,6 +202,7 @@ export const WorkItemStateDropdownBase = observer(function WorkItemStateDropdown ); return ( + // oxlint-disable-next-line jsx_a11y/no-static-element-interactions ; default: - return ; + return null; } } diff --git a/apps/web/ce/components/cycles/end-cycle/index.ts b/apps/web/core/components/epic-modal/index.ts similarity index 100% rename from apps/web/ce/components/cycles/end-cycle/index.ts rename to apps/web/core/components/epic-modal/index.ts diff --git a/apps/web/ce/components/epics/epic-modal/modal.tsx b/apps/web/core/components/epic-modal/modal.tsx similarity index 100% rename from apps/web/ce/components/epics/epic-modal/modal.tsx rename to apps/web/core/components/epic-modal/modal.tsx diff --git a/apps/web/ce/components/estimates/helper.tsx b/apps/web/core/components/estimates/create/helper.tsx similarity index 100% rename from apps/web/ce/components/estimates/helper.tsx rename to apps/web/core/components/estimates/create/helper.tsx diff --git a/apps/web/core/components/estimates/create/stage-one.tsx b/apps/web/core/components/estimates/create/stage-one.tsx index f6b4c999d3..d3988da289 100644 --- a/apps/web/core/components/estimates/create/stage-one.tsx +++ b/apps/web/core/components/estimates/create/stage-one.tsx @@ -10,13 +10,12 @@ import { EEstimateSystem, ESTIMATE_SYSTEMS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { Tooltip } from "@plane/propel/tooltip"; import type { TEstimateSystemKeys } from "@plane/types"; -// components +// helpers +import { isEstimateSystemEnabled } from "./helper"; import { convertMinutesToHoursMinutesString } from "@plane/utils"; -// plane web imports -import { isEstimateSystemEnabled } from "@/plane-web/components/estimates/helper"; -import { UpgradeBadge } from "@/plane-web/components/workspace/upgrade-badge"; +// components +import { UpgradeBadge } from "@/components/workspace/upgrade-badge"; import { RadioInput } from "../radio-select"; -// local imports type TEstimateCreateStageOne = { estimateSystem: TEstimateSystemKeys; diff --git a/apps/web/ce/components/estimates/estimate-list-item-buttons.tsx b/apps/web/core/components/estimates/estimate-list-item-buttons.tsx similarity index 100% rename from apps/web/ce/components/estimates/estimate-list-item-buttons.tsx rename to apps/web/core/components/estimates/estimate-list-item-buttons.tsx diff --git a/apps/web/core/components/estimates/estimate-list-item.tsx b/apps/web/core/components/estimates/estimate-list-item.tsx index e16dcf9912..a93cc8dac5 100644 --- a/apps/web/core/components/estimates/estimate-list-item.tsx +++ b/apps/web/core/components/estimates/estimate-list-item.tsx @@ -9,12 +9,11 @@ import { observer } from "mobx-react"; import { EEstimateSystem } from "@plane/constants"; import { convertMinutesToHoursMinutesString } from "@plane/utils"; // components +import { EstimateListItemButtons } from "./estimate-list-item-buttons"; import { SettingsBoxedControlItem } from "@/components/settings/boxed-control-item"; // hooks import { useProjectEstimates } from "@/hooks/store/estimates"; import { useEstimate } from "@/hooks/store/estimates/use-estimate"; -// plane web imports -import { EstimateListItemButtons } from "@/plane-web/components/estimates"; type TEstimateListItem = { estimateId: string; diff --git a/apps/web/core/components/estimates/inputs/root.tsx b/apps/web/core/components/estimates/inputs/root.tsx index 86b743ff7b..3d122f1044 100644 --- a/apps/web/core/components/estimates/inputs/root.tsx +++ b/apps/web/core/components/estimates/inputs/root.tsx @@ -7,8 +7,6 @@ // plane imports import type { TEstimateSystemKeys } from "@plane/types"; import { EEstimateSystem } from "@plane/types"; -// plane web imports -import { EstimateTimeInput } from "@/plane-web/components/estimates/inputs"; // local imports import { EstimateNumberInput } from "./number-input"; import { EstimateTextInput } from "./text-input"; @@ -33,12 +31,7 @@ export function EstimateInputRoot(props: TEstimateInputRootProps) { case EEstimateSystem.CATEGORIES: return ; case EEstimateSystem.TIME: - return ( - - ); + return <>>; default: return null; } diff --git a/apps/web/core/components/estimates/points/preview.tsx b/apps/web/core/components/estimates/points/preview.tsx index 59da01f93c..c07038bd90 100644 --- a/apps/web/core/components/estimates/points/preview.tsx +++ b/apps/web/core/components/estimates/points/preview.tsx @@ -13,8 +13,6 @@ import { useTranslation } from "@plane/i18n"; import { EditIcon, TrashIcon } from "@plane/propel/icons"; import type { TEstimatePointsObject, TEstimateSystemKeys, TEstimateTypeErrorObject } from "@plane/types"; import { convertMinutesToHoursMinutesString } from "@plane/utils"; -// plane web imports -import { EstimatePointDelete } from "@/plane-web/components/estimates"; // local imports import { EstimatePointUpdate } from "./update"; @@ -73,6 +71,7 @@ export const EstimatePointItemPreview = observer(function EstimatePointItemPrevi {t("project_settings.estimates.create.enter_estimate_point")} )} + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} setEstimatePointEditToggle(true)} @@ -80,6 +79,7 @@ export const EstimatePointItemPreview = observer(function EstimatePointItemPrevi {estimatePoints.length > estimateCount.min && ( + // oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions @@ -111,20 +111,6 @@ export const EstimatePointItemPreview = observer(function EstimatePointItemPrevi handleEstimatePointError={handleEstimatePointError} /> )} - - {estimateId && estimatePointId && estimatePointDeleteToggle && ( - estimateId && setEstimatePointDeleteToggle(false)} - estimatePointError={estimatePointError} - handleEstimatePointError={handleEstimatePointError} - estimateSystem={estimateType} - /> - )} ); }); diff --git a/apps/web/core/components/estimates/root.tsx b/apps/web/core/components/estimates/root.tsx index 85d18cf5bf..036fa1a8ff 100644 --- a/apps/web/core/components/estimates/root.tsx +++ b/apps/web/core/components/estimates/root.tsx @@ -16,8 +16,6 @@ import { SettingsHeading } from "@/components/settings/heading"; import { EmptyStateCompact } from "@plane/propel/empty-state"; import { useProjectEstimates } from "@/hooks/store/estimates"; import { useProject } from "@/hooks/store/use-project"; -// plane web components -import { UpdateEstimateModal } from "@/plane-web/components/estimates"; // local imports import { CreateEstimateModal } from "./create/modal"; import { DeleteEstimateModal } from "./delete/modal"; @@ -38,6 +36,7 @@ export const EstimateRoot = observer(function EstimateRoot(props: TEstimateRoot) const { loader, currentActiveEstimateId, archivedEstimateIds, getProjectEstimates } = useProjectEstimates(); // states const [isEstimateCreateModalOpen, setIsEstimateCreateModalOpen] = useState(false); + // oxlint-disable-next-line no-unused-vars const [estimateToUpdate, setEstimateToUpdate] = useState(); const [estimateToDelete, setEstimateToDelete] = useState(); @@ -134,17 +133,11 @@ export const EstimateRoot = observer(function EstimateRoot(props: TEstimateRoot) isOpen={isEstimateCreateModalOpen} handleClose={() => setIsEstimateCreateModalOpen(false)} /> - setEstimateToUpdate(undefined)} - /> setEstimateToDelete(undefined)} /> diff --git a/apps/web/ce/components/gantt-chart/blocks/block-row-list.tsx b/apps/web/core/components/gantt-chart/blocks/block-row-list.tsx similarity index 100% rename from apps/web/ce/components/gantt-chart/blocks/block-row-list.tsx rename to apps/web/core/components/gantt-chart/blocks/block-row-list.tsx diff --git a/apps/web/ce/components/gantt-chart/blocks/blocks-list.tsx b/apps/web/core/components/gantt-chart/blocks/blocks-list.tsx similarity index 100% rename from apps/web/ce/components/gantt-chart/blocks/blocks-list.tsx rename to apps/web/core/components/gantt-chart/blocks/blocks-list.tsx 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 16f1109dfa..f2f53e1da0 100644 --- a/apps/web/core/components/gantt-chart/chart/main-content.tsx +++ b/apps/web/core/components/gantt-chart/chart/main-content.tsx @@ -22,15 +22,9 @@ import { GanttChartSidebar, MonthChartView, QuarterChartView, WeekChartView } fr // helpers // hooks import { useTimeLineChartStore } from "@/hooks/use-timeline-chart"; -// plane web components -import { - TimelineDependencyPaths, - TimelineDraggablePath, - GanttAdditionalLayers, -} from "@/plane-web/components/gantt-chart"; -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"; +import { GanttChartRowList } from "@/components/gantt-chart/blocks/block-row-list"; +import { GanttChartBlocksList } from "@/components/gantt-chart/blocks/blocks-list"; +import { IssueBulkOperationsRoot } from "@/components/issues/bulk-operations"; import { useBulkOperationStatus } from "@/hooks/use-bulk-operation-status"; // local imports import { DEFAULT_BLOCK_WIDTH, GANTT_SELECT_GROUP, HEADER_HEIGHT } from "../constants"; @@ -109,6 +103,7 @@ export const GanttChartMainContent = observer(function GanttChartMainContent(pro canScroll: ({ source }) => source.data.dragInstanceId === "GANTT_REORDER", }) ); + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, [ganttContainerRef?.current]); // handling scroll functionality @@ -218,9 +213,6 @@ export const GanttChartMainContent = observer(function GanttChartMainContent(pro selectionHelpers={helpers} ganttContainerRef={ganttContainerRef} /> - - - - {/* left resize drag handle */} - {(typeof enableDependency === "function" ? enableDependency(block.id) : enableDependency) && ( - - )} + {/* oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} - {(typeof enableDependency === "function" ? enableDependency(block.id) : enableDependency) && ( - - )} ); }); diff --git a/apps/web/ce/components/global/product-updates/changelog.tsx b/apps/web/core/components/global/product-updates/changelog.tsx similarity index 95% rename from apps/web/ce/components/global/product-updates/changelog.tsx rename to apps/web/core/components/global/product-updates/changelog.tsx index 06de236082..cfddb2af4f 100644 --- a/apps/web/ce/components/global/product-updates/changelog.tsx +++ b/apps/web/core/components/global/product-updates/changelog.tsx @@ -78,6 +78,7 @@ export const ProductUpdatesChangelog = observer(function ProductUpdatesChangelog )} + {/* eslint-disable-next-line react/iframe-missing-sandbox oxlint-disable-next-line jsx_a11y/iframe-has-title */} - ({ fetch: async (_workspaceSlug: string, _projectId: string, _issueId: string) => { @@ -125,6 +106,7 @@ export const InboxIssueMainContent = observer(function InboxIssueMainContent(pro }); } }, + // oxlint-disable-next-line no-shadow archive: async (workspaceSlug: string, projectId: string, issueId: string) => { try { await archiveIssue(workspaceSlug, projectId, issueId); @@ -133,6 +115,7 @@ export const InboxIssueMainContent = observer(function InboxIssueMainContent(pro } }, }), + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps [inboxIssue] ); @@ -143,16 +126,6 @@ export const InboxIssueMainContent = observer(function InboxIssueMainContent(pro return ( <> - {duplicateIssues.length > 0 && ( - - )} = { }; export const InboxIssueCreateRoot = observer(function InboxIssueCreateRoot(props: TInboxIssueCreateRoot) { - const { workspaceSlug, projectId, handleModalClose, isDuplicateModalOpen, handleDuplicateIssueModal } = props; + const { workspaceSlug, projectId, handleModalClose } = props; // states const [uploadedAssetIds, setUploadedAssetIds] = useState([]); // router @@ -72,7 +69,6 @@ export const InboxIssueCreateRoot = observer(function InboxIssueCreateRoot(props const { getWorkspaceBySlug } = useWorkspace(); const workspaceId = getWorkspaceBySlug(workspaceSlug)?.id; const { isMobile } = usePlatformOS(); - const { getProjectById } = useProject(); const { t } = useTranslation(); // states const [createMore, setCreateMore] = useState(false); @@ -88,22 +84,8 @@ export const InboxIssueCreateRoot = observer(function InboxIssueCreateRoot(props [formData] ); - // derived values - const projectDetails = projectId ? getProjectById(projectId) : undefined; - const { getIndex } = getTabIndex(ETabIndices.INTAKE_ISSUE_FORM, isMobile); - // debounced duplicate issues swr - const { duplicateIssues } = useDebouncedDuplicateIssues( - workspaceSlug, - projectDetails?.workspace.toString(), - projectId, - { - name: formData?.name, - description_html: formData?.description_html, - } - ); - const handleEscKeyDown = (event: KeyboardEvent) => { if (descriptionEditorRef.current?.isEditorReadyToDiscard()) { handleModalClose(); @@ -160,6 +142,7 @@ export const InboxIssueCreateRoot = observer(function InboxIssueCreateRoot(props setFormSubmitting(true); await createInboxIssue(workspaceSlug, projectId, payload) + // oxlint-disable-next-line promise/always-return .then(async (res) => { if (uploadedAssetIds.length > 0) { await fileService.updateBulkProjectAssetsUploadStatus(workspaceSlug, projectId, res?.issue.id ?? "", { @@ -193,8 +176,6 @@ export const InboxIssueCreateRoot = observer(function InboxIssueCreateRoot(props const isTitleLengthMoreThan255Character = formData?.name ? formData.name.length > 255 : false; - const shouldRenderDuplicateModal = isDuplicateModalOpen && duplicateIssues?.length > 0; - if (!workspaceSlug || !projectId || !workspaceId) return <>>; return ( @@ -203,14 +184,6 @@ export const InboxIssueCreateRoot = observer(function InboxIssueCreateRoot(props {t("inbox_issue.modal.title")} - {duplicateIssues?.length > 0 && ( - 1 ? "s" : ""} found!`} - handleOnClick={() => handleDuplicateIssueModal(!isDuplicateModalOpen)} - /> - )} - {shouldRenderDuplicateModal && ( - - - - )} ); }); diff --git a/apps/web/core/components/inbox/sidebar/inbox-list-item.tsx b/apps/web/core/components/inbox/sidebar/inbox-list-item.tsx index db8d4240f9..22503e8a3b 100644 --- a/apps/web/core/components/inbox/sidebar/inbox-list-item.tsx +++ b/apps/web/core/components/inbox/sidebar/inbox-list-item.tsx @@ -20,8 +20,6 @@ import { useLabel } from "@/hooks/store/use-label"; import { useMember } from "@/hooks/store/use-member"; import { useProjectInbox } from "@/hooks/store/use-project-inbox"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web imports -import { InboxSourcePill } from "@/plane-web/components/inbox/source-pill"; // local imports import { InboxIssueStatus } from "../inbox-issue-status"; @@ -75,7 +73,6 @@ export const InboxIssueListItem = observer(function InboxIssueListItem(props: In {projectIdentifier}-{issue.sequence_id} - {inboxIssue.source && } {inboxIssue.status !== -2 && } diff --git a/apps/web/ce/components/instance/maintenance-message.tsx b/apps/web/core/components/instance/maintenance-message.tsx similarity index 100% rename from apps/web/ce/components/instance/maintenance-message.tsx rename to apps/web/core/components/instance/maintenance-message.tsx diff --git a/apps/web/core/components/instance/maintenance-view.tsx b/apps/web/core/components/instance/maintenance-view.tsx index eaa3bba4f9..05203dcfd3 100644 --- a/apps/web/core/components/instance/maintenance-view.tsx +++ b/apps/web/core/components/instance/maintenance-view.tsx @@ -11,7 +11,7 @@ import maintenanceModeLightModeImage from "@/app/assets/instance/maintenance-mod // layouts import DefaultLayout from "@/layouts/default-layout"; // components -import { MaintenanceMessage } from "@/plane-web/components/instance"; +import { MaintenanceMessage } from "./maintenance-message"; export function MaintenanceView() { // hooks diff --git a/apps/web/ce/components/active-cycles/index.ts b/apps/web/core/components/issues/bulk-operations/index.ts similarity index 100% rename from apps/web/ce/components/active-cycles/index.ts rename to apps/web/core/components/issues/bulk-operations/index.ts diff --git a/apps/web/ce/components/issues/bulk-operations/root.tsx b/apps/web/core/components/issues/bulk-operations/root.tsx similarity index 100% rename from apps/web/ce/components/issues/bulk-operations/root.tsx rename to apps/web/core/components/issues/bulk-operations/root.tsx diff --git a/apps/web/core/components/issues/delete-issue-modal.tsx b/apps/web/core/components/issues/delete-issue-modal.tsx index bf789d41a8..9b70e5c747 100644 --- a/apps/web/core/components/issues/delete-issue-modal.tsx +++ b/apps/web/core/components/issues/delete-issue-modal.tsx @@ -14,12 +14,10 @@ import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import type { TDeDupeIssue, TIssue } from "@plane/types"; // ui import { AlertModalCore } from "@plane/ui"; -// constants // hooks import { useIssues } from "@/hooks/store/use-issues"; import { useProject } from "@/hooks/store/use-project"; import { useUser, useUserPermissions } from "@/hooks/store/user"; -// plane-web type Props = { isOpen: boolean; diff --git a/apps/web/ce/components/issues/header.tsx b/apps/web/core/components/issues/header.tsx similarity index 98% rename from apps/web/ce/components/issues/header.tsx rename to apps/web/core/components/issues/header.tsx index 4871217bb9..860611319e 100644 --- a/apps/web/ce/components/issues/header.tsx +++ b/apps/web/core/components/issues/header.tsx @@ -36,7 +36,7 @@ import { useUserPermissions } from "@/hooks/store/user"; import { useAppRouter } from "@/hooks/use-app-router"; import { usePlatformOS } from "@/hooks/use-platform-os"; // plane web imports -import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common"; +import { CommonProjectBreadcrumbs } from "@/components/breadcrumbs/common"; export const IssuesHeader = observer(function IssuesHeader() { // router diff --git a/apps/web/core/components/issues/issue-detail-widgets/action-buttons.tsx b/apps/web/core/components/issues/issue-detail-widgets/action-buttons.tsx index e9b1ac43a9..688169f045 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/action-buttons.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/action-buttons.tsx @@ -10,8 +10,6 @@ import { useTranslation } from "@plane/i18n"; import { LinkIcon, ViewsIcon, RelationPropertyIcon } from "@plane/propel/icons"; // plane imports import type { TIssueServiceType, TWorkItemWidgets } from "@plane/types"; -// plane web imports -import { WorkItemAdditionalWidgetActionButtons } from "@/plane-web/components/issues/issue-detail-widgets/action-buttons"; // local imports import { IssueAttachmentActionButton } from "./attachments"; import { IssueLinksActionButton } from "./links"; @@ -92,14 +90,6 @@ export function IssueDetailWidgetActionButtons(props: Props) { issueServiceType={issueServiceType} /> )} - ); } diff --git a/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx b/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx index 8f741ad166..47772619f2 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx @@ -10,9 +10,7 @@ import { observer } from "mobx-react"; import type { TIssueServiceType, TWorkItemWidgets } from "@plane/types"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; -// Plane-web -import { WorkItemAdditionalWidgetCollapsibles } from "@/plane-web/components/issues/issue-detail-widgets/collapsibles"; -import { useTimeLineRelationOptions } from "@/plane-web/components/relations"; +import { useTimeLineRelationOptions } from "@/components/relations"; // local imports import { AttachmentsCollapsible } from "./attachments"; import { LinksCollapsible } from "./links"; @@ -89,14 +87,6 @@ export const IssueDetailWidgetCollapsibles = observer(function IssueDetailWidget issueServiceType={issueServiceType} /> )} - ); }); diff --git a/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-modals.tsx b/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-modals.tsx index de3d180cee..9071e3eb61 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-modals.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-modals.tsx @@ -12,8 +12,6 @@ import type { ISearchIssueResponse, TIssue, TIssueServiceType, TWorkItemWidgets import { ExistingIssuesListModal } from "@/components/core/modals/existing-issues-list-modal"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; -// plane web imports -import { WorkItemAdditionalWidgetModals } from "@/plane-web/components/issues/issue-detail-widgets/modals"; // local imports import { IssueLinkCreateUpdateModal } from "../issue-detail/links/create-update-link-modal"; // helpers @@ -197,14 +195,6 @@ export const IssueDetailWidgetModals = observer(function IssueDetailWidgetModals workspaceLevelToggle /> )} - - > ); }); diff --git a/apps/web/core/components/issues/issue-detail-widgets/relations/content.tsx b/apps/web/core/components/issues/issue-detail-widgets/relations/content.tsx index 968c8c3d71..b552380d18 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/relations/content.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/relations/content.tsx @@ -13,11 +13,10 @@ import { EIssueServiceType } from "@plane/types"; import { Collapsible } from "@plane/ui"; // components import { CreateUpdateIssueModal } from "@/components/issues/issue-modal/modal"; +import { useTimeLineRelationOptions } from "@/components/relations"; +import { CreateUpdateEpicModal } from "@/components/epic-modal"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; -// Plane-web -import { CreateUpdateEpicModal } from "@/plane-web/components/epics/epic-modal"; -import { useTimeLineRelationOptions } from "@/plane-web/components/relations"; // helper import { DeleteIssueModal } from "../../delete-issue-modal"; import { RelationIssueList } from "../../relations/issue-list"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/relations/quick-action-button.tsx b/apps/web/core/components/issues/issue-detail-widgets/relations/quick-action-button.tsx index eb7a367002..c2f41bcf3f 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/relations/quick-action-button.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/relations/quick-action-button.tsx @@ -14,8 +14,9 @@ import type { TIssueServiceType } from "@plane/types"; import { CustomMenu } from "@plane/ui"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; -// Plane-web -import { useTimeLineRelationOptions } from "@/plane-web/components/relations"; +// components +import { useTimeLineRelationOptions } from "@/components/relations"; +// types import type { TIssueRelationTypes } from "@plane/types"; type Props = { @@ -55,6 +56,7 @@ export const RelationActionButton = observer(function RelationActionButton(props return ( { handleOnClick(item.key); diff --git a/apps/web/core/components/issues/issue-detail-widgets/relations/title.tsx b/apps/web/core/components/issues/issue-detail-widgets/relations/title.tsx index 658359c22d..75e8084958 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/relations/title.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/relations/title.tsx @@ -12,8 +12,8 @@ import { EIssueServiceType } from "@plane/types"; import { CollapsibleButton } from "@plane/ui"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; -// Plane-web -import { useTimeLineRelationOptions } from "@/plane-web/components/relations"; +// components +import { useTimeLineRelationOptions } from "@/components/relations"; // local imports import { RelationActionButton } from "./quick-action-button"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/filters.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/filters.tsx index 9dbaf05d2d..de9c765f9c 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/filters.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/filters.tsx @@ -22,7 +22,6 @@ import { FilterStateGroup, } from "@/components/issues/issue-layouts/filters"; import { isFiltersApplied } from "@/components/issues/issue-layouts/utils"; -import { FilterIssueTypes } from "@/plane-web/components/issues/filters/issue-types"; type TSubIssueFiltersProps = { handleFiltersUpdate: (key: keyof IIssueFilterOptions, value: string | string[]) => void; filters: IIssueFilterOptions; @@ -122,17 +121,6 @@ export const SubIssueFilters = observer(function SubIssueFilters(props: TSubIssu )} - {/* work item types */} - {isFilterEnabled("issue_type") && ( - - handleFiltersUpdate("issue_type", val)} - searchQuery={filtersSearchQuery} - /> - - )} - {/* Assignees */} {isFilterEnabled("assignees") && ( diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-item.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-item.tsx index efe3c4b775..e1c70a5fd0 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-item.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-item.tsx @@ -22,8 +22,8 @@ import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useProject } from "@/hooks/store/use-project"; import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web components -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; +// components +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; // local components import { SubIssuesListItemProperties } from "./properties"; import { SubIssuesListRoot } from "./root"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity-comment-root.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity-comment-root.tsx index 689def91c7..823e199c4b 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity-comment-root.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity-comment-root.tsx @@ -13,9 +13,6 @@ import type { TCommentsOperations } from "@plane/types"; import { CommentCard } from "@/components/comments/card/root"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; -// plane web components -import { IssueAdditionalPropertiesActivity } from "@/plane-web/components/issues/issue-details/issue-properties-activity"; -import { IssueActivityWorklog } from "@/plane-web/components/issues/worklog/activity/root"; // local imports import { IssueActivityItem } from "./activity/activity-list"; import { IssueActivityLoader } from "./loader"; @@ -82,24 +79,7 @@ export const IssueActivityCommentRoot = observer(function IssueActivityCommentRo activityId={activityComment.id} ends={index === 0 ? "top" : index === filteredActivityAndComments.length - 1 ? "bottom" : undefined} /> - ) : activityComment.activity_type === "ISSUE_ADDITIONAL_PROPERTIES_ACTIVITY" ? ( - - ) : activityComment.activity_type === "WORKLOG" ? ( - - ) : ( - <>> - ); + ) : null; })} ); diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/activity-block.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/activity-block.tsx index a88bc7a806..7eae8de11a 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/activity-block.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/activity-block.tsx @@ -11,10 +11,9 @@ import { Tooltip } from "@plane/propel/tooltip"; import { renderFormattedTime, renderFormattedDate, calculateTimeAgo } from "@plane/utils"; import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web imports -import { IssueCreatorDisplay } from "@/plane-web/components/issues/issue-details/issue-creator"; // local imports import { IssueUser } from "../"; +import { IssueCreatorDisplay } from "./issue-creator"; type TIssueActivityBlockComponent = { icon?: ReactNode; diff --git a/apps/web/ce/components/relations/activity.ts b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/activity.ts similarity index 100% rename from apps/web/ce/components/relations/activity.ts rename to apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/activity.ts diff --git a/apps/web/ce/components/issues/issue-details/issue-creator.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/issue-creator.tsx similarity index 100% rename from apps/web/ce/components/issues/issue-details/issue-creator.tsx rename to apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/issue-creator.tsx diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/relation.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/relation.tsx index 5b2b8a427f..5334fd7290 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/relation.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/relation.tsx @@ -5,13 +5,15 @@ */ import { observer } from "mobx-react"; +// types +import type { TIssueRelationTypes } from "@plane/types"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; -// Plane-web -import { getRelationActivityContent, useTimeLineRelationOptions } from "@/plane-web/components/relations"; -import type { TIssueRelationTypes } from "@plane/types"; -// +// components +import { useTimeLineRelationOptions } from "@/components/relations"; +// local helpers import { IssueActivityBlockComponent } from "./"; +import { getRelationActivityContent } from "./helpers/activity"; type TIssueRelationActivity = { activityId: string; ends: "top" | "bottom" | undefined }; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/activity-list.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/activity-list.tsx index 579569ef07..12087a3c07 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/activity-list.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/activity-list.tsx @@ -9,9 +9,7 @@ import { observer } from "mobx-react"; import { getValidKeysFromObject } from "@plane/utils"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; -// plane web components -import { IssueTypeActivity, AdditionalActivityRoot } from "@/plane-web/components/issues/issue-details"; -import { useTimeLineRelationOptions } from "@/plane-web/components/relations"; +import { useTimeLineRelationOptions } from "@/components/relations"; // local components import { IssueDefaultActivity, @@ -44,6 +42,7 @@ export const IssueActivityItem = observer(function IssueActivityItem(props: TIss // hooks const { activity: { getActivityById }, + // oxlint-disable-next-line no-empty-pattern comment: {}, } = useIssueDetail(); const ISSUE_RELATION_OPTIONS = useTimeLineRelationOptions(); @@ -92,9 +91,7 @@ export const IssueActivityItem = observer(function IssueActivityItem(props: TIss case "intake": case "inbox": return ; - case "type": - return ; default: - return ; + return null; } }); diff --git a/apps/web/ce/components/issues/worklog/activity/filter-root.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/filter-root.tsx similarity index 100% rename from apps/web/ce/components/issues/worklog/activity/filter-root.tsx rename to apps/web/core/components/issues/issue-detail/issue-activity/filter-root.tsx diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/root.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/root.tsx index 66e3bad674..9f4dea41fb 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/root.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/root.tsx @@ -9,7 +9,7 @@ import uniq from "lodash-es/uniq"; import { observer } from "mobx-react"; // plane package imports import type { TActivityFilters } from "@plane/constants"; -import { E_SORT_ORDER, defaultActivityFilters, EUserPermissions } from "@plane/constants"; +import { E_SORT_ORDER, defaultActivityFilters } from "@plane/constants"; import { useLocalStorage } from "@plane/hooks"; // i18n import { useTranslation } from "@plane/i18n"; @@ -18,15 +18,12 @@ import type { TFileSignedURLResponse, TIssueComment } from "@plane/types"; // components import { CommentCreate } from "@/components/comments/comment-create"; // hooks -import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useProject } from "@/hooks/store/use-project"; -import { useUser, useUserPermissions } from "@/hooks/store/user"; -// plane web components -import { ActivityFilterRoot } from "@/plane-web/components/issues/worklog/activity/filter-root"; -import { IssueActivityWorklogCreateButton } from "@/plane-web/components/issues/worklog/activity/worklog-create-button"; +// local imports import { IssueActivityCommentRoot } from "./activity-comment-root"; import { useWorkItemCommentOperations } from "./helper"; import { ActivitySortRoot } from "./sort-root"; +import { ActivityFilterRoot } from "./filter-root"; type TIssueActivity = { workspaceSlug: string; @@ -53,21 +50,9 @@ export const IssueActivity = observer(function IssueActivity(props: TIssueActivi defaultActivityFilters ); const { setValue: setSortOrder, storedValue: sortOrder } = useLocalStorage("activity_sort_order", E_SORT_ORDER.ASC); - // store hooks - const { - issue: { getIssueById }, - } = useIssueDetail(); - const { getProjectRoleByWorkspaceSlugAndProjectId } = useUserPermissions(); const { getProjectById } = useProject(); - const { data: currentUser } = useUser(); - // derived values - const issue = issueId ? getIssueById(issueId) : undefined; - const currentUserProjectRole = getProjectRoleByWorkspaceSlugAndProjectId(workspaceSlug, projectId); - const isAdmin = currentUserProjectRole === EUserPermissions.ADMIN; - const isGuest = currentUserProjectRole === EUserPermissions.GUEST; - const isAssigned = issue?.assignee_ids && currentUser?.id ? issue?.assignee_ids.includes(currentUser?.id) : false; - const isWorklogButtonEnabled = !isIntakeIssue && !isGuest && (isAdmin || isAssigned); + // toggle filter const toggleFilter = (filter: TActivityFilters) => { if (!selectedFilters) return; @@ -110,14 +95,6 @@ export const IssueActivity = observer(function IssueActivity(props: TIssueActivi {t("common.activity")} - {isWorklogButtonEnabled && ( - - )} ); }); - -export const IssueTypeIdentifier = observer(function IssueTypeIdentifier(_props: TIssueTypeIdentifier) { - return <>>; -}); 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 34140963ae..b4343835dd 100644 --- a/apps/web/core/components/issues/issue-detail/main-content.tsx +++ b/apps/web/core/components/issues/issue-detail/main-content.tsx @@ -1,3 +1,4 @@ +// oxlint-disable no-shadow /** * Copyright (c) 2023-present Plane Software, Inc. and contributors * SPDX-License-Identifier: AGPL-3.0-only @@ -10,21 +11,16 @@ import { observer } from "mobx-react"; import type { EditorRefApi } from "@plane/editor"; import type { TNameDescriptionLoader } from "@plane/types"; import { EFileAssetType, EIssueServiceType } from "@plane/types"; -import { getTextContent } from "@plane/utils"; // components import { DescriptionVersionsRoot } from "@/components/core/description-versions"; import { DescriptionInput } from "@/components/editor/rich-text/description-input"; +import { IssueTypeSwitcher } from "@/components/issues/issue-type-switcher"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useMember } from "@/hooks/store/use-member"; -import { useProject } from "@/hooks/store/use-project"; import { useUser } from "@/hooks/store/user"; import useReloadConfirmations from "@/hooks/use-reload-confirmation"; 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 "@/hooks/use-debounced-duplicate-issues"; // services import { WorkItemVersionService } from "@/services/issue"; // local imports @@ -62,22 +58,9 @@ export const IssueMainContent = observer(function IssueMainContent(props: Props) issue: { getIssueById }, peekIssue, } = useIssueDetail(); - const { getProjectById } = useProject(); const { setShowAlert } = useReloadConfirmations(isSubmitting === "submitting"); // derived values - const projectDetails = getProjectById(projectId); const issue = issueId ? getIssueById(issueId) : undefined; - // debounced duplicate issues swr - const { duplicateIssues } = useDebouncedDuplicateIssues( - workspaceSlug, - projectDetails?.workspace.toString(), - projectDetails?.id, - { - name: issue?.name, - description_html: getTextContent(issue?.description_html), - issueId: issue?.id, - } - ); useEffect(() => { let timer: ReturnType; @@ -109,16 +92,6 @@ export const IssueMainContent = observer(function IssueMainContent(props: Props) - {duplicateIssues?.length > 0 && ( - - )} diff --git a/apps/web/core/components/issues/issue-detail/parent-select.tsx b/apps/web/core/components/issues/issue-detail/parent-select.tsx index 192f7b1334..543275c980 100644 --- a/apps/web/core/components/issues/issue-detail/parent-select.tsx +++ b/apps/web/core/components/issues/issue-detail/parent-select.tsx @@ -17,8 +17,8 @@ import { cn } from "@plane/utils"; import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useProject } from "@/hooks/store/use-project"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web components -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; +// components +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; // local imports import { ParentIssuesListModal } from "../parent-issues-list-modal"; diff --git a/apps/web/core/components/issues/issue-detail/parent/root.tsx b/apps/web/core/components/issues/issue-detail/parent/root.tsx index 6aa9149b74..1de73eb3b2 100644 --- a/apps/web/core/components/issues/issue-detail/parent/root.tsx +++ b/apps/web/core/components/issues/issue-detail/parent/root.tsx @@ -10,6 +10,7 @@ import { MinusCircle } from "lucide-react"; import { useTranslation } from "@plane/i18n"; import type { TIssue } from "@plane/types"; // component +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; // ui import { ControlLink, CustomMenu } from "@plane/ui"; // helpers @@ -20,8 +21,6 @@ import { useProject } from "@/hooks/store/use-project"; import { useProjectState } from "@/hooks/store/use-project-state"; import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web components -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; // types import type { TIssueOperations } from "../root"; import { IssueParentSiblings } from "./siblings"; diff --git a/apps/web/core/components/issues/issue-detail/parent/sibling-item.tsx b/apps/web/core/components/issues/issue-detail/parent/sibling-item.tsx index aeb1925aa7..4b9b6a1b92 100644 --- a/apps/web/core/components/issues/issue-detail/parent/sibling-item.tsx +++ b/apps/web/core/components/issues/issue-detail/parent/sibling-item.tsx @@ -12,8 +12,8 @@ import { generateWorkItemLink } from "@plane/utils"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useProject } from "@/hooks/store/use-project"; -// plane web components -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; +// components +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; type TIssueParentSiblingItem = { workspaceSlug: string; diff --git a/apps/web/core/components/issues/issue-detail/relation-select.tsx b/apps/web/core/components/issues/issue-detail/relation-select.tsx index ff06ad436f..fcfc6038e4 100644 --- a/apps/web/core/components/issues/issue-detail/relation-select.tsx +++ b/apps/web/core/components/issues/issue-detail/relation-select.tsx @@ -22,7 +22,7 @@ import { useIssues } from "@/hooks/store/use-issues"; import { useProject } from "@/hooks/store/use-project"; import { usePlatformOS } from "@/hooks/use-platform-os"; // Plane web imports -import { useTimeLineRelationOptions } from "@/plane-web/components/relations"; +import { useTimeLineRelationOptions } from "@/components/relations"; import type { TIssueRelationTypes } from "@plane/types"; import type { TRelationObject } from "../issue-detail-widgets/relations"; @@ -138,6 +138,7 @@ export const IssueRelationSelect = observer(function IssueRelationSelect(props: {!disabled && ( + {/* eslint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} { e.preventDefault(); diff --git a/apps/web/core/components/issues/issue-detail/sidebar.tsx b/apps/web/core/components/issues/issue-detail/sidebar.tsx index 1cd233574f..8077c4ef94 100644 --- a/apps/web/core/components/issues/issue-detail/sidebar.tsx +++ b/apps/web/core/components/issues/issue-detail/sidebar.tsx @@ -35,13 +35,8 @@ import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useMember } from "@/hooks/store/use-member"; import { useProject } from "@/hooks/store/use-project"; import { useProjectState } from "@/hooks/store/use-project-state"; -// plane web components // components -import { WorkItemAdditionalSidebarProperties } from "@/plane-web/components/issues/issue-details/additional-properties"; -import { IssueParentSelectRoot } from "@/plane-web/components/issues/issue-details/parent-select-root"; -import { DateAlert } from "@/plane-web/components/issues/issue-details/sidebar/date-alert"; -import { TransferHopInfo } from "@/plane-web/components/issues/issue-details/sidebar/transfer-hop-info"; -import { IssueWorklogProperty } from "@/plane-web/components/issues/worklog/property"; +import { IssueParentSelectRoot } from "@/components/issues/parent-select-root"; import { SidebarPropertyListItem } from "@/components/common/layout/sidebar/property-list-item"; import { IssueCycleSelect } from "./cycle-select"; import { IssueLabel } from "./label"; @@ -184,7 +179,6 @@ export const IssueDetailsSidebar = observer(function IssueDetailsSidebar(props: hideIcon clearIconClassName="h-3 w-3 hidden group-hover:inline text-primary" /> - {issue.target_date && } @@ -223,11 +217,7 @@ export const IssueDetailsSidebar = observer(function IssueDetailsSidebar(props: )} {projectDetails?.cycle_view && ( - } - > + - - - - diff --git a/apps/web/core/components/issues/issue-layouts/calendar/issue-block.tsx b/apps/web/core/components/issues/issue-layouts/calendar/issue-block.tsx index 5902c4ca6e..e66e35eab3 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/issue-block.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/issue-block.tsx @@ -22,8 +22,8 @@ import { useProjectState } from "@/hooks/store/use-project-state"; import { useIssueStoreType } from "@/hooks/use-issue-layout-store"; import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web components -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; +// components +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; // local components import { WorkItemPreviewCard } from "../../preview-card"; import type { TRenderQuickActions } from "../list/list-view-types"; diff --git a/apps/web/core/components/issues/issue-layouts/empty-states/index.tsx b/apps/web/core/components/issues/issue-layouts/empty-states/index.tsx index 3f6523ba86..1be930b5e4 100644 --- a/apps/web/core/components/issues/issue-layouts/empty-states/index.tsx +++ b/apps/web/core/components/issues/issue-layouts/empty-states/index.tsx @@ -6,9 +6,6 @@ // plane web components import { EIssuesStoreType } from "@plane/types"; -import { TeamEmptyState } from "@/plane-web/components/issues/issue-layouts/empty-states/team-issues"; -import { TeamProjectWorkItemEmptyState } from "@/plane-web/components/issues/issue-layouts/empty-states/team-project"; -import { TeamViewEmptyState } from "@/plane-web/components/issues/issue-layouts/empty-states/team-view-issues"; // components import { ProjectArchivedEmptyState } from "./archived-issues"; import { CycleEmptyState } from "./cycle"; @@ -41,12 +38,6 @@ export function IssueLayoutEmptyState(props: Props) { return ; case EIssuesStoreType.EPIC: return ; - case EIssuesStoreType.TEAM: - return ; - case EIssuesStoreType.TEAM_VIEW: - return ; - case EIssuesStoreType.TEAM_PROJECT_WORK_ITEMS: - return ; default: return null; } diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/group-by.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/group-by.tsx index a15d80c0ea..415759e3ff 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/group-by.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/group-by.tsx @@ -8,9 +8,10 @@ import React, { useState } from "react"; import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; import type { IIssueDisplayFilterOptions, TIssueGroupByOptions } from "@plane/types"; +// helpers +import { useGroupByOptions } from "../../../utils"; // components import { FilterHeader, FilterOption } from "@/components/issues/issue-layouts/filters"; -import { useGroupByOptions } from "@/plane-web/components/issues/issue-layouts/utils"; type Props = { displayFilters: IIssueDisplayFilterOptions | undefined; @@ -51,7 +52,7 @@ export const FilterGroupBy = observer(function FilterGroupBy(props: Props) { return ( handleUpdate(groupBy.key)} title={t(groupBy.titleTranslationKey)} multiple={false} diff --git a/apps/web/core/components/issues/issue-layouts/gantt/blocks.tsx b/apps/web/core/components/issues/issue-layouts/gantt/blocks.tsx index a9927f9dc9..57f1cebe58 100644 --- a/apps/web/core/components/issues/issue-layouts/gantt/blocks.tsx +++ b/apps/web/core/components/issues/issue-layouts/gantt/blocks.tsx @@ -13,6 +13,7 @@ import { ControlLink } from "@plane/ui"; import { findTotalDaysInRange, generateWorkItemLink } from "@plane/utils"; // components import { SIDEBAR_WIDTH } from "@/components/gantt-chart/constants"; +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useIssues } from "@/hooks/store/use-issues"; @@ -21,9 +22,6 @@ import { useProjectState } from "@/hooks/store/use-project-state"; import { useIssueStoreType } from "@/hooks/use-issue-layout-store"; import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web imports -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; -import { IssueStats } from "@/plane-web/components/issues/issue-layouts/issue-stats"; // local imports import { WorkItemPreviewCard } from "../../preview-card"; import { getBlockViewDetails } from "../utils"; @@ -64,6 +62,7 @@ export const IssueGanttBlock = observer(function IssueGanttBlock(props: Props) { {issueDetails?.name} - {isEpic && ( - = 2} - /> - )} } /> diff --git a/apps/web/core/components/issues/issue-layouts/group-drag-overlay.tsx b/apps/web/core/components/issues/issue-layouts/group-drag-overlay.tsx index ccdb346f96..8da61601b8 100644 --- a/apps/web/core/components/issues/issue-layouts/group-drag-overlay.tsx +++ b/apps/web/core/components/issues/issue-layouts/group-drag-overlay.tsx @@ -12,8 +12,6 @@ import { useTranslation } from "@plane/i18n"; import type { TIssueOrderByOptions } from "@plane/types"; // helpers import { cn } from "@plane/utils"; -// plane web imports -import { WorkFlowDisabledOverlay } from "@/plane-web/components/workflow"; type Props = { dragColumnOrientation: "justify-start" | "justify-center" | "justify-end"; @@ -59,13 +57,7 @@ export function GroupDragOverlay(props: Props) { { hidden: !shouldOverlayBeVisible } )} > - {workflowDisabledSource ? ( - - ) : ( + {workflowDisabledSource ? null : ( ); - // derived values - const subIssueCount = issue?.sub_issues_count ?? 0; - + // oxlint-disable-next-line unicorn/consistent-function-scoping const handleEventPropagation = (e: React.MouseEvent) => { e.stopPropagation(); e.preventDefault(); @@ -109,6 +104,7 @@ const KanbanIssueDetailsBlock = observer(function KanbanIssueDetailsBlock(props: displayProperties={displayProperties} /> )} + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} - - {isEpic && displayProperties && ( - !!properties.sub_issue_count && !!subIssueCount} - > - - - )} > ); }); @@ -246,6 +232,7 @@ export const KanbanIssueBlock = observer(function KanbanIssueBlock(props: IssueB }, }) ); + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, [cardRef?.current, issue?.id, isDragAllowed, canDropOverIssue, setIsCurrentBlockDragging, setIsDraggingOverBlock]); if (!issue) return null; diff --git a/apps/web/core/components/issues/issue-layouts/kanban/default.tsx b/apps/web/core/components/issues/issue-layouts/kanban/default.tsx index cff862d8ca..d63cf00ab8 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/default.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/default.tsx @@ -28,7 +28,7 @@ import { useKanbanView } from "@/hooks/store/use-kanban-view"; import { useIssueStoreType } from "@/hooks/use-issue-layout-store"; // types // parent components -import { useWorkFlowFDragNDrop } from "@/plane-web/components/workflow"; +import { useWorkFlowFDragNDrop } from "@/components/workflow"; import type { TRenderQuickActions } from "../list/list-view-types"; import type { GroupDropLocation } from "../utils"; import { getGroupByColumns, isWorkspaceLevel, getApproximateCardHeight } from "../utils"; diff --git a/apps/web/core/components/issues/issue-layouts/kanban/headers/group-by-card.tsx b/apps/web/core/components/issues/issue-layouts/kanban/headers/group-by-card.tsx index 3a89e49970..044ba46140 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/headers/group-by-card.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/headers/group-by-card.tsx @@ -19,10 +19,7 @@ import { ExistingIssuesListModal } from "@/components/core/modals/existing-issue import { CreateUpdateIssueModal } from "@/components/issues/issue-modal/modal"; // constants import { useIssueStoreType } from "@/hooks/use-issue-layout-store"; -import { CreateUpdateEpicModal } from "@/plane-web/components/epics/epic-modal"; -// types -// Plane-web -import { WorkFlowGroupTree } from "@/plane-web/components/workflow"; +import { CreateUpdateEpicModal } from "@/components/epic-modal"; interface IHeaderGroupByCard { sub_group_by: TIssueGroupByOptions | undefined; @@ -41,7 +38,6 @@ interface IHeaderGroupByCard { export const HeaderGroupByCard = observer(function HeaderGroupByCard(props: IHeaderGroupByCard) { const { - group_by, sub_group_by, column_id, icon, @@ -139,8 +135,6 @@ export const HeaderGroupByCard = observer(function HeaderGroupByCard(props: IHea - - {sub_group_by === null && ( handleCollapsedGroups("sub_group_by", column_id)} @@ -47,8 +45,6 @@ export const HeaderSubGroupByCard = observer(function HeaderSubGroupByCard(props {title} {count || 0} - - ); }); diff --git a/apps/web/core/components/issues/issue-layouts/kanban/kanban-group.tsx b/apps/web/core/components/issues/issue-layouts/kanban/kanban-group.tsx index 1358110eea..a3dbcb1fe0 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/kanban-group.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/kanban-group.tsx @@ -28,6 +28,7 @@ import type { import { EIssueLayoutTypes } from "@plane/types"; import { cn } from "@plane/utils"; import type { GroupDropLocation } from "@/components/issues/issue-layouts/utils"; +// components import { highlightIssueOnDrop, getSourceFromDropPayload, @@ -35,13 +36,12 @@ import { getIssueBlockId, } from "@/components/issues/issue-layouts/utils"; import { KanbanIssueBlockLoader } from "@/components/ui/loader/layouts/kanban-layout-loader"; +import { useWorkFlowFDragNDrop } from "@/components/workflow"; // hooks import { useProjectState } from "@/hooks/store/use-project-state"; import { useIntersectionObserver } from "@/hooks/use-intersection-observer"; import { useIssuesStore } from "@/hooks/use-issue-layout-store"; -// Plane-web -import { useWorkFlowFDragNDrop } from "@/plane-web/components/workflow"; -// +// local imports import { GroupDragOverlay } from "../group-drag-overlay"; import type { TRenderQuickActions } from "../list/list-view-types"; import { KanbanQuickAddIssueButton, QuickAddIssueRoot } from "../quick-add"; @@ -183,6 +183,7 @@ export const KanbanGroup = observer(function KanbanGroup(props: IKanbanGroup) { element, }) ); + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, [ columnRef, groupId, @@ -260,6 +261,7 @@ export const KanbanGroup = observer(function KanbanGroup(props: IKanbanGroup) { const loadMore = isPaginating ? ( ) : ( + // oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions {Array.from({ length: 2 }).map((_, index) => ( + // oxlint-disable-next-line react/no-array-index-key ))} diff --git a/apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx b/apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx index 84998f3fa5..9a93e0e619 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx @@ -23,7 +23,7 @@ import { Row } from "@plane/ui"; // hooks import { useIssueStoreType } from "@/hooks/use-issue-layout-store"; // plane web imports -import { useWorkFlowFDragNDrop } from "@/plane-web/components/workflow"; +import { useWorkFlowFDragNDrop } from "@/components/workflow"; // local imports import type { TRenderQuickActions } from "../list/list-view-types"; import type { GroupDropLocation } from "../utils"; diff --git a/apps/web/core/components/issues/issue-layouts/list/block.tsx b/apps/web/core/components/issues/issue-layouts/list/block.tsx index 2c536b2aa9..1c6fa4bcb4 100644 --- a/apps/web/core/components/issues/issue-layouts/list/block.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/block.tsx @@ -22,18 +22,13 @@ import { cn, generateWorkItemLink } from "@plane/utils"; // components import { MultipleSelectEntityAction } from "@/components/core/multiple-select"; import { IssueProperties } from "@/components/issues/issue-layouts/properties"; -// helpers +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; // hooks import { useAppTheme } from "@/hooks/store/use-app-theme"; import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useProject } from "@/hooks/store/use-project"; import type { TSelectionHelper } from "@/hooks/use-multiple-select"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web components -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; -import { IssueStats } from "@/plane-web/components/issues/issue-layouts/issue-stats"; -// types -import { WithDisplayPropertiesHOC } from "../properties/with-display-properties-HOC"; import { calculateIdentifierWidth } from "../utils"; import type { TRenderQuickActions } from "./list-view-types"; @@ -284,15 +279,6 @@ export const IssueBlock = observer(function IssueBlock(props: IssueBlockProps) { > {issue.name} - {isEpic && displayProperties && ( - !!properties.sub_issue_count} - > - - - )} {!issue?.tempId && ( + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} } + {/* eslint-disable-next-line jsx_a11y/click-events-have-key-events eslint-disable-next-line jsx_a11y/no-static-element-interactions */} handleCollapsedGroups(groupID)} > {title} {count || 0} - - - + {!disableIssueCreation && @@ -150,6 +145,7 @@ export const HeaderGroupByCard = observer(function HeaderGroupByCard(props: IHea ) : ( + // oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions { diff --git a/apps/web/core/components/issues/issue-layouts/list/list-group.tsx b/apps/web/core/components/issues/issue-layouts/list/list-group.tsx index 5c8f56fb94..548918f3a0 100644 --- a/apps/web/core/components/issues/issue-layouts/list/list-group.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/list-group.tsx @@ -27,14 +27,13 @@ import { Row } from "@plane/ui"; import { cn } from "@plane/utils"; // components import { ListLoaderItemRow } from "@/components/ui/loader/layouts/list-layout-loader"; +import { useWorkFlowFDragNDrop } from "@/components/workflow"; // hooks import { useProjectState } from "@/hooks/store/use-project-state"; import { useIntersectionObserver } from "@/hooks/use-intersection-observer"; import { useIssuesStore } from "@/hooks/use-issue-layout-store"; import type { TSelectionHelper } from "@/hooks/use-multiple-select"; -// Plane-web -import { useWorkFlowFDragNDrop } from "@/plane-web/components/workflow"; -// +// local imports import { GroupDragOverlay } from "../group-drag-overlay"; import { ListQuickAddIssueButton, QuickAddIssueRoot } from "../quick-add"; import type { GroupDropLocation } from "../utils"; @@ -132,6 +131,7 @@ export const ListGroup = observer(function ListGroup(props: Props) { const loadMore = isPaginating ? ( ) : ( + // oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions {Array.from({ length: 2 }).map((_, index) => ( + // oxlint-disable-next-line react/no-array-index-key ))} diff --git a/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx b/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx index 942017ca38..96def8e7c4 100644 --- a/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx +++ b/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx @@ -42,8 +42,6 @@ import { useProjectState } from "@/hooks/store/use-project-state"; import { useAppRouter } from "@/hooks/use-app-router"; import { useIssueStoreType } from "@/hooks/use-issue-layout-store"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web components -import { WorkItemLayoutAdditionalProperties } from "@/plane-web/components/issues/issue-layouts/additional-properties"; // local components import { IssuePropertyLabels } from "./labels"; import { WithDisplayPropertiesHOC } from "./with-display-properties-HOC"; @@ -186,6 +184,7 @@ export const IssueProperties = observer(function IssueProperties(props: IIssuePr const minDate = getDate(issue.start_date); const maxDate = getDate(issue.target_date); + // oxlint-disable-next-line unicorn/consistent-function-scoping const handleEventPropagation = (e: SyntheticEvent) => { e.stopPropagation(); e.preventDefault(); @@ -196,6 +195,7 @@ export const IssueProperties = observer(function IssueProperties(props: IIssuePr {/* basic properties */} {/* state */} + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} isDateRangeEnabled} > + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} !isDateRangeEnabled} > + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} !isDateRangeEnabled} > + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} { @@ -437,6 +446,7 @@ export const IssueProperties = observer(function IssueProperties(props: IIssuePr isMobile={isMobile} renderByDefault={false} > + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions */} - {/* Additional Properties */} - - {/* label */} (undefined); const [deleteIssueModal, setDeleteIssueModal] = useState(false); const [archiveIssueModal, setArchiveIssueModal] = useState(false); - const [duplicateWorkItemModal, setDuplicateWorkItemModal] = useState(false); + const [_, setDuplicateWorkItemModal] = useState(false); // router const { workspaceSlug } = useParams(); const { getStateById } = useProjectState(); @@ -125,15 +123,6 @@ export const AllIssueQuickActions = observer(function AllIssueQuickActions(props }} storeType={EIssuesStoreType.GLOBAL} /> - {issue.project_id && workspaceSlug && ( - setDuplicateWorkItemModal(false)} - workspaceSlug={workspaceSlug.toString()} - projectId={issue.project_id} - /> - )} (undefined); const [deleteIssueModal, setDeleteIssueModal] = useState(false); const [archiveIssueModal, setArchiveIssueModal] = useState(false); - const [duplicateWorkItemModal, setDuplicateWorkItemModal] = useState(false); + const [_, setDuplicateWorkItemModal] = useState(false); // router const { workspaceSlug, cycleId } = useParams(); const { issuesFilter } = useIssues(EIssuesStoreType.CYCLE); @@ -138,15 +135,6 @@ export const CycleIssueQuickActions = observer(function CycleIssueQuickActions(p }} storeType={EIssuesStoreType.CYCLE} /> - {issue.project_id && workspaceSlug && ( - setDuplicateWorkItemModal(false)} - workspaceSlug={workspaceSlug.toString()} - projectId={issue.project_id} - /> - )} { return; } await handleRestore() + // oxlint-disable-next-line promise/always-return .then(() => { setToast({ type: TOAST_TYPE.SUCCESS, @@ -293,6 +293,7 @@ export const useWorkItemDetailMenuItems = (props: MenuItemFactoryProps): TContex factory.createRestoreMenuItem(), factory.createDeleteMenuItem(), ], + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps [factory] ); }; @@ -334,6 +335,7 @@ export const useCycleIssueMenuItems = (props: MenuItemFactoryProps): TContextMen factory.createArchiveMenuItem(), factory.createDeleteMenuItem(), ], + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps [factory, props.cycleId] ); }; @@ -359,6 +361,7 @@ export const useModuleIssueMenuItems = (props: MenuItemFactoryProps): TContextMe factory.createArchiveMenuItem(), factory.createDeleteMenuItem(), ], + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps [factory, props.moduleId] ); }; diff --git a/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/issue-detail.tsx b/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/issue-detail.tsx index ab39101968..b848558780 100644 --- a/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/issue-detail.tsx +++ b/apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/issue-detail.tsx @@ -20,8 +20,6 @@ import { useIssues } from "@/hooks/store/use-issues"; import { useProject } from "@/hooks/store/use-project"; import { useProjectState } from "@/hooks/store/use-project-state"; import { useUserPermissions } from "@/hooks/store/user"; -// plane-web components -import { DuplicateWorkItemModal } from "@/plane-web/components/issues/issue-layouts/quick-action-dropdowns/duplicate-modal"; // helper import { ArchiveIssueModal } from "../../archive-issue-modal"; import { DeleteIssueModal } from "../../delete-issue-modal"; @@ -65,7 +63,7 @@ export const WorkItemDetailQuickActions = observer(function WorkItemDetailQuickA const [issueToEdit, setIssueToEdit] = useState(undefined); const [deleteIssueModal, setDeleteIssueModal] = useState(false); const [archiveIssueModal, setArchiveIssueModal] = useState(false); - const [duplicateWorkItemModal, setDuplicateWorkItemModal] = useState(false); + const [_, setDuplicateWorkItemModal] = useState(false); // store hooks const { allowPermissions } = useUserPermissions(); const { issuesFilter } = useIssues(EIssuesStoreType.PROJECT); @@ -152,6 +150,7 @@ export const WorkItemDetailQuickActions = observer(function WorkItemDetailQuickA const baseMenuItems = useWorkItemDetailMenuItems(menuItemProps); const MENU_ITEMS = baseMenuItems + // oxlint-disable-next-line oxc/no-map-spread .map((item) => { // Customize edit action for work item if (item.key === "edit") { @@ -224,18 +223,6 @@ export const WorkItemDetailQuickActions = observer(function WorkItemDetailQuickA storeType={EIssuesStoreType.PROJECT} fetchIssueDetails={false} /> - {issue.project_id && workspaceSlug && ( - { - setDuplicateWorkItemModal(false); - if (toggleDuplicateIssueModal) toggleDuplicateIssueModal(false); - }} - workspaceSlug={workspaceSlug.toString()} - projectId={issue.project_id} - /> - )} (undefined); const [deleteIssueModal, setDeleteIssueModal] = useState(false); const [archiveIssueModal, setArchiveIssueModal] = useState(false); - const [duplicateWorkItemModal, setDuplicateWorkItemModal] = useState(false); + const [_, setDuplicateWorkItemModal] = useState(false); // router const { workspaceSlug, moduleId } = useParams(); // store hooks @@ -137,15 +135,6 @@ export const ModuleIssueQuickActions = observer(function ModuleIssueQuickActions }} storeType={EIssuesStoreType.MODULE} /> - {issue.project_id && workspaceSlug && ( - setDuplicateWorkItemModal(false)} - workspaceSlug={workspaceSlug.toString()} - projectId={issue.project_id} - /> - )} (undefined); const [deleteIssueModal, setDeleteIssueModal] = useState(false); const [archiveIssueModal, setArchiveIssueModal] = useState(false); - const [duplicateWorkItemModal, setDuplicateWorkItemModal] = useState(false); + const [_, setDuplicateWorkItemModal] = useState(false); // store hooks const { allowPermissions } = useUserPermissions(); const { issuesFilter } = useIssues(EIssuesStoreType.PROJECT); @@ -139,15 +137,6 @@ export const ProjectIssueQuickActions = observer(function ProjectIssueQuickActio }} storeType={EIssuesStoreType.PROJECT} /> - {issue.project_id && workspaceSlug && ( - setDuplicateWorkItemModal(false)} - workspaceSlug={workspaceSlug.toString()} - projectId={issue.project_id} - /> - )} { if (isQuickAddOpen !== undefined && setIsQuickAddOpen) { setIsQuickAddOpen(isOpen); @@ -103,6 +103,7 @@ export const QuickAddIssueRoot = observer(function QuickAddIssueRoot(props: TQui reset({ ...defaultValues }); const payload = createIssuePayload(projectId.toString(), { + // oxlint-disable-next-line unicorn/no-useless-fallback-in-spread ...(prePopulatedData ?? {}), ...formData, }); @@ -149,6 +150,7 @@ export const QuickAddIssueRoot = observer(function QuickAddIssueRoot(props: TQui layout={layout} prePopulatedData={prePopulatedData} projectId={projectId?.toString()} + // oxlint-disable-next-line no-unneeded-ternary hasError={errors && errors?.name && errors?.name?.message ? true : false} setFocus={setFocus} register={register} diff --git a/apps/web/core/components/issues/issue-layouts/spreadsheet/columns/sub-issue-column.tsx b/apps/web/core/components/issues/issue-layouts/spreadsheet/columns/sub-issue-column.tsx index dcdcc4b425..2121101e80 100644 --- a/apps/web/core/components/issues/issue-layouts/spreadsheet/columns/sub-issue-column.tsx +++ b/apps/web/core/components/issues/issue-layouts/spreadsheet/columns/sub-issue-column.tsx @@ -14,7 +14,6 @@ import { Row } from "@plane/ui"; import { cn } from "@plane/utils"; // hooks import { useAppRouter } from "@/hooks/use-app-router"; -import { IssueStats } from "@/plane-web/components/issues/issue-layouts/issue-stats"; type Props = { issue: TIssue; @@ -48,7 +47,7 @@ export const SpreadsheetSubIssueColumn = observer(function SpreadsheetSubIssueCo } )} > - {isEpic ? : label} + {isEpic ? null : label} ); }); diff --git a/apps/web/core/components/issues/issue-layouts/spreadsheet/issue-column.tsx b/apps/web/core/components/issues/issue-layouts/spreadsheet/issue-column.tsx index e492c100b4..653ba4c436 100644 --- a/apps/web/core/components/issues/issue-layouts/spreadsheet/issue-column.tsx +++ b/apps/web/core/components/issues/issue-layouts/spreadsheet/issue-column.tsx @@ -8,8 +8,9 @@ import { useRef } from "react"; import { observer } from "mobx-react"; // types import type { IIssueDisplayProperties, TIssue } from "@plane/types"; +// constants +import { SPREADSHEET_COLUMNS } from "../utils"; // components -import { SPREADSHEET_COLUMNS } from "@/plane-web/components/issues/issue-layouts/utils"; import { shouldRenderColumn } from "@/helpers/issue-filter.helper"; import { WithDisplayPropertiesHOC } from "../properties/with-display-properties-HOC"; diff --git a/apps/web/core/components/issues/issue-layouts/spreadsheet/issue-row.tsx b/apps/web/core/components/issues/issue-layouts/spreadsheet/issue-row.tsx index 6d060c4dbd..278a39437b 100644 --- a/apps/web/core/components/issues/issue-layouts/spreadsheet/issue-row.tsx +++ b/apps/web/core/components/issues/issue-layouts/spreadsheet/issue-row.tsx @@ -23,7 +23,7 @@ import { cn, generateWorkItemLink } from "@plane/utils"; // components import { MultipleSelectEntityAction } from "@/components/core/multiple-select"; import RenderIfVisible from "@/components/core/render-if-visible-HOC"; -// helper +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useIssues } from "@/hooks/store/use-issues"; @@ -31,8 +31,6 @@ import { useProject } from "@/hooks/store/use-project"; import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection"; import type { TSelectionHelper } from "@/hooks/use-multiple-select"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web components -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; // local components import type { TRenderQuickActions } from "../list/list-view-types"; import { isIssueNew } 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 4111fa3c6b..b9aa21619d 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 @@ -13,11 +13,10 @@ import type { TIssue, IIssueDisplayFilterOptions, IIssueDisplayProperties } from import { EIssueLayoutTypes } from "@plane/types"; // components import { MultipleSelectGroup } from "@/components/core/multiple-select"; +import { IssueBulkOperationsRoot } from "@/components/issues/bulk-operations"; // 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"; // 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-layouts/utils.tsx b/apps/web/core/components/issues/issue-layouts/utils.tsx index f6cd86b64b..1a0cd69729 100644 --- a/apps/web/core/components/issues/issue-layouts/utils.tsx +++ b/apps/web/core/components/issues/issue-layouts/utils.tsx @@ -1,3 +1,4 @@ +// oxlint-disable no-shadow /** * Copyright (c) 2023-present Plane Software, Inc. and contributors * SPDX-License-Identifier: AGPL-3.0-only @@ -8,11 +9,27 @@ import type { CSSProperties } from "react"; import { extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item"; import { clone, isNil, pull, uniq, concat } from "lodash-es"; import scrollIntoView from "smooth-scroll-into-view-if-needed"; +import type { FC } from "react"; +import { CalendarDays, LayersIcon, Paperclip } from "lucide-react"; // plane types import { EIconSize, ISSUE_PRIORITIES, STATE_GROUPS } from "@plane/constants"; import { Logo } from "@plane/propel/emoji-icon-picker"; import type { ISvgIcons } from "@plane/propel/icons"; -import { CycleGroupIcon, CycleIcon, ModuleIcon, PriorityIcon, StateGroupIcon } from "@plane/propel/icons"; +import { + CycleGroupIcon, + CycleIcon, + ModuleIcon, + PriorityIcon, + StateGroupIcon, + LinkIcon, + StatePropertyIcon, + MembersPropertyIcon, + DueDatePropertyIcon, + EstimatePropertyIcon, + LabelPropertyIcon, + PriorityPropertyIcon, + StartDatePropertyIcon, +} from "@plane/propel/icons"; import type { GroupByColumnTypes, IGroupByColumn, @@ -26,23 +43,35 @@ import type { TGroupedIssues, IIssueDisplayFilterOptions, TGetColumns, + TSpreadsheetColumn, } from "@plane/types"; import { EIssuesStoreType } from "@plane/types"; // plane ui import { Avatar } from "@plane/ui"; import { renderFormattedDate, getFileURL } from "@plane/utils"; -// helpers // store import { store } from "@/lib/store-context"; -// plane web store -import { - getScopeMemberIds, - getTeamProjectColumns, - SpreadSheetPropertyIconMap, -} from "@/plane-web/components/issues/issue-layouts/utils"; -// store import { ISSUE_FILTER_DEFAULT_DATA } from "@/store/issue/helpers/base-issues.store"; import { DEFAULT_DISPLAY_PROPERTIES } from "@/store/issue/issue-details/sub_issues_filter.store"; +// constants +import { ISSUE_GROUP_BY_OPTIONS } from "@plane/constants"; +// components +import { + SpreadsheetAssigneeColumn, + SpreadsheetAttachmentColumn, + SpreadsheetCreatedOnColumn, + SpreadsheetDueDateColumn, + SpreadsheetEstimateColumn, + SpreadsheetLabelColumn, + SpreadsheetModuleColumn, + SpreadsheetCycleColumn, + SpreadsheetLinkColumn, + SpreadsheetPriorityColumn, + SpreadsheetStartDateColumn, + SpreadsheetStateColumn, + SpreadsheetSubIssueColumn, + SpreadsheetUpdatedOnColumn, +} from "@/components/issues/issue-layouts/spreadsheet/columns"; export const HIGHLIGHT_CLASS = "highlight"; export const HIGHLIGHT_WITH_LINE = "highlight-with-line"; @@ -63,6 +92,7 @@ export type IssueUpdates = { }; export const isWorkspaceLevel = (type: EIssuesStoreType) => + // oxlint-disable-next-line no-unneeded-ternary [ EIssuesStoreType.PROFILE, EIssuesStoreType.GLOBAL, @@ -769,3 +799,76 @@ export const calculateIdentifierWidth = (projectIdentifierLength: number, maxSeq const sequenceDigits = Math.max(1, Math.floor(Math.log10(maxSequenceId)) + 1); return projectIdentifierLength * 7 + 7 + sequenceDigits * 7; // project identifier chars + dash + sequence digits }; + +export type TGetScopeMemberIdsResult = { + memberIds: string[]; + includeNone: boolean; +}; + +export const getScopeMemberIds = ({ isWorkspaceLevel, projectId }: TGetColumns): TGetScopeMemberIdsResult => { + // store values + const { workspaceMemberIds } = store.memberRoot.workspace; + const { projectMemberIds } = store.memberRoot.project; + // derived values + const memberIds = workspaceMemberIds; + + if (isWorkspaceLevel) { + return { memberIds: memberIds ?? [], includeNone: true }; + } + + if (projectId || (projectMemberIds && projectMemberIds.length > 0)) { + const { getProjectMemberIds } = store.memberRoot.project; + const _projectMemberIds = projectId ? getProjectMemberIds(projectId, false) : projectMemberIds; + return { + memberIds: _projectMemberIds ?? [], + includeNone: true, + }; + } + + return { memberIds: [], includeNone: true }; +}; + +export const getTeamProjectColumns = (): IGroupByColumn[] | undefined => undefined; + +export const SpreadSheetPropertyIconMap: Record> = { + MembersPropertyIcon: MembersPropertyIcon, + CalenderDays: CalendarDays, + DueDatePropertyIcon: DueDatePropertyIcon, + EstimatePropertyIcon: EstimatePropertyIcon, + LabelPropertyIcon: LabelPropertyIcon, + ModuleIcon: ModuleIcon, + ContrastIcon: CycleIcon, + PriorityPropertyIcon: PriorityPropertyIcon, + StartDatePropertyIcon: StartDatePropertyIcon, + StatePropertyIcon: StatePropertyIcon, + Link2: LinkIcon, + Paperclip: Paperclip, + LayersIcon: LayersIcon, +}; + +export const SPREADSHEET_COLUMNS: { [key in keyof IIssueDisplayProperties]: TSpreadsheetColumn } = { + assignee: SpreadsheetAssigneeColumn, + created_on: SpreadsheetCreatedOnColumn, + due_date: SpreadsheetDueDateColumn, + estimate: SpreadsheetEstimateColumn, + labels: SpreadsheetLabelColumn, + modules: SpreadsheetModuleColumn, + cycle: SpreadsheetCycleColumn, + link: SpreadsheetLinkColumn, + priority: SpreadsheetPriorityColumn, + start_date: SpreadsheetStartDateColumn, + state: SpreadsheetStateColumn, + sub_issue_count: SpreadsheetSubIssueColumn, + updated_on: SpreadsheetUpdatedOnColumn, + attachment_count: SpreadsheetAttachmentColumn, +}; + +export const useGroupByOptions = ( + options: TIssueGroupByOptions[] +): { + key: TIssueGroupByOptions; + titleTranslationKey: string; +}[] => { + const groupByOptions = ISSUE_GROUP_BY_OPTIONS.filter((option) => options.includes(option.key)); + return groupByOptions; +}; diff --git a/apps/web/core/components/issues/issue-modal/components/default-properties.tsx b/apps/web/core/components/issues/issue-modal/components/default-properties.tsx index dee03b21dd..67219a2f59 100644 --- a/apps/web/core/components/issues/issue-modal/components/default-properties.tsx +++ b/apps/web/core/components/issues/issue-modal/components/default-properties.tsx @@ -26,14 +26,12 @@ import { PriorityDropdown } from "@/components/dropdowns/priority"; import { StateDropdown } from "@/components/dropdowns/state/dropdown"; import { ParentIssuesListModal } from "@/components/issues/parent-issues-list-modal"; import { IssueLabelSelect } from "@/components/issues/select"; -// helpers +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; // hooks import { useProjectEstimates } from "@/hooks/store/estimates"; import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web components -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; type TIssueDefaultPropertiesProps = { control: Control; diff --git a/apps/web/core/components/issues/issue-modal/components/parent-tag.tsx b/apps/web/core/components/issues/issue-modal/components/parent-tag.tsx index 67748b18a0..dd4e9d3e23 100644 --- a/apps/web/core/components/issues/issue-modal/components/parent-tag.tsx +++ b/apps/web/core/components/issues/issue-modal/components/parent-tag.tsx @@ -17,8 +17,8 @@ import type { ISearchIssueResponse, TIssue } from "@plane/types"; import { getTabIndex } from "@plane/utils"; // hooks import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web components -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; +// components +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; type TIssueParentTagProps = { control: Control; diff --git a/apps/web/core/components/issues/issue-modal/context/issue-modal-context.tsx b/apps/web/core/components/issues/issue-modal/context/issue-modal-context.tsx index b61589c3d3..c5f1002246 100644 --- a/apps/web/core/components/issues/issue-modal/context/issue-modal-context.tsx +++ b/apps/web/core/components/issues/issue-modal/context/issue-modal-context.tsx @@ -10,18 +10,17 @@ import type { UseFormReset, UseFormWatch } from "react-hook-form"; // plane imports import type { EditorRefApi } from "@plane/editor"; import type { ISearchIssueResponse, TIssue, TIssuePropertyValues, TIssuePropertyValueErrors } from "@plane/types"; -import type { TIssueFields } from "@/plane-web/components/issues/issue-modal"; export type TPropertyValuesValidationProps = { projectId: string | null; workspaceSlug: string; - watch: UseFormWatch; + watch: UseFormWatch; }; export type TActiveAdditionalPropertiesProps = { projectId: string | null; workspaceSlug: string; - watch: UseFormWatch; + watch: UseFormWatch; }; export type TCreateUpdatePropertyValuesProps = { diff --git a/apps/web/core/components/issues/issue-modal/form.tsx b/apps/web/core/components/issues/issue-modal/form.tsx index 53aded4387..976e4f314d 100644 --- a/apps/web/core/components/issues/issue-modal/form.tsx +++ b/apps/web/core/components/issues/issue-modal/form.tsx @@ -1,3 +1,6 @@ +// oxlint-disable promise/always-return +// oxlint-disable no-shadow +// oxlint-disable jsx_a11y/prefer-tag-over-role /** * Copyright (c) 2023-present Plane Software, Inc. and contributors * SPDX-License-Identifier: AGPL-3.0-only @@ -22,7 +25,6 @@ import { convertWorkItemDataToSearchResponse, getUpdateFormDataForReset, cn, - getTextContent, getChangedIssuefields, getTabIndex, } from "@plane/utils"; @@ -43,12 +45,6 @@ import { useProjectState } from "@/hooks/store/use-project-state"; import { useWorkspaceDraftIssues } from "@/hooks/store/workspace-draft"; import { usePlatformOS } from "@/hooks/use-platform-os"; import { useProjectIssueProperties } from "@/hooks/use-project-issue-properties"; -// 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 { IssueTypeSelect, WorkItemTemplateSelect } from "@/plane-web/components/issues/issue-modal"; -import { WorkItemModalAdditionalProperties } from "@/plane-web/components/issues/issue-modal/modal-additional-properties"; -import { useDebouncedDuplicateIssues } from "@/hooks/use-debounced-duplicate-issues"; export interface IssueFormProps { data?: Partial; @@ -94,9 +90,6 @@ export const IssueFormRoot = observer(function IssueFormRoot(props: IssueFormPro default: `${data?.id ? t("update") : isDraft ? t("save_to_drafts") : t("save")}`, loading: `${data?.id ? t("updating") : t("saving")}`, }, - isDuplicateModalOpen, - handleDuplicateIssueModal, - handleDraftAndClose, isProjectSelectionDisabled = false, showActionButtons = true, dataResetProperties = [], @@ -161,8 +154,6 @@ export const IssueFormRoot = observer(function IssueFormRoot(props: IssueFormPro watch: watch, }); - // derived values - const projectDetails = projectId ? getProjectById(projectId) : undefined; const isDisabled = isSubmitting || isApplyingTemplate; const { getIndex } = getTabIndex(ETabIndices.ISSUE_FORM, isMobile); @@ -313,18 +304,6 @@ export const IssueFormRoot = observer(function IssueFormRoot(props: IssueFormPro else onChange(null); }; - // debounced duplicate issues swr - const { duplicateIssues } = useDebouncedDuplicateIssues( - workspaceSlug?.toString(), - projectDetails?.workspace.toString(), - projectId ?? undefined, - { - name: watch("name"), - description_html: getTextContent(watch("description_html")), - issueId: data?.id, - } - ); - // executing this useEffect when the parent_id coming from the component prop useEffect(() => { const parentId = watch("parent_id") || undefined; @@ -342,6 +321,7 @@ export const IssueFormRoot = observer(function IssueFormRoot(props: IssueFormPro setSelectedParentIssue( convertWorkItemDataToSearchResponse(workspaceSlug?.toString(), issue, projectDetails, stateDetails) ); + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, [watch, getIssueById, getProjectById, selectedParentIssue, getStateById]); // executing this useEffect when isDirty changes @@ -370,10 +350,6 @@ export const IssueFormRoot = observer(function IssueFormRoot(props: IssueFormPro }; }, [formRef, modalContainerRef]); - // TODO: Remove this after the de-dupe feature is implemented - - const shouldRenderDuplicateModal = isDuplicateModalOpen && duplicateIssues?.length > 0; - return ( @@ -392,44 +368,7 @@ export const IssueFormRoot = observer(function IssueFormRoot(props: IssueFormPro disabled={!!data?.id || !!data?.sourceIssueId || isProjectSelectionDisabled} handleFormChange={handleFormChange} /> - {projectId && ( - - )} - {projectId && !data?.id && !data?.sourceIssueId && ( - { - if (handleDraftAndClose) { - handleDraftAndClose(); - } else { - onClose(); - } - }} - handleFormChange={handleFormChange} - renderChevron - /> - )} - {duplicateIssues.length > 0 && ( - handleDuplicateIssueModal(!isDuplicateModalOpen)} - /> - )} {watch("parent_id") && selectedParentIssue && ( @@ -479,12 +418,6 @@ export const IssueFormRoot = observer(function IssueFormRoot(props: IssueFormPro onClose={onClose} /> - - {shouldRenderDuplicateModal && ( - - - - )} ); diff --git a/apps/web/core/components/issues/issue-modal/modal.tsx b/apps/web/core/components/issues/issue-modal/modal.tsx index ba03fbbdbd..1fb675ef28 100644 --- a/apps/web/core/components/issues/issue-modal/modal.tsx +++ b/apps/web/core/components/issues/issue-modal/modal.tsx @@ -9,9 +9,9 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports import type { EIssuesStoreType, TIssue } from "@plane/types"; -// plane web imports -import { IssueModalProvider } from "@/plane-web/components/issues/issue-modal/provider"; +// local imports import { CreateUpdateIssueModalBase } from "./base"; +import { IssueModalProvider } from "./provider"; export interface IssuesModalProps { data?: Partial; diff --git a/apps/web/ce/components/issues/issue-modal/provider.tsx b/apps/web/core/components/issues/issue-modal/provider.tsx similarity index 96% rename from apps/web/ce/components/issues/issue-modal/provider.tsx rename to apps/web/core/components/issues/issue-modal/provider.tsx index 0494b35a05..a5108234d6 100644 --- a/apps/web/ce/components/issues/issue-modal/provider.tsx +++ b/apps/web/core/components/issues/issue-modal/provider.tsx @@ -31,6 +31,7 @@ export const IssueModalProvider = observer(function IssueModalProvider(props: TI return ( >; @@ -109,15 +93,6 @@ export const PeekOverviewIssueDetails = observer(function PeekOverviewIssueDetai )} - {duplicateIssues?.length > 0 && ( - - )} - {issue.target_date && } @@ -222,11 +217,7 @@ export const PeekOverviewProperties = observer(function PeekOverviewProperties(p )} {projectDetails?.cycle_view && ( - } - > + - - - - ); diff --git a/apps/web/core/components/issues/preview-card/root.tsx b/apps/web/core/components/issues/preview-card/root.tsx index d54220f630..b3aa466ed5 100644 --- a/apps/web/core/components/issues/preview-card/root.tsx +++ b/apps/web/core/components/issues/preview-card/root.tsx @@ -11,8 +11,8 @@ import type { TIssue, TStateGroups } from "@plane/types"; // hooks import { useProject } from "@/hooks/store/use-project"; import { useProjectState } from "@/hooks/store/use-project-state"; -// plane web imports -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; +// components +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; // local imports import { WorkItemPreviewCardDate } from "./date"; diff --git a/apps/web/core/components/issues/relations/issue-list-item.tsx b/apps/web/core/components/issues/relations/issue-list-item.tsx index 223fec63b1..2226dc7b3d 100644 --- a/apps/web/core/components/issues/relations/issue-list-item.tsx +++ b/apps/web/core/components/issues/relations/issue-list-item.tsx @@ -10,6 +10,7 @@ import { useTranslation } from "@plane/i18n"; import { LinkIcon, EditIcon, TrashIcon, CloseIcon } from "@plane/propel/icons"; // plane imports import { Tooltip } from "@plane/propel/tooltip"; +import type { TIssueRelationTypes } from "@plane/types"; import type { TIssue, TIssueServiceType } from "@plane/types"; import { EIssueServiceType } from "@plane/types"; import { ControlLink, CustomMenu } from "@plane/ui"; @@ -19,9 +20,8 @@ import { useIssueDetail } from "@/hooks/store/use-issue-detail"; import { useProject } from "@/hooks/store/use-project"; import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web imports -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; -import type { TIssueRelationTypes } from "@plane/types"; +// components +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; // local imports import { useRelationOperations } from "../issue-detail-widgets/relations/helper"; import { RelationIssueProperty } from "./properties"; diff --git a/apps/web/core/components/issues/relations/issue-list.tsx b/apps/web/core/components/issues/relations/issue-list.tsx index 6a6e52a4d8..1da83ae2a1 100644 --- a/apps/web/core/components/issues/relations/issue-list.tsx +++ b/apps/web/core/components/issues/relations/issue-list.tsx @@ -9,7 +9,6 @@ import { observer } from "mobx-react"; // plane imports import type { TIssue, TIssueServiceType } from "@plane/types"; import { EIssueServiceType } from "@plane/types"; -// Plane-web imports import type { TIssueRelationTypes } from "@plane/types"; // local imports import { RelationIssueListItem } from "./issue-list-item"; diff --git a/apps/web/core/components/issues/workspace-draft/draft-issue-block.tsx b/apps/web/core/components/issues/workspace-draft/draft-issue-block.tsx index dd3c7b5998..90d033711e 100644 --- a/apps/web/core/components/issues/workspace-draft/draft-issue-block.tsx +++ b/apps/web/core/components/issues/workspace-draft/draft-issue-block.tsx @@ -20,8 +20,6 @@ import { cn } from "@plane/utils"; import { useAppTheme } from "@/hooks/store/use-app-theme"; import { useProject } from "@/hooks/store/use-project"; import { useWorkspaceDraftIssues } from "@/hooks/store/workspace-draft"; -// plane-web imports -import { IssueTypeIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; // local imports import { IdentifierText } from "../issue-detail/identifier-text"; import { CreateUpdateIssueModal } from "../issue-modal/modal"; @@ -148,7 +146,6 @@ export const DraftIssueBlock = observer(function DraftIssueBlock(props: Props) { {issue.project_id && ( - {issue?.type_id && } { // Get the product and price using plane community constants const product = PLANE_COMMUNITY_PRODUCTS[planVariant]; + // oxlint-disable-next-line no-shadow const price = product.prices.find((price) => price.id === priceId); const frequency = price?.recurring ?? "year"; // Redirect to the appropriate URL diff --git a/apps/web/ce/components/command-palette/modals/project-level.tsx b/apps/web/core/components/modals/project-level.tsx similarity index 100% rename from apps/web/ce/components/command-palette/modals/project-level.tsx rename to apps/web/core/components/modals/project-level.tsx diff --git a/apps/web/ce/components/command-palette/modals/work-item-level.tsx b/apps/web/core/components/modals/work-item-level.tsx similarity index 99% rename from apps/web/ce/components/command-palette/modals/work-item-level.tsx rename to apps/web/core/components/modals/work-item-level.tsx index fc83af463a..bf6bd4e061 100644 --- a/apps/web/ce/components/command-palette/modals/work-item-level.tsx +++ b/apps/web/core/components/modals/work-item-level.tsx @@ -54,6 +54,7 @@ export const WorkItemLevelModals = observer(function WorkItemLevelModals(props: const { fetchSubIssues: fetchSubWorkItems } = useIssueDetail(); const { fetchSubIssues: fetchEpicSubWorkItems } = useIssueDetail(EIssueServiceType.EPICS); + // oxlint-disable-next-line no-shadow const handleDeleteIssue = async (workspaceSlug: string, projectId: string, issueId: string) => { try { const isEpic = workItemDetails?.is_epic; diff --git a/apps/web/ce/components/command-palette/modals/workspace-level.tsx b/apps/web/core/components/modals/workspace-level.tsx similarity index 100% rename from apps/web/ce/components/command-palette/modals/workspace-level.tsx rename to apps/web/core/components/modals/workspace-level.tsx diff --git a/apps/web/ce/components/app-rail/app-rail-hoc.tsx b/apps/web/core/components/navigation/app-rail-hoc.tsx similarity index 100% rename from apps/web/ce/components/app-rail/app-rail-hoc.tsx rename to apps/web/core/components/navigation/app-rail-hoc.tsx diff --git a/apps/web/core/components/navigation/app-rail-root.tsx b/apps/web/core/components/navigation/app-rail-root.tsx index 009e45e031..d37068e57f 100644 --- a/apps/web/core/components/navigation/app-rail-root.tsx +++ b/apps/web/core/components/navigation/app-rail-root.tsx @@ -16,8 +16,6 @@ import { AppSidebarItem } from "@/components/sidebar/sidebar-item"; // hooks import { useAppRailPreferences } from "@/hooks/use-navigation-preferences"; import { useAppRailVisibility } from "@/lib/app-rail/context"; -// plane web imports -import { DesktopSidebarWorkspaceMenu } from "@/plane-web/components/desktop"; // local imports import { AppSidebarItemsRoot } from "./items-root"; @@ -50,7 +48,6 @@ export const AppRailRoot = observer(() => { "gap-3": !showLabel, })} > - a.sortOrder - b.sortOrder); }, [workspaceSlug, allowPermissions, workspacePreferences]); @@ -150,10 +151,12 @@ export const CustomizeNavigationDialog = observer(function CustomizeNavigationDi }; }); + // oxlint-disable-next-line unicorn/no-array-sort return items.sort((a, b) => a.sortOrder - b.sortOrder); }, [personalPreferences, filteredPersonalItems]); // Prevent typing invalid characters in number input + // oxlint-disable-next-line unicorn/consistent-function-scoping const handleKeyDown = (e: React.KeyboardEvent) => { // Block: e, E, +, -, . if (["e", "E", "+", "-", "."].includes(e.key)) { @@ -266,6 +269,7 @@ export const CustomizeNavigationDialog = observer(function CustomizeNavigationDi {/* Navigation Mode Radio Buttons */} + {/* oxlint-disable-next-line jsx_a11y/label-has-associated-control */} + {/* oxlint-disable-next-line jsx_a11y/label-has-associated-control */} item.shouldRender) - .sort((a, b) => a.sortOrder - b.sortOrder); + // oxlint-disable-next-line unicorn/no-array-sort + .sort((a: TNavigationItem, b: TNavigationItem) => a.sortOrder - b.sortOrder); // Split items into two categories: // 1. visibleNavigationItems: Items NOT user-hidden (may still overflow due to space) // 2. hiddenNavigationItems: Items user explicitly hid (always in overflow with "Show" icon) - const visibleNavigationItems = allNavigationItems.filter((item) => !tabPreferences.hiddenTabs.includes(item.key)); - const hiddenNavigationItems = allNavigationItems.filter((item) => tabPreferences.hiddenTabs.includes(item.key)); + const visibleNavigationItems = allNavigationItems.filter( + (item: TNavigationItem) => !tabPreferences.hiddenTabs.includes(item.key) + ); + const hiddenNavigationItems = allNavigationItems.filter((item: TNavigationItem) => + tabPreferences.hiddenTabs.includes(item.key) + ); // Responsive tab layout hook const { visibleItems, overflowItems, hasOverflow, itemRefs, containerRef } = useResponsiveTabLayout({ @@ -131,10 +135,11 @@ export const TabNavigationRoot = observer(function TabNavigationRoot(props: TTab if (isProjectRoot && allNavigationItems.length > 0) { // Find the default tab in available items - const defaultTabItem = allNavigationItems.find((item) => item.key === tabPreferences.defaultTab); + const defaultTabItem = allNavigationItems.find((item: TNavigationItem) => item.key === tabPreferences.defaultTab); // If default tab exists and is enabled, use it; otherwise fall back to work_items - const targetItem = defaultTabItem || allNavigationItems.find((item) => item.key === DEFAULT_TAB_KEY); + const targetItem = + defaultTabItem || allNavigationItems.find((item: TNavigationItem) => item.key === DEFAULT_TAB_KEY); if (targetItem) { navigate(targetItem.href, { replace: true }); @@ -224,7 +229,7 @@ export const TabNavigationRoot = observer(function TabNavigationRoot(props: TTab {hasOverflow && ( - {visibleNavigationItems.map((item) => { + {visibleNavigationItems.map((item: TNavigationItem) => { const itemIsActive = isActive(item); const originalIndex = allNavigationItems.indexOf(item); return ( diff --git a/apps/web/ce/components/navigations/top-navigation-root.tsx b/apps/web/core/components/navigation/top-navigation-root.tsx similarity index 100% rename from apps/web/ce/components/navigations/top-navigation-root.tsx rename to apps/web/core/components/navigation/top-navigation-root.tsx diff --git a/apps/web/ce/components/navigations/use-navigation-items.ts b/apps/web/core/components/navigation/use-navigation-items.ts similarity index 97% rename from apps/web/ce/components/navigations/use-navigation-items.ts rename to apps/web/core/components/navigation/use-navigation-items.ts index 7e085a1d24..621d9e3a54 100644 --- a/apps/web/ce/components/navigations/use-navigation-items.ts +++ b/apps/web/core/components/navigation/use-navigation-items.ts @@ -31,6 +31,7 @@ export const useNavigationItems = ({ }: UseNavigationItemsProps): TNavigationItem[] => { // Base navigation items const baseNavigation = useCallback( + // oxlint-disable-next-line no-shadow (workspaceSlug: string, projectId: string): TNavigationItem[] => [ { i18n_key: "sidebar.work_items", @@ -108,6 +109,7 @@ export const useNavigationItems = ({ }); // Sort by sortOrder + // oxlint-disable-next-line unicorn/no-array-sort return filteredItems.sort((a, b) => (a.sortOrder || 0) - (b.sortOrder || 0)); }, [workspaceSlug, projectId, baseNavigation, allowPermissions, project?.id]); diff --git a/apps/web/ce/components/onboarding/tour/root.tsx b/apps/web/core/components/onboarding/tour/root.tsx similarity index 100% rename from apps/web/ce/components/onboarding/tour/root.tsx rename to apps/web/core/components/onboarding/tour/root.tsx diff --git a/apps/web/ce/components/onboarding/tour/sidebar.tsx b/apps/web/core/components/onboarding/tour/sidebar.tsx similarity index 92% rename from apps/web/ce/components/onboarding/tour/sidebar.tsx rename to apps/web/core/components/onboarding/tour/sidebar.tsx index 7a54ec79d3..898159fd60 100644 --- a/apps/web/ce/components/onboarding/tour/sidebar.tsx +++ b/apps/web/core/components/onboarding/tour/sidebar.tsx @@ -57,12 +57,14 @@ export function TourSidebar({ step, setStep }: Props) { {sidebarOptions.map((option) => ( + // oxlint-disable-next-line jsx_a11y/click-events-have-key-events setStep(option.key)} + // oxlint-disable-next-line jsx_a11y/prefer-tag-over-role role="button" > diff --git a/apps/web/core/components/pages/dropdowns/actions.tsx b/apps/web/core/components/pages/dropdowns/actions.tsx index e11d25f8c4..7d63dd62c0 100644 --- a/apps/web/core/components/pages/dropdowns/actions.tsx +++ b/apps/web/core/components/pages/dropdowns/actions.tsx @@ -20,8 +20,6 @@ import { cn } from "@plane/utils"; import { DeletePageModal } from "@/components/pages/modals/delete-page-modal"; // hooks import { usePageOperations } from "@/hooks/use-page-operations"; -// plane web components -import { MovePageModal } from "@/plane-web/components/pages"; // plane web hooks import type { EPageStoreType } from "@/hooks/store"; import { usePageFlag } from "@/hooks/use-page-flag"; @@ -180,7 +178,6 @@ export const PageActions = observer(function PageActions(props: Props) { return ( <> - setMovePageModal(false)} page={page} /> setDeletePageModal(false)} diff --git a/apps/web/ce/components/pages/editor/ai/ask-pi-menu.tsx b/apps/web/core/components/pages/editor/ai/ask-pi-menu.tsx similarity index 100% rename from apps/web/ce/components/pages/editor/ai/ask-pi-menu.tsx rename to apps/web/core/components/pages/editor/ai/ask-pi-menu.tsx diff --git a/apps/web/ce/components/pages/editor/ai/index.ts b/apps/web/core/components/pages/editor/ai/index.ts similarity index 100% rename from apps/web/ce/components/pages/editor/ai/index.ts rename to apps/web/core/components/pages/editor/ai/index.ts diff --git a/apps/web/ce/components/pages/editor/ai/menu.tsx b/apps/web/core/components/pages/editor/ai/menu.tsx similarity index 100% rename from apps/web/ce/components/pages/editor/ai/menu.tsx rename to apps/web/core/components/pages/editor/ai/menu.tsx diff --git a/apps/web/core/components/pages/editor/editor-body.tsx b/apps/web/core/components/pages/editor/editor-body.tsx index 561d048e44..776e10c91e 100644 --- a/apps/web/core/components/pages/editor/editor-body.tsx +++ b/apps/web/core/components/pages/editor/editor-body.tsx @@ -35,7 +35,6 @@ import { useParseEditorContent } from "@/hooks/use-parse-editor-content"; // plane web imports 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 "@/hooks/pages"; import type { EPageStoreType } from "@/hooks/store"; import { useEditorFlagging } from "@/hooks/use-editor-flagging"; @@ -45,6 +44,7 @@ import type { TPageInstance } from "@/store/pages/base-page"; import { PageContentLoader } from "../loaders/page-content-loader"; import { PageEditorHeaderRoot } from "./header"; import { PageContentBrowser } from "./summary"; +import { EditorAIMenu } from "./ai"; export type TEditorBodyConfig = { fileHandler: TFileHandler; @@ -244,8 +244,10 @@ export const PageEditorBody = observer(function PageEditorBody(props: Props) { + {/* oxlint-disable-next-line jsx_a11y/click-events-have-key-events */} , getMentionedEntityDetails: (id: string) => ({ display_name: getUserDetails(id)?.display_name ?? "" }), }} diff --git a/apps/web/core/components/pages/editor/page-root.tsx b/apps/web/core/components/pages/editor/page-root.tsx index 2ffb04148a..c7c9084466 100644 --- a/apps/web/core/components/pages/editor/page-root.tsx +++ b/apps/web/core/components/pages/editor/page-root.tsx @@ -11,9 +11,7 @@ import type { CollaborationState, EditorRefApi } from "@plane/editor"; import type { TDocumentPayload, TPage, TPageVersion, TWebhookConnectionQueryParams } from "@plane/types"; // hooks 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 "@/hooks/pages"; import type { EPageStoreType } from "@/hooks/store"; // store @@ -199,7 +197,6 @@ export const PageRoot = observer(function PageRoot(props: TPageRootProps) { }} extensions={navigationPaneExtensions} /> - ); }); 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 44b4430421..b0ea592f4d 100644 --- a/apps/web/core/components/pages/editor/toolbar/options-dropdown.tsx +++ b/apps/web/core/components/pages/editor/toolbar/options-dropdown.tsx @@ -15,7 +15,7 @@ import { useAppRouter } from "@/hooks/use-app-router"; 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 { TPageNavigationPaneTab } from "@/components/pages/navigation-pane/tab-panels"; import type { EPageStoreType } from "@/hooks/store"; // store import type { TPageInstance } from "@/store/pages/base-page"; diff --git a/apps/web/core/components/pages/editor/toolbar/root.tsx b/apps/web/core/components/pages/editor/toolbar/root.tsx index db080be8ed..9650a81add 100644 --- a/apps/web/core/components/pages/editor/toolbar/root.tsx +++ b/apps/web/core/components/pages/editor/toolbar/root.tsx @@ -14,8 +14,6 @@ import { cn } from "@plane/utils"; import { PageToolbar } from "@/components/pages/editor/toolbar"; // hooks import { usePageFilters } from "@/hooks/use-page-filters"; -// plane web components -import { PageCollaboratorsList } from "@/plane-web/components/pages/header/collaborators-list"; // store import type { TPageInstance } from "@/store/pages/base-page"; @@ -58,7 +56,6 @@ export const PageEditorToolbarRoot = observer(function PageEditorToolbarRoot(pro {editorRef && } - {!isNavigationPaneOpen && ( - - ); diff --git a/apps/web/ce/components/pages/header/lock-control.tsx b/apps/web/core/components/pages/header/lock-control.tsx similarity index 100% rename from apps/web/ce/components/pages/header/lock-control.tsx rename to apps/web/core/components/pages/header/lock-control.tsx diff --git a/apps/web/core/components/pages/navigation-pane/index.ts b/apps/web/core/components/pages/navigation-pane/index.ts index 20f042aa57..52ee3dc515 100644 --- a/apps/web/core/components/pages/navigation-pane/index.ts +++ b/apps/web/core/components/pages/navigation-pane/index.ts @@ -5,7 +5,7 @@ */ // plane web imports -import { ORDERED_PAGE_NAVIGATION_TABS_LIST } from "@/plane-web/components/pages/navigation-pane"; +import { ORDERED_PAGE_NAVIGATION_TABS_LIST } from "@/components/pages/navigation-pane/tab-panels"; export * from "./root"; export * from "./types"; diff --git a/apps/web/core/components/pages/navigation-pane/root.tsx b/apps/web/core/components/pages/navigation-pane/root.tsx index 1aa3d2d605..3f9a5fe2bf 100644 --- a/apps/web/core/components/pages/navigation-pane/root.tsx +++ b/apps/web/core/components/pages/navigation-pane/root.tsx @@ -15,7 +15,7 @@ import { Tooltip } from "@plane/propel/tooltip"; // hooks import { useQueryParams } from "@/hooks/use-query-params"; // plane web components -import type { TPageNavigationPaneTab } from "@/plane-web/components/pages/navigation-pane"; +import type { TPageNavigationPaneTab } from "@/components/pages/navigation-pane/tab-panels"; // store import type { EPageStoreType } from "@/hooks/store"; import type { TPageInstance } from "@/store/pages/base-page"; diff --git a/apps/web/core/components/pages/navigation-pane/tab-panels/assets.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/assets.tsx index cfb4e8986b..42e156112b 100644 --- a/apps/web/core/components/pages/navigation-pane/tab-panels/assets.tsx +++ b/apps/web/core/components/pages/navigation-pane/tab-panels/assets.tsx @@ -13,11 +13,10 @@ import { CORE_EXTENSIONS } from "@plane/editor"; import type { TEditorAsset } from "@plane/editor"; import { useTranslation } from "@plane/i18n"; import { getEditorAssetDownloadSrc, getEditorAssetSrc } from "@plane/utils"; -// plane web imports -import { AdditionalPageNavigationPaneAssetItem } from "@/plane-web/components/pages/navigation-pane/tab-panels/assets"; -import { PageNavigationPaneAssetsTabEmptyState } from "@/plane-web/components/pages/navigation-pane/tab-panels/empty-states/assets"; // store import type { TPageInstance } from "@/store/pages/base-page"; +// local import +import { PageNavigationPaneAssetsTabEmptyState } from "./empty-state/assets"; type Props = { page: TPageInstance; @@ -97,14 +96,7 @@ const AssetItem = observer(function AssetItem(props: AssetItemProps) { ); - return ( - - ); + return null; }); export const PageNavigationPaneAssetsTabPanel = observer(function PageNavigationPaneAssetsTabPanel(props: Props) { diff --git a/apps/web/ce/components/pages/navigation-pane/tab-panels/empty-states/assets.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/empty-state/assets.tsx similarity index 100% rename from apps/web/ce/components/pages/navigation-pane/tab-panels/empty-states/assets.tsx rename to apps/web/core/components/pages/navigation-pane/tab-panels/empty-state/assets.tsx diff --git a/apps/web/ce/components/pages/navigation-pane/tab-panels/empty-states/outline.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/empty-state/outline.tsx similarity index 100% rename from apps/web/ce/components/pages/navigation-pane/tab-panels/empty-states/outline.tsx rename to apps/web/core/components/pages/navigation-pane/tab-panels/empty-state/outline.tsx diff --git a/apps/web/ce/components/pages/navigation-pane/index.ts b/apps/web/core/components/pages/navigation-pane/tab-panels/index.ts similarity index 100% rename from apps/web/ce/components/pages/navigation-pane/index.ts rename to apps/web/core/components/pages/navigation-pane/tab-panels/index.ts diff --git a/apps/web/core/components/pages/navigation-pane/tab-panels/outline.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/outline.tsx index 43a530f8dd..cb012339e6 100644 --- a/apps/web/core/components/pages/navigation-pane/tab-panels/outline.tsx +++ b/apps/web/core/components/pages/navigation-pane/tab-panels/outline.tsx @@ -6,12 +6,11 @@ // plane imports import { ScrollArea } from "@plane/propel/scrollarea"; -// plane web imports -import { PageNavigationPaneOutlineTabEmptyState } from "@/plane-web/components/pages/navigation-pane/tab-panels/empty-states/outline"; // store import type { TPageInstance } from "@/store/pages/base-page"; // local imports import { PageContentBrowser } from "../../editor/summary"; +import { PageNavigationPaneOutlineTabEmptyState } from "./empty-state/outline"; type Props = { page: TPageInstance; diff --git a/apps/web/core/components/pages/navigation-pane/tab-panels/root.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/root.tsx index 3da17ef6fd..5cb85bdb63 100644 --- a/apps/web/core/components/pages/navigation-pane/tab-panels/root.tsx +++ b/apps/web/core/components/pages/navigation-pane/tab-panels/root.tsx @@ -6,9 +6,6 @@ // components import type { TPageRootHandlers } from "@/components/pages/editor/page-root"; -// plane web imports -import { ORDERED_PAGE_NAVIGATION_TABS_LIST } from "@/plane-web/components/pages/navigation-pane"; -import { PageNavigationPaneAdditionalTabPanelsRoot } from "@/plane-web/components/pages/navigation-pane/tab-panels/root"; // store import type { TPageInstance } from "@/store/pages/base-page"; // local imports @@ -16,6 +13,7 @@ import { PageNavigationPaneAssetsTabPanel } from "./assets"; import { PageNavigationPaneInfoTabPanel } from "./info/root"; import { PageNavigationPaneOutlineTabPanel } from "./outline"; import { Tabs } from "@plane/propel/tabs"; +import { ORDERED_PAGE_NAVIGATION_TABS_LIST } from "."; type Props = { page: TPageInstance; @@ -32,7 +30,6 @@ export function PageNavigationPaneTabPanelsRoot(props: Props) { {tab.key === "outline" && } {tab.key === "info" && } {tab.key === "assets" && } - ))} > diff --git a/apps/web/core/components/pages/navigation-pane/tabs-list.tsx b/apps/web/core/components/pages/navigation-pane/tabs-list.tsx index 3ba55f6a2c..6621667aab 100644 --- a/apps/web/core/components/pages/navigation-pane/tabs-list.tsx +++ b/apps/web/core/components/pages/navigation-pane/tabs-list.tsx @@ -8,7 +8,7 @@ import { useTranslation } from "@plane/i18n"; import { Tabs } from "@plane/propel/tabs"; // plane web components -import { ORDERED_PAGE_NAVIGATION_TABS_LIST } from "@/plane-web/components/pages/navigation-pane"; +import { ORDERED_PAGE_NAVIGATION_TABS_LIST } from "@/components/pages/navigation-pane/tab-panels"; export function PageNavigationPaneTabsList() { // translation diff --git a/apps/web/core/components/power-k/core/context-detector.ts b/apps/web/core/components/power-k/core/context-detector.ts index eb3093b6d1..0111896e29 100644 --- a/apps/web/core/components/power-k/core/context-detector.ts +++ b/apps/web/core/components/power-k/core/context-detector.ts @@ -5,20 +5,14 @@ */ import type { Params } from "react-router"; -// plane web imports -import { detectExtendedContextFromURL } from "@/plane-web/components/command-palette/power-k/context-detector"; // local imports import type { TPowerKContextType } from "./types"; -/** - * Detects the current context from the URL params and pathname - * Returns information about the active entity (work item, project, cycle, etc.) - */ export const detectContextFromURL = (params: Params): TPowerKContextType | null => { if (params.workItem) return "work-item"; if (params.cycleId) return "cycle"; if (params.moduleId) return "module"; if (params.pageId) return "page"; - return detectExtendedContextFromURL(params); + return null; }; diff --git a/apps/web/core/components/power-k/core/types.ts b/apps/web/core/components/power-k/core/types.ts index c10b29709a..f3150192b8 100644 --- a/apps/web/core/components/power-k/core/types.ts +++ b/apps/web/core/components/power-k/core/types.ts @@ -5,14 +5,8 @@ */ import type { useRouter } from "next/navigation"; -// plane web imports -import type { - TPowerKContextTypeExtended, - TPowerKPageTypeExtended, - TPowerKSearchResultsKeysExtended, -} from "@/plane-web/components/command-palette/power-k/types"; -export type TPowerKContextType = "work-item" | "page" | "cycle" | "module" | TPowerKContextTypeExtended; +export type TPowerKContextType = "work-item" | "page" | "cycle" | "module"; export type TPowerKContext = { // Route information @@ -56,8 +50,7 @@ export type TPowerKPageType = | "update-theme" | "update-timezone" | "update-start-of-week" - | "update-language" - | TPowerKPageTypeExtended; + | "update-language"; export type TPowerKCommandGroup = | "contextual" @@ -133,12 +126,4 @@ export type TSelectionPageProps = { onClose: () => void; }; -export type TPowerKSearchResultsKeys = - | "workspace" - | "project" - | "issue" - | "cycle" - | "module" - | "issue_view" - | "page" - | TPowerKSearchResultsKeysExtended; +export type TPowerKSearchResultsKeys = "workspace" | "project" | "issue" | "cycle" | "module" | "issue_view" | "page"; 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 d8ae42a83b..d7a36e250a 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 @@ -8,11 +8,9 @@ import { useParams } from "next/navigation"; // plane imports import { getPageName } from "@plane/utils"; // hooks +import { EPageStoreType, usePageStore } from "@/hooks/store"; 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 "@/hooks/store"; // local imports import type { TPowerKContextType } from "../core/types"; @@ -28,10 +26,6 @@ export const useContextIndicator = (args: TArgs): string | null => { const { getCycleById } = useCycle(); const { getModuleById } = useModule(); const { getPageById } = usePageStore(EPageStoreType.PROJECT); - // extended context indicator - const extendedIndicator = useExtendedContextIndicator({ - activeContext, - }); let indicator: string | undefined | null = null; switch (activeContext) { @@ -55,7 +49,7 @@ export const useContextIndicator = (args: TArgs): string | null => { break; } default: { - indicator = extendedIndicator; + indicator = null; } } diff --git a/apps/web/core/components/power-k/projects-app-provider.tsx b/apps/web/core/components/power-k/projects-app-provider.tsx index 624bb708fc..897c1545f7 100644 --- a/apps/web/core/components/power-k/projects-app-provider.tsx +++ b/apps/web/core/components/power-k/projects-app-provider.tsx @@ -13,9 +13,9 @@ import { usePowerK } from "@/hooks/store/use-power-k"; import { useUser } from "@/hooks/store/user"; import { useAppRouter } from "@/hooks/use-app-router"; // plane web imports -import { ProjectLevelModals } from "@/plane-web/components/command-palette/modals/project-level"; -import { WorkItemLevelModals } from "@/plane-web/components/command-palette/modals/work-item-level"; -import { WorkspaceLevelModals } from "@/plane-web/components/command-palette/modals/workspace-level"; +import { ProjectLevelModals } from "@/components/modals/project-level"; +import { WorkItemLevelModals } from "@/components/modals/work-item-level"; +import { WorkspaceLevelModals } from "@/components/modals/workspace-level"; // local imports import { useProjectsAppPowerKCommands } from "./config/commands"; import type { TPowerKCommandConfig, TPowerKContext } from "./core/types"; diff --git a/apps/web/core/components/power-k/ui/modal/constants.ts b/apps/web/core/components/power-k/ui/modal/constants.ts index 5cdf5495aa..90adccac43 100644 --- a/apps/web/core/components/power-k/ui/modal/constants.ts +++ b/apps/web/core/components/power-k/ui/modal/constants.ts @@ -4,8 +4,6 @@ * See the LICENSE file for details. */ -// plane web imports -import { POWER_K_MODAL_PAGE_DETAILS_EXTENDED } from "@/plane-web/components/command-palette/power-k/constants"; // local imports import type { TPowerKPageType } from "../../core/types"; @@ -74,5 +72,4 @@ export const POWER_K_MODAL_PAGE_DETAILS: Record { setResults(results); const count = Object.keys(results.results).reduce( diff --git a/apps/web/core/components/power-k/ui/modal/search-results-map.tsx b/apps/web/core/components/power-k/ui/modal/search-results-map.tsx index 574a40d813..2ce27313f6 100644 --- a/apps/web/core/components/power-k/ui/modal/search-results-map.tsx +++ b/apps/web/core/components/power-k/ui/modal/search-results-map.tsx @@ -17,9 +17,7 @@ import type { import { generateWorkItemLink } from "@plane/utils"; // components import type { TPowerKSearchResultsKeys } from "@/components/power-k/core/types"; -// plane web imports -import { SEARCH_RESULTS_GROUPS_MAP_EXTENDED } from "@/plane-web/components/command-palette/power-k/search/search-results-map"; -import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; +import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; export type TPowerKSearchResultGroupDetails = { icon?: React.ComponentType<{ className?: string }>; @@ -113,5 +111,4 @@ export const POWER_K_SEARCH_RESULTS_GROUPS_MAP: Record `/${workspace?.slug}/`, title: "Workspaces", }, - ...SEARCH_RESULTS_GROUPS_MAP_EXTENDED, }; diff --git a/apps/web/core/components/power-k/ui/pages/context-based/index.ts b/apps/web/core/components/power-k/ui/pages/context-based/index.ts index e0dd4dfa40..3e67e97821 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/index.ts +++ b/apps/web/core/components/power-k/ui/pages/context-based/index.ts @@ -8,8 +8,6 @@ export * from "./root"; // components import type { TPowerKContextType } from "@/components/power-k/core/types"; -// plane web imports -import { CONTEXT_ENTITY_MAP_EXTENDED } from "@/plane-web/components/command-palette/power-k/pages/context-based"; export type TContextEntityMap = { i18n_title: string; @@ -33,5 +31,4 @@ export const CONTEXT_ENTITY_MAP: Record = i18n_title: "power_k.contextual_actions.module.title", i18n_indicator: "power_k.contextual_actions.module.indicator", }, - ...CONTEXT_ENTITY_MAP_EXTENDED, }; diff --git a/apps/web/core/components/power-k/ui/pages/context-based/root.tsx b/apps/web/core/components/power-k/ui/pages/context-based/root.tsx index a87344c98f..5618e185d1 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/root.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/root.tsx @@ -6,11 +6,6 @@ // components import type { TPowerKCommandConfig, TPowerKContextType, TPowerKPageType } from "@/components/power-k/core/types"; -// plane web imports -import { - PowerKContextBasedActionsExtended, - usePowerKContextBasedExtendedActions, -} from "@/plane-web/components/command-palette/power-k/pages/context-based"; // local imports import { usePowerKCycleContextBasedActions } from "./cycle/commands"; import { PowerKModuleContextBasedPages } from "./module"; @@ -36,7 +31,6 @@ export function PowerKContextBasedPagesList(props: ContextBasedActionsProps) { {activeContext === "module" && ( )} - > ); } @@ -46,7 +40,6 @@ export const usePowerKContextBasedActions = (): TPowerKCommandConfig[] => { const cycleCommands = usePowerKCycleContextBasedActions(); const moduleCommands = usePowerKModuleContextBasedActions(); const pageCommands = usePowerKPageContextBasedActions(); - const extendedCommands = usePowerKContextBasedExtendedActions(); - return [...workItemCommands, ...cycleCommands, ...moduleCommands, ...pageCommands, ...extendedCommands]; + return [...workItemCommands, ...cycleCommands, ...moduleCommands, ...pageCommands]; }; diff --git a/apps/web/ce/components/command-palette/power-k/pages/context-based/work-item/state-menu-item.tsx b/apps/web/core/components/power-k/ui/pages/context-based/work-item/state-menu-item.tsx similarity index 98% rename from apps/web/ce/components/command-palette/power-k/pages/context-based/work-item/state-menu-item.tsx rename to apps/web/core/components/power-k/ui/pages/context-based/work-item/state-menu-item.tsx index 3188e1b42c..a407f3d851 100644 --- a/apps/web/ce/components/command-palette/power-k/pages/context-based/work-item/state-menu-item.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/work-item/state-menu-item.tsx @@ -5,7 +5,6 @@ */ import { observer } from "mobx-react"; -// plane types import { StateGroupIcon } from "@plane/propel/icons"; import type { IState } from "@plane/types"; // components diff --git a/apps/web/core/components/power-k/ui/pages/context-based/work-item/states-menu.tsx b/apps/web/core/components/power-k/ui/pages/context-based/work-item/states-menu.tsx index 96f1538307..749ddf5daf 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/work-item/states-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/work-item/states-menu.tsx @@ -13,7 +13,7 @@ import { Spinner } from "@plane/ui"; // hooks import { useProjectState } from "@/hooks/store/use-project-state"; // local imports -import { PowerKProjectStatesMenuItems } from "@/plane-web/components/command-palette/power-k/pages/context-based/work-item/state-menu-item"; +import { PowerKProjectStatesMenuItems } from "./state-menu-item"; type Props = { handleSelect: (stateId: string) => void; diff --git a/apps/web/core/components/power-k/ui/pages/work-item-selection-page.tsx b/apps/web/core/components/power-k/ui/pages/work-item-selection-page.tsx index 543c262364..4cfe00010b 100644 --- a/apps/web/core/components/power-k/ui/pages/work-item-selection-page.tsx +++ b/apps/web/core/components/power-k/ui/pages/work-item-selection-page.tsx @@ -71,6 +71,7 @@ export function WorkItemSelectionPage(props: Props) { query_type: ["issue"], ...(!isWorkspaceLevel && projectId ? { project_id: projectId.toString() } : {}), }) + // oxlint-disable-next-line promise/always-return .then((res) => { setIssueResults(res.issue || []); }) diff --git a/apps/web/core/components/project/create-project-modal.tsx b/apps/web/core/components/project/create-project-modal.tsx index 38c33e808b..45e2ed517d 100644 --- a/apps/web/core/components/project/create-project-modal.tsx +++ b/apps/web/core/components/project/create-project-modal.tsx @@ -12,7 +12,7 @@ import { getAssetIdFromUrl, checkURLValidity } from "@plane/utils"; // hooks import useKeypress from "@/hooks/use-keypress"; // plane web components -import { CreateProjectForm } from "@/plane-web/components/projects/create/root"; +import { CreateProjectForm } from "@/components/projects/create/root"; // plane web types import type { TProject } from "@plane/types"; // services diff --git a/apps/web/core/components/project/create/common-attributes.tsx b/apps/web/core/components/project/create/common-attributes.tsx index 6dace57734..ec995a5a4a 100644 --- a/apps/web/core/components/project/create/common-attributes.tsx +++ b/apps/web/core/components/project/create/common-attributes.tsx @@ -11,14 +11,11 @@ import { InfoIcon } from "@plane/propel/icons"; // plane imports import { ETabIndices } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; +import type { TProject } from "@plane/types"; // ui import { Tooltip } from "@plane/propel/tooltip"; import { Input, TextArea } from "@plane/ui"; import { cn, projectIdentifierSanitizer, getTabIndex } from "@plane/utils"; -// plane utils -// helpers -// plane-web types -import type { TProject } from "@plane/types"; type Props = { setValue: UseFormSetValue; diff --git a/apps/web/core/components/project/create/header.tsx b/apps/web/core/components/project/create/header.tsx index 98ab84dd54..03b0943d5e 100644 --- a/apps/web/core/components/project/create/header.tsx +++ b/apps/web/core/components/project/create/header.tsx @@ -18,8 +18,6 @@ import { getTabIndex } from "@plane/utils"; // components import { CoverImage } from "@/components/common/cover-image"; import { ImagePickerPopover } from "@/components/core/image-picker-popover"; -// plane web imports -import { ProjectTemplateSelect } from "@/plane-web/components/projects/create/template-select"; type Props = { handleClose: () => void; @@ -31,14 +29,7 @@ type Props = { }; function ProjectCreateHeader(props: Props) { - const { - handleClose, - isMobile = false, - handleFormOnChange, - isClosable = true, - handleTemplateSelect, - showActionButtons = true, - } = props; + const { handleClose, isMobile = false, handleFormOnChange, isClosable = true } = props; const { watch, control, setValue } = useFormContext(); const { t } = useTranslation(); // derived values @@ -54,11 +45,6 @@ function ProjectCreateHeader(props: Props) { alt={t("project_cover_image_alt")} className="absolute top-0 left-0 h-full w-full rounded-lg" /> - {showActionButtons && ( - - - - )} {isClosable && ( diff --git a/apps/web/core/components/project/member-list-item.tsx b/apps/web/core/components/project/member-list-item.tsx index 8c0b388c04..1925690189 100644 --- a/apps/web/core/components/project/member-list-item.tsx +++ b/apps/web/core/components/project/member-list-item.tsx @@ -13,7 +13,7 @@ import { useMember } from "@/hooks/store/use-member"; import { useUser, useUserPermissions } from "@/hooks/store/user"; import { useAppRouter } from "@/hooks/use-app-router"; // plane web imports -import { useProjectColumns } from "@/plane-web/components/projects/settings/useProjectColumns"; +import { useProjectColumns } from "@/components/projects/settings/useProjectColumns"; // store import type { IProjectMemberDetails } from "@/store/member/project/base-project-member.store"; // local imports @@ -46,6 +46,7 @@ export const ProjectMemberListItem = observer(function ProjectMemberListItem(pro if (memberId === currentUser?.id) { await leaveProject(workspaceSlug.toString(), projectId.toString()) + // oxlint-disable-next-line promise/always-return .then(async () => { router.push(`/${workspaceSlug}/projects`); }) diff --git a/apps/web/core/components/project/project-feature-update.tsx b/apps/web/core/components/project/project-feature-update.tsx index b2eac27f0d..931f36b347 100644 --- a/apps/web/core/components/project/project-feature-update.tsx +++ b/apps/web/core/components/project/project-feature-update.tsx @@ -15,7 +15,7 @@ import { Row } from "@plane/ui"; // hooks import { useProject } from "@/hooks/store/use-project"; // plane web imports -import { ProjectFeaturesList } from "@/plane-web/components/projects/settings/features-list"; +import { ProjectFeaturesList } from "@/components/project/settings/features-list"; type Props = { workspaceSlug: string; @@ -45,6 +45,7 @@ export const ProjectFeatureUpdate = observer(function ProjectFeatureUpdate(props {t("created").toLowerCase()}. + {/* eslint-disable-next-line jsx-a11y/tabindex-no-positive */} {t("close")} @@ -52,6 +53,7 @@ export const ProjectFeatureUpdate = observer(function ProjectFeatureUpdate(props href={`/${workspaceSlug}/projects/${projectId}/issues`} onClick={onClose} className={getButtonStyling("primary", "lg")} + // oxlint-disable-next-line jsx-a11y/tabindex-no-positive tabIndex={2} > {t("open_project")} diff --git a/apps/web/core/components/project/settings/features-list.tsx b/apps/web/core/components/project/settings/features-list.tsx index 8605bf5080..46f6437786 100644 --- a/apps/web/core/components/project/settings/features-list.tsx +++ b/apps/web/core/components/project/settings/features-list.tsx @@ -17,7 +17,7 @@ import { SettingsHeading } from "@/components/settings/heading"; // hooks import { useProject } from "@/hooks/store/use-project"; // plane web imports -import { UpgradeBadge } from "@/plane-web/components/workspace/upgrade-badge"; +import { UpgradeBadge } from "@/components/workspace/upgrade-badge"; // local imports import { ProjectFeatureToggle } from "./helper"; diff --git a/apps/web/ce/components/projects/create/attributes.tsx b/apps/web/core/components/projects/create/attributes.tsx similarity index 100% rename from apps/web/ce/components/projects/create/attributes.tsx rename to apps/web/core/components/projects/create/attributes.tsx diff --git a/apps/web/ce/components/projects/create/root.tsx b/apps/web/core/components/projects/create/root.tsx similarity index 100% rename from apps/web/ce/components/projects/create/root.tsx rename to apps/web/core/components/projects/create/root.tsx diff --git a/apps/web/ce/components/projects/create/utils.ts b/apps/web/core/components/projects/create/utils.ts similarity index 100% rename from apps/web/ce/components/projects/create/utils.ts rename to apps/web/core/components/projects/create/utils.ts diff --git a/apps/web/ce/components/projects/mobile-header.tsx b/apps/web/core/components/projects/mobile-header.tsx similarity index 100% rename from apps/web/ce/components/projects/mobile-header.tsx rename to apps/web/core/components/projects/mobile-header.tsx diff --git a/apps/web/ce/components/projects/page.tsx b/apps/web/core/components/projects/page.tsx similarity index 100% rename from apps/web/ce/components/projects/page.tsx rename to apps/web/core/components/projects/page.tsx diff --git a/apps/web/ce/components/projects/settings/intake/header.tsx b/apps/web/core/components/projects/settings/intake/header.tsx similarity index 97% rename from apps/web/ce/components/projects/settings/intake/header.tsx rename to apps/web/core/components/projects/settings/intake/header.tsx index c60466e41a..f24e43d4c0 100644 --- a/apps/web/ce/components/projects/settings/intake/header.tsx +++ b/apps/web/core/components/projects/settings/intake/header.tsx @@ -21,7 +21,7 @@ import { useProject } from "@/hooks/store/use-project"; import { useProjectInbox } from "@/hooks/store/use-project-inbox"; import { useUserPermissions } from "@/hooks/store/user"; // plane web imports -import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common"; +import { CommonProjectBreadcrumbs } from "@/components/breadcrumbs/common"; import { IntakeIcon } from "@plane/propel/icons"; export const ProjectInboxHeader = observer(function ProjectInboxHeader() { diff --git a/apps/web/ce/components/projects/settings/useProjectColumns.tsx b/apps/web/core/components/projects/settings/useProjectColumns.tsx similarity index 100% rename from apps/web/ce/components/projects/settings/useProjectColumns.tsx rename to apps/web/core/components/projects/settings/useProjectColumns.tsx diff --git a/apps/web/ce/components/relations/index.tsx b/apps/web/core/components/relations/index.tsx similarity index 98% rename from apps/web/ce/components/relations/index.tsx rename to apps/web/core/components/relations/index.tsx index 04f463ac59..e7bf7f9ec4 100644 --- a/apps/web/ce/components/relations/index.tsx +++ b/apps/web/core/components/relations/index.tsx @@ -9,8 +9,6 @@ import { RelatedIcon, DuplicatePropertyIcon } from "@plane/propel/icons"; import type { TRelationObject } from "@/components/issues/issue-detail-widgets/relations"; import type { TIssueRelationTypes } from "@plane/types"; -export * from "./activity"; - export const ISSUE_RELATION_OPTIONS: Record = { relates_to: { key: "relates_to", diff --git a/apps/web/core/components/rich-filters/filter-value-input/root.tsx b/apps/web/core/components/rich-filters/filter-value-input/root.tsx index b1e996ed1a..9a87c0c465 100644 --- a/apps/web/core/components/rich-filters/filter-value-input/root.tsx +++ b/apps/web/core/components/rich-filters/filter-value-input/root.tsx @@ -20,8 +20,6 @@ import type { TFilterConditionNodeForDisplay, } from "@plane/types"; import { FILTER_FIELD_TYPE } from "@plane/types"; -// local imports -import { AdditionalFilterValueInput } from "@/plane-web/components/rich-filters/filter-value-input/root"; import type { TFilterValueInputProps } from "../shared"; import { DateRangeFilterValueInput } from "./date/range"; import { SingleDateFilterValueInput } from "./date/single"; @@ -83,3 +81,15 @@ export const FilterValueInput = observer(function FilterValueInput; }); + +export const AdditionalFilterValueInput = observer(function AdditionalFilterValueInput< + P extends TFilterProperty, + V extends TFilterValue, +>(_props: TFilterValueInputProps) { + return ( + // Fallback + + Filter type not supported + + ); +}); diff --git a/apps/web/core/components/settings/profile/content/pages/preferences/default-list.tsx b/apps/web/core/components/settings/profile/content/pages/preferences/default-list.tsx index 8b3b010fca..e5a248dbbe 100644 --- a/apps/web/core/components/settings/profile/content/pages/preferences/default-list.tsx +++ b/apps/web/core/components/settings/profile/content/pages/preferences/default-list.tsx @@ -6,7 +6,7 @@ import { observer } from "mobx-react"; // components -import { ThemeSwitcher } from "@/plane-web/components/preferences/theme-switcher"; +import { ThemeSwitcher } from "@/components/appearance"; export const ProfileSettingsDefaultPreferencesList = observer(function ProfileSettingsDefaultPreferencesList() { return ( diff --git a/apps/web/core/components/settings/workspace/sidebar/header.tsx b/apps/web/core/components/settings/workspace/sidebar/header.tsx index 48b13a1ff2..2a34c86e81 100644 --- a/apps/web/core/components/settings/workspace/sidebar/header.tsx +++ b/apps/web/core/components/settings/workspace/sidebar/header.tsx @@ -16,8 +16,6 @@ import { WorkspaceLogo } from "@/components/workspace/logo"; import { useUserPermissions } from "@/hooks/store/user"; import { useAppRouter } from "@/hooks/use-app-router"; import { useWorkspace } from "@/hooks/store/use-workspace"; -// plane web imports -import { SubscriptionPill } from "@/plane-web/components/common/subscription/subscription-pill"; export const WorkspaceSettingsSidebarHeader = observer(function WorkspaceSettingsSidebarHeader() { // router @@ -57,9 +55,6 @@ export const WorkspaceSettingsSidebarHeader = observer(function WorkspaceSetting {t(ROLE_DETAILS[currentWorkspaceRole].i18n_title)} - - - ); diff --git a/apps/web/core/components/sidebar/sidebar-toggle-button.tsx b/apps/web/core/components/sidebar/sidebar-toggle-button.tsx index 65452d5488..7fe3e93ca8 100644 --- a/apps/web/core/components/sidebar/sidebar-toggle-button.tsx +++ b/apps/web/core/components/sidebar/sidebar-toggle-button.tsx @@ -8,14 +8,12 @@ import { observer } from "mobx-react"; import { PanelLeft } from "lucide-react"; // hooks import { useAppTheme } from "@/hooks/store/use-app-theme"; -import { isSidebarToggleVisible } from "@/plane-web/components/desktop"; import { IconButton } from "@plane/propel/icon-button"; export const AppSidebarToggleButton = observer(function AppSidebarToggleButton() { // store hooks const { toggleSidebar, sidebarPeek, toggleSidebarPeek } = useAppTheme(); - if (!isSidebarToggleVisible()) return null; return ( setFiltersSearchQuery(e.target.value)} + // oxlint-disable-next-line jsx_a11y/no-autofocus autoFocus={!isMobile} /> {filtersSearchQuery !== "" && ( @@ -91,17 +89,6 @@ export const ViewFiltersSelection = observer(function ViewFiltersSelection(props /> - {/* access / view type */} - handleFilters("view_type", val)} - searchQuery={filtersSearchQuery} - accessFilters={[ - { key: EViewAccess.PRIVATE, value: "Private" }, - { key: EViewAccess.PUBLIC, value: "Public" }, - ]} - /> - {/* created date */} { + // oxlint-disable-next-line no-shadow let logoValue = {}; if (val?.type === "emoji") @@ -173,6 +172,7 @@ export const ProjectViewForm = observer(function ProjectViewForm(props: Props) { placeholder={t("common.title")} className="w-full text-14" tabIndex={getIndex("name")} + // oxlint-disable-next-line jsx_a11y/no-autofocus autoFocus /> )} @@ -199,7 +199,6 @@ export const ProjectViewForm = observer(function ProjectViewForm(props: Props) { /> - ); default: - return ; + return <>>; } } + +export type TLayoutSelectionProps = { + onChange: (layout: EIssueLayoutTypes) => void; + selectedLayout: EIssueLayoutTypes; + workspaceSlug: string; +}; diff --git a/apps/web/ce/components/views/publish/index.ts b/apps/web/core/components/views/publish/index.ts similarity index 88% rename from apps/web/ce/components/views/publish/index.ts rename to apps/web/core/components/views/publish/index.ts index 0bc5586440..3f1b84539f 100644 --- a/apps/web/ce/components/views/publish/index.ts +++ b/apps/web/core/components/views/publish/index.ts @@ -4,5 +4,4 @@ * See the LICENSE file for details. */ -export * from "./modal"; export * from "./use-view-publish"; diff --git a/apps/web/ce/components/views/publish/use-view-publish.tsx b/apps/web/core/components/views/publish/use-view-publish.tsx similarity index 100% rename from apps/web/ce/components/views/publish/use-view-publish.tsx rename to apps/web/core/components/views/publish/use-view-publish.tsx diff --git a/apps/web/core/components/views/quick-actions.tsx b/apps/web/core/components/views/quick-actions.tsx index ea85af92fd..1726f6e423 100644 --- a/apps/web/core/components/views/quick-actions.tsx +++ b/apps/web/core/components/views/quick-actions.tsx @@ -20,7 +20,7 @@ import { copyUrlToClipboard, cn } from "@plane/utils"; import { useViewMenuItems } from "@/components/common/quick-actions-helper"; // hooks import { useUser, useUserPermissions } from "@/hooks/store/user"; -import { PublishViewModal, useViewPublish } from "@/plane-web/components/views/publish"; +import { useViewPublish } from "@/components/views/publish"; // local imports import { DeleteProjectViewModal } from "./delete-view-modal"; import { CreateUpdateProjectViewModal } from "./modal"; @@ -45,13 +45,11 @@ export const ViewQuickActions = observer(function ViewQuickActions(props: Props) const isOwner = view?.owned_by === data?.id; const isAdmin = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.PROJECT, workspaceSlug, projectId); - const { isPublishModalOpen, setPublishModalOpen, publishContextMenu } = useViewPublish( - !!view.anchor, - isAdmin || isOwner - ); + const { publishContextMenu } = useViewPublish(!!view.anchor, isAdmin || isOwner); const viewLink = `${workspaceSlug}/projects/${projectId}/views/${view.id}`; const handleCopyText = () => + // oxlint-disable-next-line promise/always-return copyUrlToClipboard(viewLink).then(() => { setToast({ type: TOAST_TYPE.SUCCESS, @@ -98,7 +96,6 @@ export const ViewQuickActions = observer(function ViewQuickActions(props: Props) data={view} /> setDeleteViewModal(false)} /> - setPublishModalOpen(false)} view={view} /> {additionalModals} (false); + const [_, setPublishModalOpen] = useState(false); // router const { workspaceSlug, projectId } = useParams(); // store @@ -82,7 +80,6 @@ export const ViewListItemAction = observer(function ViewListItemAction(props: Pr return ( <> - setPublishModalOpen(false)} view={view} /> {workspaceSlug && projectId && view && ( {view?.anchor && publishLink ? ( + // oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions setPublishModalOpen(true)} diff --git a/apps/web/ce/components/command-palette/actions/work-item-actions/index.ts b/apps/web/core/components/workflow/index.ts similarity index 67% rename from apps/web/ce/components/command-palette/actions/work-item-actions/index.ts rename to apps/web/core/components/workflow/index.ts index 3f2f8c0718..1d1f5f4439 100644 --- a/apps/web/ce/components/command-palette/actions/work-item-actions/index.ts +++ b/apps/web/core/components/workflow/index.ts @@ -4,4 +4,5 @@ * See the LICENSE file for details. */ -export * from "./change-state-list"; +export * from "./state-option"; +export * from "./use-workflow-drag-n-drop"; diff --git a/apps/web/ce/components/workflow/state-option.tsx b/apps/web/core/components/workflow/state-option.tsx similarity index 100% rename from apps/web/ce/components/workflow/state-option.tsx rename to apps/web/core/components/workflow/state-option.tsx diff --git a/apps/web/ce/components/workflow/use-workflow-drag-n-drop.ts b/apps/web/core/components/workflow/use-workflow-drag-n-drop.ts similarity index 100% rename from apps/web/ce/components/workflow/use-workflow-drag-n-drop.ts rename to apps/web/core/components/workflow/use-workflow-drag-n-drop.ts diff --git a/apps/web/ce/components/workspace-notifications/notification-card/content.ts b/apps/web/core/components/workspace-notifications/notification-card/content.ts similarity index 100% rename from apps/web/ce/components/workspace-notifications/notification-card/content.ts rename to apps/web/core/components/workspace-notifications/notification-card/content.ts diff --git a/apps/web/ce/components/workspace-notifications/notification-card/root.tsx b/apps/web/core/components/workspace-notifications/notification-card/root.tsx similarity index 94% rename from apps/web/ce/components/workspace-notifications/notification-card/root.tsx rename to apps/web/core/components/workspace-notifications/notification-card/root.tsx index 2dcc706bf8..dbb3961040 100644 --- a/apps/web/ce/components/workspace-notifications/notification-card/root.tsx +++ b/apps/web/core/components/workspace-notifications/notification-card/root.tsx @@ -48,6 +48,7 @@ export const NotificationCardListRoot = observer(function NotificationCardListRo {t("loading")}... ) : ( + // oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions {t("load_more")} diff --git a/apps/web/core/components/workspace-notifications/sidebar/notification-card/content.tsx b/apps/web/core/components/workspace-notifications/sidebar/notification-card/content.tsx index 0ed63b75dc..593acffc56 100644 --- a/apps/web/core/components/workspace-notifications/sidebar/notification-card/content.tsx +++ b/apps/web/core/components/workspace-notifications/sidebar/notification-card/content.tsx @@ -20,7 +20,7 @@ import { renderAdditionalAction, renderAdditionalValue, shouldShowConnector, -} from "@/plane-web/components/workspace-notifications/notification-card/content"; +} from "../../notification-card/content"; // Types export type TNotificationFieldData = { diff --git a/apps/web/core/components/workspace-notifications/sidebar/root.tsx b/apps/web/core/components/workspace-notifications/sidebar/root.tsx index e7e0ff4aca..2a3285a02a 100644 --- a/apps/web/core/components/workspace-notifications/sidebar/root.tsx +++ b/apps/web/core/components/workspace-notifications/sidebar/root.tsx @@ -18,13 +18,12 @@ import { CountChip } from "@/components/common/count-chip"; // hooks import { useWorkspaceNotifications } from "@/hooks/store/notifications"; import { useWorkspace } from "@/hooks/store/use-workspace"; -// plane web components -import { NotificationListRoot } from "@/plane-web/components/workspace-notifications/list-root"; // local imports import { NotificationEmptyState } from "./empty-state"; import { AppliedFilters } from "./filters/applied-filter"; import { NotificationSidebarHeader } from "./header"; import { NotificationsLoader } from "./loader"; +import { NotificationCardListRoot } from "../notification-card/root"; export const NotificationsSidebarRoot = observer(function NotificationsSidebarRoot() { const { workspaceSlug } = useParams(); @@ -69,6 +68,7 @@ export const NotificationsSidebarRoot = observer(function NotificationsSidebarRo {NOTIFICATION_TABS.map((tab) => ( + // oxlint-disable-next-line jsx_a11y/click-events-have-key-events oxlint-disable-next-line jsx_a11y/no-static-element-interactions {notificationIds && notificationIds.length > 0 ? ( - + ) : ( diff --git a/apps/web/ce/components/workspace/billing/comparison/frequency-toggle.tsx b/apps/web/core/components/workspace/billing/comparison/frequency-toggle.tsx similarity index 100% rename from apps/web/ce/components/workspace/billing/comparison/frequency-toggle.tsx rename to apps/web/core/components/workspace/billing/comparison/frequency-toggle.tsx diff --git a/apps/web/ce/components/workspace/billing/comparison/plan-detail.tsx b/apps/web/core/components/workspace/billing/comparison/plan-detail.tsx similarity index 100% rename from apps/web/ce/components/workspace/billing/comparison/plan-detail.tsx rename to apps/web/core/components/workspace/billing/comparison/plan-detail.tsx diff --git a/apps/web/ce/components/workspace/billing/comparison/root.tsx b/apps/web/core/components/workspace/billing/comparison/root.tsx similarity index 100% rename from apps/web/ce/components/workspace/billing/comparison/root.tsx rename to apps/web/core/components/workspace/billing/comparison/root.tsx diff --git a/apps/web/ce/components/command-palette/power-k/pages/context-based/index.ts b/apps/web/core/components/workspace/billing/index.ts similarity index 100% rename from apps/web/ce/components/command-palette/power-k/pages/context-based/index.ts rename to apps/web/core/components/workspace/billing/index.ts diff --git a/apps/web/ce/components/workspace/billing/root.tsx b/apps/web/core/components/workspace/billing/root.tsx similarity index 100% rename from apps/web/ce/components/workspace/billing/root.tsx rename to apps/web/core/components/workspace/billing/root.tsx diff --git a/apps/web/ce/components/workspace/content-wrapper.tsx b/apps/web/core/components/workspace/content-wrapper.tsx similarity index 94% rename from apps/web/ce/components/workspace/content-wrapper.tsx rename to apps/web/core/components/workspace/content-wrapper.tsx index 46d1d609b9..3d605d65d6 100644 --- a/apps/web/ce/components/workspace/content-wrapper.tsx +++ b/apps/web/core/components/workspace/content-wrapper.tsx @@ -10,8 +10,7 @@ import { observer } from "mobx-react"; import { cn } from "@plane/utils"; import { AppRailRoot } from "@/components/navigation"; import { useAppRailVisibility } from "@/lib/app-rail"; -// local imports -import { TopNavigationRoot } from "../navigations"; +import { TopNavigationRoot } from "@/components/navigation/top-navigation-root"; export const WorkspaceContentWrapper = observer(function WorkspaceContentWrapper({ children, diff --git a/apps/web/ce/components/workspace/delete-workspace-modal.tsx b/apps/web/core/components/workspace/delete-workspace-modal.tsx similarity index 100% rename from apps/web/ce/components/workspace/delete-workspace-modal.tsx rename to apps/web/core/components/workspace/delete-workspace-modal.tsx diff --git a/apps/web/ce/components/workspace/delete-workspace-section.tsx b/apps/web/core/components/workspace/delete-workspace-section.tsx similarity index 100% rename from apps/web/ce/components/workspace/delete-workspace-section.tsx rename to apps/web/core/components/workspace/delete-workspace-section.tsx diff --git a/apps/web/ce/components/workspace/edition-badge.tsx b/apps/web/core/components/workspace/edition-badge.tsx similarity index 94% rename from apps/web/ce/components/workspace/edition-badge.tsx rename to apps/web/core/components/workspace/edition-badge.tsx index 34ef704987..b11e850b4e 100644 --- a/apps/web/ce/components/workspace/edition-badge.tsx +++ b/apps/web/core/components/workspace/edition-badge.tsx @@ -13,8 +13,8 @@ import { Tooltip } from "@plane/propel/tooltip"; import { usePlatformOS } from "@/hooks/use-platform-os"; import packageJson from "package.json"; // local components -import { PaidPlanUpgradeModal } from "../license"; import { Button } from "@plane/propel/button"; +import { PaidPlanUpgradeModal } from "@/components/license/modal/upgrade-modal"; export const WorkspaceEditionBadge = observer(function WorkspaceEditionBadge() { // states diff --git a/apps/web/ce/components/cycles/analytics-sidebar/index.ts b/apps/web/core/components/workspace/members/index.ts similarity index 82% rename from apps/web/ce/components/cycles/analytics-sidebar/index.ts rename to apps/web/core/components/workspace/members/index.ts index d980334597..a6e8c7208d 100644 --- a/apps/web/ce/components/cycles/analytics-sidebar/index.ts +++ b/apps/web/core/components/workspace/members/index.ts @@ -4,4 +4,4 @@ * See the LICENSE file for details. */ -export * from "./root"; +export * from "./invite-modal"; diff --git a/apps/web/ce/components/workspace/members/invite-modal.tsx b/apps/web/core/components/workspace/members/invite-modal.tsx similarity index 100% rename from apps/web/ce/components/workspace/members/invite-modal.tsx rename to apps/web/core/components/workspace/members/invite-modal.tsx diff --git a/apps/web/core/components/workspace/settings/members-list-item.tsx b/apps/web/core/components/workspace/settings/members-list-item.tsx index b3b565b4ec..8ae6651fe0 100644 --- a/apps/web/core/components/workspace/settings/members-list-item.tsx +++ b/apps/web/core/components/workspace/settings/members-list-item.tsx @@ -21,7 +21,7 @@ import { useWorkspace } from "@/hooks/store/use-workspace"; import { useUser, useUserPermissions, useUserSettings } from "@/hooks/store/user"; import { useAppRouter } from "@/hooks/use-app-router"; // plane web imports -import { useMemberColumns } from "@/plane-web/components/workspace/settings/useMemberColumns"; +import { useMemberColumns } from "@/components/workspace/settings/useMemberColumns"; type Props = { memberDetails: (IWorkspaceMember | null)[]; diff --git a/apps/web/ce/components/workspace/settings/useMemberColumns.tsx b/apps/web/core/components/workspace/settings/useMemberColumns.tsx similarity index 98% rename from apps/web/ce/components/workspace/settings/useMemberColumns.tsx rename to apps/web/core/components/workspace/settings/useMemberColumns.tsx index bf0d188b99..fc60ff57b6 100644 --- a/apps/web/ce/components/workspace/settings/useMemberColumns.tsx +++ b/apps/web/core/components/workspace/settings/useMemberColumns.tsx @@ -34,6 +34,7 @@ export const useMemberColumns = () => { // derived values const isAdmin = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.WORKSPACE); + // oxlint-disable-next-line unicorn/consistent-function-scoping const isSuspended = (rowData: RowData) => rowData.is_active === false; // handlers diff --git a/apps/web/core/components/workspace/settings/workspace-details.tsx b/apps/web/core/components/workspace/settings/workspace-details.tsx index c09db3d96a..e8c27a60ed 100644 --- a/apps/web/core/components/workspace/settings/workspace-details.tsx +++ b/apps/web/core/components/workspace/settings/workspace-details.tsx @@ -23,7 +23,7 @@ import { TimezoneSelect } from "@/components/global/timezone-select"; import { useWorkspace } from "@/hooks/store/use-workspace"; import { useUserPermissions } from "@/hooks/store/user"; // plane web components -import { DeleteWorkspaceSection } from "@/plane-web/components/workspace/delete-workspace-section"; +import { DeleteWorkspaceSection } from "@/components/workspace/delete-workspace-section"; const defaultValues: Partial = { name: "", diff --git a/apps/web/core/components/workspace/sidebar/dropdown-item.tsx b/apps/web/core/components/workspace/sidebar/dropdown-item.tsx index 3a280bd6ad..5b660d326f 100644 --- a/apps/web/core/components/workspace/sidebar/dropdown-item.tsx +++ b/apps/web/core/components/workspace/sidebar/dropdown-item.tsx @@ -15,8 +15,6 @@ import { useTranslation } from "@plane/i18n"; import { CheckIcon } from "@plane/propel/icons"; import type { IWorkspace } from "@plane/types"; import { cn, getFileURL, getUserRole } from "@plane/utils"; -// plane web imports -import { SubscriptionPill } from "@/plane-web/components/common/subscription/subscription-pill"; type TProps = { workspace: IWorkspace; @@ -84,9 +82,7 @@ const SidebarDropdownItem = observer(function SidebarDropdownItem(props: TProps) - ) : ( - - )} + ) : null} {workspace.id === activeWorkspace?.id && ( <> diff --git a/apps/web/ce/components/workspace/sidebar/extended-sidebar-item.tsx b/apps/web/core/components/workspace/sidebar/extended-sidebar-item.tsx similarity index 98% rename from apps/web/ce/components/workspace/sidebar/extended-sidebar-item.tsx rename to apps/web/core/components/workspace/sidebar/extended-sidebar-item.tsx index 4014f8fb28..5ac67aad6b 100644 --- a/apps/web/ce/components/workspace/sidebar/extended-sidebar-item.tsx +++ b/apps/web/core/components/workspace/sidebar/extended-sidebar-item.tsx @@ -21,12 +21,12 @@ import { DragHandle, DropIndicator } from "@plane/ui"; import { cn } from "@plane/utils"; // components import { SidebarNavItem } from "@/components/sidebar/sidebar-navigation"; +import { UpgradeBadge } from "@/components/workspace/upgrade-badge"; // hooks import { useAppTheme } from "@/hooks/store/use-app-theme"; import { useUser, useUserPermissions } from "@/hooks/store/user"; import { useWorkspaceNavigationPreferences } from "@/hooks/use-navigation-preferences"; // local imports -import { UpgradeBadge } from "../upgrade-badge"; import { getSidebarNavigationItemIcon } from "./helper"; type TExtendedSidebarItemProps = { @@ -88,7 +88,9 @@ export const ExtendedSidebarItem = observer(function ExtendedSidebarItem(props: element, canDrop: ({ source }) => !disableDrop && source?.data?.id !== item.key && source?.data?.dragInstanceId === "NAVIGATION", + // oxlint-disable-next-line no-shadow getData: ({ input, element }) => { + // oxlint-disable-next-line no-shadow const data = { id: item.key }; // attach instruction for last in list diff --git a/apps/web/core/components/workspace/sidebar/help-section/root.tsx b/apps/web/core/components/workspace/sidebar/help-section/root.tsx index 48cd1898a6..d19b8602d3 100644 --- a/apps/web/core/components/workspace/sidebar/help-section/root.tsx +++ b/apps/web/core/components/workspace/sidebar/help-section/root.tsx @@ -14,10 +14,9 @@ import { CustomMenu } from "@plane/ui"; // components import { ProductUpdatesModal } from "@/components/global"; import { AppSidebarItem } from "@/components/sidebar/sidebar-item"; +import { PlaneVersionNumber } from "@/components/global/version-number"; // hooks import { usePowerK } from "@/hooks/store/use-power-k"; -// plane web components -import { PlaneVersionNumber } from "@/plane-web/components/global"; export const HelpMenuRoot = observer(function HelpMenuRoot() { // store hooks diff --git a/apps/web/ce/components/workspace/sidebar/helper.tsx b/apps/web/core/components/workspace/sidebar/helper.tsx similarity index 100% rename from apps/web/ce/components/workspace/sidebar/helper.tsx rename to apps/web/core/components/workspace/sidebar/helper.tsx diff --git a/apps/web/core/components/workspace/sidebar/projects-list-item.tsx b/apps/web/core/components/workspace/sidebar/projects-list-item.tsx index f1256a4e44..b0b5a1afec 100644 --- a/apps/web/core/components/workspace/sidebar/projects-list-item.tsx +++ b/apps/web/core/components/workspace/sidebar/projects-list-item.tsx @@ -38,11 +38,10 @@ import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; import { useProjectNavigationPreferences } from "@/hooks/use-navigation-preferences"; import { usePlatformOS } from "@/hooks/use-platform-os"; -// plane web imports -import { useNavigationItems } from "@/plane-web/components/navigations"; -import { ProjectNavigationRoot } from "@/plane-web/components/sidebar"; // local imports import { HIGHLIGHT_CLASS, highlightIssueOnDrop } from "../../issues/issue-layouts/utils"; +import { ProjectNavigation } from "./project-navigation"; +import { useNavigationItems } from "@/components/navigation/use-navigation-items"; type Props = { projectId: string; @@ -177,6 +176,7 @@ export const SidebarProjectsListItem = observer(function SidebarProjectsListItem element, canDrop: ({ source }) => !disableDrop && source?.data?.id !== projectId && source?.data?.dragInstanceId === "PROJECTS", + // oxlint-disable-next-line no-shadow getData: ({ input, element }) => { const data = { id: projectId }; @@ -222,6 +222,7 @@ export const SidebarProjectsListItem = observer(function SidebarProjectsListItem }, }) ); + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, [projectId, isLastChild, projectListType, handleOnProjectDrop]); useEffect(() => { @@ -479,7 +480,7 @@ export const SidebarProjectsListItem = observer(function SidebarProjectsListItem {isProjectListOpen && ( - + )} diff --git a/apps/web/core/components/workspace/sidebar/sidebar-item.tsx b/apps/web/core/components/workspace/sidebar/sidebar-item.tsx index 205e9839f9..03d30151e8 100644 --- a/apps/web/core/components/workspace/sidebar/sidebar-item.tsx +++ b/apps/web/core/components/workspace/sidebar/sidebar-item.tsx @@ -20,7 +20,7 @@ import { useAppTheme } from "@/hooks/store/use-app-theme"; import { useUser, useUserPermissions } from "@/hooks/store/user"; import { useWorkspaceNavigationPreferences } from "@/hooks/use-navigation-preferences"; // plane web imports -import { getSidebarNavigationItemIcon } from "@/plane-web/components/workspace/sidebar/helper"; +import { getSidebarNavigationItemIcon } from "@/components/workspace/sidebar/helper"; type Props = { item: IWorkspaceSidebarNavigationItem; diff --git a/apps/web/core/components/workspace/sidebar/sidebar-menu-items.tsx b/apps/web/core/components/workspace/sidebar/sidebar-menu-items.tsx index 30c74a8476..1c38dbdb81 100644 --- a/apps/web/core/components/workspace/sidebar/sidebar-menu-items.tsx +++ b/apps/web/core/components/workspace/sidebar/sidebar-menu-items.tsx @@ -27,8 +27,7 @@ import { usePersonalNavigationPreferences, useWorkspaceNavigationPreferences, } from "@/hooks/use-navigation-preferences"; -// plane-web imports -import { SidebarItem } from "@/plane-web/components/workspace/sidebar/sidebar-item"; +import { SidebarItemBase } from "./sidebar-item"; export const SidebarMenuItems = observer(function SidebarMenuItems() { // routers @@ -84,6 +83,7 @@ export const SidebarMenuItems = observer(function SidebarMenuItems() { const sortedNavigationItems = useMemo( () => + // oxlint-disable-next-line oxc/no-map-spread WORKSPACE_SIDEBAR_DYNAMIC_NAVIGATION_ITEMS_LINKS.map((item) => { const preference = workspacePreferences.items[item.key]; return { @@ -98,7 +98,8 @@ export const SidebarMenuItems = observer(function SidebarMenuItems() { <> {filteredStaticNavigationItems.map((item, _index) => ( - + // oxlint-disable-next-line react/no-array-index-key + ))} @@ -149,10 +150,12 @@ export const SidebarMenuItems = observer(function SidebarMenuItems() { <> {WORKSPACE_SIDEBAR_STATIC_PINNED_NAVIGATION_ITEMS_LINKS.map((item, _index) => ( - + // oxlint-disable-next-line react/no-array-index-key + ))} {sortedNavigationItems.map((item, _index) => ( - + // oxlint-disable-next-line react/no-array-index-key + ))} ) => Promise; @@ -124,7 +123,6 @@ export const WorkspaceViewForm = observer(function WorkspaceViewForm(props: Prop /> - {/* display filters dropdown */} { const context = useContext(StoreContext); diff --git a/apps/web/core/hooks/store/use-analytics.ts b/apps/web/core/hooks/store/use-analytics.ts index 6982f28c45..2ec50a6d66 100644 --- a/apps/web/core/hooks/store/use-analytics.ts +++ b/apps/web/core/hooks/store/use-analytics.ts @@ -8,7 +8,7 @@ import { useContext } from "react"; // mobx store import { StoreContext } from "@/lib/store-context"; // types -import type { IAnalyticsStore } from "@/plane-web/store/analytics.store"; +import type { IBaseAnalyticsStore as IAnalyticsStore } from "@/store/analytics.store"; export const useAnalytics = (): IAnalyticsStore => { const context = useContext(StoreContext); diff --git a/apps/web/core/hooks/store/use-command-palette.ts b/apps/web/core/hooks/store/use-command-palette.ts index e08e2b7653..88692735c1 100644 --- a/apps/web/core/hooks/store/use-command-palette.ts +++ b/apps/web/core/hooks/store/use-command-palette.ts @@ -8,7 +8,7 @@ import { useContext } from "react"; // mobx store import { StoreContext } from "@/lib/store-context"; // types -import type { ICommandPaletteStore } from "@/plane-web/store/command-palette.store"; +import type { ICommandPaletteStore } from "@/store/base-command-palette.store"; export const useCommandPalette = (): ICommandPaletteStore => { const context = useContext(StoreContext); diff --git a/apps/web/core/hooks/store/use-cycle.ts b/apps/web/core/hooks/store/use-cycle.ts index 810b940687..7e22fc80cf 100644 --- a/apps/web/core/hooks/store/use-cycle.ts +++ b/apps/web/core/hooks/store/use-cycle.ts @@ -8,7 +8,7 @@ import { useContext } from "react"; // mobx store import { StoreContext } from "@/lib/store-context"; // types -import type { ICycleStore } from "@/plane-web/store/cycle"; +import type { ICycleStore } from "@/store/cycle.store"; export const useCycle = (): ICycleStore => { const context = useContext(StoreContext); diff --git a/apps/web/core/hooks/store/use-global-view.ts b/apps/web/core/hooks/store/use-global-view.ts index 10ef617a17..e8ece7daf5 100644 --- a/apps/web/core/hooks/store/use-global-view.ts +++ b/apps/web/core/hooks/store/use-global-view.ts @@ -8,7 +8,7 @@ import { useContext } from "react"; // mobx store import { StoreContext } from "@/lib/store-context"; // types -import type { IGlobalViewStore } from "@/plane-web/store/global-view.store"; +import type { IGlobalViewStore } from "@/store/global-view.store"; export const useGlobalView = (): IGlobalViewStore => { const context = useContext(StoreContext); diff --git a/apps/web/core/hooks/store/use-issue-detail.ts b/apps/web/core/hooks/store/use-issue-detail.ts index 1d83949f86..a8a4f8a781 100644 --- a/apps/web/core/hooks/store/use-issue-detail.ts +++ b/apps/web/core/hooks/store/use-issue-detail.ts @@ -10,7 +10,7 @@ import { EIssueServiceType } from "@plane/types"; // mobx store import { StoreContext } from "@/lib/store-context"; // types -import type { IIssueDetail } from "@/plane-web/store/issue/issue-details/root.store"; +import type { IIssueDetail } from "@/store/issue/issue-details/root.store"; export const useIssueDetail = (serviceType: TIssueServiceType = EIssueServiceType.ISSUES): IIssueDetail => { const context = useContext(StoreContext); diff --git a/apps/web/core/hooks/store/use-issues.ts b/apps/web/core/hooks/store/use-issues.ts index 816397d840..3c8a1afdf7 100644 --- a/apps/web/core/hooks/store/use-issues.ts +++ b/apps/web/core/hooks/store/use-issues.ts @@ -9,14 +9,8 @@ import { merge } from "lodash-es"; import type { TIssueMap } from "@plane/types"; import { EIssuesStoreType } from "@plane/types"; import { StoreContext } from "@/lib/store-context"; -// plane web types -import type { IProjectEpics, IProjectEpicsFilter } from "@/plane-web/store/issue/epic"; -// types -import type { ITeamIssues, ITeamIssuesFilter } from "@/plane-web/store/issue/team"; -import type { ITeamProjectWorkItemsFilter, ITeamProjectWorkItems } from "@/plane-web/store/issue/team-project"; -import type { ITeamViewIssues, ITeamViewIssuesFilter } from "@/plane-web/store/issue/team-views"; -import type { IWorkspaceIssues } from "@/plane-web/store/issue/workspace/issue.store"; import type { IArchivedIssues, IArchivedIssuesFilter } from "@/store/issue/archived"; +import type { IWorkspaceIssues } from "@/store/issue/workspace/issue.store"; import type { ICycleIssues, ICycleIssuesFilter } from "@/store/issue/cycle"; import type { IModuleIssues, IModuleIssuesFilter } from "@/store/issue/module"; import type { IProfileIssues, IProfileIssuesFilter } from "@/store/issue/profile"; @@ -44,8 +38,8 @@ export type TStoreIssues = { issuesFilter: IProfileIssuesFilter; }; [EIssuesStoreType.TEAM]: defaultIssueStore & { - issues: ITeamIssues; - issuesFilter: ITeamIssuesFilter; + issues: IProjectIssues; + issuesFilter: IProjectIssuesFilter; }; [EIssuesStoreType.PROJECT]: defaultIssueStore & { issues: IProjectIssues; @@ -60,8 +54,8 @@ export type TStoreIssues = { issuesFilter: IModuleIssuesFilter; }; [EIssuesStoreType.TEAM_VIEW]: defaultIssueStore & { - issues: ITeamViewIssues; - issuesFilter: ITeamViewIssuesFilter; + issues: IProjectViewIssues; + issuesFilter: IProjectViewIssuesFilter; }; [EIssuesStoreType.PROJECT_VIEW]: defaultIssueStore & { issues: IProjectViewIssues; @@ -76,12 +70,12 @@ export type TStoreIssues = { issuesFilter: IProjectIssuesFilter; }; [EIssuesStoreType.EPIC]: defaultIssueStore & { - issues: IProjectEpics; - issuesFilter: IProjectEpicsFilter; + issues: IProjectIssues; + issuesFilter: IProjectIssuesFilter; }; [EIssuesStoreType.TEAM_PROJECT_WORK_ITEMS]: defaultIssueStore & { - issues: ITeamProjectWorkItems; - issuesFilter: ITeamProjectWorkItemsFilter; + issues: IProjectIssues; + issuesFilter: IProjectIssuesFilter; }; }; diff --git a/apps/web/core/hooks/store/use-power-k.ts b/apps/web/core/hooks/store/use-power-k.ts index 5a5025d3a5..e6597cfae2 100644 --- a/apps/web/core/hooks/store/use-power-k.ts +++ b/apps/web/core/hooks/store/use-power-k.ts @@ -8,7 +8,7 @@ import { useContext } from "react"; // mobx store import { StoreContext } from "@/lib/store-context"; // types -import type { IPowerKStore } from "@/plane-web/store/power-k.store"; +import type { IBasePowerKStore as IPowerKStore } from "@/store/base-power-k.store"; export const usePowerK = (): IPowerKStore => { const context = useContext(StoreContext); diff --git a/apps/web/core/hooks/store/use-project-inbox.ts b/apps/web/core/hooks/store/use-project-inbox.ts index 18296aa765..6b45235909 100644 --- a/apps/web/core/hooks/store/use-project-inbox.ts +++ b/apps/web/core/hooks/store/use-project-inbox.ts @@ -7,7 +7,7 @@ import { useContext } from "react"; // mobx store import { StoreContext } from "@/lib/store-context"; -import type { IProjectInboxStore } from "@/plane-web/store/project-inbox.store"; +import type { IProjectInboxStore } from "@/store/inbox/project-inbox.store"; export const useProjectInbox = (): IProjectInboxStore => { const context = useContext(StoreContext); diff --git a/apps/web/core/hooks/store/use-project-state.ts b/apps/web/core/hooks/store/use-project-state.ts index 3bfbf2b82c..566461e8cb 100644 --- a/apps/web/core/hooks/store/use-project-state.ts +++ b/apps/web/core/hooks/store/use-project-state.ts @@ -7,8 +7,7 @@ import { useContext } from "react"; // mobx store import { StoreContext } from "@/lib/store-context"; -// Plane-web -import type { IStateStore } from "@/plane-web/store/state.store"; +import type { IStateStore } from "@/store/state.store"; export const useProjectState = (): IStateStore => { const context = useContext(StoreContext); diff --git a/apps/web/core/hooks/store/use-project-view.ts b/apps/web/core/hooks/store/use-project-view.ts index d26dc0ee45..b552947ffe 100644 --- a/apps/web/core/hooks/store/use-project-view.ts +++ b/apps/web/core/hooks/store/use-project-view.ts @@ -8,7 +8,7 @@ import { useContext } from "react"; // mobx store import { StoreContext } from "@/lib/store-context"; // types -import type { IProjectViewStore } from "@/plane-web/store/project-view.store"; +import type { IProjectViewStore } from "@/store/project-view.store"; export const useProjectView = (): IProjectViewStore => { const context = useContext(StoreContext); diff --git a/apps/web/core/hooks/store/user/user-permissions.ts b/apps/web/core/hooks/store/user/user-permissions.ts index 548e2aaafe..e53296050e 100644 --- a/apps/web/core/hooks/store/user/user-permissions.ts +++ b/apps/web/core/hooks/store/user/user-permissions.ts @@ -8,7 +8,7 @@ import { useContext } from "react"; // mobx store import { StoreContext } from "@/lib/store-context"; // plane web imports -import type { IUserPermissionStore } from "@/plane-web/store/user/permission.store"; +import type { IUserPermissionStore } from "@/store/user/base-permissions.store"; export const useUserPermissions = (): IUserPermissionStore => { const context = useContext(StoreContext); diff --git a/apps/web/core/hooks/use-timeline-chart.ts b/apps/web/core/hooks/use-timeline-chart.ts index ce9d1d88f0..291362f96f 100644 --- a/apps/web/core/hooks/use-timeline-chart.ts +++ b/apps/web/core/hooks/use-timeline-chart.ts @@ -9,9 +9,8 @@ import { useContext } from "react"; import { GANTT_TIMELINE_TYPE, type TTimelineTypeCore, type TTimelineType } from "@plane/types"; // lib import { StoreContext } from "@/lib/store-context"; -// plane-web store types -import type { IBaseTimelineStore } from "@/plane-web/store/timeline/base-timeline.store"; -import type { ITimelineStore } from "@/plane-web/store/timeline"; +import type { IBaseTimelineStore } from "@/store/timeline/base-timeline.store"; +import type { ITimelineStore } from "@/store/timeline/timeline.store"; import { useTimeLineType } from "../components/gantt-chart/contexts"; export const getTimelineStore = ( diff --git a/apps/web/core/lib/store-context.tsx b/apps/web/core/lib/store-context.tsx index 6a5f5c2102..661d393b92 100644 --- a/apps/web/core/lib/store-context.tsx +++ b/apps/web/core/lib/store-context.tsx @@ -7,7 +7,7 @@ import type { ReactElement } from "react"; import { createContext } from "react"; // plane web store -import { RootStore } from "@/plane-web/store/root.store"; +import { RootStore } from "@/store/root.store"; export let rootStore = new RootStore(); diff --git a/apps/web/core/store/analytics.store.ts b/apps/web/core/store/analytics.store.ts index ca1ffc1409..b7e122c317 100644 --- a/apps/web/core/store/analytics.store.ts +++ b/apps/web/core/store/analytics.store.ts @@ -31,7 +31,7 @@ export interface IBaseAnalyticsStore { updateIsEpic: (isEpic: boolean) => void; } -export abstract class BaseAnalyticsStore implements IBaseAnalyticsStore { +export class BaseAnalyticsStore implements IBaseAnalyticsStore { //observables currentTab: TAnalyticsTabsBase = "overview"; selectedProjects: string[] = []; diff --git a/apps/web/core/store/base-command-palette.store.ts b/apps/web/core/store/base-command-palette.store.ts index e5fe61b344..7b9fb56e86 100644 --- a/apps/web/core/store/base-command-palette.store.ts +++ b/apps/web/core/store/base-command-palette.store.ts @@ -4,7 +4,7 @@ * See the LICENSE file for details. */ -import { observable, action, makeObservable, runInAction } from "mobx"; +import { observable, action, computed, makeObservable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; // plane imports import type { TCreateModalStoreTypes, TCreatePageModal } from "@plane/constants"; @@ -20,6 +20,8 @@ export interface ModalData { } export interface IBaseCommandPaletteStore { + // computed + isAnyModalOpen: boolean; // observables isCreateProjectModalOpen: boolean; isCreateCycleModalOpen: boolean; @@ -52,7 +54,7 @@ export interface IBaseCommandPaletteStore { toggleProfileSettingsModal: (value: { activeTab?: TProfileSettingsTabs | null; isOpen?: boolean }) => void; } -export abstract class BaseCommandPaletteStore implements IBaseCommandPaletteStore { +export class BaseCommandPaletteStore implements IBaseCommandPaletteStore { // observables isCreateProjectModalOpen: boolean = false; isCreateCycleModalOpen: boolean = false; @@ -99,9 +101,14 @@ export abstract class BaseCommandPaletteStore implements IBaseCommandPaletteStor toggleAllStickiesModal: action, toggleProjectListOpen: action, toggleProfileSettingsModal: action, + isAnyModalOpen: computed, }); } + get isAnyModalOpen(): boolean { + return Boolean(this.getCoreModalsState()); + } + /** * Returns whether any base modal is open * @protected - allows access from child classes @@ -277,3 +284,7 @@ export abstract class BaseCommandPaletteStore implements IBaseCommandPaletteStor }); }; } + +// Aliases so consumers can keep using CommandPaletteStore / ICommandPaletteStore +export type ICommandPaletteStore = IBaseCommandPaletteStore; +export { BaseCommandPaletteStore as CommandPaletteStore }; diff --git a/apps/web/core/store/base-power-k.store.ts b/apps/web/core/store/base-power-k.store.ts index ded57f3e6b..379ecf96fe 100644 --- a/apps/web/core/store/base-power-k.store.ts +++ b/apps/web/core/store/base-power-k.store.ts @@ -35,7 +35,7 @@ export interface IBasePowerKStore { toggleShortcutsListModal: (value?: boolean) => void; } -export abstract class BasePowerKStore implements IBasePowerKStore { +export class BasePowerKStore implements IBasePowerKStore { // observables isPowerKModalOpen: boolean = false; isShortcutsListModalOpen: boolean = false; diff --git a/apps/web/ce/store/estimates/estimate.ts b/apps/web/core/store/estimates/estimate.ts similarity index 95% rename from apps/web/ce/store/estimates/estimate.ts rename to apps/web/core/store/estimates/estimate.ts index 805c00df8d..7e654940a0 100644 --- a/apps/web/ce/store/estimates/estimate.ts +++ b/apps/web/core/store/estimates/estimate.ts @@ -135,13 +135,6 @@ export class Estimate implements IEstimate { }); // actions - /** - * @description create an estimate point - * @param { string } workspaceSlug - * @param { string } projectId - * @param { Partial } payload - * @returns { IEstimatePointType | undefined } - */ creteEstimatePoint = async ( workspaceSlug: string, projectId: string, diff --git a/apps/web/core/store/estimates/project-estimate.store.ts b/apps/web/core/store/estimates/project-estimate.store.ts index 519e0805cf..bfbe066de3 100644 --- a/apps/web/core/store/estimates/project-estimate.store.ts +++ b/apps/web/core/store/estimates/project-estimate.store.ts @@ -12,8 +12,8 @@ import type { IEstimate as IEstimateType, IEstimateFormData, TEstimateSystemKeys // plane web services import estimateService from "@/services/estimate.service"; // plane web store -import type { IEstimate } from "@/plane-web/store/estimates/estimate"; -import { Estimate } from "@/plane-web/store/estimates/estimate"; +import type { IEstimate } from "@/store/estimates/estimate"; +import { Estimate } from "@/store/estimates/estimate"; // store import type { CoreRootStore } from "../root.store"; diff --git a/apps/web/core/store/issue/helpers/base-issues.store.ts b/apps/web/core/store/issue/helpers/base-issues.store.ts index 023f6590da..09c24d25f4 100644 --- a/apps/web/core/store/issue/helpers/base-issues.store.ts +++ b/apps/web/core/store/issue/helpers/base-issues.store.ts @@ -30,7 +30,6 @@ import { EIssueServiceType, EIssueLayoutTypes } from "@plane/types"; // helpers import { convertToISODateString } from "@plane/utils"; // plane web imports -import { workItemSortWithOrderByExtended } from "@/plane-web/store/issue/helpers/base-issue.store"; // services import { CycleService } from "@/services/cycle.service"; import { IssueArchiveService, IssueService } from "@/services/issue"; @@ -329,6 +328,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { // The Issue Property corresponding to the order by value get orderByKey() { + // oxlint-disable-next-line no-shadow const orderBy = this.orderBy; if (!orderBy) return; @@ -537,6 +537,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { this.addIssue(response, shouldUpdateList); // If shouldUpdateList is true, call fetchParentStats + // oxlint-disable-next-line no-unused-expressions shouldUpdateList && (await this.fetchParentStats(workspaceSlug, projectId)); return response; @@ -762,6 +763,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { try { const getIssueById = this.rootIssueStore.issues.getIssueById; runInAction(() => { + // oxlint-disable-next-line no-shadow for (const update of updates) { const dates: Partial = {}; if (update.start_date) dates.start_date = update.start_date; @@ -784,6 +786,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { await this.issueService.updateIssueDates(workspaceSlug, projectId, updates); } catch (e) { runInAction(() => { + // oxlint-disable-next-line no-shadow for (const update of issueDatesBeforeChange) { const dates: Partial = {}; if (update.start_date) dates.start_date = update.start_date; @@ -858,6 +861,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { runInAction(() => { // If cycle Id is the current cycle Id, then, remove issue from list of issueIds + // oxlint-disable-next-line no-unused-expressions this.cycleId === cycleId && this.removeIssueFromList(issueId); }); @@ -988,6 +992,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { runInAction(() => { // if module Id is the current Module Id, then, add issue to list of issueIds + // oxlint-disable-next-line no-unused-expressions this.moduleId === moduleId && issueIds.forEach((issueId) => this.addIssueToList(issueId)); }); @@ -1016,6 +1021,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { runInAction(() => { // if module Id is the current Module Id, then remove issue from list of issueIds + // oxlint-disable-next-line no-unused-expressions this.moduleId === moduleId && issueIds.forEach((issueId) => this.removeIssueFromList(issueId)); }); @@ -1089,6 +1095,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { // remove the new issue id to the module issues removeModuleIds.forEach((moduleId) => { // If module Id is equal to current module Id, them remove Issue from List + // oxlint-disable-next-line no-unused-expressions this.moduleId === moduleId && this.removeIssueFromList(issueId); currentModuleIds = pull(currentModuleIds, moduleId); }); @@ -1196,6 +1203,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { updateIssueList( issue?: TIssue, issueBeforeUpdate?: TIssue, + // oxlint-disable-next-line no-shadow action?: EIssueGroupedAction.ADD | EIssueGroupedAction.DELETE ) { if (!issue && !issueBeforeUpdate) return; @@ -1379,6 +1387,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { set(this.groupedIssueCount, [ALL_ISSUES], groupedIssueCount[ALL_ISSUES]); // loop through the groups of groupedIssues. + // oxlint-disable-next-line no-shadow for (const groupId in groupedIssues) { const issueGroup = groupedIssues[groupId]; const issueGroupCount = groupedIssueCount[groupId]; @@ -1392,6 +1401,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { if (storeUpdated) continue; // if issueGroup is not a string, loop through the sub group Issues + // oxlint-disable-next-line no-shadow for (const subGroupId in issueGroup) { const issueSubGroup = (issueGroup as TGroupedIssues)[subGroupId]; const issueSubGroupCount = groupedIssueCount[getGroupKey(groupId, subGroupId)]; @@ -1436,6 +1446,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { accumulateIssueUpdates( accumulator: { [key: string]: EIssueGroupedAction }, path: string[], + // oxlint-disable-next-line no-shadow action: EIssueGroupedAction ) { const [groupId, subGroupId] = path; @@ -1470,6 +1481,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { updateUpdateAccumulator( accumulator: { [key: string]: EIssueGroupedAction }, key: string, + // oxlint-disable-next-line no-shadow action: EIssueGroupedAction ) { // if the key for accumulator is undefined, they update it with the action @@ -1494,6 +1506,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { updateIssueCount(accumulatedUpdatesForCount: { [key: string]: EIssueGroupedAction }) { const updateKeys = Object.keys(accumulatedUpdatesForCount); for (const updateKey of updateKeys) { + // oxlint-disable-next-line no-shadow const update = accumulatedUpdatesForCount[updateKey]; if (!update) continue; @@ -1515,6 +1528,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { getUpdateDetails = ( issue?: Partial, issueBeforeUpdate?: Partial, + // oxlint-disable-next-line no-shadow action?: EIssueGroupedAction.ADD | EIssueGroupedAction.DELETE ): { path: string[]; action: EIssueGroupedAction }[] => { // check the before and after states to return if there needs to be a re-sorting of issueId list if the issue property that orderBy depends on has changed @@ -1935,7 +1949,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { ); default: - return workItemSortWithOrderByExtended(array, key); + return getIssueIds(array); } }; diff --git a/apps/web/core/store/issue/helpers/issue-filter-helper.store.ts b/apps/web/core/store/issue/helpers/issue-filter-helper.store.ts index fc7e9255dc..b89801f287 100644 --- a/apps/web/core/store/issue/helpers/issue-filter-helper.store.ts +++ b/apps/web/core/store/issue/helpers/issue-filter-helper.store.ts @@ -30,7 +30,6 @@ import { EIssueLayoutTypes } from "@plane/types"; import { getComputedDisplayFilters, getComputedDisplayProperties } from "@plane/utils"; // lib import { storage } from "@/lib/local-storage"; -import { getEnabledDisplayFilters } from "@/plane-web/store/issue/helpers/filter-utils"; interface ILocalStoreIssueFilters { key: EIssuesStoreType; @@ -68,6 +67,7 @@ export interface IIssueFilterHelperStore { } export class IssueFilterHelperStore implements IIssueFilterHelperStore { + // oxlint-disable-next-line no-useless-constructor constructor() {} /** @@ -185,7 +185,7 @@ export class IssueFilterHelperStore implements IIssueFilterHelperStore { defaultValues?: IIssueDisplayFilterOptions ): IIssueDisplayFilterOptions => { const computedFilters = getComputedDisplayFilters(displayFilters, defaultValues); - return getEnabledDisplayFilters(computedFilters); + return computedFilters; }; /** diff --git a/apps/web/ce/store/issue/issue-details/activity.store.ts b/apps/web/core/store/issue/issue-details/activity.store.ts similarity index 99% rename from apps/web/ce/store/issue/issue-details/activity.store.ts rename to apps/web/core/store/issue/issue-details/activity.store.ts index a9f4b0a5e5..6687aebc35 100644 --- a/apps/web/ce/store/issue/issue-details/activity.store.ts +++ b/apps/web/core/store/issue/issue-details/activity.store.ts @@ -18,7 +18,6 @@ import type { TIssueServiceType, } from "@plane/types"; import { EIssueServiceType } from "@plane/types"; -// plane web constants // services import { IssueActivityService } from "@/services/issue"; // store @@ -160,6 +159,7 @@ export class IssueActivityStore implements IIssueActivityStore { const activityIds = activities.map((activity) => activity.id); runInAction(() => { + // oxlint-disable-next-line no-shadow update(this.activities, issueId, (currentActivityIds) => { if (!currentActivityIds) return activityIds; return uniq(concat(currentActivityIds, activityIds)); diff --git a/apps/web/core/store/issue/issue-details/root.store.ts b/apps/web/core/store/issue/issue-details/root.store.ts index c8688e362f..8596e1fec7 100644 --- a/apps/web/core/store/issue/issue-details/root.store.ts +++ b/apps/web/core/store/issue/issue-details/root.store.ts @@ -18,12 +18,8 @@ import type { TWorkItemWidgets, } from "@plane/types"; // plane web store -import { IssueActivityStore } from "@/plane-web/store/issue/issue-details/activity.store"; -import type { - IIssueActivityStore, - IIssueActivityStoreActions, - TActivityLoader, -} from "@/plane-web/store/issue/issue-details/activity.store"; +import { IssueActivityStore } from "./activity.store"; +import type { IIssueActivityStore, IIssueActivityStoreActions, TActivityLoader } from "./activity.store"; import type { IIssueRootStore } from "../root.store"; import { IssueAttachmentStore } from "./attachment.store"; import type { IIssueAttachmentStore, IIssueAttachmentStoreActions } from "./attachment.store"; @@ -126,7 +122,7 @@ export interface IIssueDetail relation: IIssueRelationStore; } -export abstract class IssueDetail implements IIssueDetail { +export class IssueDetail implements IIssueDetail { // observables peekIssue: TPeekIssue | undefined = undefined; relationKey: TIssueRelationTypes | null = null; diff --git a/apps/web/core/store/issue/root.store.ts b/apps/web/core/store/issue/root.store.ts index d8632f311d..f0e6ffeabb 100644 --- a/apps/web/core/store/issue/root.store.ts +++ b/apps/web/core/store/issue/root.store.ts @@ -10,22 +10,9 @@ import { autorun, makeObservable, observable } from "mobx"; import type { ICycle, IIssueLabel, IModule, IProject, IState, IUserLite, TIssueServiceType } from "@plane/types"; import { EIssueServiceType } from "@plane/types"; // plane web store -import type { IProjectEpics, IProjectEpicsFilter } from "@/plane-web/store/issue/epic"; -import { ProjectEpics, ProjectEpicsFilter } from "@/plane-web/store/issue/epic"; -import type { IIssueDetail } from "@/plane-web/store/issue/issue-details/root.store"; -import { IssueDetail } from "@/plane-web/store/issue/issue-details/root.store"; -import type { ITeamIssuesFilter, ITeamIssues } from "@/plane-web/store/issue/team"; -import { TeamIssues, TeamIssuesFilter } from "@/plane-web/store/issue/team"; -import type { ITeamProjectWorkItemsFilter } from "@/plane-web/store/issue/team-project/filter.store"; -import { TeamProjectWorkItemsFilter } from "@/plane-web/store/issue/team-project/filter.store"; -import type { ITeamProjectWorkItems } from "@/plane-web/store/issue/team-project/issue.store"; -import { TeamProjectWorkItems } from "@/plane-web/store/issue/team-project/issue.store"; -import type { ITeamViewIssues, ITeamViewIssuesFilter } from "@/plane-web/store/issue/team-views"; -import { TeamViewIssues, TeamViewIssuesFilter } from "@/plane-web/store/issue/team-views"; -// root store -import type { IWorkspaceIssues } from "@/plane-web/store/issue/workspace/issue.store"; -import { WorkspaceIssues } from "@/plane-web/store/issue/workspace/issue.store"; -import type { RootStore } from "@/plane-web/store/root.store"; +import type { IIssueDetail } from "@/store/issue/issue-details/root.store"; +import { IssueDetail } from "@/store/issue/issue-details/root.store"; +import type { RootStore } from "@/store/root.store"; import type { IWorkspaceMembership } from "@/store/member/workspace/workspace-member.store"; // issues data store import type { IArchivedIssuesFilter, IArchivedIssues } from "./archived"; @@ -48,6 +35,8 @@ import type { IProjectViewIssuesFilter, IProjectViewIssues } from "./project-vie import { ProjectViewIssuesFilter, ProjectViewIssues } from "./project-views"; import type { IWorkspaceIssuesFilter } from "./workspace"; import { WorkspaceIssuesFilter } from "./workspace"; +import type { IWorkspaceIssues } from "./workspace/issue.store"; +import { WorkspaceIssues } from "./workspace/issue.store"; import type { IWorkspaceDraftIssues, IWorkspaceDraftIssuesFilter } from "./workspace-draft"; import { WorkspaceDraftIssues, WorkspaceDraftIssuesFilter } from "./workspace-draft"; @@ -88,8 +77,8 @@ export interface IIssueRootStore { profileIssuesFilter: IProfileIssuesFilter; profileIssues: IProfileIssues; - teamIssuesFilter: ITeamIssuesFilter; - teamIssues: ITeamIssues; + teamIssuesFilter: IProjectIssuesFilter; + teamIssues: IProjectIssues; projectIssuesFilter: IProjectIssuesFilter; projectIssues: IProjectIssues; @@ -100,11 +89,11 @@ export interface IIssueRootStore { moduleIssuesFilter: IModuleIssuesFilter; moduleIssues: IModuleIssues; - teamViewIssuesFilter: ITeamViewIssuesFilter; - teamViewIssues: ITeamViewIssues; + teamViewIssuesFilter: IProjectViewIssuesFilter; + teamViewIssues: IProjectViewIssues; - teamProjectWorkItemsFilter: ITeamProjectWorkItemsFilter; - teamProjectWorkItems: ITeamProjectWorkItems; + teamProjectWorkItemsFilter: IProjectIssuesFilter; + teamProjectWorkItems: IProjectIssues; projectViewIssuesFilter: IProjectViewIssuesFilter; projectViewIssues: IProjectViewIssues; @@ -115,8 +104,8 @@ export interface IIssueRootStore { issueKanBanView: IIssueKanBanViewStore; issueCalendarView: ICalendarStore; - projectEpicsFilter: IProjectEpicsFilter; - projectEpics: IProjectEpics; + projectEpicsFilter: IProjectIssuesFilter; + projectEpics: IProjectIssues; } export class IssueRootStore implements IIssueRootStore { @@ -156,8 +145,8 @@ export class IssueRootStore implements IIssueRootStore { profileIssuesFilter: IProfileIssuesFilter; profileIssues: IProfileIssues; - teamIssuesFilter: ITeamIssuesFilter; - teamIssues: ITeamIssues; + teamIssuesFilter: IProjectIssuesFilter; + teamIssues: IProjectIssues; projectIssuesFilter: IProjectIssuesFilter; projectIssues: IProjectIssues; @@ -168,14 +157,14 @@ export class IssueRootStore implements IIssueRootStore { moduleIssuesFilter: IModuleIssuesFilter; moduleIssues: IModuleIssues; - teamViewIssuesFilter: ITeamViewIssuesFilter; - teamViewIssues: ITeamViewIssues; + teamViewIssuesFilter: IProjectViewIssuesFilter; + teamViewIssues: IProjectViewIssues; projectViewIssuesFilter: IProjectViewIssuesFilter; projectViewIssues: IProjectViewIssues; - teamProjectWorkItemsFilter: ITeamProjectWorkItemsFilter; - teamProjectWorkItems: ITeamProjectWorkItems; + teamProjectWorkItemsFilter: IProjectIssuesFilter; + teamProjectWorkItems: IProjectIssues; archivedIssuesFilter: IArchivedIssuesFilter; archivedIssues: IArchivedIssues; @@ -183,8 +172,8 @@ export class IssueRootStore implements IIssueRootStore { issueKanBanView: IIssueKanBanViewStore; issueCalendarView: ICalendarStore; - projectEpicsFilter: IProjectEpicsFilter; - projectEpics: IProjectEpics; + projectEpicsFilter: IProjectIssuesFilter; + projectEpics: IProjectIssues; constructor(rootStore: RootStore, serviceType: TIssueServiceType = EIssueServiceType.ISSUES) { makeObservable(this, { @@ -250,8 +239,8 @@ export class IssueRootStore implements IIssueRootStore { this.projectIssuesFilter = new ProjectIssuesFilter(this); this.projectIssues = new ProjectIssues(this, this.projectIssuesFilter); - this.teamIssuesFilter = new TeamIssuesFilter(this); - this.teamIssues = new TeamIssues(this, this.teamIssuesFilter); + this.teamIssuesFilter = new ProjectIssuesFilter(this); + this.teamIssues = new ProjectIssues(this, this.teamIssuesFilter); this.cycleIssuesFilter = new CycleIssuesFilter(this); this.cycleIssues = new CycleIssues(this, this.cycleIssuesFilter); @@ -259,14 +248,14 @@ export class IssueRootStore implements IIssueRootStore { this.moduleIssuesFilter = new ModuleIssuesFilter(this); this.moduleIssues = new ModuleIssues(this, this.moduleIssuesFilter); - this.teamViewIssuesFilter = new TeamViewIssuesFilter(this); - this.teamViewIssues = new TeamViewIssues(this, this.teamViewIssuesFilter); + this.teamViewIssuesFilter = new ProjectViewIssuesFilter(this); + this.teamViewIssues = new ProjectViewIssues(this, this.teamViewIssuesFilter); this.projectViewIssuesFilter = new ProjectViewIssuesFilter(this); this.projectViewIssues = new ProjectViewIssues(this, this.projectViewIssuesFilter); - this.teamProjectWorkItemsFilter = new TeamProjectWorkItemsFilter(this); - this.teamProjectWorkItems = new TeamProjectWorkItems(this, this.teamProjectWorkItemsFilter); + this.teamProjectWorkItemsFilter = new ProjectIssuesFilter(this); + this.teamProjectWorkItems = new ProjectIssues(this, this.teamProjectWorkItemsFilter); this.archivedIssuesFilter = new ArchivedIssuesFilter(this); this.archivedIssues = new ArchivedIssues(this, this.archivedIssuesFilter); @@ -274,7 +263,7 @@ export class IssueRootStore implements IIssueRootStore { this.issueKanBanView = new IssueKanBanViewStore(this); this.issueCalendarView = new CalendarStore(this); - this.projectEpicsFilter = new ProjectEpicsFilter(this); - this.projectEpics = new ProjectEpics(this, this.projectEpicsFilter); + this.projectEpicsFilter = new ProjectIssuesFilter(this); + this.projectEpics = new ProjectIssues(this, this.projectEpicsFilter); } } diff --git a/apps/web/core/store/member/index.ts b/apps/web/core/store/member/index.ts index fcce4e1fee..10474ab2b1 100644 --- a/apps/web/core/store/member/index.ts +++ b/apps/web/core/store/member/index.ts @@ -9,9 +9,9 @@ import { computedFn } from "mobx-utils"; // plane imports import type { IUserLite } from "@plane/types"; // plane web imports -import type { IProjectMemberStore } from "@/plane-web/store/member/project-member.store"; -import { ProjectMemberStore } from "@/plane-web/store/member/project-member.store"; -import type { RootStore } from "@/plane-web/store/root.store"; +import type { IProjectMemberStore } from "@/store/member/project/base-project-member.store"; +import { ProjectMemberStore } from "@/store/member/project/base-project-member.store"; +import type { RootStore } from "@/store/root.store"; // local imports import type { IWorkspaceMemberStore } from "./workspace/workspace-member.store"; import { WorkspaceMemberStore } from "./workspace/workspace-member.store"; diff --git a/apps/web/core/store/member/project/base-project-member.store.ts b/apps/web/core/store/member/project/base-project-member.store.ts index 701089a09e..5ec4c090ec 100644 --- a/apps/web/core/store/member/project/base-project-member.store.ts +++ b/apps/web/core/store/member/project/base-project-member.store.ts @@ -17,7 +17,7 @@ import type { TProjectMembership, } from "@plane/types"; // plane web imports -import type { RootStore } from "@/plane-web/store/root.store"; +import type { RootStore } from "@/store/root.store"; // services import { ProjectMemberService, ProjectService } from "@/services/project"; // store @@ -84,7 +84,7 @@ export interface IBaseProjectMemberStore { removeMemberFromProject: (workspaceSlug: string, projectId: string, userId: string) => Promise; } -export abstract class BaseProjectMemberStore implements IBaseProjectMemberStore { +export class BaseProjectMemberStore implements IBaseProjectMemberStore { // observables projectMemberFetchStatusMap: { [projectId: string]: boolean; @@ -204,7 +204,9 @@ export abstract class BaseProjectMemberStore implements IBaseProjectMemberStore * @param { string } projectId - The ID of the project * @returns { EUserProjectRoles | undefined } The user's role in the project, or undefined if not found */ - abstract getUserProjectRole: (userId: string, projectId: string) => EUserProjectRoles | undefined; + getUserProjectRole = computedFn((userId: string, projectId: string): EUserProjectRoles | undefined => + this.getRoleFromProjectMembership(userId, projectId) + ); /** * @description get the details of a project member @@ -329,16 +331,13 @@ export abstract class BaseProjectMemberStore implements IBaseProjectMemberStore }); /** - * @description update the role of a member in a project + * @description Returns the role to use when updating a project member * @param projectId * @param userId * @param role */ - abstract getProjectMemberRoleForUpdate: ( - projectId: string, - userId: string, - role: EUserProjectRoles - ) => EUserProjectRoles; + getProjectMemberRoleForUpdate = (_projectId: string, _userId: string, role: EUserProjectRoles): EUserProjectRoles => + role; /** * @description update the role of a member in a project @@ -417,11 +416,10 @@ export abstract class BaseProjectMemberStore implements IBaseProjectMemberStore /** * @description Processes the removal of a member from a project - * This abstract method handles the cleanup of member data from the project member map * @param projectId - The ID of the project to remove the member from * @param userId - The ID of the user to remove from the project */ - abstract processMemberRemoval: (projectId: string, userId: string) => void; + processMemberRemoval = (projectId: string, userId: string) => this.handleMemberRemoval(projectId, userId); /** * @description remove a member from a project @@ -432,6 +430,7 @@ export abstract class BaseProjectMemberStore implements IBaseProjectMemberStore removeMemberFromProject = async (workspaceSlug: string, projectId: string, userId: string) => { const memberDetails = this.getProjectMemberDetails(userId, projectId); if (!memberDetails || !memberDetails?.id) throw new Error("Member not found"); + // oxlint-disable-next-line promise/always-return await this.projectMemberService.deleteProjectMember(workspaceSlug, projectId, memberDetails?.id).then(() => { runInAction(() => { this.processMemberRemoval(projectId, userId); @@ -496,3 +495,7 @@ export abstract class BaseProjectMemberStore implements IBaseProjectMemberStore } }; } + +// Aliases so consumers can keep using ProjectMemberStore / IProjectMemberStore +export type IProjectMemberStore = IBaseProjectMemberStore; +export { BaseProjectMemberStore as ProjectMemberStore }; diff --git a/apps/web/core/store/member/workspace/workspace-member.store.ts b/apps/web/core/store/member/workspace/workspace-member.store.ts index cad57f0aa2..6028d56053 100644 --- a/apps/web/core/store/member/workspace/workspace-member.store.ts +++ b/apps/web/core/store/member/workspace/workspace-member.store.ts @@ -10,7 +10,6 @@ import { computedFn } from "mobx-utils"; // types import type { EUserPermissions } from "@plane/constants"; import type { IWorkspaceBulkInviteFormData, IWorkspaceMember, IWorkspaceMemberInvitation } from "@plane/types"; -// plane-web constants // services import { WorkspaceService } from "@/services/workspace.service"; // types @@ -20,7 +19,7 @@ import type { IUserStore } from "@/store/user"; import type { IMemberRootStore } from "../index.ts"; import type { IWorkspaceMemberFiltersStore } from "./workspace-member-filters.store"; import { WorkspaceMemberFiltersStore } from "./workspace-member-filters.store"; -import type { RootStore } from "@/plane-web/store/root.store"; +import type { RootStore } from "@/store/root.store"; export interface IWorkspaceMembership { id: string; @@ -282,6 +281,7 @@ export class WorkspaceMemberStore implements IWorkspaceMemberStore { removeMemberFromWorkspace = async (workspaceSlug: string, userId: string) => { const memberDetails = this.getWorkspaceMemberDetails(userId); if (!memberDetails) throw new Error("Member not found"); + // oxlint-disable-next-line promise/always-return await this.workspaceService.deleteWorkspaceMember(workspaceSlug, memberDetails?.id).then(() => { runInAction(() => { set(this.workspaceMemberMap, [workspaceSlug, userId, "is_active"], false); @@ -323,7 +323,7 @@ export class WorkspaceMemberStore implements IWorkspaceMemberStore { invitationId: string, data: Partial ) => { - const originalMemberInvitations = [...this.workspaceMemberInvitations?.[workspaceSlug]]; // in case of error, we will revert back to original members + const originalMemberInvitations = [...(this.workspaceMemberInvitations?.[workspaceSlug] ?? [])]; // in case of error, we will revert back to original members try { const memberInvitations = originalMemberInvitations?.map((invitation) => ({ ...invitation, @@ -349,6 +349,7 @@ export class WorkspaceMemberStore implements IWorkspaceMemberStore { * @param memberId */ deleteMemberInvitation = async (workspaceSlug: string, invitationId: string) => + // oxlint-disable-next-line promise/always-return await this.workspaceService.deleteWorkspaceInvitations(workspaceSlug.toString(), invitationId).then(() => { runInAction(() => { this.workspaceMemberInvitations[workspaceSlug] = this.workspaceMemberInvitations[workspaceSlug].filter( diff --git a/apps/web/core/store/pages/base-page.ts b/apps/web/core/store/pages/base-page.ts index 1cde3950bf..1936a6bd2c 100644 --- a/apps/web/core/store/pages/base-page.ts +++ b/apps/web/core/store/pages/base-page.ts @@ -11,8 +11,8 @@ import { EPageAccess } from "@plane/constants"; import type { TChangeHandlerProps } from "@plane/propel/emoji-icon-picker"; import type { TDocumentPayload, TLogoProps, TNameDescriptionLoader, TPage } from "@plane/types"; // plane web store -import { ExtendedBasePage } from "@/plane-web/store/pages/extended-base-page"; -import type { RootStore } from "@/plane-web/store/root.store"; +import { ExtendedBasePage } from "@/store/pages/extended-base-page"; +import type { RootStore } from "@/store/root.store"; // local imports import { PageEditorInstance } from "./page-editor-info"; diff --git a/apps/web/ce/store/pages/extended-base-page.ts b/apps/web/core/store/pages/extended-base-page.ts similarity index 71% rename from apps/web/ce/store/pages/extended-base-page.ts rename to apps/web/core/store/pages/extended-base-page.ts index 3144ef647b..56634456ed 100644 --- a/apps/web/ce/store/pages/extended-base-page.ts +++ b/apps/web/core/store/pages/extended-base-page.ts @@ -5,7 +5,7 @@ */ import type { TPage, TPageExtended } from "@plane/types"; -import type { RootStore } from "@/plane-web/store/root.store"; +import type { CoreRootStore } from "@/store/root.store"; import type { TBasePageServices } from "@/store/pages/base-page"; export type TExtendedPageInstance = TPageExtended & { @@ -13,8 +13,8 @@ export type TExtendedPageInstance = TPageExtended & { }; export class ExtendedBasePage implements TExtendedPageInstance { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - constructor(store: RootStore, page: TPage, services: TBasePageServices) {} + // oxlint-disable-next-line no-useless-constructor, no-unused-vars + constructor(store: CoreRootStore, page: TPage, services: TBasePageServices) {} get asJSONExtended(): TExtendedPageInstance["asJSONExtended"] { return {}; diff --git a/apps/web/core/store/pages/project-page.store.ts b/apps/web/core/store/pages/project-page.store.ts index abb48ab917..4fc70ea7f8 100644 --- a/apps/web/core/store/pages/project-page.store.ts +++ b/apps/web/core/store/pages/project-page.store.ts @@ -15,7 +15,6 @@ import { EUserProjectRoles } from "@plane/types"; import { filterPagesByPageType, getPageName, orderPages, shouldFilterPage } from "@plane/utils"; // plane web constants // plane web store -import type { RootStore } from "@/plane-web/store/root.store"; // services import { ProjectPageService } from "@/services/page"; // store @@ -81,7 +80,7 @@ export class ProjectPageStore implements IProjectPageStore { service: ProjectPageService; rootStore: CoreRootStore; - constructor(private store: RootStore) { + constructor(private store: CoreRootStore) { makeObservable(this, { // observables loader: observable.ref, diff --git a/apps/web/core/store/pages/project-page.ts b/apps/web/core/store/pages/project-page.ts index b3cc1c9922..5b31fa340b 100644 --- a/apps/web/core/store/pages/project-page.ts +++ b/apps/web/core/store/pages/project-page.ts @@ -10,7 +10,7 @@ import { computedFn } from "mobx-utils"; import { EPageAccess, EUserPermissions } from "@plane/constants"; import type { TPage } from "@plane/types"; // plane web store -import type { RootStore } from "@/plane-web/store/root.store"; +import type { RootStore } from "@/store/root.store"; // services import { ProjectPageService } from "@/services/page"; const projectPageService = new ProjectPageService(); diff --git a/apps/web/core/store/root.store.ts b/apps/web/core/store/root.store.ts index 3b950a9c64..ebca38e41a 100644 --- a/apps/web/core/store/root.store.ts +++ b/apps/web/core/store/root.store.ts @@ -10,16 +10,17 @@ import { FALLBACK_LANGUAGE, setLanguage } from "@plane/i18n"; import type { IWorkItemFilterStore } from "@plane/shared-state"; import { WorkItemFilterStore } from "@plane/shared-state"; // plane web store -import type { IAnalyticsStore } from "@/plane-web/store/analytics.store"; -import { AnalyticsStore } from "@/plane-web/store/analytics.store"; -import type { ICommandPaletteStore } from "@/plane-web/store/command-palette.store"; -import { CommandPaletteStore } from "@/plane-web/store/command-palette.store"; -import { PowerKStore } from "@/plane-web/store/power-k.store"; -import type { IPowerKStore } from "@/plane-web/store/power-k.store"; -import type { RootStore } from "@/plane-web/store/root.store"; -import type { IStateStore } from "@/plane-web/store/state.store"; -import { StateStore } from "@/plane-web/store/state.store"; -import { WorkspaceRootStore } from "@/plane-web/store/workspace"; +import type { IBaseAnalyticsStore as IAnalyticsStore } from "@/store/analytics.store"; +import { BaseAnalyticsStore as AnalyticsStore } from "@/store/analytics.store"; +import type { IBasePowerKStore as IPowerKStore } from "@/store/base-power-k.store"; +import { BasePowerKStore as PowerKStore } from "@/store/base-power-k.store"; +import type { IStateStore } from "@/store/state.store"; +import { StateStore } from "@/store/state.store"; +import type { ICommandPaletteStore } from "@/store/base-command-palette.store"; +import { CommandPaletteStore } from "@/store/base-command-palette.store"; +import { WorkspaceRootStore } from "@/store/workspace"; +import type { ITimelineStore } from "./timeline/timeline.store"; +import { TimeLineStore } from "./timeline/timeline.store"; // stores import type { ICycleStore } from "./cycle.store"; import { CycleStore } from "./cycle.store"; @@ -101,29 +102,30 @@ export class CoreRootStore { editorAssetStore: IEditorAssetStore; workItemFilters: IWorkItemFilterStore; powerK: IPowerKStore; + timelineStore: ITimelineStore; constructor() { this.router = new RouterStore(); this.commandPalette = new CommandPaletteStore(); this.instance = new InstanceStore(); - this.user = new UserStore(this as unknown as RootStore); + this.user = new UserStore(this); this.theme = new ThemeStore(); - this.workspaceRoot = new WorkspaceRootStore(this as unknown as RootStore); + this.workspaceRoot = new WorkspaceRootStore(this); this.projectRoot = new ProjectRootStore(this); - this.memberRoot = new MemberRootStore(this as unknown as RootStore); + this.memberRoot = new MemberRootStore(this); this.cycle = new CycleStore(this); this.cycleFilter = new CycleFilterStore(this); this.module = new ModulesStore(this); this.moduleFilter = new ModuleFilterStore(this); this.projectView = new ProjectViewStore(this); this.globalView = new GlobalViewStore(this); - this.issue = new IssueRootStore(this as unknown as RootStore); - this.state = new StateStore(this as unknown as RootStore); + this.issue = new IssueRootStore(this); + this.state = new StateStore(this); this.label = new LabelStore(this); this.dashboard = new DashboardStore(this); this.multipleSelect = new MultipleSelectStore(); this.projectInbox = new ProjectInboxStore(this); - this.projectPages = new ProjectPageStore(this as unknown as RootStore); + this.projectPages = new ProjectPageStore(this); this.projectEstimate = new ProjectEstimateStore(this); this.workspaceNotification = new WorkspaceNotificationStore(this); this.favorite = new FavoriteStore(this); @@ -132,6 +134,7 @@ export class CoreRootStore { this.analytics = new AnalyticsStore(); this.workItemFilters = new WorkItemFilterStore(); this.powerK = new PowerKStore(); + this.timelineStore = new TimeLineStore(this); } resetOnSignOut() { @@ -141,22 +144,22 @@ export class CoreRootStore { this.router = new RouterStore(); this.commandPalette = new CommandPaletteStore(); this.instance = new InstanceStore(); - this.user = new UserStore(this as unknown as RootStore); - this.workspaceRoot = new WorkspaceRootStore(this as unknown as RootStore); + this.user = new UserStore(this); + this.workspaceRoot = new WorkspaceRootStore(this); this.projectRoot = new ProjectRootStore(this); - this.memberRoot = new MemberRootStore(this as unknown as RootStore); + this.memberRoot = new MemberRootStore(this); this.cycle = new CycleStore(this); this.cycleFilter = new CycleFilterStore(this); this.module = new ModulesStore(this); this.moduleFilter = new ModuleFilterStore(this); this.projectView = new ProjectViewStore(this); this.globalView = new GlobalViewStore(this); - this.issue = new IssueRootStore(this as unknown as RootStore); - this.state = new StateStore(this as unknown as RootStore); + this.issue = new IssueRootStore(this); + this.state = new StateStore(this); this.label = new LabelStore(this); this.dashboard = new DashboardStore(this); this.projectInbox = new ProjectInboxStore(this); - this.projectPages = new ProjectPageStore(this as unknown as RootStore); + this.projectPages = new ProjectPageStore(this); this.multipleSelect = new MultipleSelectStore(); this.projectEstimate = new ProjectEstimateStore(this); this.workspaceNotification = new WorkspaceNotificationStore(this); @@ -165,5 +168,8 @@ export class CoreRootStore { this.editorAssetStore = new EditorAssetStore(); this.workItemFilters = new WorkItemFilterStore(); this.powerK = new PowerKStore(); + this.timelineStore = new TimeLineStore(this); } } + +export { CoreRootStore as RootStore }; diff --git a/apps/web/core/store/state.store.ts b/apps/web/core/store/state.store.ts index 1e2ad56732..a8c28bd7d5 100644 --- a/apps/web/core/store/state.store.ts +++ b/apps/web/core/store/state.store.ts @@ -14,7 +14,7 @@ import type { IIntakeState, IState } from "@plane/types"; import { sortStates } from "@plane/utils"; // plane web import { ProjectStateService } from "@/services/project/project-state.service"; -import type { RootStore } from "@/plane-web/store/root.store"; +import type { RootStore } from "@/store/root.store"; export interface IStateStore { //Loaders @@ -126,6 +126,7 @@ export class StateStore implements IStateStore { // Ensure all STATE_GROUPS are present const allGroups = Object.keys(STATE_GROUPS).reduce( (acc, group) => ({ + // oxlint-disable-next-line oxc/no-accumulating-spread ...acc, [group]: groupedStates[group] || [], }), @@ -307,6 +308,7 @@ export class StateStore implements IStateStore { */ deleteState = async (workspaceSlug: string, projectId: string, stateId: string) => { if (!this.stateMap?.[stateId]) return; + // oxlint-disable-next-line promise/always-return await this.stateService.deleteState(workspaceSlug, projectId, stateId).then(() => { runInAction(() => { delete this.stateMap[stateId]; diff --git a/apps/web/ce/store/timeline/base-timeline.store.ts b/apps/web/core/store/timeline/base-timeline.store.ts similarity index 99% rename from apps/web/ce/store/timeline/base-timeline.store.ts rename to apps/web/core/store/timeline/base-timeline.store.ts index b97b2ff7e1..d5b1a55ecc 100644 --- a/apps/web/ce/store/timeline/base-timeline.store.ts +++ b/apps/web/core/store/timeline/base-timeline.store.ts @@ -24,7 +24,7 @@ import { } from "@/components/gantt-chart/views/helpers"; // helpers // store -import type { RootStore } from "@/plane-web/store/root.store"; +import type { RootStore } from "@/store/root.store"; // types type BlockData = { diff --git a/apps/web/core/store/timeline/issues-timeline.store.ts b/apps/web/core/store/timeline/issues-timeline.store.ts index 9320bf06a3..54a502b0ff 100644 --- a/apps/web/core/store/timeline/issues-timeline.store.ts +++ b/apps/web/core/store/timeline/issues-timeline.store.ts @@ -5,10 +5,9 @@ */ import { autorun } from "mobx"; -// Plane-web -import type { RootStore } from "@/plane-web/store/root.store"; -import type { IBaseTimelineStore } from "@/plane-web/store/timeline/base-timeline.store"; -import { BaseTimeLineStore } from "@/plane-web/store/timeline/base-timeline.store"; +import type { RootStore } from "@/store/root.store"; +import type { IBaseTimelineStore } from "@/store/timeline/base-timeline.store"; +import { BaseTimeLineStore } from "@/store/timeline/base-timeline.store"; export interface IIssuesTimeLineStore extends IBaseTimelineStore { isDependencyEnabled: boolean; diff --git a/apps/web/core/store/timeline/modules-timeline.store.ts b/apps/web/core/store/timeline/modules-timeline.store.ts index 0b5f0317ce..7df60f2bcb 100644 --- a/apps/web/core/store/timeline/modules-timeline.store.ts +++ b/apps/web/core/store/timeline/modules-timeline.store.ts @@ -5,10 +5,9 @@ */ import { autorun } from "mobx"; -// Store -import type { RootStore } from "@/plane-web/store/root.store"; -import { BaseTimeLineStore } from "@/plane-web/store/timeline/base-timeline.store"; -import type { IBaseTimelineStore } from "@/plane-web/store/timeline/base-timeline.store"; +import type { RootStore } from "@/store/root.store"; +import { BaseTimeLineStore } from "@/store/timeline/base-timeline.store"; +import type { IBaseTimelineStore } from "@/store/timeline/base-timeline.store"; export interface IModulesTimeLineStore extends IBaseTimelineStore { isDependencyEnabled: boolean; diff --git a/apps/web/ce/store/timeline/index.ts b/apps/web/core/store/timeline/timeline.store.ts similarity index 95% rename from apps/web/ce/store/timeline/index.ts rename to apps/web/core/store/timeline/timeline.store.ts index 7fe482b93f..b74e9cc59e 100644 --- a/apps/web/ce/store/timeline/index.ts +++ b/apps/web/core/store/timeline/timeline.store.ts @@ -4,7 +4,7 @@ * See the LICENSE file for details. */ -import type { RootStore } from "@/plane-web/store/root.store"; +import type { RootStore } from "@/store/root.store"; import { IssuesTimeLineStore } from "@/store/timeline/issues-timeline.store"; import type { IIssuesTimeLineStore } from "@/store/timeline/issues-timeline.store"; import { ModulesTimeLineStore } from "@/store/timeline/modules-timeline.store"; diff --git a/apps/web/core/store/user/base-permissions.store.ts b/apps/web/core/store/user/base-permissions.store.ts index 8810ab26cd..7afa71aad5 100644 --- a/apps/web/core/store/user/base-permissions.store.ts +++ b/apps/web/core/store/user/base-permissions.store.ts @@ -18,7 +18,7 @@ import type { EUserProjectRoles, IUserProjectsRole, IWorkspaceMemberMe, TProject import { EUserWorkspaceRoles } from "@plane/types"; // plane web imports import { WorkspaceService } from "@/services/workspace.service"; -import type { RootStore } from "@/plane-web/store/root.store"; +import type { RootStore } from "@/store/root.store"; // services import projectMemberService from "@/services/project/project-member.service"; import userService from "@/services/user.service"; @@ -64,7 +64,7 @@ export interface IBaseUserPermissionStore { * @description This store is used to handle permission layer for the currently logged user. * It manages workspace and project level permissions, roles and access control. */ -export abstract class BaseUserPermissionStore implements IBaseUserPermissionStore { +export class BaseUserPermissionStore implements IBaseUserPermissionStore { loader: boolean = false; // constants workspaceUserInfo: Record = {}; @@ -150,10 +150,10 @@ export abstract class BaseUserPermissionStore implements IBaseUserPermissionStor * @param { string } projectId * @returns { EUserPermissions | undefined } */ - abstract getProjectRoleByWorkspaceSlugAndProjectId: ( - workspaceSlug: string, - projectId?: string - ) => EUserPermissions | undefined; + getProjectRoleByWorkspaceSlugAndProjectId = computedFn( + (workspaceSlug: string, projectId?: string): EUserPermissions | undefined => + this.getProjectRole(workspaceSlug, projectId) + ); /** * @description Fetches project-level entities that are not automatically loaded by the project wrapper. @@ -162,7 +162,9 @@ export abstract class BaseUserPermissionStore implements IBaseUserPermissionStor * @param { string } projectId * @returns { Promise } */ - abstract fetchWorkspaceLevelProjectEntities: (workspaceSlug: string, projectId: string) => void; + fetchWorkspaceLevelProjectEntities = (workspaceSlug: string, projectId: string): void => { + void this.store.projectRoot.project.fetchProjectDetails(workspaceSlug, projectId); + }; /** * @description Returns whether the user has the permission to access a page @@ -353,3 +355,7 @@ export abstract class BaseUserPermissionStore implements IBaseUserPermissionStor } }; } + +// Aliases so consumers can keep using UserPermissionStore / IUserPermissionStore +export type IUserPermissionStore = IBaseUserPermissionStore; +export { BaseUserPermissionStore as UserPermissionStore }; diff --git a/apps/web/core/store/user/index.ts b/apps/web/core/store/user/index.ts index 5218c2ba9d..74eb6f047b 100644 --- a/apps/web/core/store/user/index.ts +++ b/apps/web/core/store/user/index.ts @@ -10,9 +10,9 @@ import { action, makeObservable, observable, runInAction, computed } from "mobx" import { EUserPermissions, API_BASE_URL } from "@plane/constants"; import type { IUser, TUserPermissions } from "@plane/types"; // plane web imports -import type { RootStore } from "@/plane-web/store/root.store"; -import type { IUserPermissionStore } from "@/plane-web/store/user/permission.store"; -import { UserPermissionStore } from "@/plane-web/store/user/permission.store"; +import type { RootStore } from "@/store/root.store"; +import type { IUserPermissionStore } from "@/store/user/base-permissions.store"; +import { UserPermissionStore } from "@/store/user/base-permissions.store"; // services import { AuthService } from "@/services/auth.service"; import { UserService } from "@/services/user.service"; diff --git a/apps/web/core/store/workspace/index.ts b/apps/web/core/store/workspace/index.ts index 746c869991..27bb4701e7 100644 --- a/apps/web/core/store/workspace/index.ts +++ b/apps/web/core/store/workspace/index.ts @@ -70,7 +70,7 @@ export interface IWorkspaceRootStore { home: IHomeStore; } -export abstract class BaseWorkspaceRootStore implements IWorkspaceRootStore { +export class BaseWorkspaceRootStore implements IWorkspaceRootStore { loader: boolean = false; // observables workspaces: Record = {}; @@ -383,8 +383,13 @@ export abstract class BaseWorkspaceRootStore implements IWorkspaceRootStore { }; /** - * Mutate workspace members activity + * Mutate workspace members activity — no-op in CE * @param workspaceSlug */ - abstract mutateWorkspaceMembersActivity(workspaceSlug: string): Promise; + mutateWorkspaceMembersActivity = async (_workspaceSlug: string): Promise => { + // No-op in default/CE version + }; } + +// Alias so consumers can keep using WorkspaceRootStore +export { BaseWorkspaceRootStore as WorkspaceRootStore }; diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 2646a6599f..0a35dbbd57 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -6,7 +6,6 @@ "@/app/*": ["./app/*"], "@/helpers/*": ["./helpers/*"], "@/styles/*": ["./styles/*"], - "@/plane-web/*": ["./ce/*"], "package.json": ["./package.json"] }, "strictNullChecks": true,
{state.name}
- Embed and access issues in pages seamlessly, upgrade to Plane Pro now. -
) { - return ( - // Fallback -
{issue.name}
) { + return ( + // Fallback +
{t(ROLE_DETAILS[currentWorkspaceRole].i18n_title)}