refactor: move web utils to packages (#7145)
* refactor: move web utils to packages * fix: build and lint errors * chore: update drag handle plugin * chore: update table cell type to fix build errors * fix: build errors * chore: sync few changes * fix: build errors * chore: minor fixes related to duplicate assets imports * fix: build errors * chore: minor changes
This commit is contained in:
parent
dffcc6dc10
commit
2014400bed
614 changed files with 1999 additions and 3030 deletions
|
|
@ -8,10 +8,10 @@ import { useTranslation } from "@plane/i18n";
|
|||
// types
|
||||
import type { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions } from "@plane/types";
|
||||
// components
|
||||
import { isIssueFilterActive } from "@plane/utils";
|
||||
import { ArchiveTabsList } from "@/components/archives";
|
||||
import { DisplayFiltersSelection, FilterSelection, FiltersDropdown } from "@/components/issues";
|
||||
// helpers
|
||||
import { isIssueFilterActive } from "@/helpers/filter.helper";
|
||||
// hooks
|
||||
import { useIssues, useLabel, useMember, useProject, useProjectState } from "@/hooks/store";
|
||||
|
||||
|
|
|
|||
|
|
@ -6,15 +6,13 @@ import Link from "next/link";
|
|||
import { AlertCircle, X } from "lucide-react";
|
||||
// ui
|
||||
import { Tooltip } from "@plane/ui";
|
||||
import { convertBytesToSize, getFileExtension, getFileName, getFileURL, renderFormattedDate, truncateText } from "@plane/utils";
|
||||
// icons
|
||||
//
|
||||
import { getFileIcon } from "@/components/icons";
|
||||
// components
|
||||
import { IssueAttachmentDeleteModal } from "@/components/issues";
|
||||
// helpers
|
||||
import { convertBytesToSize, getFileExtension, getFileName } from "@/helpers/attachment.helper";
|
||||
import { renderFormattedDate } from "@/helpers/date-time.helper";
|
||||
import { getFileURL } from "@/helpers/file.helper";
|
||||
import { truncateText } from "@/helpers/string.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useMember } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
|
|
|||
|
|
@ -8,13 +8,12 @@ import { useTranslation } from "@plane/i18n";
|
|||
import { TIssueServiceType } from "@plane/types";
|
||||
// ui
|
||||
import { CustomMenu, Tooltip } from "@plane/ui";
|
||||
import { convertBytesToSize, getFileExtension, getFileName, getFileURL, renderFormattedDate } from "@plane/utils";
|
||||
// components
|
||||
//
|
||||
import { ButtonAvatars } from "@/components/dropdowns/member/avatar";
|
||||
import { getFileIcon } from "@/components/icons";
|
||||
// helpers
|
||||
import { convertBytesToSize, getFileExtension, getFileName } from "@/helpers/attachment.helper";
|
||||
import { renderFormattedDate } from "@/helpers/date-time.helper";
|
||||
import { getFileURL } from "@/helpers/file.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useMember } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import { observer } from "mobx-react";
|
|||
// ui
|
||||
import { CircularProgressIndicator, Tooltip } from "@plane/ui";
|
||||
// components
|
||||
import { getFileExtension } from "@plane/utils";
|
||||
import { getFileIcon } from "@/components/icons";
|
||||
// helpers
|
||||
import { getFileExtension } from "@/helpers/attachment.helper";
|
||||
// hooks
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
"use client";
|
||||
|
||||
import { observer } from "mobx-react";
|
||||
// ui
|
||||
import { CircularProgressIndicator, Tooltip } from "@plane/ui";
|
||||
import { getFileExtension, truncateText } from "@plane/utils";
|
||||
// ui
|
||||
// icons
|
||||
import { getFileIcon } from "@/components/icons";
|
||||
// helpers
|
||||
import { getFileExtension } from "@/helpers/attachment.helper";
|
||||
import { truncateText } from "@/helpers/string.helper";
|
||||
// hooks
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { TIssueServiceType } from "@plane/types";
|
|||
// ui
|
||||
import { AlertModalCore } from "@plane/ui";
|
||||
// helper
|
||||
import { getFileName } from "@/helpers/attachment.helper";
|
||||
import { getFileName } from "@plane/utils";
|
||||
// hooks
|
||||
import { useIssueDetail } from "@/hooks/store";
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { MARKETING_PLANE_ONE_PAGE_LINK } from "@plane/constants";
|
||||
import { getButtonStyling } from "@plane/ui";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { cn } from "@plane/utils";
|
||||
|
||||
type Props = {
|
||||
className?: string;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
"use client";
|
||||
import React, { FC, useState } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { copyUrlToClipboard, generateWorkItemLink } from "@plane/utils";
|
||||
// plane imports
|
||||
import { copyUrlToClipboard } from "@plane/utils";
|
||||
// helpers
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useProject } from "@/hooks/store";
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ import { TIssue, TNameDescriptionLoader } from "@plane/types";
|
|||
import { EFileAssetType } from "@plane/types/src/enums";
|
||||
import { Loader } from "@plane/ui";
|
||||
// components
|
||||
import { getDescriptionPlaceholderI18n } from "@plane/utils";
|
||||
import { RichTextEditor, RichTextReadOnlyEditor } from "@/components/editor";
|
||||
import { TIssueOperations } from "@/components/issues/issue-detail";
|
||||
// helpers
|
||||
import { getDescriptionPlaceholderI18n } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useEditorAsset, useWorkspace } from "@/hooks/store";
|
||||
// plane web services
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ import { useTranslation } from "@plane/i18n";
|
|||
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions } from "@plane/types";
|
||||
import { Button } from "@plane/ui";
|
||||
// components
|
||||
import { isIssueFilterActive } from "@plane/utils";
|
||||
import { DisplayFiltersSelection, FiltersDropdown, FilterSelection, LayoutSelection } from "@/components/issues";
|
||||
// helpers
|
||||
import { isIssueFilterActive } from "@/helpers/filter.helper";
|
||||
// hooks
|
||||
import { useLabel, useProjectState, useMember, useIssues } from "@/hooks/store";
|
||||
// plane web types
|
||||
|
|
|
|||
|
|
@ -7,11 +7,10 @@ import { EIssueServiceType, EIssuesStoreType } from "@plane/constants";
|
|||
import { useTranslation } from "@plane/i18n";
|
||||
import { TIssue, TIssueServiceType, TSubIssueOperations } from "@plane/types";
|
||||
import { ControlLink, CustomMenu, Tooltip } from "@plane/ui";
|
||||
import { cn, generateWorkItemLink } from "@plane/utils";
|
||||
// helpers
|
||||
import { useSubIssueOperations } from "@/components/issues/issue-detail-widgets/sub-issues/helper";
|
||||
import { WithDisplayPropertiesHOC } from "@/components/issues/issue-layouts/properties/with-display-properties-HOC";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useProject, useProjectState } from "@/hooks/store";
|
||||
import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection";
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
// plane imports
|
||||
import { SyntheticEvent } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { IIssueDisplayProperties, TIssue } from "@plane/types";
|
||||
import { getDate, renderFormattedPayloadDate } from "@plane/utils";
|
||||
// components
|
||||
import { PriorityDropdown, MemberDropdown, StateDropdown, DateRangeDropdown } from "@/components/dropdowns";
|
||||
// hooks
|
||||
import { WithDisplayPropertiesHOC } from "@/components/issues/issue-layouts/properties/with-display-properties-HOC";
|
||||
import { getDate, renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
|
||||
type Props = {
|
||||
workspaceSlug: string;
|
||||
|
|
@ -28,8 +27,6 @@ type Props = {
|
|||
|
||||
export const SubIssuesListItemProperties: React.FC<Props> = observer((props) => {
|
||||
const { workspaceSlug, parentIssueId, issueId, disabled, updateSubIssue, displayProperties, issue } = props;
|
||||
// hooks
|
||||
const { t } = useTranslation();
|
||||
|
||||
const handleEventPropagation = (e: SyntheticEvent<HTMLDivElement>) => {
|
||||
e.stopPropagation();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"use client";
|
||||
import React, { FC } from "react";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { cn } from "@plane/utils";
|
||||
|
||||
type Props = {
|
||||
icon: JSX.Element;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ import { observer } from "mobx-react";
|
|||
import { useTranslation } from "@plane/i18n";
|
||||
// hooks
|
||||
// components
|
||||
import { cn } from "@plane/utils";
|
||||
import { CycleDropdown } from "@/components/dropdowns";
|
||||
// ui
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { useIssueDetail } from "@/hooks/store";
|
||||
// types
|
||||
import type { TIssueOperations } from "./root";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { TActivityFilters, TActivityFilterOption } from "@plane/constants";
|
|||
import { useTranslation } from "@plane/i18n";
|
||||
import { Button, PopoverMenu } from "@plane/ui";
|
||||
// helper
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { cn } from "@plane/utils";
|
||||
// constants
|
||||
|
||||
type TActivityFilter = {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { FC, ReactNode } from "react";
|
|||
import { Network } from "lucide-react";
|
||||
// hooks
|
||||
import { Tooltip } from "@plane/ui";
|
||||
import { renderFormattedTime, renderFormattedDate, calculateTimeAgo } from "@/helpers/date-time.helper";
|
||||
import { renderFormattedTime, renderFormattedDate, calculateTimeAgo } from "@plane/utils";
|
||||
import { useIssueDetail } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
// ui
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
import { FC } from "react";
|
||||
// hooks
|
||||
import { Tooltip } from "@plane/ui";
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
import { generateWorkItemLink } from "@plane/utils";
|
||||
import { useIssueDetail } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
// ui
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { FC } from "react";
|
|||
import { observer } from "mobx-react";
|
||||
import { CalendarDays } from "lucide-react";
|
||||
// hooks
|
||||
import { renderFormattedDate } from "@/helpers/date-time.helper";
|
||||
import { renderFormattedDate } from "@plane/utils";
|
||||
import { useIssueDetail } from "@/hooks/store";
|
||||
// components
|
||||
import { IssueActivityBlockComponent, IssueLink } from "./";
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { FC } from "react";
|
|||
import { observer } from "mobx-react";
|
||||
import { CalendarDays } from "lucide-react";
|
||||
// hooks
|
||||
import { renderFormattedDate } from "@/helpers/date-time.helper";
|
||||
import { renderFormattedDate } from "@plane/utils";
|
||||
import { useIssueDetail } from "@/hooks/store";
|
||||
// components
|
||||
import { IssueActivityBlockComponent, IssueLink } from "./";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// helpers
|
||||
import { getValidKeysFromObject } from "@/helpers/array.helper";
|
||||
import { getValidKeysFromObject } from "@plane/utils";
|
||||
// hooks
|
||||
import { useIssueDetail } from "@/hooks/store";
|
||||
// plane web components
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { useTranslation } from "@plane/i18n";
|
|||
import { TCommentsOperations, TIssueActivity, TIssueComment } from "@plane/types";
|
||||
import { EFileAssetType } from "@plane/types/src/enums";
|
||||
import { setToast, TOAST_TYPE } from "@plane/ui";
|
||||
import { formatTextList } from "@/helpers/issue.helper";
|
||||
import { formatTextList } from "@plane/utils";
|
||||
import { useEditorAsset, useIssueDetail, useMember, useUser } from "@/hooks/store";
|
||||
|
||||
export const useCommentOperations = (
|
||||
|
|
|
|||
|
|
@ -14,12 +14,10 @@ import {
|
|||
} from "@plane/constants";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { TOAST_TYPE, Tooltip, setToast } from "@plane/ui";
|
||||
import { cn, generateWorkItemLink, copyTextToClipboard } from "@plane/utils";
|
||||
// components
|
||||
import { ArchiveIssueModal, DeleteIssueModal, IssueSubscription } from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
import { copyTextToClipboard } from "@/helpers/string.helper";
|
||||
// hooks
|
||||
import {
|
||||
useEventTracker,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { EUserPermissionsLevel, EUserProjectRoles, getRandomLabelColor } from "@
|
|||
import { useTranslation } from "@plane/i18n";
|
||||
import { IIssueLabel } from "@plane/types";
|
||||
// helpers
|
||||
import { getTabIndex } from "@/helpers/tab-indices.helper";
|
||||
import { getTabIndex } from "@plane/utils";
|
||||
// hooks
|
||||
import { useLabel, useUserPermissions } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
|
|
|||
|
|
@ -5,12 +5,11 @@ import { FC } from "react";
|
|||
// ui
|
||||
import { Pencil, Trash2, ExternalLink } from "lucide-react";
|
||||
import { Tooltip, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import { getIconForLink } from "@plane/utils";
|
||||
import { getIconForLink, copyTextToClipboard, calculateTimeAgo } from "@plane/utils";
|
||||
// icons
|
||||
// types
|
||||
// helpers
|
||||
import { calculateTimeAgo } from "@/helpers/date-time.helper";
|
||||
import { copyTextToClipboard } from "@/helpers/string.helper";
|
||||
//
|
||||
import { useIssueDetail, useMember } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
import { TLinkOperationsModal } from "./create-update-link-modal";
|
||||
|
|
|
|||
|
|
@ -8,9 +8,8 @@ import { useTranslation } from "@plane/i18n";
|
|||
import { TIssueServiceType } from "@plane/types";
|
||||
// ui
|
||||
import { Tooltip, TOAST_TYPE, setToast, CustomMenu } from "@plane/ui";
|
||||
import { calculateTimeAgo, getIconForLink } from "@plane/utils";
|
||||
import { calculateTimeAgo, getIconForLink, copyTextToClipboard } from "@plane/utils";
|
||||
// helpers
|
||||
import { copyTextToClipboard } from "@/helpers/string.helper";
|
||||
// hooks
|
||||
import { useIssueDetail } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import { EIssueServiceType } from "@plane/constants";
|
|||
import { EditorRefApi } from "@plane/editor";
|
||||
import { TNameDescriptionLoader } from "@plane/types";
|
||||
// components
|
||||
import { getTextContent } from "@plane/utils";
|
||||
import { DescriptionVersionsRoot } from "@/components/core/description-versions";
|
||||
import {
|
||||
IssueActivity,
|
||||
|
|
@ -19,7 +20,6 @@ import {
|
|||
PeekOverviewProperties,
|
||||
} from "@/components/issues";
|
||||
// helpers
|
||||
import { getTextContent } from "@/helpers/editor.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useMember, useProject, useUser } from "@/hooks/store";
|
||||
import useReloadConfirmations from "@/hooks/use-reload-confirmation";
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ import { observer } from "mobx-react";
|
|||
import { useTranslation } from "@plane/i18n";
|
||||
// hooks
|
||||
// components
|
||||
import { cn } from "@plane/utils";
|
||||
import { ModuleDropdown } from "@/components/dropdowns";
|
||||
// ui
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { useIssueDetail } from "@/hooks/store";
|
||||
// types
|
||||
import type { TIssueOperations } from "./root";
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import { useTranslation } from "@plane/i18n";
|
|||
// ui
|
||||
import { Tooltip } from "@plane/ui";
|
||||
// components
|
||||
import { cn } from "@plane/utils";
|
||||
import { ParentIssuesListModal } from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useProject } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { TIssue } from "@plane/types";
|
|||
// ui
|
||||
import { ControlLink, CustomMenu } from "@plane/ui";
|
||||
// helpers
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
import { generateWorkItemLink } from "@plane/utils";
|
||||
// hooks
|
||||
import { useIssues, useProject, useProjectState } from "@/hooks/store";
|
||||
import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import Link from "next/link";
|
|||
// ui
|
||||
import { CustomMenu } from "@plane/ui";
|
||||
// helpers
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
import { generateWorkItemLink } from "@plane/utils";
|
||||
// hooks
|
||||
import { useIssueDetail, useProject } from "@/hooks/store";
|
||||
// plane web components
|
||||
|
|
|
|||
|
|
@ -5,10 +5,9 @@ import { observer } from "mobx-react";
|
|||
import { IUser } from "@plane/types";
|
||||
// components
|
||||
import { TOAST_TYPE, Tooltip, setToast } from "@plane/ui";
|
||||
import { cn, formatTextList } from "@plane/utils";
|
||||
// helper
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { renderEmoji } from "@/helpers/emoji.helper";
|
||||
import { formatTextList } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useMember } from "@/hooks/store";
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -6,10 +6,9 @@ import { IUser } from "@plane/types";
|
|||
// hooks
|
||||
// ui
|
||||
import { TOAST_TYPE, Tooltip, setToast } from "@plane/ui";
|
||||
import { cn, formatTextList } from "@plane/utils";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { renderEmoji } from "@/helpers/emoji.helper";
|
||||
import { formatTextList } from "@/helpers/issue.helper";
|
||||
import { useIssueDetail, useMember } from "@/hooks/store";
|
||||
// types
|
||||
import { ReactionSelector } from "./reaction-selector";
|
||||
|
|
|
|||
|
|
@ -7,11 +7,10 @@ import { CircleDot, CopyPlus, Pencil, X, XCircle } from "lucide-react";
|
|||
// Plane
|
||||
import { ISearchIssueResponse } from "@plane/types";
|
||||
import { RelatedIcon, Tooltip, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import { cn, generateWorkItemLink } from "@plane/utils";
|
||||
// components
|
||||
import { ExistingIssuesListModal } from "@/components/core";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useIssues, useProject } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import { CalendarCheck2, CalendarClock, LayoutPanelTop, Signal, Tag, Triangle, U
|
|||
import { useTranslation } from "@plane/i18n";
|
||||
// ui
|
||||
import { ContrastIcon, DiceIcon, DoubleCircleIcon } from "@plane/ui";
|
||||
import { cn, getDate, renderFormattedPayloadDate, shouldHighlightIssueDueDate } from "@plane/utils";
|
||||
// components
|
||||
import {
|
||||
DateDropdown,
|
||||
|
|
@ -18,9 +19,6 @@ import {
|
|||
import { ButtonAvatars } from "@/components/dropdowns/member/avatar";
|
||||
import { IssueCycleSelect, IssueLabel, IssueModuleSelect } from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { getDate, renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
import { shouldHighlightIssueDueDate } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useProjectEstimates, useIssueDetail, useProject, useProjectState, useMember } from "@/hooks/store";
|
||||
// plane web components
|
||||
|
|
|
|||
|
|
@ -16,16 +16,16 @@ import type {
|
|||
TIssueKanbanFilters,
|
||||
TIssueMap,
|
||||
TPaginationData,
|
||||
ICalendarWeek,
|
||||
} from "@plane/types";
|
||||
// ui
|
||||
import { Spinner } from "@plane/ui";
|
||||
import { renderFormattedPayloadDate, cn } from "@plane/utils";
|
||||
// components
|
||||
import { CalendarHeader, CalendarIssueBlocks, CalendarWeekDays, CalendarWeekHeader } from "@/components/issues";
|
||||
// constants
|
||||
import { MONTHS_LIST } from "@/constants/calendar";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
// hooks
|
||||
import { useIssues } from "@/hooks/store";
|
||||
import useSize from "@/hooks/use-window-size";
|
||||
|
|
@ -38,7 +38,6 @@ import { IProjectIssuesFilter } from "@/store/issue/project";
|
|||
import { IProjectViewIssuesFilter } from "@/store/issue/project-views";
|
||||
import { IssueLayoutHOC } from "../issue-layout-HOC";
|
||||
import { TRenderQuickActions } from "../list/list-view-types";
|
||||
import type { ICalendarWeek } from "./types";
|
||||
|
||||
type Props = {
|
||||
issuesFilterStore:
|
||||
|
|
|
|||
|
|
@ -5,18 +5,17 @@ import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
|||
import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
||||
import { differenceInCalendarDays } from "date-fns/differenceInCalendarDays";
|
||||
import { observer } from "mobx-react";
|
||||
import { TGroupedIssues, TIssue, TIssueMap, TPaginationData, ICalendarDate } from "@plane/types";
|
||||
// types
|
||||
import { TGroupedIssues, TIssue, TIssueMap, TPaginationData } from "@plane/types";
|
||||
// ui
|
||||
import { TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// components
|
||||
import { CalendarIssueBlocks, ICalendarDate } from "@/components/issues";
|
||||
import { cn, renderFormattedPayloadDate } from "@plane/utils";
|
||||
import { CalendarIssueBlocks } from "@/components/issues/issue-layouts/calendar";
|
||||
import { highlightIssueOnDrop } from "@/components/issues/issue-layouts/utils";
|
||||
// helpers
|
||||
import { MONTHS_LIST } from "@/constants/calendar";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
// types
|
||||
import { IProjectEpicsFilter } from "@/plane-web/store/issue/epic";
|
||||
import { ICycleIssuesFilter } from "@/store/issue/cycle";
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import { Popover, Transition } from "@headlessui/react";
|
|||
//hooks
|
||||
// icons
|
||||
// constants
|
||||
import { getDate } from "@plane/utils";
|
||||
import { MONTHS_LIST } from "@/constants/calendar";
|
||||
import { getDate } from "@/helpers/date-time.helper";
|
||||
import { useCalendarView } from "@/hooks/store";
|
||||
import { IProjectEpicsFilter } from "@/plane-web/store/issue/epic";
|
||||
import { ICycleIssuesFilter } from "@/store/issue/cycle";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
export * from "./dropdowns";
|
||||
export * from "./roots";
|
||||
export * from "./calendar";
|
||||
export * from "./types.d";
|
||||
export * from "./day-tile";
|
||||
export * from "./header";
|
||||
export * from "./issue-blocks";
|
||||
|
|
|
|||
|
|
@ -11,9 +11,8 @@ import { useOutsideClickDetector } from "@plane/hooks";
|
|||
import { TIssue } from "@plane/types";
|
||||
// ui
|
||||
import { Tooltip, ControlLink } from "@plane/ui";
|
||||
import { cn, generateWorkItemLink } from "@plane/utils";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useIssues, useProject, useProjectState } from "@/hooks/store";
|
||||
import { useIssueStoreType } from "@/hooks/use-issue-layout-store";
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import { observer } from "mobx-react";
|
|||
import { useTranslation } from "@plane/i18n";
|
||||
import { TIssue, TPaginationData } from "@plane/types";
|
||||
// components
|
||||
import { renderFormattedPayloadDate } from "@plane/utils";
|
||||
import { CalendarQuickAddIssueActions, CalendarIssueBlockRoot } from "@/components/issues";
|
||||
// helpers
|
||||
import { renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
import { useIssuesStore } from "@/hooks/use-issue-layout-store";
|
||||
import { TRenderQuickActions } from "../list/list-view-types";
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ import { ISearchIssueResponse, TIssue } from "@plane/types";
|
|||
// ui
|
||||
import { CustomMenu, setPromiseToast } from "@plane/ui";
|
||||
// components
|
||||
import { cn } from "@plane/utils";
|
||||
import { ExistingIssuesListModal } from "@/components/core";
|
||||
import { QuickAddIssueRoot } from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useIssueDetail } from "@/hooks/store";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
export interface ICalendarDate {
|
||||
date: Date;
|
||||
year: number;
|
||||
month: number;
|
||||
day: number;
|
||||
week: number; // week number wrt year, eg- 51, 52
|
||||
is_current_month: boolean;
|
||||
is_current_week: boolean;
|
||||
is_today: boolean;
|
||||
}
|
||||
|
||||
export interface ICalendarWeek {
|
||||
[date: string]: ICalendarDate;
|
||||
}
|
||||
|
||||
export interface ICalendarMonth {
|
||||
[monthIndex: string]: {
|
||||
[weekNumber: string]: ICalendarWeek;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ICalendarPayload {
|
||||
[year: string]: ICalendarMonth;
|
||||
}
|
||||
|
|
@ -1,12 +1,10 @@
|
|||
import { observer } from "mobx-react";
|
||||
import { EStartOfTheWeek } from "@plane/constants";
|
||||
import { TGroupedIssues, TIssue, TIssueMap, TPaginationData } from "@plane/types";
|
||||
import { cn } from "@plane/utils";
|
||||
import { TGroupedIssues, TIssue, TIssueMap, TPaginationData, ICalendarDate, ICalendarWeek } from "@plane/types";
|
||||
import { cn, getOrderedDays, renderFormattedPayloadDate } from "@plane/utils";
|
||||
// components
|
||||
import { CalendarDayTile } from "@/components/issues";
|
||||
// helpers
|
||||
import { getOrderedDays } from "@/helpers/calendar.helper";
|
||||
import { renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
//
|
||||
// hooks
|
||||
import { useUserProfile } from "@/hooks/store";
|
||||
// types
|
||||
|
|
@ -16,7 +14,6 @@ import { IModuleIssuesFilter } from "@/store/issue/module";
|
|||
import { IProjectIssuesFilter } from "@/store/issue/project";
|
||||
import { IProjectViewIssuesFilter } from "@/store/issue/project-views";
|
||||
import { TRenderQuickActions } from "../list/list-view-types";
|
||||
import { ICalendarDate, ICalendarWeek } from "./types";
|
||||
|
||||
type Props = {
|
||||
issuesFilterStore:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { observer } from "mobx-react";
|
||||
import { EStartOfTheWeek } from "@plane/constants";
|
||||
import { getOrderedDays } from "@plane/utils";
|
||||
import { DAYS_LIST } from "@/constants/calendar";
|
||||
// helpers
|
||||
import { getOrderedDays } from "@/helpers/calendar.helper";
|
||||
// hooks
|
||||
import { useUserProfile } from "@/hooks/store";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ import { observer } from "mobx-react";
|
|||
import { X } from "lucide-react";
|
||||
// helpers
|
||||
import { DATE_AFTER_FILTER_OPTIONS } from "@plane/constants";
|
||||
import { renderFormattedDate } from "@/helpers/date-time.helper";
|
||||
import { capitalizeFirstLetter } from "@/helpers/string.helper";
|
||||
import { renderFormattedDate, capitalizeFirstLetter } from "@plane/utils";
|
||||
// constants
|
||||
|
||||
type Props = {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { useTranslation } from "@plane/i18n";
|
|||
import { IIssueFilterOptions, IIssueLabel, IState } from "@plane/types";
|
||||
// components
|
||||
import { Tag } from "@plane/ui";
|
||||
import { replaceUnderscoreIfSnakeCase } from "@plane/utils";
|
||||
import {
|
||||
AppliedCycleFilters,
|
||||
AppliedDateFilters,
|
||||
|
|
@ -19,7 +20,6 @@ import {
|
|||
} from "@/components/issues";
|
||||
// constants
|
||||
// helpers
|
||||
import { replaceUnderscoreIfSnakeCase } from "@/helpers/string.helper";
|
||||
// hooks
|
||||
import { useUserPermissions } from "@/hooks/store";
|
||||
// plane web components
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { X } from "lucide-react";
|
|||
// plane ui
|
||||
import { Avatar } from "@plane/ui";
|
||||
// helpers
|
||||
import { getFileURL } from "@/helpers/file.helper";
|
||||
import { getFileURL } from "@plane/utils";
|
||||
// hooks
|
||||
import { useMember } from "@/hooks/store";
|
||||
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@ import { IIssueFilterOptions, TStaticViewTypes } from "@plane/types";
|
|||
//ui
|
||||
// components
|
||||
import { Header, EHeaderVariant, Loader } from "@plane/ui";
|
||||
import { cn } from "@plane/utils";
|
||||
import { AppliedFiltersList } from "@/components/issues";
|
||||
import { UpdateViewComponent } from "@/components/views/update-view-component";
|
||||
import { CreateUpdateWorkspaceViewModal } from "@/components/workspace";
|
||||
// constants
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useEventTracker, useGlobalView, useIssues, useLabel, useUser, useUserPermissions } from "@/hooks/store";
|
||||
import { getAreFiltersEqual } from "../../../utils";
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import { observer } from "mobx-react";
|
|||
|
||||
// icons
|
||||
import { X } from "lucide-react";
|
||||
import { IState } from "@plane/types";
|
||||
import { EIconSize } from "@plane/constants";
|
||||
import { IState } from "@plane/types";
|
||||
import { StateGroupIcon } from "@plane/ui";
|
||||
// types
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import { observer } from "mobx-react";
|
|||
// plane ui
|
||||
import { Avatar, Loader } from "@plane/ui";
|
||||
// components
|
||||
import { getFileURL } from "@plane/utils";
|
||||
import { FilterHeader, FilterOption } from "@/components/issues";
|
||||
// helpers
|
||||
import { getFileURL } from "@/helpers/file.helper";
|
||||
// hooks
|
||||
import { useMember, useUser } from "@/hooks/store";
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import { observer } from "mobx-react";
|
|||
// plane ui
|
||||
import { Avatar, Loader } from "@plane/ui";
|
||||
// components
|
||||
import { getFileURL } from "@plane/utils";
|
||||
import { FilterHeader, FilterOption } from "@/components/issues";
|
||||
// helpers
|
||||
import { getFileURL } from "@/helpers/file.helper";
|
||||
// hooks
|
||||
import { useMember, useUser } from "@/hooks/store";
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import { observer } from "mobx-react";
|
|||
// plane ui
|
||||
import { Loader, Avatar } from "@plane/ui";
|
||||
// components
|
||||
import { getFileURL } from "@plane/utils";
|
||||
import { FilterHeader, FilterOption } from "@/components/issues";
|
||||
// helpers
|
||||
import { getFileURL } from "@/helpers/file.helper";
|
||||
// hooks
|
||||
import { useMember, useUser } from "@/hooks/store";
|
||||
|
||||
|
|
|
|||
|
|
@ -10,15 +10,16 @@ import {
|
|||
EUserPermissionsLevel,
|
||||
} from "@plane/constants";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { TIssue } from "@plane/types";
|
||||
import type { IBlockUpdateData, TIssue } from "@plane/types";
|
||||
import { setToast, TOAST_TYPE } from "@plane/ui";
|
||||
// hooks
|
||||
import { GanttChartRoot, IBlockUpdateData, IssueGanttSidebar } from "@/components/gantt-chart";
|
||||
import { renderFormattedPayloadDate } from "@plane/utils";
|
||||
import { ETimeLineTypeType, TimeLineTypeContext } from "@/components/gantt-chart/contexts";
|
||||
import { GanttChartRoot } from "@/components/gantt-chart/root";
|
||||
import { IssueGanttSidebar } from "@/components/gantt-chart/sidebar/issues/sidebar";
|
||||
import { QuickAddIssueRoot, IssueGanttBlock, GanttQuickAddIssueButton } from "@/components/issues";
|
||||
//constants
|
||||
// helpers
|
||||
import { renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
//hooks
|
||||
import { useIssues, useUserPermissions } from "@/hooks/store";
|
||||
import { useIssueStoreType } from "@/hooks/use-issue-layout-store";
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import { observer } from "mobx-react";
|
|||
import { useParams } from "next/navigation";
|
||||
// ui
|
||||
import { Tooltip, ControlLink } from "@plane/ui";
|
||||
import { findTotalDaysInRange, generateWorkItemLink } from "@plane/utils";
|
||||
// components
|
||||
import { findTotalDaysInRange } from "@plane/utils";
|
||||
import { SIDEBAR_WIDTH } from "@/components/gantt-chart/constants";
|
||||
// helpers
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useIssues, useProject, useProjectState } from "@/hooks/store";
|
||||
import { useIssueStoreType } from "@/hooks/use-issue-layout-store";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { ISSUE_ORDER_BY_OPTIONS } from "@plane/constants";
|
|||
import { useTranslation } from "@plane/i18n";
|
||||
import { TIssueOrderByOptions } from "@plane/types";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { cn } from "@plane/utils";
|
||||
// plane web imports
|
||||
import { WorkFlowDisabledOverlay } from "@/plane-web/components/workflow";
|
||||
|
||||
|
|
|
|||
|
|
@ -13,12 +13,11 @@ import { useOutsideClickDetector } from "@plane/hooks";
|
|||
import { TIssue, IIssueDisplayProperties, IIssueMap } from "@plane/types";
|
||||
// ui
|
||||
import { ControlLink, DropIndicator, TOAST_TYPE, Tooltip, setToast } from "@plane/ui";
|
||||
import { cn, generateWorkItemLink } from "@plane/utils";
|
||||
// components
|
||||
import RenderIfVisible from "@/components/core/render-if-visible-HOC";
|
||||
import { HIGHLIGHT_CLASS } from "@/components/issues/issue-layouts/utils";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useKanbanView, useProject } from "@/hooks/store";
|
||||
import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection";
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ import {
|
|||
TIssueOrderByOptions,
|
||||
} from "@plane/types";
|
||||
import { TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import { cn } from "@plane/utils";
|
||||
import { KanbanQuickAddIssueButton, QuickAddIssueRoot } from "@/components/issues";
|
||||
import { highlightIssueOnDrop } from "@/components/issues/issue-layouts/utils";
|
||||
import { KanbanIssueBlockLoader } from "@/components/ui";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useProjectState } from "@/hooks/store";
|
||||
import { useIntersectionObserver } from "@/hooks/use-intersection-observer";
|
||||
|
|
|
|||
|
|
@ -11,12 +11,11 @@ import { EIssueServiceType } from "@plane/constants";
|
|||
import { TIssue, IIssueDisplayProperties, TIssueMap } from "@plane/types";
|
||||
// ui
|
||||
import { Spinner, Tooltip, ControlLink, setToast, TOAST_TYPE, Row } from "@plane/ui";
|
||||
import { cn, generateWorkItemLink } from "@plane/utils";
|
||||
// components
|
||||
import { MultipleSelectEntityAction } from "@/components/core";
|
||||
import { IssueProperties } from "@/components/issues/issue-layouts/properties";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useAppTheme, useIssueDetail, useProject } from "@/hooks/store";
|
||||
import { TSelectionHelper } from "@/hooks/use-multiple-select";
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ import { TIssue, ISearchIssueResponse, TIssueGroupByOptions } from "@plane/types
|
|||
// ui
|
||||
import { CustomMenu, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// components
|
||||
import { cn } from "@plane/utils";
|
||||
import { ExistingIssuesListModal, MultipleSelectGroupAction } from "@/components/core";
|
||||
import { CreateUpdateIssueModal } from "@/components/issues";
|
||||
// constants
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useEventTracker } from "@/hooks/store";
|
||||
import { useIssueStoreType } from "@/hooks/use-issue-layout-store";
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import { useTranslation } from "@plane/i18n";
|
|||
import { TIssue, IIssueDisplayProperties, TIssuePriorities } from "@plane/types";
|
||||
// ui
|
||||
import { Tooltip } from "@plane/ui";
|
||||
import { cn, getDate, renderFormattedPayloadDate, generateWorkItemLink, shouldHighlightIssueDueDate } from "@plane/utils";
|
||||
// components
|
||||
import {
|
||||
EstimateDropdown,
|
||||
|
|
@ -25,9 +26,6 @@ import {
|
|||
} from "@/components/dropdowns";
|
||||
// constants
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { getDate, renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
import { generateWorkItemLink, shouldHighlightIssueDueDate } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useEventTracker, useLabel, useIssues, useProjectState, useProject, useProjectEstimates } from "@/hooks/store";
|
||||
import { useAppRouter } from "@/hooks/use-app-router";
|
||||
|
|
|
|||
|
|
@ -8,10 +8,9 @@ import { useParams } from "next/navigation";
|
|||
import { ARCHIVABLE_STATE_GROUPS, EIssuesStoreType } from "@plane/constants";
|
||||
import { TIssue } from "@plane/types";
|
||||
import { ContextMenu, CustomMenu } from "@plane/ui";
|
||||
import { cn } from "@plane/utils";
|
||||
// components
|
||||
import { ArchiveIssueModal, CreateUpdateIssueModal, DeleteIssueModal } from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useEventTracker, useProject, useProjectState } from "@/hooks/store";
|
||||
// plane-web components
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import { useParams } from "next/navigation";
|
|||
// ui
|
||||
import { EIssuesStoreType, EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
|
||||
import { ContextMenu, CustomMenu } from "@plane/ui";
|
||||
import { cn } from "@plane/utils";
|
||||
// components
|
||||
import { DeleteIssueModal } from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useEventTracker, useIssues, useUserPermissions } from "@/hooks/store";
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -8,10 +8,9 @@ import { useParams } from "next/navigation";
|
|||
import { ARCHIVABLE_STATE_GROUPS, EIssuesStoreType, EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
|
||||
import { TIssue } from "@plane/types";
|
||||
import { ContextMenu, CustomMenu } from "@plane/ui";
|
||||
import { cn } from "@plane/utils";
|
||||
// components
|
||||
import { ArchiveIssueModal, CreateUpdateIssueModal, DeleteIssueModal } from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useEventTracker, useIssues, useProject, useProjectState, useUserPermissions } from "@/hooks/store";
|
||||
// plane-web components
|
||||
|
|
|
|||
|
|
@ -8,15 +8,13 @@ import { useParams, usePathname } from "next/navigation";
|
|||
import { EIssuesStoreType, EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
|
||||
import { TIssue } from "@plane/types";
|
||||
import { ContextMenu, CustomMenu } from "@plane/ui";
|
||||
import { cn } from "@plane/utils";
|
||||
// components
|
||||
import { CreateUpdateIssueModal, DeleteIssueModal } from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useEventTracker, useUserPermissions } from "@/hooks/store";
|
||||
// types
|
||||
// local imports
|
||||
import { IQuickActionProps } from "../list/list-view-types";
|
||||
// helper
|
||||
import { useDraftIssueMenuItems, MenuItemFactoryProps } from "./helper";
|
||||
|
||||
export const DraftIssueQuickActions: React.FC<IQuickActionProps> = observer((props) => {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,7 @@ import { EIssuesStoreType } from "@plane/constants";
|
|||
import { useTranslation } from "@plane/i18n";
|
||||
import { TIssue } from "@plane/types";
|
||||
import { ArchiveIcon, TContextMenuItem, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import { copyUrlToClipboard } from "@plane/utils";
|
||||
// helpers
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
import { copyUrlToClipboard, generateWorkItemLink } from "@plane/utils";
|
||||
// types
|
||||
import { createCopyMenuWithDuplication } from "@/plane-web/components/issues/issue-layouts/quick-action-dropdowns";
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,9 @@ import { useParams } from "next/navigation";
|
|||
import { ARCHIVABLE_STATE_GROUPS, EIssuesStoreType, EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
|
||||
import { TIssue } from "@plane/types";
|
||||
import { ContextMenu, CustomMenu } from "@plane/ui";
|
||||
import { cn } from "@plane/utils";
|
||||
// components
|
||||
import { ArchiveIssueModal, CreateUpdateIssueModal, DeleteIssueModal } from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useIssues, useEventTracker, useProjectState, useUserPermissions, useProject } from "@/hooks/store";
|
||||
// plane-web components
|
||||
|
|
|
|||
|
|
@ -8,10 +8,9 @@ import { useParams, usePathname } from "next/navigation";
|
|||
import { ARCHIVABLE_STATE_GROUPS, EIssuesStoreType, EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
|
||||
import { TIssue } from "@plane/types";
|
||||
import { ContextMenu, CustomMenu } from "@plane/ui";
|
||||
import { cn } from "@plane/utils";
|
||||
// components
|
||||
import { ArchiveIssueModal, CreateUpdateIssueModal, DeleteIssueModal } from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useEventTracker, useIssues, useProject, useProjectState, useUserPermissions } from "@/hooks/store";
|
||||
// plane-web components
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { cn } from "@plane/utils";
|
||||
import { TQuickAddIssueForm } from "../root";
|
||||
|
||||
export const GanttQuickAddIssueForm: FC<TQuickAddIssueForm> = observer((props) => {
|
||||
|
|
|
|||
|
|
@ -12,12 +12,11 @@ import { useTranslation } from "@plane/i18n";
|
|||
import { IProject, TIssue } from "@plane/types";
|
||||
// ui
|
||||
import { setPromiseToast } from "@plane/ui";
|
||||
import { cn, createIssuePayload } from "@plane/utils";
|
||||
// components
|
||||
import { CreateIssueToastActionItems } from "@/components/issues";
|
||||
// constants
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { createIssuePayload } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useEventTracker } from "@/hooks/store";
|
||||
// plane web components
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { observer } from "mobx-react";
|
|||
import { TIssue } from "@plane/types";
|
||||
// helpers
|
||||
import { Row } from "@plane/ui";
|
||||
import { renderFormattedDate } from "@/helpers/date-time.helper";
|
||||
import { renderFormattedDate } from "@plane/utils";
|
||||
|
||||
type Props = {
|
||||
issue: TIssue;
|
||||
|
|
|
|||
|
|
@ -3,12 +3,10 @@ import { observer } from "mobx-react";
|
|||
import { CalendarCheck2 } from "lucide-react";
|
||||
// types
|
||||
import { TIssue } from "@plane/types";
|
||||
import { cn, getDate, renderFormattedPayloadDate, shouldHighlightIssueDueDate } from "@plane/utils";
|
||||
// components
|
||||
import { DateDropdown } from "@/components/dropdowns";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { getDate, renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
import { shouldHighlightIssueDueDate } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useProjectState } from "@/hooks/store";
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import { CalendarClock } from "lucide-react";
|
|||
// types
|
||||
import { TIssue } from "@plane/types";
|
||||
// components
|
||||
import { getDate, renderFormattedPayloadDate } from "@plane/utils";
|
||||
import { DateDropdown } from "@/components/dropdowns";
|
||||
// helpers
|
||||
import { getDate, renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
|
||||
type Props = {
|
||||
issue: TIssue;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { useParams } from "next/navigation";
|
|||
import { TIssue } from "@plane/types";
|
||||
// helpers
|
||||
import { Row } from "@plane/ui";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { cn } from "@plane/utils";
|
||||
// hooks
|
||||
import { useAppRouter } from "@/hooks/use-app-router";
|
||||
import { IssueStats } from "@/plane-web/components/issues/issue-layouts/issue-stats";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { observer } from "mobx-react";
|
|||
import { TIssue } from "@plane/types";
|
||||
// helpers
|
||||
import { Row } from "@plane/ui";
|
||||
import { renderFormattedDate } from "@/helpers/date-time.helper";
|
||||
import { renderFormattedDate } from "@plane/utils";
|
||||
|
||||
type Props = {
|
||||
issue: TIssue;
|
||||
|
|
|
|||
|
|
@ -11,12 +11,11 @@ import { useOutsideClickDetector } from "@plane/hooks";
|
|||
import { IIssueDisplayProperties, TIssue } from "@plane/types";
|
||||
// ui
|
||||
import { ControlLink, Row, Tooltip } from "@plane/ui";
|
||||
import { cn, generateWorkItemLink } from "@plane/utils";
|
||||
// components
|
||||
import { MultipleSelectEntityAction } from "@/components/core";
|
||||
import RenderIfVisible from "@/components/core/render-if-visible-HOC";
|
||||
// helper
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useIssues, useProject } from "@/hooks/store";
|
||||
import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection";
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import { SPREADSHEET_SELECT_GROUP } from "@plane/constants";
|
|||
import { IIssueDisplayFilterOptions, IIssueDisplayProperties } from "@plane/types";
|
||||
// components
|
||||
import { Row } from "@plane/ui";
|
||||
import { cn } from "@plane/utils";
|
||||
import { MultipleSelectGroupAction } from "@/components/core";
|
||||
import { SpreadsheetHeaderColumn } from "@/components/issues/issue-layouts";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { TSelectionHelper } from "@/hooks/use-multiple-select";
|
||||
|
||||
|
|
|
|||
|
|
@ -30,11 +30,10 @@ import {
|
|||
} from "@plane/types";
|
||||
// plane ui
|
||||
import { Avatar, CycleGroupIcon, DiceIcon, ISvgIcons, PriorityIcon, StateGroupIcon } from "@plane/ui";
|
||||
import { renderFormattedDate, getFileURL } from "@plane/utils";
|
||||
// components
|
||||
import { Logo } from "@/components/common";
|
||||
// helpers
|
||||
import { renderFormattedDate } from "@/helpers/date-time.helper";
|
||||
import { getFileURL } from "@/helpers/file.helper";
|
||||
// store
|
||||
import { store } from "@/lib/store-context";
|
||||
// plane web store
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import { useTranslation } from "@plane/i18n";
|
|||
import { ISearchIssueResponse, TIssue } from "@plane/types";
|
||||
// ui
|
||||
import { CustomMenu } from "@plane/ui";
|
||||
import { getDate, renderFormattedPayloadDate, getTabIndex } from "@plane/utils";
|
||||
// components
|
||||
import {
|
||||
CycleDropdown,
|
||||
|
|
@ -24,8 +25,6 @@ import {
|
|||
import { ParentIssuesListModal } from "@/components/issues";
|
||||
import { IssueLabelSelect } from "@/components/issues/select";
|
||||
// helpers
|
||||
import { getDate, renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
import { getTabIndex } from "@/helpers/tab-indices.helper";
|
||||
// hooks
|
||||
import { useProjectEstimates, useProject, useUserPermissions } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
|
|
|||
|
|
@ -15,12 +15,11 @@ import { TIssue } from "@plane/types";
|
|||
import { EFileAssetType } from "@plane/types/src/enums";
|
||||
// ui
|
||||
import { Loader, setToast, TOAST_TYPE } from "@plane/ui";
|
||||
import { getDescriptionPlaceholderI18n, getTabIndex } from "@plane/utils";
|
||||
// components
|
||||
import { GptAssistantPopover } from "@/components/core";
|
||||
import { RichTextEditor } from "@/components/editor";
|
||||
// helpers
|
||||
import { getDescriptionPlaceholderI18n } from "@/helpers/issue.helper";
|
||||
import { getTabIndex } from "@/helpers/tab-indices.helper";
|
||||
// hooks
|
||||
import { useEditorAsset, useInstance, useWorkspace } from "@/hooks/store";
|
||||
import useKeypress from "@/hooks/use-keypress";
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { ETabIndices } from "@plane/constants";
|
|||
// types
|
||||
import { ISearchIssueResponse, TIssue } from "@plane/types";
|
||||
// helpers
|
||||
import { getTabIndex } from "@/helpers/tab-indices.helper";
|
||||
import { getTabIndex } from "@plane/utils";
|
||||
// hooks
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
// plane web components
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ import { Control, Controller } from "react-hook-form";
|
|||
import { ETabIndices } from "@plane/constants";
|
||||
// types
|
||||
import { TIssue } from "@plane/types";
|
||||
import { getTabIndex } from "@plane/utils";
|
||||
// components
|
||||
import { ProjectDropdown } from "@/components/dropdowns";
|
||||
// helpers
|
||||
import { getTabIndex } from "@/helpers/tab-indices.helper";
|
||||
// hooks
|
||||
import { useIssueModal } from "@/hooks/context/use-issue-modal";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { TIssue } from "@plane/types";
|
|||
// ui
|
||||
import { Input } from "@plane/ui";
|
||||
// helpers
|
||||
import { getTabIndex } from "@/helpers/tab-indices.helper";
|
||||
import { getTabIndex } from "@plane/utils";
|
||||
// hooks
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import { createContext } from "react";
|
||||
// ce imports
|
||||
import { TIssueFields } from "ce/components/issues";
|
||||
// react-hook-form
|
||||
import { UseFormReset, UseFormWatch } from "react-hook-form";
|
||||
// plane imports
|
||||
import { EditorRefApi } from "@plane/editor";
|
||||
import { ISearchIssueResponse, TIssue } from "@plane/types";
|
||||
import { TIssuePropertyValues, TIssuePropertyValueErrors } from "@/plane-web/types/issue-types";
|
||||
import { TIssueFields } from "ce/components/issues";
|
||||
|
||||
export type TPropertyValuesValidationProps = {
|
||||
projectId: string | null;
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ import type { TIssue } from "@plane/types";
|
|||
// ui
|
||||
import { TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// components
|
||||
import { isEmptyHtmlString } from "@plane/utils";
|
||||
import { ConfirmIssueDiscard } from "@/components/issues";
|
||||
// helpers
|
||||
import { isEmptyHtmlString } from "@/helpers/string.helper";
|
||||
// hooks
|
||||
import { useIssueModal } from "@/hooks/context/use-issue-modal";
|
||||
import { useEventTracker, useWorkspaceDraftIssues } from "@/hooks/store";
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import { useTranslation } from "@plane/i18n";
|
|||
import type { TIssue, TWorkspaceDraftIssue } from "@plane/types";
|
||||
// hooks
|
||||
import { Button, ToggleSwitch, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import { convertWorkItemDataToSearchResponse, getUpdateFormDataForReset, cn, getTextContent, getChangedIssuefields, getTabIndex } from "@plane/utils";
|
||||
// components
|
||||
import { convertWorkItemDataToSearchResponse, getUpdateFormDataForReset } from "@plane/utils";
|
||||
import {
|
||||
IssueDefaultProperties,
|
||||
IssueDescriptionEditor,
|
||||
|
|
@ -24,10 +24,6 @@ import {
|
|||
} from "@/components/issues/issue-modal/components";
|
||||
import { CreateLabelModal } from "@/components/labels";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { getTextContent } from "@/helpers/editor.helper";
|
||||
import { getChangedIssuefields } from "@/helpers/issue-modal.helper";
|
||||
import { getTabIndex } from "@/helpers/tab-indices.helper";
|
||||
// hooks
|
||||
import { useIssueModal } from "@/hooks/context/use-issue-modal";
|
||||
import { useIssueDetail, useProject, useProjectState, useWorkspaceDraftIssues } from "@/hooks/store";
|
||||
|
|
|
|||
|
|
@ -12,11 +12,10 @@ import { useTranslation } from "@plane/i18n";
|
|||
import { ISearchIssueResponse } from "@plane/types";
|
||||
// ui
|
||||
import { Loader } from "@plane/ui";
|
||||
import { generateWorkItemLink, getTabIndex } from "@plane/utils";
|
||||
// components
|
||||
import { IssueSearchModalEmptyState } from "@/components/core";
|
||||
// helpers
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
import { getTabIndex } from "@/helpers/tab-indices.helper";
|
||||
// hooks
|
||||
import useDebounce from "@/hooks/use-debounce";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
|
|
|||
|
|
@ -18,12 +18,10 @@ import {
|
|||
Tooltip,
|
||||
setToast,
|
||||
} from "@plane/ui";
|
||||
import { copyUrlToClipboard } from "@plane/utils";
|
||||
import { copyUrlToClipboard, cn, generateWorkItemLink } from "@plane/utils";
|
||||
// components
|
||||
import { IssueSubscription, NameDescriptionUpdateStatus } from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
// store hooks
|
||||
import { useIssueDetail, useProject, useProjectState, useUser } from "@/hooks/store";
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ import { observer } from "mobx-react";
|
|||
import { EditorRefApi } from "@plane/editor";
|
||||
import { TNameDescriptionLoader } from "@plane/types";
|
||||
// components
|
||||
import { getTextContent } from "@plane/utils";
|
||||
import { DescriptionVersionsRoot } from "@/components/core/description-versions";
|
||||
import { IssueParentDetail, TIssueOperations } from "@/components/issues";
|
||||
// helpers
|
||||
import { getTextContent } from "@/helpers/editor.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useMember, useProject, useUser } from "@/hooks/store";
|
||||
import useReloadConfirmations from "@/hooks/use-reload-confirmation";
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import { Signal, Tag, Triangle, LayoutPanelTop, CalendarClock, CalendarCheck2, U
|
|||
import { useTranslation } from "@plane/i18n";
|
||||
// ui icons
|
||||
import { DiceIcon, DoubleCircleIcon, ContrastIcon } from "@plane/ui";
|
||||
import { cn, getDate, renderFormattedPayloadDate, shouldHighlightIssueDueDate } from "@plane/utils";
|
||||
// components
|
||||
import {
|
||||
DateDropdown,
|
||||
|
|
@ -18,9 +19,6 @@ import {
|
|||
import { ButtonAvatars } from "@/components/dropdowns/member/avatar";
|
||||
import { IssueCycleSelect, IssueModuleSelect, IssueLabel, TIssueOperations } from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { getDate, renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
import { shouldHighlightIssueDueDate } from "@/helpers/issue.helper";
|
||||
import { useIssueDetail, useMember, useProject, useProjectState } from "@/hooks/store";
|
||||
// plane web components
|
||||
import { IssueParentSelectRoot, IssueWorklogProperty } from "@/plane-web/components/issues";
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { EIssueServiceType } from "@plane/constants";
|
|||
// types
|
||||
import { TNameDescriptionLoader } from "@plane/types";
|
||||
// components
|
||||
import { cn } from "@plane/utils";
|
||||
import {
|
||||
DeleteIssueModal,
|
||||
IssuePeekOverviewHeader,
|
||||
|
|
@ -18,7 +19,6 @@ import {
|
|||
IssueDetailWidgets,
|
||||
} from "@/components/issues";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useIssueDetail } from "@/hooks/store";
|
||||
import useKeypress from "@/hooks/use-keypress";
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import { useTranslation } from "@plane/i18n";
|
|||
import { TIssue, TIssueServiceType } from "@plane/types";
|
||||
import { ControlLink, CustomMenu, Tooltip } from "@plane/ui";
|
||||
// components
|
||||
import { generateWorkItemLink } from "@plane/utils";
|
||||
import { RelationIssueProperty } from "@/components/issues/relations";
|
||||
// helpers
|
||||
import { generateWorkItemLink } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useIssueDetail, useProject, useProjectState } from "@/hooks/store";
|
||||
import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection";
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import { Combobox } from "@headlessui/react";
|
|||
import { useOutsideClickDetector } from "@plane/hooks";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
// components
|
||||
import { cn } from "@plane/utils";
|
||||
import { IssueLabelsList } from "@/components/ui";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useLabel } from "@/hooks/store";
|
||||
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { TNameDescriptionLoader } from "@plane/types";
|
|||
// components
|
||||
import { TextArea } from "@plane/ui";
|
||||
// types
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { cn } from "@plane/utils";
|
||||
import useDebounce from "@/hooks/use-debounce";
|
||||
import { TIssueOperations } from "./issue-detail";
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { TWorkspaceDraftIssue } from "@plane/types";
|
|||
import { Row, TContextMenuItem, Tooltip } from "@plane/ui";
|
||||
// constants
|
||||
// helper
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { cn } from "@plane/utils";
|
||||
// hooks
|
||||
import { useAppTheme, useProject, useWorkspaceDraftIssues } from "@/hooks/store";
|
||||
// plane-web components
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import { useParams } from "next/navigation";
|
|||
import { CalendarCheck2, CalendarClock } from "lucide-react";
|
||||
// types
|
||||
import { TIssuePriorities, TWorkspaceDraftIssue } from "@plane/types";
|
||||
import { getDate, renderFormattedPayloadDate, shouldHighlightIssueDueDate } from "@plane/utils";
|
||||
// components
|
||||
import {
|
||||
DateDropdown,
|
||||
|
|
@ -18,8 +19,6 @@ import {
|
|||
StateDropdown,
|
||||
} from "@/components/dropdowns";
|
||||
// helpers
|
||||
import { getDate, renderFormattedPayloadDate } from "@/helpers/date-time.helper";
|
||||
import { shouldHighlightIssueDueDate } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useLabel, useProjectState, useProject, useProjectEstimates, useWorkspaceDraftIssues } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { useTranslation } from "@plane/i18n";
|
|||
// ui
|
||||
import { ContextMenu, CustomMenu, TContextMenuItem } from "@plane/ui";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { cn } from "@plane/utils";
|
||||
|
||||
export interface Props {
|
||||
parentRef: React.RefObject<HTMLElement>;
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ import { EDraftIssuePaginationType } from "@plane/constants";
|
|||
import { EUserPermissionsLevel, EUserWorkspaceRoles } from "@plane/constants/src/user";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
// components
|
||||
import { cn } from "@plane/utils";
|
||||
import { ComicBoxButton, DetailedEmptyState } from "@/components/empty-state";
|
||||
// constants
|
||||
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useCommandPalette, useProject, useUserPermissions, useWorkspaceDraftIssues } from "@/hooks/store";
|
||||
import { useResolvedAssetPath } from "@/hooks/use-resolved-asset-path";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue