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
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue