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:
Prateek Shourya 2025-06-16 17:18:41 +05:30 committed by GitHub
parent dffcc6dc10
commit 2014400bed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
614 changed files with 1999 additions and 3030 deletions

View file

@ -8,10 +8,8 @@ import { CircleAlert, XCircle } from "lucide-react";
import { useTranslation } from "@plane/i18n";
import { IEmailCheckData } from "@plane/types";
import { Button, Input, Spinner } from "@plane/ui";
import { cn, checkEmailValidity } from "@plane/utils";
// helpers
import { cn } from "@/helpers/common.helper";
import { checkEmailValidity } from "@/helpers/string.helper";
type TAuthEmailForm = {
defaultEmail: string;
onSubmit: (data: IEmailCheckData) => Promise<void>;

View file

@ -6,16 +6,15 @@ import Link from "next/link";
// icons
import { Eye, EyeOff, Info, X, XCircle } from "lucide-react";
// plane imports
import { FORGOT_PASSWORD, SIGN_IN_WITH_CODE, SIGN_IN_WITH_PASSWORD, SIGN_UP_WITH_PASSWORD } from "@plane/constants";
import { FORGOT_PASSWORD, SIGN_IN_WITH_CODE, SIGN_IN_WITH_PASSWORD, SIGN_UP_WITH_PASSWORD, API_BASE_URL, E_PASSWORD_STRENGTH } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { Button, Input, Spinner } from "@plane/ui";
import { getPasswordStrength } from "@plane/utils";
// components
import { ForgotPasswordPopover, PasswordStrengthMeter } from "@/components/account";
// constants
// helpers
import { EAuthModes, EAuthSteps } from "@/helpers/authentication.helper";
import { API_BASE_URL } from "@/helpers/common.helper";
import { E_PASSWORD_STRENGTH, getPasswordStrength } from "@/helpers/password.helper";
// hooks
import { useEventTracker } from "@/hooks/store";
// services

View file

@ -2,13 +2,12 @@
import React, { useEffect, useState } from "react";
import { CircleCheck, XCircle } from "lucide-react";
import { CODE_VERIFIED } from "@plane/constants";
import { CODE_VERIFIED, API_BASE_URL } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { Button, Input, Spinner } from "@plane/ui";
// constants
// helpers
import { EAuthModes } from "@/helpers/authentication.helper";
import { API_BASE_URL } from "@/helpers/common.helper";
// hooks
import { useEventTracker } from "@/hooks/store";
import useTimer from "@/hooks/use-timer";

View file

@ -3,7 +3,7 @@ import { useSearchParams } from "next/navigation";
import Image from "next/image";
import { useTheme } from "next-themes";
// helpers
import { API_BASE_URL } from "@/helpers/common.helper";
import { API_BASE_URL } from "@plane/constants";
// images
import githubLightModeImage from "/public/logos/github-black.png";
import githubDarkModeImage from "/public/logos/github-dark.svg";

View file

@ -3,7 +3,7 @@ import Image from "next/image";
import { useSearchParams } from "next/navigation";
import { useTheme } from "next-themes";
// helpers
import { API_BASE_URL } from "@/helpers/common.helper";
import { API_BASE_URL } from "@plane/constants";
// images
import GitlabLogo from "/public/logos/gitlab-logo.svg";

View file

@ -3,7 +3,7 @@ import { useSearchParams } from "next/navigation";
import Image from "next/image";
import { useTheme } from "next-themes";
// helpers
import { API_BASE_URL } from "@/helpers/common.helper";
import { API_BASE_URL } from "@plane/constants";
// images
import GoogleLogo from "/public/logos/google-logo.svg";

View file

@ -1,15 +1,10 @@
"use client";
import { FC, useMemo } from "react";
// plane imports
import { E_PASSWORD_STRENGTH } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
// import { CircleCheck } from "lucide-react";
// helpers
import { cn } from "@/helpers/common.helper";
import {
E_PASSWORD_STRENGTH,
// PASSWORD_CRITERIA,
getPasswordStrength,
} from "@/helpers/password.helper";
import { cn, getPasswordStrength } from "@plane/utils";
type TPasswordStrengthMeter = {
password: string;
@ -59,7 +54,7 @@ export const PasswordStrengthMeter: FC<TPasswordStrengthMeter> = (props) => {
};
}
}
}, [strength,t]);
}, [strength, t]);
const isPasswordMeterVisible = isFocused ? true : strength === E_PASSWORD_STRENGTH.STRENGTH_VALID ? false : true;

View file

@ -3,14 +3,12 @@
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
import { Briefcase } from "lucide-react";
import { ChartYAxisMetric, EEstimateSystem } from "@plane/constants";
// plane package imports
import { ChartYAxisMetric } from "@plane/constants";
import { CustomSelect } from "@plane/ui";
// hooks
import { useProjectEstimates } from "@/hooks/store";
// plane web constants
import { EEstimateSystem } from "@/plane-web/constants/estimates";
type Props = {
value: ChartYAxisMetric;
onChange: (val: ChartYAxisMetric | null) => void;

View file

@ -5,12 +5,12 @@ import useSWR from "swr";
import { IInsightField, ANALYTICS_INSIGHTS_FIELDS } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { IAnalyticsResponse, TAnalyticsTabsBase } from "@plane/types";
//hooks
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
// hooks
import { useAnalytics } from "@/hooks/store/use-analytics";
//services
// services
import { AnalyticsService } from "@/services/analytics.service";
// plane web components
// local imports
import InsightCard from "./insight-card";
const analyticsService = new AnalyticsService();

View file

@ -7,13 +7,12 @@ import { mutate } from "swr";
import { IApiToken } from "@plane/types";
// ui
import { EModalPosition, EModalWidth, ModalCore, TOAST_TYPE, setToast } from "@plane/ui";
import { renderFormattedDate, csvDownload } from "@plane/utils";
// components
import { CreateApiTokenForm, GeneratedTokenDetails } from "@/components/api-token";
// fetch-keys
import { API_TOKENS_LIST } from "@/constants/fetch-keys";
// helpers
import { renderFormattedDate } from "@/helpers/date-time.helper";
import { csvDownload } from "@/helpers/download.helper";
// services
import { APITokenService } from "@/services/api_token.service";

View file

@ -9,12 +9,10 @@ import { useTranslation } from "@plane/i18n";
import { IApiToken } from "@plane/types";
// ui
import { Button, CustomSelect, Input, TextArea, ToggleSwitch, TOAST_TYPE, setToast } from "@plane/ui";
import { cn, renderFormattedDate, renderFormattedTime } from "@plane/utils";
// components
import { DateDropdown } from "@/components/dropdowns";
// helpers
import { cn } from "@/helpers/common.helper";
import { renderFormattedDate, renderFormattedTime } from "@/helpers/date-time.helper";
type Props = {
handleClose: () => void;
neverExpires: boolean;

View file

@ -5,9 +5,8 @@ import { useTranslation } from "@plane/i18n";
import { IApiToken } from "@plane/types";
// ui
import { Button, Tooltip, TOAST_TYPE, setToast } from "@plane/ui";
import { renderFormattedDate, renderFormattedTime, copyTextToClipboard } from "@plane/utils";
// helpers
import { renderFormattedDate, renderFormattedTime } from "@/helpers/date-time.helper";
import { copyTextToClipboard } from "@/helpers/string.helper";
// types
import { usePlatformOS } from "@/hooks/use-platform-os";
// hooks

View file

@ -5,8 +5,8 @@ import { XCircle } from "lucide-react";
import { IApiToken } from "@plane/types";
// components
import { Tooltip } from "@plane/ui";
import { renderFormattedDate, calculateTimeAgo, renderFormattedTime } from "@plane/utils";
import { DeleteApiTokenModal } from "@/components/api-token";
import { renderFormattedDate, calculateTimeAgo, renderFormattedTime } from "@/helpers/date-time.helper";
import { usePlatformOS } from "@/hooks/use-platform-os";
// ui
// helpers

View file

@ -5,7 +5,7 @@ import { observer } from "mobx-react";
import { useParams } from "next/navigation";
import { ArchiveRestore } from "lucide-react";
// types
import { PROJECT_AUTOMATION_MONTHS,EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
import { PROJECT_AUTOMATION_MONTHS, EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { IProject } from "@plane/types";
// ui

View file

@ -1,8 +1,8 @@
import { getWeekOfMonth, isValid } from "date-fns";
import { CHART_X_AXIS_DATE_PROPERTIES, ChartXAxisDateGrouping, ChartXAxisProperty, TO_CAPITALIZE_PROPERTIES } from "@plane/constants";
import { TChart, TChartDatum } from "@plane/types";
import { capitalizeFirstLetter, hexToHsl, hslToHex, renderFormattedDate } from "@plane/utils";
import { renderFormattedDateWithoutYear } from "@/helpers/date-time.helper";
import { capitalizeFirstLetter, hexToHsl, hslToHex, renderFormattedDate, renderFormattedDateWithoutYear } from "@plane/utils";
//
const getDateGroupingName = (date: string, dateGrouping: ChartXAxisDateGrouping): string => {
if (!date || ["none", "null"].includes(date.toLowerCase())) return "None";

View file

@ -9,7 +9,7 @@ import { TIssue } from "@plane/types";
// hooks
import { DoubleCircleIcon, TOAST_TYPE, setToast } from "@plane/ui";
// helpers
import { copyTextToClipboard } from "@/helpers/string.helper";
import { copyTextToClipboard } from "@plane/utils";
// hooks
import { useCommandPalette, useIssueDetail, useUser } from "@/hooks/store";

View file

@ -10,7 +10,7 @@ import { TIssue } from "@plane/types";
// plane ui
import { Avatar } from "@plane/ui";
// helpers
import { getFileURL } from "@/helpers/file.helper";
import { getFileURL } from "@plane/utils";
// hooks
import { useIssueDetail, useMember } from "@/hooks/store";

View file

@ -12,7 +12,7 @@ import { EUserPermissions, EUserPermissionsLevel, WORKSPACE_DEFAULT_SEARCH_RESUL
import { useTranslation } from "@plane/i18n";
import { IWorkspaceSearchResults } from "@plane/types";
import { LayersIcon, Loader, ToggleSwitch } from "@plane/ui";
import { cn } from "@plane/utils";
import { cn, getTabIndex } from "@plane/utils";
// components
import {
ChangeIssueAssignee,
@ -27,7 +27,6 @@ import {
} from "@/components/command-palette";
import { SimpleEmptyState } from "@/components/empty-state";
// helpers
import { getTabIndex } from "@/helpers/tab-indices.helper";
// hooks
import {
useCommandPalette,

View file

@ -8,9 +8,9 @@ import useSWR from "swr";
import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
import { TOAST_TYPE, setToast } from "@plane/ui";
// components
import { copyTextToClipboard } from "@plane/utils";
import { CommandModal, ShortcutsModal } from "@/components/command-palette";
// helpers
import { copyTextToClipboard } from "@/helpers/string.helper";
// hooks
import {
useEventTracker,

View file

@ -1,6 +1,6 @@
import { Command } from "lucide-react";
// helpers
import { substringMatch } from "@/helpers/string.helper";
import { substringMatch } from "@plane/utils";
// hooks
import { usePlatformOS } from "@/hooks/use-platform-os";
// plane web helpers

View file

@ -11,9 +11,9 @@ import { useTranslation } from "@plane/i18n";
import { TIssueComment, TCommentsOperations } from "@plane/types";
import { CustomMenu } from "@plane/ui";
// components
import { isCommentEmpty } from "@plane/utils";
import { LiteTextEditor, LiteTextReadOnlyEditor } from "@/components/editor";
// helpers
import { isCommentEmpty } from "@/helpers/string.helper";
// hooks
import { useUser } from "@/hooks/store";
//

View file

@ -7,12 +7,11 @@ import { EIssueCommentAccessSpecifier } from "@plane/constants";
import { EditorRefApi } from "@plane/editor";
// plane types
import { TIssueComment, TCommentsOperations } from "@plane/types";
import { cn, isCommentEmpty } from "@plane/utils";
// components
import { LiteTextEditor } from "@/components/editor";
// constants
import { cn } from "@/helpers/common.helper";
// helpers
import { isCommentEmpty } from "@/helpers/string.helper";
// hooks
import { useWorkspace } from "@/hooks/store";
// services

View file

@ -6,9 +6,9 @@ import { observer } from "mobx-react";
import { TCommentsOperations, TIssueComment } from "@plane/types";
import { Tooltip } from "@plane/ui";
// components
import { cn } from "@plane/utils";
import { ReactionSelector } from "@/components/issues";
// helpers
import { cn } from "@/helpers/common.helper";
import { renderEmoji } from "@/helpers/emoji.helper";
export type TProps = {

View file

@ -7,7 +7,7 @@ import { TWorkspaceBaseActivity } from "@plane/types";
// ui
import { Tooltip } from "@plane/ui";
// helpers
import { renderFormattedTime, renderFormattedDate, calculateTimeAgo } from "@/helpers/date-time.helper";
import { renderFormattedTime, renderFormattedDate, calculateTimeAgo } from "@plane/utils";
// hooks
import { usePlatformOS } from "@/hooks/use-platform-os";
// local components

View file

@ -3,10 +3,8 @@ import { observer } from "mobx-react";
import { X } from "lucide-react";
// plane constants
import { DATE_BEFORE_FILTER_OPTIONS } from "@plane/constants";
import { renderFormattedDate, capitalizeFirstLetter } from "@plane/utils";
// helpers
import { renderFormattedDate } from "@/helpers/date-time.helper";
import { capitalizeFirstLetter } from "@/helpers/string.helper";
type Props = {
editable: boolean | undefined;
handleRemove: (val: string) => void;

View file

@ -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";
// types
import { useMember } from "@/hooks/store";

View file

@ -2,7 +2,7 @@
import { FC } from "react";
//
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
type TCountChip = {
count: string | number;

View file

@ -2,10 +2,10 @@ import React, { useState } from "react";
import { observer } from "mobx-react";
// plane constants
import { DATE_BEFORE_FILTER_OPTIONS } from "@plane/constants";
import { isInDateFormat } from "@plane/utils";
import { DateFilterModal } from "@/components/core";
import { FilterHeader, FilterOption } from "@/components/issues";
// helpers
import { isInDateFormat } from "@/helpers/date-time.helper";
type Props = {
appliedFilters: string[] | null;

View file

@ -6,9 +6,9 @@ import { observer } from "mobx-react";
// 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";

View file

@ -6,12 +6,10 @@ import { Emoji } from "emoji-picker-react";
// should be after the imported here rather than some below helper functions as it is in the original file
// eslint-disable-next-line import/order
import useFontFaceObserver from "use-font-face-observer";
// types
// plane imports
import { LUCIDE_ICONS_LIST } from "@plane/constants";
import { TLogoProps } from "@plane/types";
// ui
import { LUCIDE_ICONS_LIST } from "@plane/ui";
// helpers
import { emojiCodeToUnicode } from "@/helpers/emoji.helper";
import { emojiCodeToUnicode } from "@plane/utils";
type Props = {
logo: TLogoProps;

View file

@ -3,7 +3,7 @@
import { FC } from "react";
import { Crown } from "lucide-react";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
type TProIcon = {
className?: string;

View file

@ -1,8 +1,7 @@
import { FC } from "react";
import { TLogoProps } from "@plane/types";
import { ISvgIcons, Logo } from "@plane/ui";
import { getFileURL } from "@plane/utils";
import { truncateText } from "@/helpers/string.helper";
import { getFileURL, truncateText } from "@plane/utils";
type TSwitcherLabelProps = {
logo_props?: TLogoProps;
logo_url?: string;

View file

@ -22,10 +22,8 @@ import {
} from "lucide-react";
import { IIssueActivity } from "@plane/types";
import { Tooltip, BlockedIcon, BlockerIcon, RelatedIcon, LayersIcon, DiceIcon, Intake, EpicIcon } from "@plane/ui";
import { renderFormattedDate, generateWorkItemLink, capitalizeFirstLetter } from "@plane/utils";
// helpers
import { renderFormattedDate } from "@/helpers/date-time.helper";
import { generateWorkItemLink } from "@/helpers/issue.helper";
import { capitalizeFirstLetter } from "@/helpers/string.helper";
import { useLabel } from "@/hooks/store";
import { usePlatformOS } from "@/hooks/use-platform-os";
// types

View file

@ -2,7 +2,7 @@
import { ReactNode } from "react";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
export interface ContentWrapperProps {
className?: string;

View file

@ -7,7 +7,7 @@ import { Dialog, Transition } from "@headlessui/react";
import { Button, Calendar } from "@plane/ui";
import { renderFormattedPayloadDate, renderFormattedDate, getDate } from "@/helpers/date-time.helper";
import { renderFormattedPayloadDate, renderFormattedDate, getDate } from "@plane/utils";
import { DateFilterSelect } from "./date-filter-select";
type Props = {
title: string;

View file

@ -16,7 +16,7 @@ import { EFileAssetType } from "@plane/types/src/enums";
// ui
import { Button, Input, Loader, TOAST_TYPE, setToast } from "@plane/ui";
// helpers
import { getFileURL } from "@/helpers/file.helper";
import { getFileURL } from "@plane/utils";
// hooks
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
// services

View file

@ -3,7 +3,7 @@ import React, { FC } from "react";
// ui
import { ControlLink, Row, Tooltip } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
// hooks
import { useAppRouter } from "@/hooks/use-app-router";

View file

@ -9,9 +9,8 @@ import { useTranslation } from "@plane/i18n";
import { ISearchIssueResponse, TProjectIssuesSearchParams } from "@plane/types";
// ui
import { Button, Loader, ToggleSwitch, Tooltip, TOAST_TYPE, setToast } from "@plane/ui";
import { generateWorkItemLink, getTabIndex } from "@plane/utils";
// 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";

View file

@ -9,9 +9,8 @@ import { Transition, Dialog } from "@headlessui/react";
import { ACCEPTED_AVATAR_IMAGE_MIME_TYPES_FOR_REACT_DROPZONE, MAX_FILE_SIZE } from "@plane/constants";
import { EFileAssetType } from "@plane/types/src/enums";
import { Button, TOAST_TYPE, setToast } from "@plane/ui";
import { getAssetIdFromUrl, getFileURL, checkURLValidity } from "@plane/utils";
// helpers
import { getAssetIdFromUrl, getFileURL } from "@/helpers/file.helper";
import { checkURLValidity } from "@/helpers/string.helper";
// services
import { FileService } from "@/services/file.service";
const fileService = new FileService();

View file

@ -9,9 +9,8 @@ import { Transition, Dialog } from "@headlessui/react";
import { ACCEPTED_AVATAR_IMAGE_MIME_TYPES_FOR_REACT_DROPZONE, MAX_FILE_SIZE } from "@plane/constants";
import { EFileAssetType } from "@plane/types/src/enums";
import { Button, TOAST_TYPE, setToast } from "@plane/ui";
import { getAssetIdFromUrl, getFileURL, checkURLValidity } from "@plane/utils";
// helpers
import { getAssetIdFromUrl, getFileURL } from "@/helpers/file.helper";
import { checkURLValidity } from "@/helpers/string.helper";
// hooks
import { useWorkspace } from "@/hooks/store";
// services

View file

@ -4,7 +4,7 @@ import { observer } from "mobx-react";
// ui
import { Checkbox } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
// hooks
import { TSelectionHelper } from "@/hooks/use-multiple-select";

View file

@ -2,7 +2,7 @@
// ui
import { Checkbox } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
// hooks
import { TSelectionHelper } from "@/hooks/use-multiple-select";

View file

@ -1,5 +1,5 @@
import React, { useState, useRef, useEffect, ReactNode, MutableRefObject } from "react";
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
type Props = {
defaultHeight?: string;

View file

@ -1,7 +1,8 @@
import React from "react";
// plane imports
import { AreaChart } from "@plane/propel/charts/area-chart";
import { TChartData, TModuleCompletionChartDistribution } from "@plane/types";
import { renderFormattedDateWithoutYear } from "@/helpers/date-time.helper";
import { renderFormattedDateWithoutYear } from "@plane/utils";
type Props = {
distribution: TModuleCompletionChartDistribution;

View file

@ -12,14 +12,12 @@ import { useTranslation } from "@plane/i18n";
import { ICycle, IIssueFilterOptions } from "@plane/types";
// ui
import { Tooltip, Loader, PriorityIcon, Avatar } from "@plane/ui";
import { cn, renderFormattedDate, renderFormattedDateWithoutYear, getFileURL } from "@plane/utils";
// components
import { SingleProgressStats } from "@/components/core";
import { StateDropdown } from "@/components/dropdowns";
import { SimpleEmptyState } from "@/components/empty-state";
// helpers
import { cn } from "@/helpers/common.helper";
import { renderFormattedDate, renderFormattedDateWithoutYear } from "@/helpers/date-time.helper";
import { getFileURL } from "@/helpers/file.helper";
// hooks
import { useIssueDetail, useIssues } from "@/hooks/store";
import { useIntersectionObserver } from "@/hooks/use-intersection-observer";

View file

@ -11,10 +11,10 @@ import { EIssueFilterType, EIssuesStoreType } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { ICycle, IIssueFilterOptions, TCyclePlotType, TProgressSnapshot } from "@plane/types";
// components
import { getDate } from "@plane/utils";
import { CycleProgressStats } from "@/components/cycles";
// constants
// helpers
import { getDate } from "@/helpers/date-time.helper";
// hooks
import { useIssues, useCycle } from "@/hooks/store";
// plane web components

View file

@ -14,11 +14,10 @@ import {
TStateGroups,
} from "@plane/types";
import { Avatar, StateGroupIcon } from "@plane/ui";
import { cn, getFileURL } from "@plane/utils";
// components
import { SingleProgressStats } from "@/components/core";
// helpers
import { cn } from "@/helpers/common.helper";
import { getFileURL } from "@/helpers/file.helper";
// hooks
import { useProjectState } from "@/hooks/store";
import useLocalStorage from "@/hooks/use-local-storage";

View file

@ -4,16 +4,16 @@ import isEmpty from "lodash/isEmpty";
import { observer } from "mobx-react";
import { LayersIcon, SquareUser, Users } from "lucide-react";
// plane types
import { EEstimateSystem } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { ICycle } from "@plane/types";
// plane ui
import { Avatar, AvatarGroup, TextArea } from "@plane/ui";
// helpers
import { getFileURL } from "@/helpers/file.helper";
import { getFileURL } from "@plane/utils";
// hooks
import { useMember, useProjectEstimates } from "@/hooks/store";
// plane web constants
import { EEstimateSystem } from "@/plane-web/constants/estimates";
type Props = {
projectId: string;

View file

@ -9,18 +9,15 @@ import { CYCLE_STATUS, CYCLE_UPDATED, EUserPermissions, EUserPermissionsLevel }
import { useTranslation } from "@plane/i18n";
import { ICycle } from "@plane/types";
import { setToast, TOAST_TYPE } from "@plane/ui";
import { getDate, renderFormattedPayloadDate } from "@plane/utils";
// components
import { DateRangeDropdown } from "@/components/dropdowns";
// helpers
import { renderFormattedPayloadDate, getDate } from "@/helpers/date-time.helper";
// hooks
import { useCycle, useEventTracker, useUserPermissions } from "@/hooks/store";
import { useAppRouter } from "@/hooks/use-app-router";
// plane web constants
// services
import { useTimeZoneConverter } from "@/hooks/use-timezone-converter";
// services
import { CycleService } from "@/services/cycle.service";
// local components
// local imports
import { ArchiveCycleModal } from "../archived-cycles";
import { CycleDeleteModal } from "../delete-modal";
@ -41,15 +38,13 @@ const cycleService = new CycleService();
export const CycleSidebarHeader: FC<Props> = observer((props) => {
const { workspaceSlug, projectId, cycleDetails, handleClose, isArchived = false } = props;
// router
const router = useAppRouter();
// states
const [archiveCycleModal, setArchiveCycleModal] = useState(false);
const [cycleDeleteModal, setCycleDeleteModal] = useState(false);
// hooks
const { allowPermissions } = useUserPermissions();
const { updateCycleDetails, restoreCycle } = useCycle();
const { setTrackElement, captureCycleEvent } = useEventTracker();
const { updateCycleDetails } = useCycle();
const { captureCycleEvent } = useEventTracker();
const { t } = useTranslation();
const { renderFormattedDateInUserTimezone, getProjectUTCOffset } = useTimeZoneConverter(projectId);

View file

@ -2,8 +2,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 = {

View file

@ -5,8 +5,8 @@ import { useTranslation } from "@plane/i18n";
import { TCycleFilters } from "@plane/types";
// hooks
import { Tag } from "@plane/ui";
import { replaceUnderscoreIfSnakeCase } from "@plane/utils";
import { AppliedDateFilters, AppliedStatusFilters } from "@/components/cycles";
import { replaceUnderscoreIfSnakeCase } from "@/helpers/string.helper";
import { useUserPermissions } from "@/hooks/store";
// components

View file

@ -2,7 +2,7 @@ import { observer } from "mobx-react";
import { X } from "lucide-react";
import { CYCLE_STATUS } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
type Props = {
handleRemove: (val: string) => void;

View file

@ -7,13 +7,12 @@ import { ListFilter, Search, X } from "lucide-react";
import { useOutsideClickDetector } from "@plane/hooks";
// types
import type { TCycleFilters } from "@plane/types";
import { cn, calculateTotalFilters } from "@plane/utils";
// components
import { ArchiveTabsList } from "@/components/archives";
import { CycleFiltersSelection } from "@/components/cycles";
import { FiltersDropdown } from "@/components/issues";
// helpers
import { cn } from "@/helpers/common.helper";
import { calculateTotalFilters } from "@/helpers/filter.helper";
// hooks
import { useCycleFilter } from "@/hooks/store";

View file

@ -6,11 +6,11 @@ import useSWR from "swr";
import { useTranslation } from "@plane/i18n";
import { TCycleFilters } from "@plane/types";
// components
import { calculateTotalFilters } from "@plane/utils";
import { ArchivedCyclesView, CycleAppliedFiltersList } from "@/components/cycles";
import { DetailedEmptyState } from "@/components/empty-state";
import { CycleModuleListLayout } from "@/components/ui";
// helpers
import { calculateTotalFilters } from "@/helpers/filter.helper";
// hooks
import { useCycle, useCycleFilter } from "@/hooks/store";
import { useResolvedAssetPath } from "@/hooks/use-resolved-asset-path";

View file

@ -2,7 +2,7 @@ import React, { useEffect } from "react";
import { observer } from "mobx-react";
import { usePathname, useSearchParams } from "next/navigation";
// hooks
import { generateQueryParams } from "@/helpers/router.helper";
import { generateQueryParams } from "@plane/utils";
import { useCycle } from "@/hooks/store";
import { useAppRouter } from "@/hooks/use-app-router";
// components

View file

@ -7,12 +7,11 @@ import { useOutsideClickDetector } from "@plane/hooks";
// types
import { useTranslation } from "@plane/i18n";
import { TCycleFilters } from "@plane/types";
import { cn, calculateTotalFilters } from "@plane/utils";
// components
import { CycleFiltersSelection } from "@/components/cycles";
import { FiltersDropdown } from "@/components/issues";
// helpers
import { cn } from "@/helpers/common.helper";
import { calculateTotalFilters } from "@/helpers/filter.helper";
// hooks
import { useCycleFilter } from "@/hooks/store";

View file

@ -3,11 +3,11 @@ import { observer } from "mobx-react";
// constants
import { DATE_AFTER_FILTER_OPTIONS } from "@plane/constants";
// components
import { isInDateFormat } from "@plane/utils";
import { DateFilterModal } from "@/components/core";
import { FilterHeader, FilterOption } from "@/components/issues";
// helpers
import { isInDateFormat } from "@/helpers/date-time.helper";
type Props = {
appliedFilters: string[] | null;

View file

@ -3,11 +3,11 @@ import { observer } from "mobx-react";
// constants
import { DATE_AFTER_FILTER_OPTIONS } from "@plane/constants";
// components
import { isInDateFormat } from "@plane/utils";
import { DateFilterModal } from "@/components/core";
import { FilterHeader, FilterOption } from "@/components/issues";
// helpers
import { isInDateFormat } from "@/helpers/date-time.helper";
type Props = {
appliedFilters: string[] | null;

View file

@ -9,12 +9,9 @@ import { useTranslation } from "@plane/i18n";
import { ICycle } from "@plane/types";
// ui
import { Button, Input, TextArea } from "@plane/ui";
import { getDate, renderFormattedPayloadDate, getTabIndex } from "@plane/utils";
// components
import { DateRangeDropdown, ProjectDropdown } from "@/components/dropdowns";
// constants
// helpers
import { getDate, renderFormattedPayloadDate } from "@/helpers/date-time.helper";
import { getTabIndex } from "@/helpers/tab-indices.helper";
// hooks
import { useUser } from "@/hooks/store/user/user-user";

View file

@ -7,7 +7,7 @@ import { TCycleGroups } from "@plane/types";
// icons
import { Row, CycleGroupIcon } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
type Props = {
type: TCycleGroups;

View file

@ -18,15 +18,13 @@ import { useTranslation } from "@plane/i18n";
import { ICycle, TCycleGroups } from "@plane/types";
// ui
import { Avatar, AvatarGroup, FavoriteStar, LayersIcon, Tooltip, TransferIcon, setPromiseToast } from "@plane/ui";
import { getDate, getFileURL, generateQueryParams } from "@plane/utils";
// components
import { CycleQuickActions, TransferIssuesModal } from "@/components/cycles";
import { DateRangeDropdown } from "@/components/dropdowns";
import { ButtonAvatars } from "@/components/dropdowns/member/avatar";
import { MergedDateDisplay } from "@/components/dropdowns/merged-date";
import { getDate } from "@/helpers/date-time.helper";
import { getFileURL } from "@/helpers/file.helper";
// hooks
import { generateQueryParams } from "@/helpers/router.helper";
import { useCycle, useEventTracker, useMember, useUserPermissions } from "@/hooks/store";
import { useAppRouter } from "@/hooks/use-app-router";
import { usePlatformOS } from "@/hooks/use-platform-os";

View file

@ -6,7 +6,7 @@ import { ChevronRight } from "lucide-react";
// icons
import { Row, Logo } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
import { useProject } from "@/hooks/store/use-project";
type Props = {

View file

@ -10,11 +10,11 @@ import type { TCycleGroups } from "@plane/types";
// ui
import { CircularProgressIndicator } from "@plane/ui";
// components
import { generateQueryParams } from "@plane/utils";
import { ListItem } from "@/components/core/list";
import { CycleQuickActions } from "@/components/cycles/";
import { CycleListItemAction } from "@/components/cycles/list";
// helpers
import { generateQueryParams } from "@/helpers/router.helper";
// hooks
import { useCycle } from "@/hooks/store";
import { useAppRouter } from "@/hooks/use-app-router";

View file

@ -9,11 +9,10 @@ import { ArchiveRestoreIcon, ExternalLink, LinkIcon, Pencil, Trash2 } from "luci
import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { ArchiveIcon, ContextMenu, CustomMenu, TContextMenuItem, TOAST_TYPE, setToast } from "@plane/ui";
import { copyUrlToClipboard } from "@plane/utils";
import { copyUrlToClipboard, cn } from "@plane/utils";
// components
import { ArchiveCycleModal, CycleCreateUpdateModal, CycleDeleteModal } from "@/components/cycles";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
import { useCycle, useEventTracker, useUserPermissions } from "@/hooks/store";
import { useAppRouter } from "@/hooks/use-app-router";

View file

@ -2,7 +2,7 @@
// helpers
import { Tooltip } from "@plane/ui";
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
// types
import { usePlatformOS } from "@/hooks/use-platform-os";
import { BACKGROUND_BUTTON_VARIANTS, BORDER_BUTTON_VARIANTS } from "./constants";

View file

@ -7,7 +7,7 @@ import { useTranslation } from "@plane/i18n";
// ui
import { ComboDropDown, ContrastIcon } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
// hooks
import { useCycle } from "@/hooks/store";
import { useDropdown } from "@/hooks/use-dropdown";

View file

@ -10,9 +10,8 @@ import { Combobox } from "@headlessui/react";
import { useTranslation } from "@plane/i18n";
// ui
import { ComboDropDown, Calendar } from "@plane/ui";
import { cn, renderFormattedDate } from "@plane/utils";
// helpers
import { cn } from "@/helpers/common.helper";
import { renderFormattedDate } from "@/helpers/date-time.helper";
// hooks
import { useDropdown } from "@/hooks/use-dropdown";
// components

View file

@ -8,9 +8,8 @@ import { Combobox } from "@headlessui/react";
// ui
import { EStartOfTheWeek } from "@plane/constants";
import { ComboDropDown, Calendar } from "@plane/ui";
import { cn, renderFormattedDate, getDate } from "@plane/utils";
// helpers
import { cn } from "@/helpers/common.helper";
import { renderFormattedDate, getDate } from "@/helpers/date-time.helper";
// hooks
import { useUserProfile } from "@/hooks/store";
import { useDropdown } from "@/hooks/use-dropdown";

View file

@ -8,9 +8,8 @@ import { Combobox } from "@headlessui/react";
import { useTranslation } from "@plane/i18n";
import { EEstimateSystem } from "@plane/types/src/enums";
import { ComboDropDown } from "@plane/ui";
import { convertMinutesToHoursMinutesString, cn } from "@plane/utils";
// helpers
import { convertMinutesToHoursMinutesString } from "@plane/utils";
import { cn } from "@/helpers/common.helper";
// hooks
import {
useEstimate,

View file

@ -4,10 +4,9 @@ import { observer } from "mobx-react";
import { LucideIcon, Users } from "lucide-react";
// plane ui
import { Avatar, AvatarGroup } from "@plane/ui";
import { cn, getFileURL } from "@plane/utils";
// plane utils
import { cn } from "@plane/utils";
// helpers
import { getFileURL } from "@/helpers/file.helper";
// hooks
import { useMember } from "@/hooks/store";

View file

@ -5,7 +5,7 @@ import { useTranslation } from "@plane/i18n";
// ui
import { ComboDropDown } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
// hooks
import { useMember } from "@/hooks/store";
import { useDropdown } from "@/hooks/use-dropdown";

View file

@ -12,9 +12,8 @@ import { EUserPermissions } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
// plane ui
import { Avatar } from "@plane/ui";
import { cn, getFileURL } from "@plane/utils";
// helpers
import { cn } from "@/helpers/common.helper";
import { getFileURL } from "@/helpers/file.helper";
// hooks
import { useUser, useMember } from "@/hooks/store";
import { usePlatformOS } from "@/hooks/use-platform-os";

View file

@ -1,8 +1,7 @@
import React from "react";
import { observer } from "mobx-react";
// helpers
import { formatDateRange } from "@plane/utils";
import { getDate } from "@/helpers/date-time.helper";
import { formatDateRange, getDate } from "@plane/utils";
type Props = {
startDate: Date | string | null | undefined;

View file

@ -8,7 +8,7 @@ import { useTranslation } from "@plane/i18n";
// ui
import { ComboDropDown, DiceIcon, Tooltip } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
// hooks
import { useModule } from "@/hooks/store";
import { useDropdown } from "@/hooks/use-dropdown";

View file

@ -12,7 +12,7 @@ import { useTranslation } from "@plane/i18n";
//components
import { DiceIcon } from "@plane/ui";
//store
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
import { useModule } from "@/hooks/store";
import { usePlatformOS } from "@/hooks/use-platform-os";
//hooks

View file

@ -12,7 +12,7 @@ import { TIssuePriorities } from "@plane/types";
// ui
import { ComboDropDown, PriorityIcon, Tooltip } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
// hooks
import { useDropdown } from "@/hooks/use-dropdown";
import { usePlatformOS } from "@/hooks/use-platform-os";

View file

@ -7,9 +7,9 @@ import { Combobox } from "@headlessui/react";
import { useTranslation } from "@plane/i18n";
import { ComboDropDown } from "@plane/ui";
// components
import { cn } from "@plane/utils";
import { Logo } from "@/components/common";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
import { useProject } from "@/hooks/store";
import { useDropdown } from "@/hooks/use-dropdown";

View file

@ -10,7 +10,7 @@ import { useTranslation } from "@plane/i18n";
// ui
import { ComboDropDown, Spinner, StateGroupIcon } from "@plane/ui";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
// hooks
import { useProjectState } from "@/hooks/store";
import { useDropdown } from "@/hooks/use-dropdown";

View file

@ -7,10 +7,9 @@ import { usePopper } from "react-popper";
import { ROLE } from "@plane/constants";
// plane ui
import { Avatar } from "@plane/ui";
import { cn, getFileURL } from "@plane/utils";
// constants
// helpers
import { cn } from "@/helpers/common.helper";
import { getFileURL } from "@/helpers/file.helper";
// hooks
import { useMember, useUser } from "@/hooks/store";

View file

@ -7,10 +7,9 @@ import { EditorRefApi, ILiteTextEditor, LiteTextEditorWithRef, TFileHandler } fr
import { useTranslation } from "@plane/i18n";
// components
import { MakeOptional } from "@plane/types";
import { cn, isCommentEmpty } from "@plane/utils";
import { EditorMentionsRoot, IssueCommentToolbar } from "@/components/editor";
// helpers
import { cn } from "@/helpers/common.helper";
import { isCommentEmpty } from "@/helpers/string.helper";
// hooks
import { useEditorConfig, useEditorMention } from "@/hooks/editor";
// store hooks

View file

@ -3,9 +3,9 @@ import React from "react";
import { EditorReadOnlyRefApi, ILiteTextReadOnlyEditor, LiteTextReadOnlyEditorWithRef } from "@plane/editor";
import { MakeOptional } from "@plane/types";
// components
import { cn } from "@plane/utils";
import { EditorMentionsRoot } from "@/components/editor";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
import { useEditorConfig } from "@/hooks/editor";
// store hooks

View file

@ -10,9 +10,9 @@ import { useTranslation } from "@plane/i18n";
// ui
import { Button, Tooltip } from "@plane/ui";
// constants
import { cn } from "@plane/utils";
import { TOOLBAR_ITEMS, ToolbarMenuItem } from "@/constants/editor";
// helpers
import { cn } from "@/helpers/common.helper";
type Props = {
accessSpecifier?: EIssueCommentAccessSpecifier;

View file

@ -3,9 +3,9 @@ import React, { forwardRef } from "react";
import { EditorRefApi, IRichTextEditor, RichTextEditorWithRef, TFileHandler } from "@plane/editor";
import { MakeOptional, TSearchEntityRequestPayload, TSearchResponse } from "@plane/types";
// components
import { cn } from "@plane/utils";
import { EditorMentionsRoot } from "@/components/editor";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
import { useEditorConfig, useEditorMention } from "@/hooks/editor";
// store hooks

View file

@ -1,11 +1,13 @@
"use client";
import React from "react";
// plane imports
import { EditorReadOnlyRefApi, IRichTextReadOnlyEditor, RichTextReadOnlyEditorWithRef } from "@plane/editor";
import { MakeOptional } from "@plane/types";
// components
import { cn } from "@plane/utils";
import { EditorMentionsRoot } from "@/components/editor";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
import { useEditorConfig } from "@/hooks/editor";
// store hooks

View file

@ -6,7 +6,7 @@ import { EditorRefApi, ILiteTextEditor, LiteTextEditorWithRef, TFileHandler } fr
// components
import { TSticky } from "@plane/types";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
// hooks
import { useEditorConfig } from "@/hooks/editor";
// plane web hooks

View file

@ -9,9 +9,9 @@ import { useOutsideClickDetector } from "@plane/hooks";
import { TSticky } from "@plane/types";
import { Tooltip } from "@plane/ui";
// constants
import { cn } from "@plane/utils";
import { TOOLBAR_ITEMS, ToolbarMenuItem } from "@/constants/editor";
// helpers
import { cn } from "@/helpers/common.helper";
import { ColorPalette } from "./color-palette";
type Props = {

View file

@ -4,6 +4,7 @@ import { FC, useEffect, useMemo, useState } from "react";
import { observer } from "mobx-react";
import { ChevronLeft } from "lucide-react";
// types
import { EEstimateSystem, ESTIMATE_SYSTEMS } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { IEstimateFormData, TEstimateSystemKeys, TEstimatePointsObject, TEstimateTypeError } from "@plane/types";
// ui
@ -13,7 +14,6 @@ import { EstimateCreateStageOne, EstimatePointCreateRoot } from "@/components/es
// hooks
import { useProjectEstimates } from "@/hooks/store";
// plane web constants
import { EEstimateSystem, ESTIMATE_SYSTEMS } from "@/plane-web/constants/estimates";
type TCreateEstimateModal = {
workspaceSlug: string;

View file

@ -2,6 +2,7 @@
import { FC } from "react";
import { Info } from "lucide-react";
import { EEstimateSystem, ESTIMATE_SYSTEMS } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { TEstimateSystemKeys } from "@plane/types";
import { Tooltip } from "@plane/ui";
@ -11,7 +12,6 @@ import { RadioInput } from "@/components/estimates";
// plane web constants
import { isEstimateSystemEnabled } from "@/plane-web/components/estimates/helper";
import { UpgradeBadge } from "@/plane-web/components/workspace";
import { EEstimateSystem, ESTIMATE_SYSTEMS } from "@/plane-web/constants/estimates";
type TEstimateCreateStageOne = {
estimateSystem: TEstimateSystemKeys;

View file

@ -1,13 +1,12 @@
import { FC } from "react";
import { observer } from "mobx-react";
import { EEstimateSystem } from "@plane/constants";
import { convertMinutesToHoursMinutesString, cn } from "@plane/utils";
// helpers
import { convertMinutesToHoursMinutesString } from "@plane/utils";
import { cn } from "@/helpers/common.helper";
// hooks
import { useEstimate, useProjectEstimates } from "@/hooks/store";
// plane web components
import { EstimateListItemButtons } from "@/plane-web/components/estimates";
import { EEstimateSystem } from "@/plane-web/constants/estimates";
type TEstimateListItem = {
estimateId: string;

View file

@ -3,12 +3,12 @@
import { Dispatch, FC, SetStateAction, useCallback, useState } from "react";
import { observer } from "mobx-react";
import { Plus } from "lucide-react";
import { estimateCount } from "@plane/constants";
import { TEstimatePointsObject, TEstimateSystemKeys, TEstimateTypeError } from "@plane/types";
import { Button, Sortable } from "@plane/ui";
// components
import { EstimatePointCreate, EstimatePointItemPreview } from "@/components/estimates/points";
// plane web constants
import { estimateCount } from "@/plane-web/constants/estimates";
type TEstimatePointCreateRoot = {
workspaceSlug: string;

View file

@ -3,17 +3,16 @@
import { FC, useState, FormEvent } from "react";
import { observer } from "mobx-react";
import { Check, Info, X } from "lucide-react";
import { EEstimateSystem, MAX_ESTIMATE_POINT_INPUT_LENGTH } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { TEstimatePointsObject, TEstimateSystemKeys, TEstimateTypeErrorObject } from "@plane/types";
import { Spinner, TOAST_TYPE, Tooltip, setToast } from "@plane/ui";
import { cn, isEstimatePointValuesRepeated } from "@plane/utils";
import { EstimateInputRoot } from "@/components/estimates/inputs/root";
// helpers
import { cn } from "@/helpers/common.helper";
import { isEstimatePointValuesRepeated } from "@/helpers/estimates";
// hooks
import { useEstimate } from "@/hooks/store";
// plane web constants
import { EEstimateSystem, MAX_ESTIMATE_POINT_INPUT_LENGTH } from "@/plane-web/constants/estimates";
type TEstimatePointCreate = {
workspaceSlug: string;

View file

@ -1,6 +1,7 @@
import { FC, useEffect, useRef, useState } from "react";
import { observer } from "mobx-react";
import { GripVertical, Pencil, Trash2 } from "lucide-react";
import { EEstimateSystem, estimateCount } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { TEstimatePointsObject, TEstimateSystemKeys, TEstimateTypeErrorObject } from "@plane/types";
// components
@ -9,7 +10,6 @@ import { EstimatePointUpdate } from "@/components/estimates/points";
// plane web components
import { EstimatePointDelete } from "@/plane-web/components/estimates";
// plane web constants
import { EEstimateSystem, estimateCount } from "@/plane-web/constants/estimates";
type TEstimatePointItemPreview = {
workspaceSlug: string;

View file

@ -3,17 +3,16 @@
import { FC, useEffect, useState, FormEvent } from "react";
import { observer } from "mobx-react";
import { Check, Info, X } from "lucide-react";
import { EEstimateSystem, MAX_ESTIMATE_POINT_INPUT_LENGTH } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { TEstimatePointsObject, TEstimateSystemKeys, TEstimateTypeErrorObject } from "@plane/types";
import { Spinner, TOAST_TYPE, Tooltip, setToast } from "@plane/ui";
import { cn, isEstimatePointValuesRepeated } from "@plane/utils";
import { EstimateInputRoot } from "@/components/estimates/inputs/root";
// helpers
import { cn } from "@/helpers/common.helper";
import { isEstimatePointValuesRepeated } from "@/helpers/estimates";
// hooks
import { useEstimatePoint } from "@/hooks/store";
// plane web constants
import { EEstimateSystem, MAX_ESTIMATE_POINT_INPUT_LENGTH } from "@/plane-web/constants/estimates";
type TEstimatePointUpdate = {
workspaceSlug: string;

View file

@ -1,6 +1,6 @@
import React from "react";
// helpers
import { cn } from "@/helpers/common.helper";
import { cn } from "@plane/utils";
type RadioInputProps = {
name?: string;

View file

@ -5,7 +5,7 @@ import { useState, FC } from "react";
import { IExportData } from "@plane/types";
import { Button } from "@plane/ui";
// helpers
import { getDate, renderFormattedDate } from "@/helpers/date-time.helper";
import { getDate, renderFormattedDate } from "@plane/utils";
// types
type Props = {

View file

@ -1,11 +1,11 @@
import { FC } from "react";
// components
import type { IBlockUpdateData, IGanttBlock } from "@plane/types";
import RenderIfVisible from "@/components/core/render-if-visible-HOC";
// hooks
import { TSelectionHelper } from "@/hooks/use-multiple-select";
// types
import { BLOCK_HEIGHT } from "../constants";
import { IBlockUpdateData, IGanttBlock } from "../types";
import { BlockRow } from "./block-row";
export type GanttChartBlocksProps = {

View file

@ -2,7 +2,8 @@ import { useEffect, useState } from "react";
import { observer } from "mobx-react";
import { ArrowRight } from "lucide-react";
// helpers
import { cn } from "@/helpers/common.helper";
import type { IBlockUpdateData, IGanttBlock } from "@plane/types";
import { cn } from "@plane/utils";
// hooks
import { useIssueDetail } from "@/hooks/store";
import { TSelectionHelper } from "@/hooks/use-multiple-select";
@ -10,7 +11,6 @@ import { useTimeLineChartStore } from "@/hooks/use-timeline-chart";
//
import { BLOCK_HEIGHT, SIDEBAR_WIDTH } from "../constants";
import { ChartAddBlock } from "../helpers";
import { IBlockUpdateData, IGanttBlock } from "../types";
type Props = {
blockId: string;

View file

@ -1,9 +1,10 @@
import { RefObject, useRef } from "react";
import { observer } from "mobx-react";
// components
import type { IBlockUpdateDependencyData } from "@plane/types";
import { cn } from "@plane/utils";
import RenderIfVisible from "@/components/core/render-if-visible-HOC";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
import { useTimeLineChartStore } from "@/hooks/use-timeline-chart";
// constants
@ -11,7 +12,6 @@ import { BLOCK_HEIGHT } from "../constants";
// components
import { ChartDraggable } from "../helpers";
import { useGanttResizable } from "../helpers/blockResizables/use-gantt-resizable";
import { IBlockUpdateDependencyData } from "../types";
type Props = {
blockId: string;

View file

@ -1,6 +1,6 @@
import { FC } from "react";
//
import { IBlockUpdateDependencyData } from "../types";
import type { IBlockUpdateDependencyData } from "@plane/types";
import { GanttChartBlock } from "./block";
export type GanttChartBlocksProps = {

View file

@ -2,16 +2,16 @@ import { observer } from "mobx-react";
import { Expand, Shrink } from "lucide-react";
import { useTranslation } from "@plane/i18n";
// plane
import type { TGanttViews } from "@plane/types";
import { Row } from "@plane/ui";
// components
import { cn } from "@plane/utils";
import { VIEWS_LIST } from "@/components/gantt-chart/data";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
import { useTimeLineChartStore } from "@/hooks/use-timeline-chart";
//
import { GANTT_BREADCRUMBS_HEIGHT } from "../constants";
import { TGanttViews } from "../types";
type Props = {
blockIds: string[];

Some files were not shown because too many files have changed in this diff Show more