fix: build errors

This commit is contained in:
LAKHAN BAHETI 2024-04-29 14:32:05 +05:30
parent b7fd5706f4
commit 9b3f1a10a7
66 changed files with 143 additions and 150 deletions

View File

@ -2,13 +2,14 @@ import { useState, Fragment, FC } from "react";
import { useRouter } from "next/router";
import { mutate } from "swr";
import { Dialog, Transition } from "@headlessui/react";
// hooks
import { useEventTracker } from "hooks/store";
import { IApiToken } from "@plane/types";
// services
import { Button, TOAST_TYPE, setToast } from "@plane/ui";
import { API_TOKEN_DELETED } from "@/constants/event-tracker";
import { API_TOKENS_LIST } from "@/constants/fetch-keys";
import { APITokenService } from "@/services/api_token.service";
// hooks
import { useEventTracker } from "hooks/store";
// ui
// types
// fetch-keys

View File

@ -2,18 +2,18 @@ import React, { useState } from "react";
import { useRouter } from "next/router";
import { mutate } from "swr";
import { Dialog, Transition } from "@headlessui/react";
// hooks
import { useEventTracker } from "hooks/store";
import { IApiToken } from "@plane/types";
// services
import { TOAST_TYPE, setToast } from "@plane/ui";
import { TOAST_TYPE, setToast } from "@plane/ui";
import { CreateApiTokenForm, GeneratedTokenDetails } from "@/components/api-token";
// constants
import { API_TOKEN_CREATED } from "constants/event-tracker";
import { API_TOKEN_CREATED } from "@/constants/event-tracker";
import { API_TOKENS_LIST } from "@/constants/fetch-keys";
import { renderFormattedDate } from "@/helpers/date-time.helper";
import { csvDownload } from "@/helpers/download.helper";
// hooks
import { useEventTracker } from "@/hooks/store";
// services
import { APITokenService } from "@/services/api_token.service";
// ui
// components

View File

@ -8,7 +8,7 @@ import { CustomSelect, Loader, ToggleSwitch } from "@plane/ui";
import { SelectMonthModal } from "@/components/automation";
// icon
// constants
import { AUTO_ARCHIVE_TOGGLED, AUTO_ARCHIVE_UPDATED } from "constants/event-tracker";
import { AUTO_ARCHIVE_TOGGLED, AUTO_ARCHIVE_UPDATED } from "@/constants/event-tracker";
import { EUserProjectRoles, PROJECT_AUTOMATION_MONTHS } from "@/constants/project";
import { useEventTracker, useProject, useUser } from "@/hooks/store";
// types

View File

@ -6,7 +6,7 @@ import { IProject } from "@plane/types";
import { CustomSelect, CustomSearchSelect, ToggleSwitch, StateGroupIcon, DoubleCircleIcon, Loader } from "@plane/ui";
import { SelectMonthModal } from "@/components/automation";
// constants
import { AUTO_CLOSE_Toggled, AUTO_CLOSE_UPDATED } from "constants/event-tracker";
import { AUTO_CLOSE_Toggled, AUTO_CLOSE_UPDATED } from "@/constants/event-tracker";
import { EUserProjectRoles, PROJECT_AUTOMATION_MONTHS } from "@/constants/project";
import { useEventTracker, useProject, useProjectState, useUser } from "@/hooks/store";
// component

View File

@ -1,9 +1,9 @@
import { Command } from "cmdk";
import { ContrastIcon, FileText } from "lucide-react";
// constants
import { E_COMMAND_PALETTE } from "constants/event-tracker";
// hooks
import { DiceIcon, PhotoFilterIcon } from "@plane/ui";
// constants
import { E_COMMAND_PALETTE } from "@/constants/event-tracker";
// hooks
import { useApplication, useEventTracker } from "@/hooks/store";
// ui

View File

@ -21,7 +21,9 @@ import {
CommandPaletteSearchResults,
} from "@/components/command-palette";
import { EmptyState } from "@/components/empty-state";
// constants
import { EmptyStateType } from "@/constants/empty-state";
import { E_COMMAND_PALETTE } from "@/constants/event-tracker";
import { ISSUE_DETAILS } from "@/constants/fetch-keys";
import { useApplication, useEventTracker, useProject } from "@/hooks/store";
import useDebounce from "@/hooks/use-debounce";
@ -33,8 +35,6 @@ import { WorkspaceService } from "@/services/workspace.service";
// components
// types
// fetch-keys
// constants
import { E_COMMAND_PALETTE } from "constants/event-tracker";
const workspaceService = new WorkspaceService();
const issueService = new IssueService();

View File

@ -18,7 +18,7 @@ import { CreateUpdateProjectViewModal } from "@/components/views";
// helpers
// services
// fetch keys
import { E_SHORTCUT_KEY } from "constants/event-tracker";
import { E_SHORTCUT_KEY } from "@/constants/event-tracker";
import { ISSUE_DETAILS } from "@/constants/fetch-keys";
import { EIssuesStoreType } from "@/constants/issue";
import { EUserProjectRoles } from "@/constants/project";

View File

@ -19,10 +19,10 @@ import {
UsersIcon,
Inbox,
} from "lucide-react";
// constants
import { ISSUE_OPENED, elementFromPath } from "constants/event-tracker";
import { IIssueActivity } from "@plane/types";
import { Tooltip, BlockedIcon, BlockerIcon, RelatedIcon, LayersIcon, DiceIcon } from "@plane/ui";
// constants
import { ISSUE_OPENED, elementFromPath } from "@/constants/event-tracker";
// helpers
import { renderFormattedDate } from "@/helpers/date-time.helper";
import { capitalizeFirstLetter } from "@/helpers/string.helper";

View File

@ -8,7 +8,7 @@ import { Avatar, AvatarGroup, setPromiseToast } from "@plane/ui";
import { FavoriteStar } from "@/components/core";
import { CycleQuickActions } from "@/components/cycles";
// constants
import { CYCLE_FAVORITED, CYCLE_UNFAVORITED, E_LIST_LAYOUT } from "constants/event-tracker";
import { CYCLE_FAVORITED, CYCLE_UNFAVORITED, E_LIST_LAYOUT } from "@/constants/event-tracker";
// helpers
import { renderFormattedDate } from "@/helpers/date-time.helper";
// hooks

View File

@ -12,7 +12,7 @@ import { FavoriteStar } from "@/components/core";
import { CycleQuickActions } from "@/components/cycles";
// constants
import { CYCLE_STATUS } from "@/constants/cycle";
import { CYCLE_FAVORITED, CYCLE_UNFAVORITED, E_GRID_LAYOUT } from "constants/event-tracker";
import { CYCLE_FAVORITED, CYCLE_UNFAVORITED, E_GRID_LAYOUT } from "@/constants/event-tracker";
import { EUserWorkspaceRoles } from "@/constants/workspace";
// helpers
import { findHowManyDaysLeft, getDate, renderFormattedDate } from "@/helpers/date-time.helper";

View File

@ -13,7 +13,7 @@ import { FavoriteStar } from "@/components/core";
import { CycleQuickActions } from "@/components/cycles";
// constants
import { CYCLE_STATUS } from "@/constants/cycle";
import { CYCLE_FAVORITED, CYCLE_UNFAVORITED, E_LIST_LAYOUT } from "constants/event-tracker";
import { CYCLE_FAVORITED, CYCLE_UNFAVORITED, E_LIST_LAYOUT } from "@/constants/event-tracker";
import { EUserProjectRoles } from "@/constants/project";
// helpers
import { findHowManyDaysLeft, getDate, renderFormattedDate } from "@/helpers/date-time.helper";

View File

@ -8,7 +8,7 @@ import { ArchiveIcon, CustomMenu, TOAST_TYPE, setToast } from "@plane/ui";
// components
import { ArchiveCycleModal, CycleCreateUpdateModal, CycleDeleteModal } from "@/components/cycles";
// constants
import { E_CYCLES_LIST_LAYOUT } from "constants/event-tracker";
import { E_CYCLES_LIST_LAYOUT } from "@/constants/event-tracker";
import { EUserProjectRoles } from "@/constants/project";
// helpers
import { copyUrlToClipboard } from "@/helpers/string.helper";

View File

@ -2,13 +2,13 @@ import { observer } from "mobx-react-lite";
import Image from "next/image";
// hooks
import { Button } from "@plane/ui";
// constants
import { E_PROJECT_EMPTY_STATE } from "@/constants/event-tracker";
import { EUserWorkspaceRoles } from "@/constants/workspace";
import { useApplication, useEventTracker, useUser } from "@/hooks/store";
// ui
// assets
import ProjectEmptyStateImage from "public/empty-state/dashboard/project.svg";
// constants
import { E_PROJECT_EMPTY_STATE } from "constants/event-tracker";
export const DashboardProjectEmptyState = observer(() => {
// store hooks

View File

@ -15,7 +15,7 @@ import {
IssueListItemProps,
} from "@/components/dashboard/widgets";
// constants
import { E_DASHBOARD, ISSUE_OPENED } from "constants/event-tracker";
import { E_DASHBOARD, ISSUE_OPENED } from "@/constants/event-tracker";
// ui
// helpers
import { cn } from "@/helpers/common.helper";

View File

@ -7,15 +7,15 @@ import { TRecentProjectsWidgetResponse } from "@plane/types";
import { Avatar, AvatarGroup } from "@plane/ui";
import { WidgetLoader, WidgetProps } from "@/components/dashboard/widgets";
import { ProjectLogo } from "@/components/project";
// constants
import { PROJECT_BACKGROUND_COLORS } from "@/constants/dashboard";
import { E_SIDEBAR } from "@/constants/event-tracker";
import { EUserWorkspaceRoles } from "@/constants/workspace";
import { useApplication, useEventTracker, useDashboard, useProject, useUser } from "@/hooks/store";
// components
// ui
// helpers
// types
// constants
import { E_SIDEBAR } from "constants/event-tracker";
const WIDGET_KEY = "recent_projects";

View File

@ -7,7 +7,7 @@ import { IEstimate, IEstimateFormData } from "@plane/types";
// store hooks
import { Button, Input, TextArea, TOAST_TYPE, setToast } from "@plane/ui";
// constants
import { ESTIMATE_CREATED, ESTIMATE_UPDATED } from "constants/event-tracker";
import { ESTIMATE_CREATED, ESTIMATE_UPDATED } from "@/constants/event-tracker";
import { checkDuplicates } from "@/helpers/array.helper";
import { useEstimate, useEventTracker } from "@/hooks/store";
// ui

View File

@ -6,11 +6,11 @@ import { Dialog, Transition } from "@headlessui/react";
import { IEstimate } from "@plane/types";
// store hooks
import { Button, TOAST_TYPE, setToast } from "@plane/ui";
import { useEstimate, useEventTracker } from "hooks/store";
// constants
import { ESTIMATE_DELETED } from "@/constants/event-tracker";
import { useEstimate, useEventTracker } from "@/hooks/store";
// types
// ui
// constants
import { ESTIMATE_DELETED } from "constants/event-tracker";
type Props = {
isOpen: boolean;

View File

@ -6,7 +6,7 @@ import { Pencil, Trash2 } from "lucide-react";
import { IEstimate } from "@plane/types";
import { Button, CustomMenu, TOAST_TYPE, setToast } from "@plane/ui";
// constants
import { ESTIMATE_USED } from "constants/event-tracker";
import { ESTIMATE_USED } from "@/constants/event-tracker";
import { orderArrayBy } from "@/helpers/array.helper";
import { useProject, useEventTracker } from "@/hooks/store";
// ui

View File

@ -7,14 +7,14 @@ import { Button, Loader, TOAST_TYPE, setToast } from "@plane/ui";
import { EmptyState } from "@/components/empty-state";
import { CreateUpdateEstimateModal, DeleteEstimateModal, EstimateListItem } from "@/components/estimates";
import { EmptyStateType } from "@/constants/empty-state";
// constants
import { ESTIMATE_DISABLED } from "@/constants/event-tracker";
import { orderArrayBy } from "@/helpers/array.helper";
import { useEstimate, useProject, useEventTracker } from "@/hooks/store";
// components
// ui
// types
// helpers
// constants
import { ESTIMATE_DISABLED } from "constants/event-tracker";
export const EstimatesList: React.FC = observer(() => {
// states

View File

@ -5,13 +5,12 @@ import { Dialog, Transition } from "@headlessui/react";
import { IUser, IImporterService } from "@plane/types";
// hooks
import { Button, CustomSearchSelect, TOAST_TYPE, setToast } from "@plane/ui";
import { useEventTracker, useProject } from "hooks/store";
// constants
import { ISSUES_EXPORTED } from "@/constants/event-tracker";
import { useEventTracker, useProject } from "@/hooks/store";
// services
import { ProjectExportService } from "@/services/project";
// ui
// constants
import { ISSUES_EXPORTED } from "constants/event-tracker";
type Props = {
isOpen: boolean;

View File

@ -11,6 +11,18 @@ import { ProjectAnalyticsModal } from "@/components/analytics";
import { BreadcrumbLink } from "@/components/common";
import { DisplayFiltersSelection, FiltersDropdown, FilterSelection, LayoutSelection } from "@/components/issues";
import { ProjectLogo } from "@/components/project";
// constants
import {
DP_APPLIED,
DP_REMOVED,
E_CYCLE_ISSUES,
elementFromPath,
FILTER_APPLIED,
FILTER_REMOVED,
FILTER_SEARCHED,
LAYOUT_CHANGED,
LP_UPDATED,
} from "@/constants/event-tracker";
import { EIssueFilterType, EIssuesStoreType, ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue";
import { EUserProjectRoles } from "@/constants/project";
import { cn } from "@/helpers/common.helper";
@ -32,18 +44,6 @@ import useLocalStorage from "@/hooks/use-local-storage";
// helpers
// types
import { usePlatformOS } from "@/hooks/use-platform-os";
// constants
import {
DP_APPLIED,
DP_REMOVED,
E_CYCLE_ISSUES,
elementFromPath,
FILTER_APPLIED,
FILTER_REMOVED,
FILTER_SEARCHED,
LAYOUT_CHANGED,
LP_UPDATED,
} from "constants/event-tracker";
const CycleDropdownOption: React.FC<{ cycleId: string }> = ({ cycleId }) => {
// router
@ -274,9 +274,7 @@ export const CycleIssuesHeader: React.FC = observer(() => {
className="ml-1.5 flex-shrink-0 truncate"
placement="bottom-start"
>
{currentProjectCycleIds?.map((cycleId) => (
<CycleDropdownOption key={cycleId} cycleId={cycleId} />
))}
{currentProjectCycleIds?.map((cycleId) => <CycleDropdownOption key={cycleId} cycleId={cycleId} />)}
</CustomMenu>
}
/>

View File

@ -10,7 +10,7 @@ import { Breadcrumbs, Button, ContrastIcon } from "@plane/ui";
import { BreadcrumbLink } from "@/components/common";
import { ProjectLogo } from "@/components/project";
// constants
import { E_CYCLES } from "constants/event-tracker";
import { E_CYCLES } from "@/constants/event-tracker";
import { EUserProjectRoles } from "@/constants/project";
import { useApplication, useEventTracker, useProject, useUser } from "@/hooks/store";

View File

@ -21,7 +21,7 @@ import {
FILTER_REMOVED,
FILTER_SEARCHED,
LP_UPDATED,
} from "constants/event-tracker";
} from "@/constants/event-tracker";
import { EIssueFilterType, EIssuesStoreType, ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue";
import { EUserWorkspaceRoles } from "@/constants/workspace";
import { useLabel, useMember, useUser, useIssues, useEventTracker } from "@/hooks/store";

View File

@ -10,6 +10,18 @@ import { ProjectAnalyticsModal } from "@/components/analytics";
import { BreadcrumbLink } from "@/components/common";
import { DisplayFiltersSelection, FiltersDropdown, FilterSelection, LayoutSelection } from "@/components/issues";
import { ProjectLogo } from "@/components/project";
// constants
import {
DP_APPLIED,
DP_REMOVED,
E_MODULE_ISSUES,
elementFromPath,
FILTER_APPLIED,
FILTER_REMOVED,
FILTER_SEARCHED,
LAYOUT_CHANGED,
LP_UPDATED,
} from "@/constants/event-tracker";
import { EIssuesStoreType, EIssueFilterType, ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue";
import { EUserProjectRoles } from "@/constants/project";
import { cn } from "@/helpers/common.helper";
@ -33,18 +45,6 @@ import useLocalStorage from "@/hooks/use-local-storage";
// helpers
// types
import { usePlatformOS } from "@/hooks/use-platform-os";
// constants
import {
DP_APPLIED,
DP_REMOVED,
E_MODULE_ISSUES,
elementFromPath,
FILTER_APPLIED,
FILTER_REMOVED,
FILTER_SEARCHED,
LAYOUT_CHANGED,
LP_UPDATED,
} from "constants/event-tracker";
const ModuleDropdownOption: React.FC<{ moduleId: string }> = ({ moduleId }) => {
// router
@ -273,9 +273,7 @@ export const ModuleIssuesHeader: React.FC = observer(() => {
className="ml-1.5 flex-shrink-0"
placement="bottom-start"
>
{projectModuleIds?.map((moduleId) => (
<ModuleDropdownOption key={moduleId} moduleId={moduleId} />
))}
{projectModuleIds?.map((moduleId) => <ModuleDropdownOption key={moduleId} moduleId={moduleId} />)}
</CustomMenu>
}
/>

View File

@ -9,7 +9,7 @@ import { BreadcrumbLink } from "@/components/common";
import { FiltersDropdown } from "@/components/issues";
import { ModuleFiltersSelection, ModuleOrderByDropdown } from "@/components/modules";
import { ProjectLogo } from "@/components/project";
import { E_MODULES } from "constants/event-tracker";
import { E_MODULES } from "@/constants/event-tracker";
import { MODULE_VIEW_LAYOUTS } from "@/constants/module";
import { EUserProjectRoles } from "@/constants/project";
import { cn } from "@/helpers/common.helper";

View File

@ -6,8 +6,8 @@ import { FileText, Plus } from "lucide-react";
import { Breadcrumbs, Button } from "@plane/ui";
// helpers
import { BreadcrumbLink } from "@/components/common";
import { E_PAGES } from "constants/event-tracker";
import { ProjectLogo } from "@/components/project";
import { E_PAGES } from "@/constants/event-tracker";
import { EUserProjectRoles } from "@/constants/project";
// constants
// components

View File

@ -9,6 +9,18 @@ import { ProjectAnalyticsModal } from "@/components/analytics";
import { BreadcrumbLink } from "@/components/common";
import { DisplayFiltersSelection, FiltersDropdown, FilterSelection, LayoutSelection } from "@/components/issues";
import { ProjectLogo } from "@/components/project";
// constants
import {
DP_APPLIED,
DP_REMOVED,
E_PROJECT_ISSUES,
elementFromPath,
FILTER_APPLIED,
FILTER_REMOVED,
FILTER_SEARCHED,
LAYOUT_CHANGED,
LP_UPDATED,
} from "@/constants/event-tracker";
import { EIssueFilterType, EIssuesStoreType, ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue";
import { EUserProjectRoles } from "@/constants/project";
import {
@ -25,18 +37,6 @@ import { useIssues } from "@/hooks/store/use-issues";
// ui
// types
import { usePlatformOS } from "@/hooks/use-platform-os";
// constants
import {
DP_APPLIED,
DP_REMOVED,
E_PROJECT_ISSUES,
elementFromPath,
FILTER_APPLIED,
FILTER_REMOVED,
FILTER_SEARCHED,
LAYOUT_CHANGED,
LP_UPDATED,
} from "constants/event-tracker";
// helper
export const ProjectIssuesHeader: React.FC = observer(() => {

View File

@ -24,7 +24,7 @@ import {
FILTER_SEARCHED,
LAYOUT_CHANGED,
LP_UPDATED,
} from "constants/event-tracker";
} from "@/constants/event-tracker";
import { EIssuesStoreType, EIssueFilterType, ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@/constants/issue";
import { EUserProjectRoles } from "@/constants/project";
import { truncateText } from "@/helpers/string.helper";

View File

@ -7,7 +7,7 @@ import { Breadcrumbs, PhotoFilterIcon, Button } from "@plane/ui";
import { BreadcrumbLink } from "@/components/common";
// helpers
import { ProjectLogo } from "@/components/project";
import { E_VIEWS } from "constants/event-tracker";
import { E_VIEWS } from "@/constants/event-tracker";
import { EUserProjectRoles } from "@/constants/project";
// constants
import { useApplication, useProject, useUser, useEventTracker } from "@/hooks/store";

View File

@ -11,7 +11,7 @@ import { BreadcrumbLink } from "@/components/common";
// constants
import { FiltersDropdown } from "@/components/issues";
import { ProjectFiltersSelection, ProjectOrderByDropdown } from "@/components/project";
import { E_PROJECTS } from "constants/event-tracker";
import { E_PROJECTS } from "@/constants/event-tracker";
import { EUserWorkspaceRoles } from "@/constants/workspace";
import { cn } from "@/helpers/common.helper";
import { useApplication, useEventTracker, useMember, useProjectFilter, useUser } from "@/hooks/store";

View File

@ -89,7 +89,7 @@ export const InboxIssueMainContent: React.FC<Props> = observer((props) => {
changed_property: Object.keys(data).join(","),
change_details: Object.values(data).join(","),
},
path: router.asPath,
routePath: router.asPath,
});
} catch (error) {
setToast({
@ -104,7 +104,7 @@ export const InboxIssueMainContent: React.FC<Props> = observer((props) => {
changed_property: Object.keys(data).join(","),
change_details: Object.values(data).join(","),
},
path: router.asPath,
routePath: router.asPath,
});
}
},

View File

@ -88,7 +88,7 @@ export const InboxIssueCreateRoot: FC<TInboxIssueCreateRoot> = observer((props)
state: "SUCCESS",
element: "Inbox page",
},
path: router.pathname,
routePath: router.pathname,
});
setToast({
type: TOAST_TYPE.SUCCESS,
@ -105,7 +105,7 @@ export const InboxIssueCreateRoot: FC<TInboxIssueCreateRoot> = observer((props)
state: "FAILED",
element: "Inbox page",
},
path: router.pathname,
routePath: router.pathname,
});
setToast({
type: TOAST_TYPE.ERROR,

View File

@ -91,7 +91,7 @@ export const InboxIssueEditRoot: FC<TInboxIssueEditRoot> = observer((props) => {
state: "SUCCESS",
element: "Inbox page",
},
path: router.pathname,
routePath: router.pathname,
});
setToast({
type: TOAST_TYPE.SUCCESS,
@ -110,7 +110,7 @@ export const InboxIssueEditRoot: FC<TInboxIssueEditRoot> = observer((props) => {
state: "FAILED",
element: "Inbox page",
},
path: router.pathname,
routePath: router.pathname,
});
setToast({
type: TOAST_TYPE.ERROR,

View File

@ -13,7 +13,7 @@ import { Button, Input, ToggleSwitch, TOAST_TYPE, setToast } from "@plane/ui";
import { GptAssistantPopover } from "@/components/core";
import { PriorityDropdown } from "@/components/dropdowns";
import { RichTextEditor } from "@/components/editor/rich-text-editor/rich-text-editor";
import { E_INBOX, ISSUE_CREATED } from "constants/event-tracker";
import { E_INBOX, ISSUE_CREATED } from "@/constants/event-tracker";
import { useApplication, useEventTracker, useWorkspace, useProjectInbox } from "@/hooks/store";
// services
import { AIService } from "@/services/ai.service";

View File

@ -22,12 +22,12 @@ import {
} from "@/components/integration";
// icons
// images
import { GITHUB_ISSUES_IMPORTED } from "constants/event-tracker";
import { GITHUB_ISSUES_IMPORTED } from "@/constants/event-tracker";
import { APP_INTEGRATIONS, IMPORTER_SERVICES_LIST, WORKSPACE_INTEGRATIONS } from "@/constants/fetch-keys";
// hooks
import { useEventTracker } from "@/hooks/store";
import { IntegrationService, GithubIntegrationService } from "@/services/integrations";
import GithubLogo from "public/services/github.png";
// hooks
import { useEventTracker } from "hooks/store";
// components
// icons
// images

View File

@ -8,7 +8,7 @@ import { IJiraImporterForm } from "@plane/types";
// components
import { CustomSelect, Input } from "@plane/ui";
// constants
import { E_JIRA_IMPORT } from "constants/event-tracker";
import { E_JIRA_IMPORT } from "@/constants/event-tracker";
// helpers
import { checkEmailValidity } from "@/helpers/string.helper";
import { useApplication, useEventTracker, useProject } from "@/hooks/store";

View File

@ -4,8 +4,6 @@ import Link from "next/link";
import { useRouter } from "next/router";
import { FormProvider, useForm } from "react-hook-form";
import { mutate } from "swr";
// hooks
import { useEventTracker } from "hooks/store";
// icons
import { ArrowLeft, Check, List, Settings } from "lucide-react";
import { IJiraImporterForm } from "@plane/types";
@ -13,7 +11,11 @@ import { IJiraImporterForm } from "@plane/types";
// fetch keys
// components
import { Button, UserGroupIcon } from "@plane/ui";
// constants
import { JIRA_ISSUES_IMPORTED } from "@/constants/event-tracker";
import { IMPORTER_SERVICES_LIST } from "@/constants/fetch-keys";
// hooks
import { useEventTracker } from "@/hooks/store";
// assets
import { JiraImporterService } from "@/services/integrations";
import JiraLogo from "public/services/jira.svg";
@ -27,8 +29,6 @@ import {
TJiraIntegrationSteps,
IJiraIntegrationData,
} from ".";
// constants
import { JIRA_ISSUES_IMPORTED } from "constants/event-tracker";
const integrationWorkflowData: Array<{
title: string;

View File

@ -1,13 +1,13 @@
import { FC, useMemo } from "react";
// hooks
import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/ui";
// constants
import { E_ISSUE_DETAILS } from "@/constants/event-tracker";
import { useEventTracker, useIssueDetail } from "@/hooks/store";
// ui
// components
import { IssueAttachmentUpload } from "./attachment-upload";
import { IssueAttachmentsList } from "./attachments-list";
// constants
import { E_ISSUE_DETAILS } from "constants/event-tracker";
export type TIssueAttachmentRoot = {
workspaceSlug: string;

View File

@ -1,6 +1,6 @@
import { FC, useMemo, useState } from "react";
import { useRouter } from "next/router";
import { observer } from "mobx-react-lite";
import { useRouter } from "next/router";
import { History, LucideIcon, MessageCircle } from "lucide-react";
// types
import { TIssueComment } from "@plane/types";
@ -9,7 +9,7 @@ import { TOAST_TYPE, setToast } from "@plane/ui";
// components
import { IssueActivityCommentRoot, IssueCommentRoot, IssueCommentCreate } from "@/components/issues";
// constants
import { COMMENT_CREATED, COMMENT_DELETED, COMMENT_UPDATED } from "constants/event-tracker";
import { COMMENT_CREATED, COMMENT_DELETED, COMMENT_UPDATED } from "@/constants/event-tracker";
// hooks
import { useIssueDetail, useProject, useEventTracker } from "@/hooks/store";

View File

@ -6,7 +6,7 @@ import { TIssue } from "@plane/types";
import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/ui";
import { EmptyState } from "@/components/common";
import { IssuePeekOverview } from "@/components/issues";
import { ISSUE_UPDATED, ISSUE_DELETED, ISSUE_ARCHIVED, E_ISSUE_DETAILS } from "constants/event-tracker";
import { ISSUE_UPDATED, ISSUE_DELETED, ISSUE_ARCHIVED, E_ISSUE_DETAILS } from "@/constants/event-tracker";
import { EIssuesStoreType } from "@/constants/issue";
import { EUserProjectRoles } from "@/constants/project";
import { useApplication, useEventTracker, useIssueDetail, useIssues, useUser } from "@/hooks/store";

View File

@ -8,7 +8,7 @@ import { ISearchIssueResponse, TIssue } from "@plane/types";
import { TOAST_TYPE, setPromiseToast, setToast, CustomMenu } from "@plane/ui";
import { ExistingIssuesListModal } from "@/components/core";
// hooks
import { E_CALENDAR_QUICK_ADD, ISSUE_CREATED } from "constants/event-tracker";
import { E_CALENDAR_QUICK_ADD, ISSUE_CREATED } from "@/constants/event-tracker";
import { cn } from "@/helpers/common.helper";
import { createIssuePayload } from "@/helpers/issue.helper";
import { useEventTracker, useIssueDetail, useProject } from "@/hooks/store";

View File

@ -2,13 +2,13 @@ import { observer } from "mobx-react-lite";
import { Plus, PlusIcon } from "lucide-react";
// hooks
import { EmptyState } from "@/components/common";
// constants
import { E_GLOBAL_ISSUES_EMPTY_STATE } from "@/constants/event-tracker";
import { useApplication, useEventTracker, useProject } from "@/hooks/store";
// components
// assets
import emptyIssue from "public/empty-state/issue.svg";
import emptyProject from "public/empty-state/project.svg";
// constants
import { E_GLOBAL_ISSUES_EMPTY_STATE } from "constants/event-tracker";
export const GlobalViewEmptyState: React.FC = observer(() => {
// store hooks

View File

@ -2,13 +2,13 @@ import { observer } from "mobx-react-lite";
import { PlusIcon } from "lucide-react";
// hooks
import { EmptyState } from "@/components/common";
// constants
import { E_VIEW_ISSUES_EMPTY_STATE } from "@/constants/event-tracker";
import { EIssuesStoreType } from "@/constants/issue";
import { useApplication, useEventTracker } from "@/hooks/store";
// components
// assets
import emptyIssue from "public/empty-state/issue.svg";
// constants
import { E_VIEW_ISSUES_EMPTY_STATE } from "constants/event-tracker";
export const ProjectViewEmptyState: React.FC = observer(() => {
// store hooks

View File

@ -2,8 +2,7 @@ import { useEffect, useState } from "react";
import { observer } from "mobx-react-lite";
import { Search, X } from "lucide-react";
import { IIssueFilterOptions, IIssueLabel, IState } from "@plane/types";
// hooks
import useDebounce from "hooks/use-debounce";
import {
FilterAssignees,
FilterMentions,
@ -19,7 +18,9 @@ import {
FilterModule,
} from "@/components/issues";
import { ILayoutDisplayFiltersOptions } from "@/constants/issue";
// hooks
import { useApplication } from "@/hooks/store";
import useDebounce from "@/hooks/use-debounce";
// components
// types
// constants

View File

@ -10,12 +10,11 @@ import { CustomMenu, TOAST_TYPE, setToast } from "@plane/ui";
import { ExistingIssuesListModal } from "@/components/core";
import { CreateUpdateIssueModal } from "@/components/issues";
// constants
import { E_KANBAN_LAYOUT } from "@/constants/event-tracker";
// hooks
import { useEventTracker } from "@/hooks/store";
// types
import { KanbanStoreType } from "../base-kanban-root";
// constants
import { E_KANBAN_LAYOUT } from "constants/event-tracker";
interface IHeaderGroupByCard {
sub_group_by: TIssueGroupByOptions | undefined;

View File

@ -9,6 +9,8 @@ import { ArchiveIcon, CustomMenu, TOAST_TYPE, setToast } from "@plane/ui";
import { ArchiveIssueModal, CreateUpdateIssueModal, DeleteIssueModal } from "@/components/issues";
// ui
// components
// constants
import { E_GLOBAL_ISSUES } from "@/constants/event-tracker";
import { EIssuesStoreType } from "@/constants/issue";
import { STATE_GROUPS } from "@/constants/state";
import { copyUrlToClipboard } from "@/helpers/string.helper";
@ -17,8 +19,6 @@ import { useEventTracker, useProjectState } from "@/hooks/store";
// helpers
// types
import { IQuickActionProps } from "../list/list-view-types";
// constants
import { E_GLOBAL_ISSUES } from "constants/event-tracker";
export const AllIssueQuickActions: React.FC<IQuickActionProps> = observer((props) => {
const {

View File

@ -20,7 +20,7 @@ import {
} from "@/components/issues";
import { ActiveLoader } from "@/components/ui";
// constants
import { EIssueFilterType, EIssuesStoreType } from "constants/issue";
import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
import { useCycle, useEventTracker, useIssues } from "hooks/store";
// types

View File

@ -4,12 +4,12 @@ import { useRouter } from "next/router";
import { TIssue } from "@plane/types";
// hooks
import { CycleDropdown } from "@/components/dropdowns";
// constants
import { E_SPREADSHEET_LAYOUT } from "@/constants/event-tracker";
import { EIssuesStoreType } from "@/constants/issue";
import { useEventTracker, useIssues } from "@/hooks/store";
// components
// types
// constants
import { E_SPREADSHEET_LAYOUT } from "constants/event-tracker";
type Props = {
issue: TIssue;

View File

@ -5,12 +5,12 @@ import { useRouter } from "next/router";
import { TIssue } from "@plane/types";
// hooks
import { ModuleDropdown } from "@/components/dropdowns";
// constants
import { E_SPREADSHEET_LAYOUT } from "@/constants/event-tracker";
import { EIssuesStoreType } from "@/constants/issue";
import { useEventTracker, useIssues } from "@/hooks/store";
// components
// types
// constants
import { E_SPREADSHEET_LAYOUT } from "constants/event-tracker";
type Props = {
issue: TIssue;

View File

@ -8,14 +8,14 @@ import { Dialog, Popover, Transition } from "@headlessui/react";
import type { IIssueLabel, IState } from "@plane/types";
// hooks
import { Button, Input, TOAST_TYPE, setToast } from "@plane/ui";
// constants
import { E_LABELS, LABEL_CREATED } from "@/constants/event-tracker";
import { LABEL_COLOR_OPTIONS, getRandomLabelColor } from "@/constants/label";
import { useLabel, useEventTracker } from "@/hooks/store";
// ui
// types
// constants
import { E_LABELS, LABEL_CREATED } from "constants/event-tracker";
// types
type Props = {
isOpen: boolean;
projectId: string;

View File

@ -12,7 +12,7 @@ import {
ProjectSettingLabelItem,
} from "@/components/labels";
import { EmptyStateType } from "@/constants/empty-state";
import { useLabel, useEventTracker } from "@/hooks/store";
import { useLabel } from "@/hooks/store";
// components
// ui
// types
@ -29,8 +29,7 @@ export const ProjectSettingsLabelList: React.FC = observer(() => {
const router = useRouter();
const { workspaceSlug, projectId } = router.query;
// store hooks
const { projectLabels, updateLabelPosition, projectLabelsTree, getLabelById } = useLabel();
const { captureLabelDragNDropEvent } = useEventTracker();
const { projectLabels, updateLabelPosition, projectLabelsTree } = useLabel();
const newLabel = () => {
setIsUpdating(false);

View File

@ -9,7 +9,7 @@ import { Avatar, AvatarGroup, LayersIcon, Tooltip, setPromiseToast } from "@plan
import { FavoriteStar } from "@/components/core";
import { ModuleQuickActions } from "@/components/modules";
// constants
import { E_GRID_LAYOUT, E_MODULES_GRID_LAYOUT, MODULE_FAVORITED, MODULE_UNFAVORITED } from "@/constants/event-tracker";
import { E_GRID_LAYOUT, MODULE_FAVORITED, MODULE_UNFAVORITED } from "@/constants/event-tracker";
import { MODULE_STATUS } from "@/constants/module";
import { EUserProjectRoles } from "@/constants/project";
// helpers
@ -139,8 +139,8 @@ export const ModuleCardItem: React.FC<Props> = observer((props) => {
? !moduleTotalIssues || moduleTotalIssues === 0
? "0 Issue"
: moduleTotalIssues === moduleDetails.completed_issues
? `${moduleTotalIssues} Issue${moduleTotalIssues > 1 ? "s" : ""}`
: `${moduleDetails.completed_issues}/${moduleTotalIssues} Issues`
? `${moduleTotalIssues} Issue${moduleTotalIssues > 1 ? "s" : ""}`
: `${moduleDetails.completed_issues}/${moduleTotalIssues} Issues`
: "0 Issue";
return (

View File

@ -9,7 +9,7 @@ import { Avatar, AvatarGroup, CircularProgressIndicator, Tooltip, setPromiseToas
import { FavoriteStar } from "@/components/core";
import { ModuleQuickActions } from "@/components/modules";
// constants
import { E_GRID_LAYOUT, E_MODULES_LIST_LAYOUT, MODULE_FAVORITED, MODULE_UNFAVORITED } from "@/constants/event-tracker";
import { E_GRID_LAYOUT, MODULE_FAVORITED, MODULE_UNFAVORITED } from "@/constants/event-tracker";
import { MODULE_STATUS } from "@/constants/module";
import { EUserProjectRoles } from "@/constants/project";
// helpers

View File

@ -26,7 +26,7 @@ import { EUserWorkspaceRoles, ROLE } from "@/constants/workspace";
// helpers
import { getUserRole } from "@/helpers/user.helper";
// hooks
import { useEventTracker } from "@/hooks/store";
import { useEventTracker, useApplication } from "@/hooks/store";
import useDynamicDropdownPosition from "@/hooks/use-dynamic-dropdown";
// assets
import { WorkspaceService } from "@/services/workspace.service";

View File

@ -12,10 +12,10 @@ import { ConfirmProjectMemberRemove } from "@/components/project";
import { E_PROJECT_MEMBERS, PM_ROLE_CHANGED, PROJECT_MEMBER_LEFT, PROJECT_MEMBER_REMOVED } from "@/constants/event-tracker";
import { EUserProjectRoles } from "@/constants/project";
import { ROLE } from "@/constants/workspace";
import { getUserRole } from "@/helpers/user.helper";
// hooks
import { useEventTracker, useMember, useProject, useUser } from "@/hooks/store";
import { usePlatformOS } from "@/hooks/use-platform-os";
import { getUserRole } from "@/helpers/user.helper";
type Props = {
userId: string;

View File

@ -31,7 +31,7 @@ import {
} from "@plane/ui";
import { LeaveProjectModal, ProjectLogo, PublishProjectModal } from "@/components/project";
// constants
import { E_SIDEBAR } from "constants/event-tracker";
import { E_SIDEBAR } from "@/constants/event-tracker";
import { EUserProjectRoles } from "@/constants/project";
import { cn } from "@/helpers/common.helper";
// hooks

View File

@ -9,7 +9,7 @@ import { IProject } from "@plane/types";
import { TOAST_TYPE, setToast } from "@plane/ui";
import { CreateProjectModal, ProjectSidebarListItem } from "@/components/project";
// constants
import { E_SIDEBAR } from "constants/event-tracker";
import { E_SIDEBAR } from "@/constants/event-tracker";
import { EUserWorkspaceRoles } from "@/constants/workspace";
import { cn } from "@/helpers/common.helper";
import { orderJoinedProjects } from "@/helpers/project.helper";

View File

@ -7,7 +7,7 @@ import { Plus } from "lucide-react";
import { Loader } from "@plane/ui";
import { CreateUpdateStateInline, DeleteStateModal, StateGroup, StatesListItem } from "@/components/states";
// constants
import { E_STATES } from "constants/event-tracker";
import { E_STATES } from "@/constants/event-tracker";
import { STATES_LIST } from "@/constants/fetch-keys";
import { sortByField } from "@/helpers/array.helper";
import { orderStateGroups } from "@/helpers/state.helper";

View File

@ -6,7 +6,7 @@ import { Dialog, Transition } from "@headlessui/react";
import { IProjectView } from "@plane/types";
// ui
import { Button, TOAST_TYPE, setToast } from "@plane/ui";
import { E_VIEWS, VIEW_DELETED } from "constants/event-tracker";
import { E_VIEWS, VIEW_DELETED } from "@/constants/event-tracker";
// hooks
import { useProjectView, useEventTracker } from "@/hooks/store";
// types

View File

@ -1,6 +1,6 @@
import { FC, Fragment } from "react";
import { useRouter } from "next/router";
import { observer } from "mobx-react-lite";
import { useRouter } from "next/router";
import { Dialog, Transition } from "@headlessui/react";
import { IProjectView } from "@plane/types";
// ui

View File

@ -4,18 +4,18 @@ import { useRouter } from "next/router";
import { Dialog, Transition } from "@headlessui/react";
import { IWebhook, IWorkspace, TWebhookEventTypes } from "@plane/types";
import { TOAST_TYPE, setToast } from "@plane/ui";
// hooks
import { useEventTracker } from "hooks/store";
// components
// constants
import { WEBHOOK_CREATED } from "@/constants/event-tracker";
// helpers
import { csvDownload } from "@/helpers/download.helper";
// hooks
import { useEventTracker } from "@/hooks/store";
// components
// types
import { WebhookForm } from "./form";
import { GeneratedHookDetails } from "./generated-hook-details";
// utils
import { getCurrentHookAsCSV } from "./utils";
// constants
import { WEBHOOK_CREATED } from "constants/event-tracker";
// ui
interface ICreateWebhookModal {

View File

@ -7,7 +7,7 @@ import { Button, TOAST_TYPE, setToast } from "@plane/ui";
// constants
import { WEBHOOK_DELETED } from "@/constants/event-tracker";
// hooks
import { useWebhook } from "@/hooks/store";
import { useWebhook, useEventTracker } from "@/hooks/store";
interface IDeleteWebhook {
isOpen: boolean;

View File

@ -24,7 +24,7 @@ import {
// images
import emptyProject from "public/empty-state/project.svg";
// constants
import { E_PAGES_EMPTY_STATE } from "constants/event-tracker";
import { E_PAGES_EMPTY_STATE } from "@/constants/event-tracker";
interface IProjectAuthWrapper {
children: ReactNode;

View File

@ -5,8 +5,6 @@ import { PostHogProvider as PHProvider } from "posthog-js/react";
import { IUser } from "@plane/types";
// constants
import { GROUP_WORKSPACE } from "@/constants/event-tracker";
// helpers
import { getUserRole } from "@/helpers/user.helper";
// types
export interface IPosthogWrapper {

View File

@ -12,8 +12,8 @@ import { WorkspaceAnalyticsHeader } from "@/components/headers";
// type
// constants
import { ANALYTICS_TABS } from "@/constants/analytics";
import { E_ANALYTICS_EMPTY_STATE } from "@/constants/event-tracker";
import { EmptyStateType } from "@/constants/empty-state"
import { E_ANALYTICS_EMPTY_STATE } from "@/constants/event-tracker";
import { useApplication, useEventTracker, useProject, useWorkspace } from "@/hooks/store";
import { AppLayout } from "@/layouts/app-layout";
import { NextPageWithLayout } from "@/lib/types";

View File

@ -16,9 +16,9 @@ import CyclesListMobileHeader from "@/components/cycles/cycles-list-mobile-heade
import { EmptyState } from "@/components/empty-state";
import { CyclesHeader } from "@/components/headers";
import { CycleModuleBoardLayout, CycleModuleListLayout, GanttLayoutLoader } from "@/components/ui";
import { E_CYCLES_EMPTY_STATE } from "@/constants/event-tracker";
import { CYCLE_TABS_LIST } from "@/constants/cycle";
import { EmptyStateType } from "@/constants/empty-state";
import { E_CYCLES_EMPTY_STATE } from "@/constants/event-tracker";
import { calculateTotalFilters } from "@/helpers/filter.helper";
import { useEventTracker, useCycle, useProject, useCycleFilter } from "@/hooks/store";
// layouts