{ + if(!query.length) return handleAddLabel(query); }} - className="text-left text-custom-text-200 cursor-pointer" + className={`text-left text-custom-text-200 ${query.length ? "cursor-pointer" : "cursor-default"}`} > - + Add "{query}" to labels + {query.length ? ( + <> + + Add "{query}" to labels + > + ) : ( + "Type to add a new label" + )}
) : (No matching results.
diff --git a/web/core/components/issues/issue-detail/root.tsx b/web/core/components/issues/issue-detail/root.tsx index 24e24792c8e..136edab8e20 100644 --- a/web/core/components/issues/issue-detail/root.tsx +++ b/web/core/components/issues/issue-detail/root.tsx @@ -4,6 +4,7 @@ import { FC, useMemo } from "react"; import { observer } from "mobx-react"; import { usePathname } from "next/navigation"; // types +import { EIssuesStoreType } from "@plane/constants"; import { TIssue } from "@plane/types"; // ui import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/ui"; @@ -12,7 +13,6 @@ import { EmptyState } from "@/components/common"; import { IssueDetailsSidebar, IssuePeekOverview } from "@/components/issues"; // constants import { ISSUE_UPDATED, ISSUE_DELETED, ISSUE_ARCHIVED } from "@/constants/event-tracker"; -import { EIssuesStoreType } from "@/constants/issue"; // hooks import { useAppTheme, useEventTracker, useIssueDetail, useIssues, useUserPermissions } from "@/hooks/store"; import { useAppRouter } from "@/hooks/use-app-router"; diff --git a/web/core/components/issues/issue-layouts/calendar/base-calendar-root.tsx b/web/core/components/issues/issue-layouts/calendar/base-calendar-root.tsx index 0fbcfbfe709..07e124bf0bf 100644 --- a/web/core/components/issues/issue-layouts/calendar/base-calendar-root.tsx +++ b/web/core/components/issues/issue-layouts/calendar/base-calendar-root.tsx @@ -3,13 +3,12 @@ import { FC, useCallback, useEffect } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; -import { EIssueGroupByToServerOptions } from "@plane/constants"; +import { EIssueGroupByToServerOptions, EIssuesStoreType } from "@plane/constants"; import { TGroupedIssues } from "@plane/types"; // components import { TOAST_TYPE, setToast } from "@plane/ui"; import { CalendarChart } from "@/components/issues"; //constants -import { EIssuesStoreType } from "@/constants/issue"; // hooks import { useIssues, useCalendarView, useUserPermissions } from "@/hooks/store"; import { useIssueStoreType } from "@/hooks/use-issue-layout-store"; @@ -38,7 +37,14 @@ interface IBaseCalendarRoot { } export const BaseCalendarRoot = observer((props: IBaseCalendarRoot) => { - const { QuickActions, addIssuesToView, isCompletedCycle = false, viewId, isEpic = false, canEditPropertiesBasedOnProject } = props; + const { + QuickActions, + addIssuesToView, + isCompletedCycle = false, + viewId, + isEpic = false, + canEditPropertiesBasedOnProject, + } = props; // router const { workspaceSlug } = useParams(); diff --git a/web/core/components/issues/issue-layouts/calendar/calendar.tsx b/web/core/components/issues/issue-layouts/calendar/calendar.tsx index 0377f19c463..9a0284f47bc 100644 --- a/web/core/components/issues/issue-layouts/calendar/calendar.tsx +++ b/web/core/components/issues/issue-layouts/calendar/calendar.tsx @@ -4,6 +4,8 @@ import { useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { autoScrollForElements } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element"; import { observer } from "mobx-react"; +// plane constants +import { EIssueLayoutTypes, EIssueFilterType, EIssuesStoreType } from "@plane/constants"; // types import type { IIssueDisplayFilterOptions, @@ -21,7 +23,6 @@ import { Spinner } from "@plane/ui"; import { CalendarHeader, CalendarIssueBlocks, CalendarWeekDays, CalendarWeekHeader } from "@/components/issues"; // constants import { MONTHS_LIST } from "@/constants/calendar"; -import { EIssueFilterType, EIssueLayoutTypes, EIssuesStoreType } from "@/constants/issue"; // helpers import { cn } from "@/helpers/common.helper"; import { renderFormattedPayloadDate } from "@/helpers/date-time.helper"; diff --git a/web/core/components/issues/issue-layouts/calendar/dropdowns/options-dropdown.tsx b/web/core/components/issues/issue-layouts/calendar/dropdowns/options-dropdown.tsx index b28959c5b22..9b5b13ce462 100644 --- a/web/core/components/issues/issue-layouts/calendar/dropdowns/options-dropdown.tsx +++ b/web/core/components/issues/issue-layouts/calendar/dropdowns/options-dropdown.tsx @@ -9,6 +9,7 @@ import { Popover, Transition } from "@headlessui/react"; // hooks // ui // icons +import { EIssueFilterType } from "@plane/constants"; import { IIssueDisplayFilterOptions, IIssueDisplayProperties, @@ -20,7 +21,6 @@ import { ToggleSwitch } from "@plane/ui"; // types // constants import { CALENDAR_LAYOUTS } from "@/constants/calendar"; -import { EIssueFilterType } from "@/constants/issue"; import { useCalendarView } from "@/hooks/store"; import useSize from "@/hooks/use-window-size"; import { IProjectEpicsFilter } from "@/plane-web/store/issue/epic"; diff --git a/web/core/components/issues/issue-layouts/calendar/header.tsx b/web/core/components/issues/issue-layouts/calendar/header.tsx index 3c55acf8e4e..a441ff8c165 100644 --- a/web/core/components/issues/issue-layouts/calendar/header.tsx +++ b/web/core/components/issues/issue-layouts/calendar/header.tsx @@ -2,6 +2,7 @@ import { observer } from "mobx-react"; // components import { ChevronLeft, ChevronRight } from "lucide-react"; +import { EIssueFilterType } from "@plane/constants"; import { IIssueDisplayFilterOptions, IIssueDisplayProperties, @@ -11,7 +12,6 @@ import { import { Row } from "@plane/ui"; import { CalendarMonthsDropdown, CalendarOptionsDropdown } from "@/components/issues"; // icons -import { EIssueFilterType } from "@/constants/issue"; import { useCalendarView } from "@/hooks/store/use-calendar-view"; import { IProjectEpicsFilter } from "@/plane-web/store/issue/epic"; import { ICycleIssuesFilter } from "@/store/issue/cycle"; diff --git a/web/core/components/issues/issue-layouts/calendar/quick-add-issue-actions.tsx b/web/core/components/issues/issue-layouts/calendar/quick-add-issue-actions.tsx index 5a1becee227..285285f7aaf 100644 --- a/web/core/components/issues/issue-layouts/calendar/quick-add-issue-actions.tsx +++ b/web/core/components/issues/issue-layouts/calendar/quick-add-issue-actions.tsx @@ -5,6 +5,8 @@ import { differenceInCalendarDays } from "date-fns"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { PlusIcon } from "lucide-react"; +// plane constants +import { EIssueLayoutTypes } from "@plane/constants"; // types import { ISearchIssueResponse, TIssue } from "@plane/types"; // ui @@ -13,7 +15,6 @@ import { CustomMenu, setPromiseToast } from "@plane/ui"; import { ExistingIssuesListModal } from "@/components/core"; import { QuickAddIssueRoot } from "@/components/issues"; // helpers -import { EIssueLayoutTypes } from "@/constants/issue"; import { cn } from "@/helpers/common.helper"; // hooks import { useIssueDetail } from "@/hooks/store"; diff --git a/web/core/components/issues/issue-layouts/calendar/roots/cycle-root.tsx b/web/core/components/issues/issue-layouts/calendar/roots/cycle-root.tsx index 8543e85de87..ba85fb80fbf 100644 --- a/web/core/components/issues/issue-layouts/calendar/roots/cycle-root.tsx +++ b/web/core/components/issues/issue-layouts/calendar/roots/cycle-root.tsx @@ -2,8 +2,8 @@ import { useCallback } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; //hooks +import { EIssuesStoreType } from "@plane/constants"; import { CycleIssueQuickActions } from "@/components/issues"; -import { EIssuesStoreType } from "@/constants/issue"; import { useCycle, useIssues } from "@/hooks/store"; // components import { BaseCalendarRoot } from "../base-calendar-root"; diff --git a/web/core/components/issues/issue-layouts/calendar/roots/module-root.tsx b/web/core/components/issues/issue-layouts/calendar/roots/module-root.tsx index aaf746b34f8..296b4c5a3b5 100644 --- a/web/core/components/issues/issue-layouts/calendar/roots/module-root.tsx +++ b/web/core/components/issues/issue-layouts/calendar/roots/module-root.tsx @@ -3,10 +3,10 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // hooks // components +import { EIssuesStoreType } from "@plane/constants"; import { ModuleIssueQuickActions } from "@/components/issues"; // types // constants -import { EIssuesStoreType } from "@/constants/issue"; import { useIssues } from "@/hooks/store"; import { BaseCalendarRoot } from "../base-calendar-root"; diff --git a/web/core/components/issues/issue-layouts/empty-states/archived-issues.tsx b/web/core/components/issues/issue-layouts/empty-states/archived-issues.tsx index 020062e4e35..833a2d6054e 100644 --- a/web/core/components/issues/issue-layouts/empty-states/archived-issues.tsx +++ b/web/core/components/issues/issue-layouts/empty-states/archived-issues.tsx @@ -1,13 +1,13 @@ import size from "lodash/size"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions } from "@plane/types"; // hooks // components import { EmptyState } from "@/components/empty-state"; // constants import { EmptyStateType } from "@/constants/empty-state"; -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; import { useIssues } from "@/hooks/store"; // types diff --git a/web/core/components/issues/issue-layouts/empty-states/cycle.tsx b/web/core/components/issues/issue-layouts/empty-states/cycle.tsx index 1650bfc9892..274aa85883b 100644 --- a/web/core/components/issues/issue-layouts/empty-states/cycle.tsx +++ b/web/core/components/issues/issue-layouts/empty-states/cycle.tsx @@ -6,6 +6,7 @@ import size from "lodash/size"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // types +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions, ISearchIssueResponse } from "@plane/types"; // ui import { TOAST_TYPE, setToast } from "@plane/ui"; @@ -14,7 +15,6 @@ import { ExistingIssuesListModal } from "@/components/core"; import { EmptyState } from "@/components/empty-state"; // constants import { EmptyStateType } from "@/constants/empty-state"; -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; import { useCommandPalette, useCycle, useEventTracker, useIssues } from "@/hooks/store"; export const CycleEmptyState: React.FC = observer(() => { diff --git a/web/core/components/issues/issue-layouts/empty-states/draft-issues.tsx b/web/core/components/issues/issue-layouts/empty-states/draft-issues.tsx index 88eed515c4f..1af3ca5a5c4 100644 --- a/web/core/components/issues/issue-layouts/empty-states/draft-issues.tsx +++ b/web/core/components/issues/issue-layouts/empty-states/draft-issues.tsx @@ -1,13 +1,13 @@ import size from "lodash/size"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions } from "@plane/types"; // hooks // components import { EmptyState } from "@/components/empty-state"; // constants import { EmptyStateType } from "@/constants/empty-state"; -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; import { useIssues } from "@/hooks/store"; // types diff --git a/web/core/components/issues/issue-layouts/empty-states/global-view.tsx b/web/core/components/issues/issue-layouts/empty-states/global-view.tsx index 107770f83c0..8850fe22677 100644 --- a/web/core/components/issues/issue-layouts/empty-states/global-view.tsx +++ b/web/core/components/issues/issue-layouts/empty-states/global-view.tsx @@ -1,10 +1,10 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // components +import { EIssuesStoreType } from "@plane/constants"; import { EmptyState } from "@/components/empty-state"; // constants import { EMPTY_STATE_DETAILS, EmptyStateType } from "@/constants/empty-state"; -import { EIssuesStoreType } from "@/constants/issue"; // hooks import { useCommandPalette, useEventTracker, useProject } from "@/hooks/store"; // assets diff --git a/web/core/components/issues/issue-layouts/empty-states/index.tsx b/web/core/components/issues/issue-layouts/empty-states/index.tsx index e776d29bad2..f2d42152680 100644 --- a/web/core/components/issues/issue-layouts/empty-states/index.tsx +++ b/web/core/components/issues/issue-layouts/empty-states/index.tsx @@ -1,4 +1,4 @@ -import { EIssuesStoreType } from "@/constants/issue"; +import { EIssuesStoreType } from "@plane/constants"; // components import { ProjectArchivedEmptyState } from "./archived-issues"; import { CycleEmptyState } from "./cycle"; diff --git a/web/core/components/issues/issue-layouts/empty-states/module.tsx b/web/core/components/issues/issue-layouts/empty-states/module.tsx index 35ed83e0051..9e8a26955e6 100644 --- a/web/core/components/issues/issue-layouts/empty-states/module.tsx +++ b/web/core/components/issues/issue-layouts/empty-states/module.tsx @@ -5,6 +5,7 @@ import size from "lodash/size"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // types +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions, ISearchIssueResponse } from "@plane/types"; // ui import { TOAST_TYPE, setToast } from "@plane/ui"; @@ -13,7 +14,6 @@ import { ExistingIssuesListModal } from "@/components/core"; import { EmptyState } from "@/components/empty-state"; // constants import { EmptyStateType } from "@/constants/empty-state"; -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; // hooks import { useCommandPalette, useEventTracker, useIssues } from "@/hooks/store"; diff --git a/web/core/components/issues/issue-layouts/empty-states/project-issues.tsx b/web/core/components/issues/issue-layouts/empty-states/project-issues.tsx index 5ec86340d79..5e437357a89 100644 --- a/web/core/components/issues/issue-layouts/empty-states/project-issues.tsx +++ b/web/core/components/issues/issue-layouts/empty-states/project-issues.tsx @@ -2,12 +2,12 @@ import size from "lodash/size"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // types +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions } from "@plane/types"; // components import { EmptyState } from "@/components/empty-state"; // constants import { EmptyStateType } from "@/constants/empty-state"; -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; // hooks import { useCommandPalette, useEventTracker, useIssues } from "@/hooks/store"; diff --git a/web/core/components/issues/issue-layouts/empty-states/project-view.tsx b/web/core/components/issues/issue-layouts/empty-states/project-view.tsx index 160834ea71c..0749d810f27 100644 --- a/web/core/components/issues/issue-layouts/empty-states/project-view.tsx +++ b/web/core/components/issues/issue-layouts/empty-states/project-view.tsx @@ -1,9 +1,9 @@ import { observer } from "mobx-react"; import { PlusIcon } from "lucide-react"; // components +import { EIssuesStoreType } from "@plane/constants"; import { EmptyState } from "@/components/common"; // constants -import { EIssuesStoreType } from "@/constants/issue"; // hooks import { useCommandPalette, useEventTracker, useUserPermissions } from "@/hooks/store"; import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions"; diff --git a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/archived-issue.tsx b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/archived-issue.tsx index 92a9d8db378..91d7207764b 100644 --- a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/archived-issue.tsx +++ b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/archived-issue.tsx @@ -1,9 +1,9 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions } from "@plane/types"; // hooks import { AppliedFiltersList } from "@/components/issues"; -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; import { useIssues, useLabel, useProjectState } from "@/hooks/store"; // components // types diff --git a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/cycle-root.tsx b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/cycle-root.tsx index e9f6302dc15..2628fe41daa 100644 --- a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/cycle-root.tsx +++ b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/cycle-root.tsx @@ -1,10 +1,10 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions } from "@plane/types"; // hooks import { Header, EHeaderVariant } from "@plane/ui"; import { AppliedFiltersList, SaveFilterView } from "@/components/issues"; -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; import { useIssues, useLabel, useProjectState } from "@/hooks/store"; // components // types diff --git a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/draft-issue.tsx b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/draft-issue.tsx index ba0777eea60..a596b4248c0 100644 --- a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/draft-issue.tsx +++ b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/draft-issue.tsx @@ -1,9 +1,9 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions } from "@plane/types"; // hooks import { AppliedFiltersList } from "@/components/issues"; -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; import { useIssues, useLabel, useProjectState } from "@/hooks/store"; // components // types diff --git a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/global-view-root.tsx b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/global-view-root.tsx index 0b1003260fc..c0a5cc1d39e 100644 --- a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/global-view-root.tsx +++ b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/global-view-root.tsx @@ -6,6 +6,7 @@ import isEmpty from "lodash/isEmpty"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // types +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions, TStaticViewTypes } from "@plane/types"; //ui // components @@ -15,7 +16,6 @@ import { UpdateViewComponent } from "@/components/views/update-view-component"; import { CreateUpdateWorkspaceViewModal } from "@/components/workspace"; // constants import { GLOBAL_VIEW_UPDATED } from "@/constants/event-tracker"; -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; import { EViewAccess } from "@/constants/views"; import { DEFAULT_GLOBAL_VIEWS_LIST } from "@/constants/workspace"; // helpers diff --git a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/module-root.tsx b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/module-root.tsx index 13f0fad8ad7..10820d35416 100644 --- a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/module-root.tsx +++ b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/module-root.tsx @@ -1,10 +1,10 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions } from "@plane/types"; // hooks import { Header, EHeaderVariant } from "@plane/ui"; import { AppliedFiltersList, SaveFilterView } from "@/components/issues"; -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; import { useIssues, useLabel, useProjectState } from "@/hooks/store"; // components // types diff --git a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/profile-issues-root.tsx b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/profile-issues-root.tsx index fe1af5fb20d..eebf4fd9d1e 100644 --- a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/profile-issues-root.tsx +++ b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/profile-issues-root.tsx @@ -1,11 +1,11 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions } from "@plane/types"; // hooks // components import { AppliedFiltersList } from "@/components/issues"; // types -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; import { useIssues, useLabel } from "@/hooks/store"; import { useWorkspaceIssueProperties } from "@/hooks/use-workspace-issue-properties"; diff --git a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/project-root.tsx b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/project-root.tsx index 721bad76969..37616a2736d 100644 --- a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/project-root.tsx +++ b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/project-root.tsx @@ -1,13 +1,13 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // types +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions } from "@plane/types"; // ui import { Header, EHeaderVariant } from "@plane/ui"; // components import { AppliedFiltersList, SaveFilterView } from "@/components/issues"; // constants -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; // hooks import { useLabel, useProjectState, useUserPermissions } from "@/hooks/store"; import { useIssues } from "@/hooks/store/use-issues"; diff --git a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/project-view-root.tsx b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/project-view-root.tsx index 395d6044a6f..152ebcc2d3f 100644 --- a/web/core/components/issues/issue-layouts/filters/applied-filters/roots/project-view-root.tsx +++ b/web/core/components/issues/issue-layouts/filters/applied-filters/roots/project-view-root.tsx @@ -6,6 +6,7 @@ import isEmpty from "lodash/isEmpty"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // types +import { EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueFilterOptions } from "@plane/types"; // components import { Header, EHeaderVariant } from "@plane/ui"; @@ -13,7 +14,6 @@ import { AppliedFiltersList } from "@/components/issues"; import { CreateUpdateProjectViewModal } from "@/components/views"; import { UpdateViewComponent } from "@/components/views/update-view-component"; // constants -import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; import { EViewAccess } from "@/constants/views"; // hooks import { useIssues, useLabel, useProjectState, useProjectView, useUser, useUserPermissions } from "@/hooks/store"; diff --git a/web/core/components/issues/issue-layouts/filters/header/display-filters/display-filters-selection.tsx b/web/core/components/issues/issue-layouts/filters/header/display-filters/display-filters-selection.tsx index 604b12581f0..cd33525c8e7 100644 --- a/web/core/components/issues/issue-layouts/filters/header/display-filters/display-filters-selection.tsx +++ b/web/core/components/issues/issue-layouts/filters/header/display-filters/display-filters-selection.tsx @@ -1,7 +1,12 @@ import React from "react"; import isEmpty from "lodash/isEmpty"; import { observer } from "mobx-react"; -import { IIssueDisplayFilterOptions, IIssueDisplayProperties, TIssueGroupByOptions } from "@plane/types"; +import { + IIssueDisplayFilterOptions, + IIssueDisplayProperties, + ILayoutDisplayFiltersOptions, + TIssueGroupByOptions, +} from "@plane/types"; // components import { FilterDisplayProperties, @@ -10,8 +15,6 @@ import { FilterOrderBy, FilterSubGroupBy, } from "@/components/issues"; -// types -import { ILayoutDisplayFiltersOptions } from "@/constants/issue"; type Props = { displayFilters: IIssueDisplayFilterOptions | undefined; diff --git a/web/core/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx b/web/core/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx index fb05e7421b7..c45db7f4907 100644 --- a/web/core/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx +++ b/web/core/components/issues/issue-layouts/filters/header/filters/filters-selection.tsx @@ -3,7 +3,13 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { Search, X } from "lucide-react"; // types -import { IIssueDisplayFilterOptions, IIssueFilterOptions, IIssueLabel, IState } from "@plane/types"; +import { + IIssueDisplayFilterOptions, + IIssueFilterOptions, + IIssueLabel, + ILayoutDisplayFiltersOptions, + IState, +} from "@plane/types"; // components import { FilterAssignees, @@ -20,8 +26,6 @@ import { FilterModule, FilterIssueGrouping, } from "@/components/issues"; -// constants -import { ILayoutDisplayFiltersOptions } from "@/constants/issue"; // hooks import { usePlatformOS } from "@/hooks/use-platform-os"; // plane web components diff --git a/web/core/components/issues/issue-layouts/filters/header/layout-selection.tsx b/web/core/components/issues/issue-layouts/filters/header/layout-selection.tsx index 6eb8a0c6ad0..9439eea5dcf 100644 --- a/web/core/components/issues/issue-layouts/filters/header/layout-selection.tsx +++ b/web/core/components/issues/issue-layouts/filters/header/layout-selection.tsx @@ -1,12 +1,13 @@ "use client"; import React from "react"; - +// plane constants +import { EIssueLayoutTypes } from "@plane/constants"; // ui import { Tooltip } from "@plane/ui"; // types // constants -import { EIssueLayoutTypes, ISSUE_LAYOUTS } from "@/constants/issue"; +import { ISSUE_LAYOUTS } from "@/constants/issue"; import { usePlatformOS } from "@/hooks/use-platform-os"; // hooks diff --git a/web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx b/web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx index 5e5ec1db8e2..c0c97a22ac0 100644 --- a/web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx +++ b/web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx @@ -2,7 +2,7 @@ import React, { useCallback, useEffect } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane constants -import { ALL_ISSUES } from "@plane/constants"; +import { ALL_ISSUES, EIssueLayoutTypes, EIssuesStoreType } from "@plane/constants"; import { TIssue } from "@plane/types"; import { setToast, TOAST_TYPE } from "@plane/ui"; // hooks @@ -10,7 +10,6 @@ import { GanttChartRoot, IBlockUpdateData, IssueGanttSidebar } from "@/component import { ETimeLineTypeType, TimeLineTypeContext } from "@/components/gantt-chart/contexts"; import { QuickAddIssueRoot, IssueGanttBlock, GanttQuickAddIssueButton } from "@/components/issues"; //constants -import { EIssueLayoutTypes, EIssuesStoreType } from "@/constants/issue"; // helpers import { renderFormattedPayloadDate } from "@/helpers/date-time.helper"; //hooks diff --git a/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx b/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx index be911f75743..24cf204f992 100644 --- a/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx +++ b/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx @@ -1,4 +1,6 @@ import { observer } from "mobx-react"; +// plane constants +import { EIssueLayoutTypes } from "@plane/constants"; import { CalendarLayoutLoader, GanttLayoutLoader, @@ -6,7 +8,6 @@ import { ListLayoutLoader, SpreadsheetLayoutLoader, } from "@/components/ui"; -import { EIssueLayoutTypes } from "@/constants/issue"; import { useIssues } from "@/hooks/store"; import { useIssueStoreType } from "@/hooks/use-issue-layout-store"; import { IssueLayoutEmptyState } from "./empty-states"; diff --git a/web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx b/web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx index 396b1df0d51..2fc8e1c2394 100644 --- a/web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx +++ b/web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx @@ -6,11 +6,10 @@ import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element import { autoScrollForElements } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element"; import { observer } from "mobx-react"; import { useParams, usePathname } from "next/navigation"; -import { EIssueServiceType } from "@plane/constants"; +import { EIssueLayoutTypes, EIssueServiceType, EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { DeleteIssueModal } from "@/components/issues"; //constants import { ISSUE_DELETED } from "@/constants/event-tracker"; -import { EIssueFilterType, EIssueLayoutTypes, EIssuesStoreType } from "@/constants/issue"; //hooks import { useEventTracker, useIssueDetail, useIssues, useKanbanView, useUserPermissions } from "@/hooks/store"; import { useGroupIssuesDragNDrop } from "@/hooks/use-group-dragndrop"; diff --git a/web/core/components/issues/issue-layouts/kanban/kanban-group.tsx b/web/core/components/issues/issue-layouts/kanban/kanban-group.tsx index 0bee738b6f2..7e1a2f02875 100644 --- a/web/core/components/issues/issue-layouts/kanban/kanban-group.tsx +++ b/web/core/components/issues/issue-layouts/kanban/kanban-group.tsx @@ -5,6 +5,8 @@ import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; import { autoScrollForElements } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element"; import { observer } from "mobx-react"; +// plane constants +import { EIssueLayoutTypes } from "@plane/constants"; //types import { TGroupedIssues, @@ -20,7 +22,7 @@ import { KanbanQuickAddIssueButton, QuickAddIssueRoot } from "@/components/issue import { highlightIssueOnDrop } from "@/components/issues/issue-layouts/utils"; import { KanbanIssueBlockLoader } from "@/components/ui"; // helpers -import { DRAG_ALLOWED_GROUPS, EIssueLayoutTypes } from "@/constants/issue"; +import { DRAG_ALLOWED_GROUPS } from "@/constants/issue"; import { cn } from "@/helpers/common.helper"; // hooks import { useProjectState } from "@/hooks/store"; diff --git a/web/core/components/issues/issue-layouts/kanban/roots/cycle-root.tsx b/web/core/components/issues/issue-layouts/kanban/roots/cycle-root.tsx index 591947978c4..c16e3ec2f3a 100644 --- a/web/core/components/issues/issue-layouts/kanban/roots/cycle-root.tsx +++ b/web/core/components/issues/issue-layouts/kanban/roots/cycle-root.tsx @@ -2,9 +2,9 @@ import React, { useCallback } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // components +import { EIssuesStoreType } from "@plane/constants"; import { CycleIssueQuickActions } from "@/components/issues"; // constants -import { EIssuesStoreType } from "@/constants/issue"; // hooks import { useCycle, useIssues, useUserPermissions } from "@/hooks/store"; import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions"; diff --git a/web/core/components/issues/issue-layouts/kanban/roots/module-root.tsx b/web/core/components/issues/issue-layouts/kanban/roots/module-root.tsx index fb1e360d8ae..0e46fc50567 100644 --- a/web/core/components/issues/issue-layouts/kanban/roots/module-root.tsx +++ b/web/core/components/issues/issue-layouts/kanban/roots/module-root.tsx @@ -2,8 +2,8 @@ import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // hook +import { EIssuesStoreType } from "@plane/constants"; import { ModuleIssueQuickActions } from "@/components/issues"; -import { EIssuesStoreType } from "@/constants/issue"; import { useIssues } from "@/hooks/store"; // components // types diff --git a/web/core/components/issues/issue-layouts/list/base-list-root.tsx b/web/core/components/issues/issue-layouts/list/base-list-root.tsx index ff49ec668ee..68f7d98595f 100644 --- a/web/core/components/issues/issue-layouts/list/base-list-root.tsx +++ b/web/core/components/issues/issue-layouts/list/base-list-root.tsx @@ -1,10 +1,11 @@ import { FC, useCallback, useEffect } from "react"; import { observer } from "mobx-react"; -// types import { useParams } from "next/navigation"; +// plane constants +import { EIssueLayoutTypes, EIssueFilterType, EIssuesStoreType } from "@plane/constants"; +// types import { GroupByColumnTypes, TGroupedIssues, TIssueKanbanFilters } from "@plane/types"; // constants -import { EIssueFilterType, EIssueLayoutTypes, EIssuesStoreType } from "@/constants/issue"; // hooks import { useIssues, useUserPermissions } from "@/hooks/store"; // hooks diff --git a/web/core/components/issues/issue-layouts/list/list-group.tsx b/web/core/components/issues/issue-layouts/list/list-group.tsx index 7e8f3d29128..1e3413662bb 100644 --- a/web/core/components/issues/issue-layouts/list/list-group.tsx +++ b/web/core/components/issues/issue-layouts/list/list-group.tsx @@ -4,8 +4,9 @@ import { MutableRefObject, useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; import { observer } from "mobx-react"; -import { cn } from "@plane/editor"; -// plane packages +// plane constants +import { EIssueLayoutTypes } from "@plane/constants"; +// plane ui import { IGroupByColumn, TIssueMap, @@ -16,10 +17,12 @@ import { TIssueKanbanFilters, } from "@plane/types"; import { Row, setToast, TOAST_TYPE } from "@plane/ui"; +// plane utils +import { cn } from "@plane/utils"; // components import { ListLoaderItemRow } from "@/components/ui"; // constants -import { DRAG_ALLOWED_GROUPS, EIssueLayoutTypes } from "@/constants/issue"; +import { DRAG_ALLOWED_GROUPS } from "@/constants/issue"; // hooks import { useProjectState } from "@/hooks/store"; import { useIntersectionObserver } from "@/hooks/use-intersection-observer"; diff --git a/web/core/components/issues/issue-layouts/list/roots/cycle-root.tsx b/web/core/components/issues/issue-layouts/list/roots/cycle-root.tsx index 12c604ee607..21ab26e7887 100644 --- a/web/core/components/issues/issue-layouts/list/roots/cycle-root.tsx +++ b/web/core/components/issues/issue-layouts/list/roots/cycle-root.tsx @@ -2,9 +2,9 @@ import React, { useCallback } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // components +import { EIssuesStoreType } from "@plane/constants"; import { CycleIssueQuickActions } from "@/components/issues"; // constants -import { EIssuesStoreType } from "@/constants/issue"; // hooks import { useCycle, useIssues, useUserPermissions } from "@/hooks/store"; import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions"; diff --git a/web/core/components/issues/issue-layouts/list/roots/module-root.tsx b/web/core/components/issues/issue-layouts/list/roots/module-root.tsx index 66c5109d1dc..257a6be977f 100644 --- a/web/core/components/issues/issue-layouts/list/roots/module-root.tsx +++ b/web/core/components/issues/issue-layouts/list/roots/module-root.tsx @@ -2,8 +2,8 @@ import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // mobx store +import { EIssuesStoreType } from "@plane/constants"; import { ModuleIssueQuickActions } from "@/components/issues"; -import { EIssuesStoreType } from "@/constants/issue"; import { useIssues } from "@/hooks/store"; // components // types diff --git a/web/core/components/issues/issue-layouts/properties/labels.tsx b/web/core/components/issues/issue-layouts/properties/labels.tsx index 56f9b651bef..697bf376b71 100644 --- a/web/core/components/issues/issue-layouts/properties/labels.tsx +++ b/web/core/components/issues/issue-layouts/properties/labels.tsx @@ -341,11 +341,18 @@ export const IssuePropertyLabels: React.FC{ + if (!query.length) return; handleAddLabel(query); }} - className="text-left text-custom-text-200 cursor-pointer" + className={`text-left text-custom-text-200 ${query.length ? "cursor-pointer" : "cursor-default"}`} > - + Add "{query}" to labels + {query.length ? ( + <> + + Add "{query}" to labels + > + ) : ( + "Type to add a new label" + )}
) : (No matching results.
diff --git a/web/core/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx b/web/core/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx index 9ecbe44d0f0..f7bce8e7219 100644 --- a/web/core/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx +++ b/web/core/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx @@ -6,13 +6,13 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { Copy, ExternalLink, Link, Pencil, Trash2 } from "lucide-react"; // types +import { EIssuesStoreType } from "@plane/constants"; import { TIssue } from "@plane/types"; // ui import { ArchiveIcon, ContextMenu, CustomMenu, TContextMenuItem, TOAST_TYPE, setToast } from "@plane/ui"; // components import { ArchiveIssueModal, CreateUpdateIssueModal, DeleteIssueModal } from "@/components/issues"; // constants -import { EIssuesStoreType } from "@/constants/issue"; import { ARCHIVABLE_STATE_GROUPS } from "@/constants/state"; // helpers import { cn } from "@/helpers/common.helper"; diff --git a/web/core/components/issues/issue-layouts/quick-action-dropdowns/archived-issue.tsx b/web/core/components/issues/issue-layouts/quick-action-dropdowns/archived-issue.tsx index e6349fac818..1428a3f0e52 100644 --- a/web/core/components/issues/issue-layouts/quick-action-dropdowns/archived-issue.tsx +++ b/web/core/components/issues/issue-layouts/quick-action-dropdowns/archived-issue.tsx @@ -6,11 +6,11 @@ import { useParams } from "next/navigation"; // icons import { ArchiveRestoreIcon, ExternalLink, Link, Trash2 } from "lucide-react"; // ui +import { EIssuesStoreType } from "@plane/constants"; import { ContextMenu, CustomMenu, TContextMenuItem, TOAST_TYPE, setToast } from "@plane/ui"; // components import { DeleteIssueModal } from "@/components/issues"; // constants -import { EIssuesStoreType } from "@/constants/issue"; // helpers import { cn } from "@/helpers/common.helper"; import { copyUrlToClipboard } from "@/helpers/string.helper"; diff --git a/web/core/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx b/web/core/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx index 3f455f990ba..dff81f55f2e 100644 --- a/web/core/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx +++ b/web/core/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx @@ -6,13 +6,13 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { Copy, ExternalLink, Link, Pencil, Trash2, XCircle } from "lucide-react"; // types +import { EIssuesStoreType } from "@plane/constants"; import { TIssue } from "@plane/types"; // ui import { ArchiveIcon, ContextMenu, CustomMenu, TContextMenuItem, TOAST_TYPE, setToast } from "@plane/ui"; // components import { ArchiveIssueModal, CreateUpdateIssueModal, DeleteIssueModal } from "@/components/issues"; // constants -import { EIssuesStoreType } from "@/constants/issue"; import { ARCHIVABLE_STATE_GROUPS } from "@/constants/state"; // helpers import { cn } from "@/helpers/common.helper"; diff --git a/web/core/components/issues/issue-layouts/quick-action-dropdowns/draft-issue.tsx b/web/core/components/issues/issue-layouts/quick-action-dropdowns/draft-issue.tsx index d9bc00c5fce..f9fd1ab1c52 100644 --- a/web/core/components/issues/issue-layouts/quick-action-dropdowns/draft-issue.tsx +++ b/web/core/components/issues/issue-layouts/quick-action-dropdowns/draft-issue.tsx @@ -6,13 +6,13 @@ import { observer } from "mobx-react"; // icons import { Pencil, Trash2 } from "lucide-react"; // types +import { EIssuesStoreType } from "@plane/constants"; import { TIssue } from "@plane/types"; // ui import { ContextMenu, CustomMenu, TContextMenuItem } from "@plane/ui"; // components import { CreateUpdateIssueModal, DeleteIssueModal } from "@/components/issues"; // constant -import { EIssuesStoreType } from "@/constants/issue"; // helpers import { cn } from "@/helpers/common.helper"; // hooks diff --git a/web/core/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx b/web/core/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx index c4ce4ce526d..c6c8e691eca 100644 --- a/web/core/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx +++ b/web/core/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx @@ -6,13 +6,13 @@ import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { Copy, ExternalLink, Link, Pencil, Trash2, XCircle } from "lucide-react"; // types +import { EIssuesStoreType } from "@plane/constants"; import { TIssue } from "@plane/types"; // ui import { ArchiveIcon, ContextMenu, CustomMenu, TContextMenuItem, TOAST_TYPE, setToast } from "@plane/ui"; // components import { ArchiveIssueModal, CreateUpdateIssueModal, DeleteIssueModal } from "@/components/issues"; // constants -import { EIssuesStoreType } from "@/constants/issue"; import { ARCHIVABLE_STATE_GROUPS } from "@/constants/state"; // helpers import { cn } from "@/helpers/common.helper"; diff --git a/web/core/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx b/web/core/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx index 378585e4bfc..f9f5c88d7a5 100644 --- a/web/core/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx +++ b/web/core/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx @@ -6,13 +6,13 @@ import { observer } from "mobx-react"; import { useParams, usePathname } from "next/navigation"; import { Copy, ExternalLink, Link, Pencil, Trash2 } from "lucide-react"; // types +import { EIssuesStoreType } from "@plane/constants"; import { TIssue } from "@plane/types"; // ui import { ArchiveIcon, ContextMenu, CustomMenu, TContextMenuItem, TOAST_TYPE, setToast } from "@plane/ui"; // components import { ArchiveIssueModal, CreateUpdateIssueModal, DeleteIssueModal } from "@/components/issues"; // constants -import { EIssuesStoreType } from "@/constants/issue"; import { ARCHIVABLE_STATE_GROUPS } from "@/constants/state"; // helpers import { cn } from "@/helpers/common.helper"; diff --git a/web/core/components/issues/issue-layouts/quick-add/root.tsx b/web/core/components/issues/issue-layouts/quick-add/root.tsx index 4cdf2e8c092..61575fb23b3 100644 --- a/web/core/components/issues/issue-layouts/quick-add/root.tsx +++ b/web/core/components/issues/issue-layouts/quick-add/root.tsx @@ -5,6 +5,8 @@ import { observer } from "mobx-react"; import { useParams, usePathname } from "next/navigation"; import { useForm, UseFormRegister } from "react-hook-form"; import { PlusIcon } from "lucide-react"; +// plane constants +import { EIssueLayoutTypes } from "@plane/constants"; // types import { IProject, TIssue } from "@plane/types"; // ui @@ -13,7 +15,6 @@ import { setPromiseToast } from "@plane/ui"; import { CreateIssueToastActionItems } from "@/components/issues"; // constants import { ISSUE_CREATED } from "@/constants/event-tracker"; -import { EIssueLayoutTypes } from "@/constants/issue"; // helpers import { cn } from "@/helpers/common.helper"; import { createIssuePayload } from "@/helpers/issue.helper"; diff --git a/web/core/components/issues/issue-layouts/roots/all-issue-layout-root.tsx b/web/core/components/issues/issue-layouts/roots/all-issue-layout-root.tsx index d9d6e45f9f6..25d529e93e6 100644 --- a/web/core/components/issues/issue-layouts/roots/all-issue-layout-root.tsx +++ b/web/core/components/issues/issue-layouts/roots/all-issue-layout-root.tsx @@ -4,7 +4,7 @@ import { observer } from "mobx-react"; import { useParams, useSearchParams } from "next/navigation"; import useSWR from "swr"; // plane constants -import { ALL_ISSUES } from "@plane/constants"; +import { ALL_ISSUES, EIssueLayoutTypes, EIssueFilterType, EIssuesStoreType } from "@plane/constants"; import { IIssueDisplayFilterOptions } from "@plane/types"; // hooks // components @@ -13,12 +13,7 @@ import { SpreadsheetView } from "@/components/issues/issue-layouts"; import { AllIssueQuickActions } from "@/components/issues/issue-layouts/quick-action-dropdowns"; import { SpreadsheetLayoutLoader } from "@/components/ui"; // constants -import { - EIssueFilterType, - EIssueLayoutTypes, - EIssuesStoreType, - ISSUE_DISPLAY_FILTERS_BY_LAYOUT, -} from "@/constants/issue"; +import { ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue"; // hooks import { useGlobalView, useIssues, useUserPermissions } from "@/hooks/store"; import { useAppRouter } from "@/hooks/use-app-router"; diff --git a/web/core/components/issues/issue-layouts/roots/archived-issue-layout-root.tsx b/web/core/components/issues/issue-layouts/roots/archived-issue-layout-root.tsx index 7e94dbfbe99..86f299ef280 100644 --- a/web/core/components/issues/issue-layouts/roots/archived-issue-layout-root.tsx +++ b/web/core/components/issues/issue-layouts/roots/archived-issue-layout-root.tsx @@ -4,9 +4,9 @@ import { useParams } from "next/navigation"; import useSWR from "swr"; // mobx store // components +import { EIssuesStoreType } from "@plane/constants"; import { LogoSpinner } from "@/components/common"; import { ArchivedIssueListLayout, ArchivedIssueAppliedFiltersRoot, IssuePeekOverview } from "@/components/issues"; -import { EIssuesStoreType } from "@/constants/issue"; // ui import { useIssues } from "@/hooks/store"; import { IssuesStoreContext } from "@/hooks/use-issue-layout-store"; diff --git a/web/core/components/issues/issue-layouts/roots/cycle-layout-root.tsx b/web/core/components/issues/issue-layouts/roots/cycle-layout-root.tsx index 1b69156ba11..8d35494e4a1 100644 --- a/web/core/components/issues/issue-layouts/roots/cycle-layout-root.tsx +++ b/web/core/components/issues/issue-layouts/roots/cycle-layout-root.tsx @@ -3,7 +3,8 @@ import isEmpty from "lodash/isEmpty"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import useSWR from "swr"; -// hooks +// plane constants +import { EIssueLayoutTypes, EIssuesStoreType } from "@plane/constants"; // components import { LogoSpinner } from "@/components/common"; import { TransferIssues, TransferIssuesModal } from "@/components/cycles"; @@ -17,7 +18,6 @@ import { IssuePeekOverview, } from "@/components/issues"; // constants -import { EIssueLayoutTypes, EIssuesStoreType } from "@/constants/issue"; // hooks import { useCycle, useIssues } from "@/hooks/store"; import { IssuesStoreContext } from "@/hooks/use-issue-layout-store"; diff --git a/web/core/components/issues/issue-layouts/roots/draft-issue-layout-root.tsx b/web/core/components/issues/issue-layouts/roots/draft-issue-layout-root.tsx index c13ff104e16..13597c5789b 100644 --- a/web/core/components/issues/issue-layouts/roots/draft-issue-layout-root.tsx +++ b/web/core/components/issues/issue-layouts/roots/draft-issue-layout-root.tsx @@ -2,9 +2,11 @@ import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import useSWR from "swr"; +// plane constants +import { EIssueLayoutTypes, EIssuesStoreType } from "@plane/constants"; +// components import { LogoSpinner } from "@/components/common"; import { IssuePeekOverview } from "@/components/issues/peek-overview"; -import { EIssueLayoutTypes, EIssuesStoreType } from "@/constants/issue"; // hooks import { useIssues } from "@/hooks/store"; import { IssuesStoreContext } from "@/hooks/use-issue-layout-store"; diff --git a/web/core/components/issues/issue-layouts/roots/module-layout-root.tsx b/web/core/components/issues/issue-layouts/roots/module-layout-root.tsx index b4eb7c464cd..f64f28cc755 100644 --- a/web/core/components/issues/issue-layouts/roots/module-layout-root.tsx +++ b/web/core/components/issues/issue-layouts/roots/module-layout-root.tsx @@ -2,7 +2,8 @@ import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import useSWR from "swr"; -// mobx store +// plane constants +import { EIssueLayoutTypes, EIssuesStoreType } from "@plane/constants"; // components import { Row, ERowVariant } from "@plane/ui"; import { LogoSpinner } from "@/components/common"; @@ -16,7 +17,6 @@ import { ModuleSpreadsheetLayout, } from "@/components/issues"; // constants -import { EIssueLayoutTypes, EIssuesStoreType } from "@/constants/issue"; import { useIssues } from "@/hooks/store"; import { IssuesStoreContext } from "@/hooks/use-issue-layout-store"; // types diff --git a/web/core/components/issues/issue-layouts/roots/project-layout-root.tsx b/web/core/components/issues/issue-layouts/roots/project-layout-root.tsx index 853f13dd4f2..4007468dc20 100644 --- a/web/core/components/issues/issue-layouts/roots/project-layout-root.tsx +++ b/web/core/components/issues/issue-layouts/roots/project-layout-root.tsx @@ -4,6 +4,8 @@ import { FC, Fragment } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import useSWR from "swr"; +// plane constants +import { EIssueLayoutTypes, EIssuesStoreType } from "@plane/constants"; // components import { Spinner } from "@plane/ui"; import { LogoSpinner } from "@/components/common"; @@ -16,8 +18,6 @@ import { ProjectSpreadsheetLayout, IssuePeekOverview, } from "@/components/issues"; -// constants -import { EIssueLayoutTypes, EIssuesStoreType } from "@/constants/issue"; // hooks import { useIssues } from "@/hooks/store"; import { IssuesStoreContext } from "@/hooks/use-issue-layout-store"; diff --git a/web/core/components/issues/issue-layouts/roots/project-view-layout-root.tsx b/web/core/components/issues/issue-layouts/roots/project-view-layout-root.tsx index 8c84417578d..fd0a54a3191 100644 --- a/web/core/components/issues/issue-layouts/roots/project-view-layout-root.tsx +++ b/web/core/components/issues/issue-layouts/roots/project-view-layout-root.tsx @@ -2,7 +2,8 @@ import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import useSWR from "swr"; -// mobx store +// plane constants +import { EIssueLayoutTypes, EIssuesStoreType } from "@plane/constants"; // components import { LogoSpinner } from "@/components/common"; import { @@ -14,8 +15,6 @@ import { ProjectViewListLayout, ProjectViewSpreadsheetLayout, } from "@/components/issues"; -// constants -import { EIssueLayoutTypes, EIssuesStoreType } from "@/constants/issue"; import { useIssues } from "@/hooks/store"; import { IssuesStoreContext } from "@/hooks/use-issue-layout-store"; // types diff --git a/web/core/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx b/web/core/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx index b7bd6d9f134..5a681fd8330 100644 --- a/web/core/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx +++ b/web/core/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx @@ -2,11 +2,9 @@ import { FC, useCallback, useEffect } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane constants -import { ALL_ISSUES } from "@plane/constants"; +import { ALL_ISSUES, EIssueLayoutTypes, EIssuesStoreType, EIssueFilterType } from "@plane/constants"; import { IIssueDisplayFilterOptions } from "@plane/types"; // hooks -import { EIssueFilterType, EIssueLayoutTypes, EIssuesStoreType } from "@/constants/issue"; -// hooks import { useIssues, useUserPermissions } from "@/hooks/store"; import { useIssueStoreType } from "@/hooks/use-issue-layout-store"; import { useIssuesActions } from "@/hooks/use-issues-actions"; diff --git a/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx b/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx index 26c7881112d..6d70b923f27 100644 --- a/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx +++ b/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx @@ -1,13 +1,13 @@ import React, { useRef } from "react"; import { observer } from "mobx-react"; +// plane constants +import { EIssueLayoutTypes } from "@plane/constants"; // types import { TIssue, IIssueDisplayFilterOptions, IIssueDisplayProperties } from "@plane/types"; // components import { LogoSpinner } from "@/components/common"; import { MultipleSelectGroup } from "@/components/core"; import { QuickAddIssueRoot, SpreadsheetAddIssueButton } from "@/components/issues"; -// constants -import { EIssueLayoutTypes } from "@/constants/issue"; import { SPREADSHEET_PROPERTY_LIST, SPREADSHEET_SELECT_GROUP } from "@/constants/spreadsheet"; // hooks import { useProject } from "@/hooks/store"; diff --git a/web/core/components/issues/issue-layouts/utils.tsx b/web/core/components/issues/issue-layouts/utils.tsx index 2cb20814cee..3e7d72b1bd0 100644 --- a/web/core/components/issues/issue-layouts/utils.tsx +++ b/web/core/components/issues/issue-layouts/utils.tsx @@ -11,6 +11,7 @@ import uniq from "lodash/uniq"; import scrollIntoView from "smooth-scroll-into-view-if-needed"; import { ContrastIcon } from "lucide-react"; // plane types +import { EIssuesStoreType } from "@plane/constants"; import { GroupByColumnTypes, IGroupByColumn, @@ -30,7 +31,7 @@ import { Avatar, CycleGroupIcon, DiceIcon, PriorityIcon, StateGroupIcon } from " // components import { Logo } from "@/components/common"; // constants -import { ISSUE_PRIORITIES, EIssuesStoreType } from "@/constants/issue"; +import { ISSUE_PRIORITIES } from "@/constants/issue"; import { STATE_GROUPS } from "@/constants/state"; // helpers import { renderFormattedDate } from "@/helpers/date-time.helper"; diff --git a/web/core/components/issues/issue-modal/base.tsx b/web/core/components/issues/issue-modal/base.tsx index 2a9d4abe1ce..116b22e77b5 100644 --- a/web/core/components/issues/issue-modal/base.tsx +++ b/web/core/components/issues/issue-modal/base.tsx @@ -4,13 +4,13 @@ import React, { useEffect, useRef, useState } from "react"; import { observer } from "mobx-react"; import { useParams, usePathname } from "next/navigation"; // types +import { EIssuesStoreType } from "@plane/constants"; import type { TBaseIssue, TIssue } from "@plane/types"; // ui import { EModalPosition, EModalWidth, ModalCore, TOAST_TYPE, setToast } from "@plane/ui"; import { CreateIssueToastActionItems, IssuesModalProps } from "@/components/issues"; // constants import { ISSUE_CREATED, ISSUE_UPDATED } from "@/constants/event-tracker"; -import { EIssuesStoreType } from "@/constants/issue"; // hooks import { useIssueModal } from "@/hooks/context/use-issue-modal"; import { useEventTracker, useCycle, useIssues, useModule, useIssueDetail, useUser } from "@/hooks/store"; @@ -187,19 +187,21 @@ export const CreateUpdateIssueModalBase: React.FC