[WEB-5135] refactor: update sites ESLint configuration and refactor imports to use type imports (#7956)
- Enhanced ESLint configuration by adding new rules for import consistency and type imports. - Refactored multiple files to replace regular imports with type imports for better clarity and performance. - Ensured consistent use of type imports across the application to align with TypeScript best practices. Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
parent
ddf07dc993
commit
9f41e92d21
78 changed files with 170 additions and 116 deletions
|
|
@ -1,4 +1,18 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/next.js"],
|
extends: ["@plane/eslint-config/next.js"],
|
||||||
|
rules: {
|
||||||
|
"no-duplicate-imports": "off",
|
||||||
|
"import/no-duplicates": ["error", { "prefer-inline": false }],
|
||||||
|
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
||||||
|
"@typescript-eslint/no-import-type-side-effects": "error",
|
||||||
|
"@typescript-eslint/consistent-type-imports": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
prefer: "type-imports",
|
||||||
|
fixStyle: "separate-type-imports",
|
||||||
|
disallowTypeAnnotations: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { notFound, redirect } from "next/navigation";
|
import { notFound, redirect } from "next/navigation";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { SitesProjectPublishService } from "@plane/services";
|
import { SitesProjectPublishService } from "@plane/services";
|
||||||
import { TProjectPublishSettings } from "@plane/types";
|
import type { TProjectPublishSettings } from "@plane/types";
|
||||||
|
|
||||||
const publishService = new SitesProjectPublishService();
|
const publishService = new SitesProjectPublishService();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
// helpers
|
// helpers
|
||||||
import { SPACE_BASE_PATH } from "@plane/constants";
|
import { SPACE_BASE_PATH } from "@plane/constants";
|
||||||
// styles
|
// styles
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC, ReactNode } from "react";
|
import type { ReactNode, FC } from "react";
|
||||||
import { ThemeProvider } from "next-themes";
|
import { ThemeProvider } from "next-themes";
|
||||||
// components
|
// components
|
||||||
import { TranslationProvider } from "@plane/i18n";
|
import { TranslationProvider } from "@plane/i18n";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// plane editor
|
// plane editor
|
||||||
import { TMentionComponentProps } from "@plane/editor";
|
import type { TMentionComponentProps } from "@plane/editor";
|
||||||
|
|
||||||
export const EditorAdditionalMentionsRoot: React.FC<TMentionComponentProps> = () => null;
|
export const EditorAdditionalMentionsRoot: React.FC<TMentionComponentProps> = () => null;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// editor
|
// editor
|
||||||
import { TExtensions } from "@plane/editor";
|
import type { TExtensions } from "@plane/editor";
|
||||||
|
|
||||||
export type TEditorFlaggingHookReturnType = {
|
export type TEditorFlaggingHookReturnType = {
|
||||||
document: {
|
document: {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { Info, X } from "lucide-react";
|
import { Info, X } from "lucide-react";
|
||||||
// helpers
|
// helpers
|
||||||
import { TAuthErrorInfo } from "@/helpers/authentication.helper";
|
import type { TAuthErrorInfo } from "@/helpers/authentication.helper";
|
||||||
|
|
||||||
type TAuthBanner = {
|
type TAuthBanner = {
|
||||||
bannerData: TAuthErrorInfo | undefined;
|
bannerData: TAuthErrorInfo | undefined;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC } from "react";
|
import type { FC } from "react";
|
||||||
// helpers
|
// helpers
|
||||||
import { EAuthModes } from "@/types/auth";
|
import { EAuthModes } from "@/types/auth";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { FC, useEffect, useState } from "react";
|
import type { FC } from "react";
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { useSearchParams } from "next/navigation";
|
import { useSearchParams } from "next/navigation";
|
||||||
|
|
@ -8,16 +9,12 @@ import { useTheme } from "next-themes";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { API_BASE_URL } from "@plane/constants";
|
import { API_BASE_URL } from "@plane/constants";
|
||||||
import { SitesAuthService } from "@plane/services";
|
import { SitesAuthService } from "@plane/services";
|
||||||
import { IEmailCheckData } from "@plane/types";
|
import type { IEmailCheckData } from "@plane/types";
|
||||||
import { OAuthOptions } from "@plane/ui";
|
import { OAuthOptions } from "@plane/ui";
|
||||||
// components
|
// components
|
||||||
// helpers
|
// helpers
|
||||||
import {
|
import type { TAuthErrorInfo } from "@/helpers/authentication.helper";
|
||||||
EAuthenticationErrorCodes,
|
import { EErrorAlertType, authErrorHandler, EAuthenticationErrorCodes } from "@/helpers/authentication.helper";
|
||||||
EErrorAlertType,
|
|
||||||
TAuthErrorInfo,
|
|
||||||
authErrorHandler,
|
|
||||||
} from "@/helpers/authentication.helper";
|
|
||||||
// hooks
|
// hooks
|
||||||
import { useInstance } from "@/hooks/store/use-instance";
|
import { useInstance } from "@/hooks/store/use-instance";
|
||||||
// types
|
// types
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC, FormEvent, useMemo, useRef, useState } from "react";
|
import type { FC, FormEvent } from "react";
|
||||||
|
import { useMemo, useRef, useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// icons
|
// icons
|
||||||
import { CircleAlert, XCircle } from "lucide-react";
|
import { CircleAlert, XCircle } from "lucide-react";
|
||||||
// types
|
// types
|
||||||
import { Button } from "@plane/propel/button";
|
import { Button } from "@plane/propel/button";
|
||||||
import { IEmailCheckData } from "@plane/types";
|
import type { IEmailCheckData } from "@plane/types";
|
||||||
// ui
|
// ui
|
||||||
import { Input, Spinner } from "@plane/ui";
|
import { Input, Spinner } from "@plane/ui";
|
||||||
// helpers
|
// helpers
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { FC } from "react";
|
import type { FC } from "react";
|
||||||
|
import React from "react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { WEBSITE_URL } from "@plane/constants";
|
import { WEBSITE_URL } from "@plane/constants";
|
||||||
// assets
|
// assets
|
||||||
import { PlaneLogo } from "@plane/propel/icons";
|
import { PlaneLogo } from "@plane/propel/icons";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// types
|
// types
|
||||||
import { TLogoProps } from "@plane/types";
|
import type { TLogoProps } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// plane editor
|
// plane editor
|
||||||
import { TMentionComponentProps } from "@plane/editor";
|
import type { TMentionComponentProps } from "@plane/editor";
|
||||||
// plane web components
|
// plane web components
|
||||||
import { EditorAdditionalMentionsRoot } from "@/plane-web/components/editor";
|
import { EditorAdditionalMentionsRoot } from "@/plane-web/components/editor";
|
||||||
// local components
|
// local components
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { type EditorRefApi, type ILiteTextEditorProps, LiteTextEditorWithRef, type TFileHandler } from "@plane/editor";
|
import { LiteTextEditorWithRef } from "@plane/editor";
|
||||||
|
import type { EditorRefApi, ILiteTextEditorProps, TFileHandler } from "@plane/editor";
|
||||||
import type { MakeOptional } from "@plane/types";
|
import type { MakeOptional } from "@plane/types";
|
||||||
import { cn, isCommentEmpty } from "@plane/utils";
|
import { cn, isCommentEmpty } from "@plane/utils";
|
||||||
// helpers
|
// helpers
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import React, { forwardRef } from "react";
|
import React, { forwardRef } from "react";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { type EditorRefApi, type IRichTextEditorProps, RichTextEditorWithRef, type TFileHandler } from "@plane/editor";
|
import { RichTextEditorWithRef } from "@plane/editor";
|
||||||
|
import type { EditorRefApi, IRichTextEditorProps, TFileHandler } from "@plane/editor";
|
||||||
import type { MakeOptional } from "@plane/types";
|
import type { MakeOptional } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { getEditorFileHandlers } from "@/helpers/editor.helper";
|
import { getEditorFileHandlers } from "@/helpers/editor.helper";
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
import React, { useEffect, useState, useCallback } from "react";
|
import React, { useEffect, useState, useCallback } from "react";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { TOOLBAR_ITEMS, type ToolbarMenuItem, type EditorRefApi } from "@plane/editor";
|
import { TOOLBAR_ITEMS } from "@plane/editor";
|
||||||
|
import type { ToolbarMenuItem, EditorRefApi } from "@plane/editor";
|
||||||
import { Button } from "@plane/propel/button";
|
import { Button } from "@plane/propel/button";
|
||||||
import { Tooltip } from "@plane/propel/tooltip";
|
import { Tooltip } from "@plane/propel/tooltip";
|
||||||
import { cn } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC } from "react";
|
import type { FC } from "react";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
import { Button } from "@plane/propel/button";
|
import { Button } from "@plane/propel/button";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { observer } from "mobx-react";
|
||||||
import { X } from "lucide-react";
|
import { X } from "lucide-react";
|
||||||
// types
|
// types
|
||||||
import { useTranslation } from "@plane/i18n";
|
import { useTranslation } from "@plane/i18n";
|
||||||
import { TFilters } from "@/types/issue";
|
import type { TFilters } from "@/types/issue";
|
||||||
// components
|
// components
|
||||||
import { AppliedPriorityFilters } from "./priority";
|
import { AppliedPriorityFilters } from "./priority";
|
||||||
import { AppliedStateFilters } from "./state";
|
import { AppliedStateFilters } from "./state";
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import { X } from "lucide-react";
|
import { X } from "lucide-react";
|
||||||
// types
|
// types
|
||||||
import { IIssueLabel } from "@/types/issue";
|
import type { IIssueLabel } from "@/types/issue";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handleRemove: (val: string) => void;
|
handleRemove: (val: string) => void;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { X } from "lucide-react";
|
import { X } from "lucide-react";
|
||||||
import { PriorityIcon, type TIssuePriorities } from "@plane/propel/icons";
|
import { PriorityIcon } from "@plane/propel/icons";
|
||||||
|
import type { TIssuePriorities } from "@plane/propel/icons";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handleRemove: (val: string) => void;
|
handleRemove: (val: string) => void;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC, useCallback } from "react";
|
import type { FC } from "react";
|
||||||
|
import { useCallback } from "react";
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { Fragment, useState } from "react";
|
import React, { Fragment, useState } from "react";
|
||||||
import { Placement } from "@popperjs/core";
|
import type { Placement } from "@popperjs/core";
|
||||||
import { usePopper } from "react-popper";
|
import { usePopper } from "react-popper";
|
||||||
import { Popover, Transition } from "@headlessui/react";
|
import { Popover, Transition } from "@headlessui/react";
|
||||||
// ui
|
// ui
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC, useCallback } from "react";
|
import type { FC } from "react";
|
||||||
|
import { useCallback } from "react";
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
@ -14,7 +15,7 @@ import { queryParamGenerator } from "@/helpers/query-param-generator";
|
||||||
// hooks
|
// hooks
|
||||||
import { useIssueFilter } from "@/hooks/store/use-issue-filter";
|
import { useIssueFilter } from "@/hooks/store/use-issue-filter";
|
||||||
// types
|
// types
|
||||||
import { TIssueQueryFilters } from "@/types/issue";
|
import type { TIssueQueryFilters } from "@/types/issue";
|
||||||
|
|
||||||
type IssueFiltersDropdownProps = {
|
type IssueFiltersDropdownProps = {
|
||||||
anchor: string;
|
anchor: string;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { useCallback, useMemo, useRef } from "react";
|
||||||
import { debounce } from "lodash-es";
|
import { debounce } from "lodash-es";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// types
|
// types
|
||||||
import { IIssueDisplayProperties } from "@plane/types";
|
import type { IIssueDisplayProperties } from "@plane/types";
|
||||||
// components
|
// components
|
||||||
import { IssueLayoutHOC } from "@/components/issues/issue-layouts/issue-layout-HOC";
|
import { IssueLayoutHOC } from "@/components/issues/issue-layouts/issue-layout-HOC";
|
||||||
// hooks
|
// hooks
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { MutableRefObject } from "react";
|
import type { MutableRefObject } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useParams, useSearchParams } from "next/navigation";
|
import { useParams, useSearchParams } from "next/navigation";
|
||||||
// plane types
|
// plane types
|
||||||
import { Tooltip } from "@plane/propel/tooltip";
|
import { Tooltip } from "@plane/propel/tooltip";
|
||||||
import { IIssueDisplayProperties } from "@plane/types";
|
import type { IIssueDisplayProperties } from "@plane/types";
|
||||||
// plane ui
|
// plane ui
|
||||||
// plane utils
|
// plane utils
|
||||||
import { cn } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
|
|
@ -18,7 +18,7 @@ import { queryParamGenerator } from "@/helpers/query-param-generator";
|
||||||
import { usePublish } from "@/hooks/store/publish";
|
import { usePublish } from "@/hooks/store/publish";
|
||||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||||
//
|
//
|
||||||
import { IIssue } from "@/types/issue";
|
import type { IIssue } from "@/types/issue";
|
||||||
import { IssueProperties } from "../properties/all-properties";
|
import { IssueProperties } from "../properties/all-properties";
|
||||||
import { getIssueBlockId } from "../utils";
|
import { getIssueBlockId } from "../utils";
|
||||||
import { BlockReactions } from "./block-reactions";
|
import { BlockReactions } from "./block-reactions";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { MutableRefObject } from "react";
|
import type { MutableRefObject } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
//types
|
//types
|
||||||
import { IIssueDisplayProperties } from "@plane/types";
|
import type { IIssueDisplayProperties } from "@plane/types";
|
||||||
// components
|
// components
|
||||||
import { KanbanIssueBlock } from "./block";
|
import { KanbanIssueBlock } from "./block";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { MutableRefObject } from "react";
|
import type { MutableRefObject } from "react";
|
||||||
import { isNil } from "lodash-es";
|
import { isNil } from "lodash-es";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// types
|
// types
|
||||||
import {
|
import type {
|
||||||
GroupByColumnTypes,
|
GroupByColumnTypes,
|
||||||
IGroupByColumn,
|
IGroupByColumn,
|
||||||
TGroupedIssues,
|
TGroupedIssues,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { FC } from "react";
|
import type { FC } from "react";
|
||||||
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Circle } from "lucide-react";
|
import { Circle } from "lucide-react";
|
||||||
// types
|
// types
|
||||||
import { TIssueGroupByOptions } from "@plane/types";
|
import type { TIssueGroupByOptions } from "@plane/types";
|
||||||
|
|
||||||
interface IHeaderGroupByCard {
|
interface IHeaderGroupByCard {
|
||||||
groupBy: TIssueGroupByOptions | undefined;
|
groupBy: TIssueGroupByOptions | undefined;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import React, { FC } from "react";
|
import type { FC } from "react";
|
||||||
|
import React from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { Circle, ChevronDown, ChevronUp } from "lucide-react";
|
import { Circle, ChevronDown, ChevronUp } from "lucide-react";
|
||||||
// mobx
|
// mobx
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { MutableRefObject, forwardRef, useCallback, useRef, useState } from "react";
|
import type { MutableRefObject } from "react";
|
||||||
|
import { forwardRef, useCallback, useRef, useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
//types
|
//types
|
||||||
import type {
|
import type {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
import { MutableRefObject, useState } from "react";
|
import type { MutableRefObject } from "react";
|
||||||
|
import { useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// types
|
// types
|
||||||
import {
|
import type {
|
||||||
GroupByColumnTypes,
|
GroupByColumnTypes,
|
||||||
IGroupByColumn,
|
IGroupByColumn,
|
||||||
TGroupedIssues,
|
TGroupedIssues,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { useCallback, useMemo } from "react";
|
import { useCallback, useMemo } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// types
|
// types
|
||||||
import { IIssueDisplayProperties, TGroupedIssues } from "@plane/types";
|
import type { IIssueDisplayProperties, TGroupedIssues } from "@plane/types";
|
||||||
// constants
|
// constants
|
||||||
// components
|
// components
|
||||||
import { IssueLayoutHOC } from "@/components/issues/issue-layouts/issue-layout-HOC";
|
import { IssueLayoutHOC } from "@/components/issues/issue-layouts/issue-layout-HOC";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import Link from "next/link";
|
||||||
import { useParams, useSearchParams } from "next/navigation";
|
import { useParams, useSearchParams } from "next/navigation";
|
||||||
// plane types
|
// plane types
|
||||||
import { Tooltip } from "@plane/propel/tooltip";
|
import { Tooltip } from "@plane/propel/tooltip";
|
||||||
import { IIssueDisplayProperties } from "@plane/types";
|
import type { IIssueDisplayProperties } from "@plane/types";
|
||||||
// plane ui
|
// plane ui
|
||||||
// plane utils
|
// plane utils
|
||||||
import { cn } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { FC, MutableRefObject } from "react";
|
import type { FC, MutableRefObject } from "react";
|
||||||
// types
|
// types
|
||||||
import { IIssueDisplayProperties } from "@plane/types";
|
import type { IIssueDisplayProperties } from "@plane/types";
|
||||||
import { IssueBlock } from "./block";
|
import { IssueBlock } from "./block";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { useRef } from "react";
|
import { useRef } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// types
|
// types
|
||||||
import {
|
import type {
|
||||||
GroupByColumnTypes,
|
GroupByColumnTypes,
|
||||||
TGroupedIssues,
|
TGroupedIssues,
|
||||||
IIssueDisplayProperties,
|
IIssueDisplayProperties,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,17 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Fragment, MutableRefObject, forwardRef, useRef, useState } from "react";
|
import type { MutableRefObject } from "react";
|
||||||
|
import { Fragment, forwardRef, useRef, useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useTranslation } from "@plane/i18n";
|
import { useTranslation } from "@plane/i18n";
|
||||||
// plane types
|
// plane types
|
||||||
import { IGroupByColumn, TIssueGroupByOptions, IIssueDisplayProperties, TPaginationData, TLoader } from "@plane/types";
|
import type {
|
||||||
|
IGroupByColumn,
|
||||||
|
TIssueGroupByOptions,
|
||||||
|
IIssueDisplayProperties,
|
||||||
|
TPaginationData,
|
||||||
|
TLoader,
|
||||||
|
} from "@plane/types";
|
||||||
// plane utils
|
// plane utils
|
||||||
import { cn } from "@plane/utils";
|
import { cn } from "@plane/utils";
|
||||||
// hooks
|
// hooks
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import { WithDisplayPropertiesHOC } from "@/components/issues/issue-layouts/with
|
||||||
// helpers
|
// helpers
|
||||||
import { getDate } from "@/helpers/date-time.helper";
|
import { getDate } from "@/helpers/date-time.helper";
|
||||||
//// hooks
|
//// hooks
|
||||||
import { IIssue } from "@/types/issue";
|
import type { IIssue } from "@/types/issue";
|
||||||
import { IssueBlockCycle } from "./cycle";
|
import { IssueBlockCycle } from "./cycle";
|
||||||
import { IssueBlockDate } from "./due-date";
|
import { IssueBlockDate } from "./due-date";
|
||||||
import { IssueBlockLabels } from "./labels";
|
import { IssueBlockLabels } from "./labels";
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// icons
|
// icons
|
||||||
import { LucideIcon, Users } from "lucide-react";
|
import type { LucideIcon } from "lucide-react";
|
||||||
|
import { Users } from "lucide-react";
|
||||||
// plane ui
|
// plane ui
|
||||||
import { Avatar, AvatarGroup } from "@plane/ui";
|
import { Avatar, AvatarGroup } from "@plane/ui";
|
||||||
// plane utils
|
// plane utils
|
||||||
|
|
@ -10,7 +11,7 @@ import { cn } from "@plane/utils";
|
||||||
// hooks
|
// hooks
|
||||||
import { useMember } from "@/hooks/store/use-member";
|
import { useMember } from "@/hooks/store/use-member";
|
||||||
//
|
//
|
||||||
import { TPublicMember } from "@/types/member";
|
import type { TPublicMember } from "@/types/member";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
memberIds: string[];
|
memberIds: string[];
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { useTranslation } from "@plane/i18n";
|
||||||
// types
|
// types
|
||||||
import { PriorityIcon } from "@plane/propel/icons";
|
import { PriorityIcon } from "@plane/propel/icons";
|
||||||
import { Tooltip } from "@plane/propel/tooltip";
|
import { Tooltip } from "@plane/propel/tooltip";
|
||||||
import { TIssuePriorities } from "@plane/types";
|
import type { TIssuePriorities } from "@plane/types";
|
||||||
// constants
|
// constants
|
||||||
import { cn, getIssuePriorityFilters } from "@plane/utils";
|
import { cn, getIssuePriorityFilters } from "@plane/utils";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC, useEffect } from "react";
|
import type { FC } from "react";
|
||||||
|
import { useEffect } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
// components
|
// components
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { ContrastIcon } from "lucide-react";
|
||||||
// types
|
// types
|
||||||
import { EIconSize, ISSUE_PRIORITIES } from "@plane/constants";
|
import { EIconSize, ISSUE_PRIORITIES } from "@plane/constants";
|
||||||
import { CycleGroupIcon, ModuleIcon, PriorityIcon, StateGroupIcon } from "@plane/propel/icons";
|
import { CycleGroupIcon, ModuleIcon, PriorityIcon, StateGroupIcon } from "@plane/propel/icons";
|
||||||
import {
|
import type {
|
||||||
GroupByColumnTypes,
|
GroupByColumnTypes,
|
||||||
IGroupByColumn,
|
IGroupByColumn,
|
||||||
TCycleGroups,
|
TCycleGroups,
|
||||||
|
|
@ -17,11 +17,11 @@ import { Avatar } from "@plane/ui";
|
||||||
// components
|
// components
|
||||||
// constants
|
// constants
|
||||||
// stores
|
// stores
|
||||||
import { ICycleStore } from "@/store/cycle.store";
|
import type { ICycleStore } from "@/store/cycle.store";
|
||||||
import { IIssueLabelStore } from "@/store/label.store";
|
import type { IIssueLabelStore } from "@/store/label.store";
|
||||||
import { IIssueMemberStore } from "@/store/members.store";
|
import type { IIssueMemberStore } from "@/store/members.store";
|
||||||
import { IIssueModuleStore } from "@/store/module.store";
|
import type { IIssueModuleStore } from "@/store/module.store";
|
||||||
import { IStateStore } from "@/store/state.store";
|
import type { IStateStore } from "@/store/state.store";
|
||||||
|
|
||||||
export const HIGHLIGHT_CLASS = "highlight";
|
export const HIGHLIGHT_CLASS = "highlight";
|
||||||
export const HIGHLIGHT_WITH_LINE = "highlight-with-line";
|
export const HIGHLIGHT_WITH_LINE = "highlight-with-line";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane imports
|
// plane imports
|
||||||
import type { IIssueDisplayProperties } from "@plane/types";
|
import type { IIssueDisplayProperties } from "@plane/types";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useEffect, FC } from "react";
|
import type { FC } from "react";
|
||||||
|
import { useEffect } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useRouter, useSearchParams } from "next/navigation";
|
import { useRouter, useSearchParams } from "next/navigation";
|
||||||
// components
|
// components
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { List, Kanban, LucideProps } from "lucide-react";
|
import type { LucideProps } from "lucide-react";
|
||||||
import { TIssueLayout } from "@plane/constants";
|
import { List, Kanban } from "lucide-react";
|
||||||
|
import type { TIssueLayout } from "@plane/constants";
|
||||||
|
|
||||||
export const IssueLayoutIcon = ({ layout, ...props }: { layout: TIssueLayout } & LucideProps) => {
|
export const IssueLayoutIcon = ({ layout, ...props }: { layout: TIssueLayout } & LucideProps) => {
|
||||||
switch (layout) {
|
switch (layout) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useRouter, useSearchParams } from "next/navigation";
|
import { useRouter, useSearchParams } from "next/navigation";
|
||||||
// ui
|
// ui
|
||||||
|
|
@ -13,7 +13,7 @@ import { queryParamGenerator } from "@/helpers/query-param-generator";
|
||||||
// hooks
|
// hooks
|
||||||
import { useIssueFilter } from "@/hooks/store/use-issue-filter";
|
import { useIssueFilter } from "@/hooks/store/use-issue-filter";
|
||||||
// mobx
|
// mobx
|
||||||
import { TIssueLayout } from "@/types/issue";
|
import type { TIssueLayout } from "@/types/issue";
|
||||||
import { IssueLayoutIcon } from "./layout-icon";
|
import { IssueLayoutIcon } from "./layout-icon";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC } from "react";
|
import type { FC } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { ProjectIcon } from "@plane/propel/icons";
|
import { ProjectIcon } from "@plane/propel/icons";
|
||||||
// components
|
// components
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC, Fragment, useEffect, useState } from "react";
|
import type { FC } from "react";
|
||||||
|
import { Fragment, useEffect, useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { usePathname, useSearchParams } from "next/navigation";
|
import { usePathname, useSearchParams } from "next/navigation";
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ import React, { useRef, useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useForm, Controller } from "react-hook-form";
|
import { useForm, Controller } from "react-hook-form";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { EditorRefApi } from "@plane/editor";
|
import type { EditorRefApi } from "@plane/editor";
|
||||||
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
|
||||||
import { SitesFileService } from "@plane/services";
|
import { SitesFileService } from "@plane/services";
|
||||||
import { TIssuePublicComment } from "@plane/types";
|
import type { TIssuePublicComment } from "@plane/types";
|
||||||
// editor components
|
// editor components
|
||||||
import { LiteTextEditor } from "@/components/editor/lite-text-editor";
|
import { LiteTextEditor } from "@/components/editor/lite-text-editor";
|
||||||
// hooks
|
// hooks
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ import { Controller, useForm } from "react-hook-form";
|
||||||
import { Check, MessageSquare, MoreVertical, X } from "lucide-react";
|
import { Check, MessageSquare, MoreVertical, X } from "lucide-react";
|
||||||
import { Menu, Transition } from "@headlessui/react";
|
import { Menu, Transition } from "@headlessui/react";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { EditorRefApi } from "@plane/editor";
|
import type { EditorRefApi } from "@plane/editor";
|
||||||
import { TIssuePublicComment } from "@plane/types";
|
import type { TIssuePublicComment } from "@plane/types";
|
||||||
import { getFileURL } from "@plane/utils";
|
import { getFileURL } from "@plane/utils";
|
||||||
// components
|
// components
|
||||||
import { LiteTextEditor } from "@/components/editor/lite-text-editor";
|
import { LiteTextEditor } from "@/components/editor/lite-text-editor";
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import { copyTextToClipboard } from "@/helpers/string.helper";
|
||||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||||
import useClipboardWritePermission from "@/hooks/use-clipboard-write-permission";
|
import useClipboardWritePermission from "@/hooks/use-clipboard-write-permission";
|
||||||
// types
|
// types
|
||||||
import { IIssue, IPeekMode } from "@/types/issue";
|
import type { IIssue, IPeekMode } from "@/types/issue";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
handleClose: () => void;
|
handleClose: () => void;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||||
import { useUser } from "@/hooks/store/use-user";
|
import { useUser } from "@/hooks/store/use-user";
|
||||||
import useIsInIframe from "@/hooks/use-is-in-iframe";
|
import useIsInIframe from "@/hooks/use-is-in-iframe";
|
||||||
// types
|
// types
|
||||||
import { IIssue } from "@/types/issue";
|
import type { IIssue } from "@/types/issue";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
anchor: string;
|
anchor: string;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { observer } from "mobx-react";
|
||||||
import { RichTextEditor } from "@/components/editor/rich-text-editor";
|
import { RichTextEditor } from "@/components/editor/rich-text-editor";
|
||||||
import { usePublish } from "@/hooks/store/publish";
|
import { usePublish } from "@/hooks/store/publish";
|
||||||
// types
|
// types
|
||||||
import { IIssue } from "@/types/issue";
|
import type { IIssue } from "@/types/issue";
|
||||||
// local imports
|
// local imports
|
||||||
import { IssueReactions } from "./issue-reaction";
|
import { IssueReactions } from "./issue-reaction";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import { copyTextToClipboard, addSpaceIfCamelCase } from "@/helpers/string.helpe
|
||||||
import { usePublish } from "@/hooks/store/publish";
|
import { usePublish } from "@/hooks/store/publish";
|
||||||
import { useStates } from "@/hooks/store/use-state";
|
import { useStates } from "@/hooks/store/use-state";
|
||||||
// types
|
// types
|
||||||
import { IIssue, IPeekMode } from "@/types/issue";
|
import type { IIssue, IPeekMode } from "@/types/issue";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
issueDetails: IIssue;
|
issueDetails: IIssue;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { FC, Fragment, useEffect, useState } from "react";
|
import type { FC } from "react";
|
||||||
|
import { Fragment, useEffect, useState } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useRouter, useSearchParams } from "next/navigation";
|
import { useRouter, useSearchParams } from "next/navigation";
|
||||||
import { Dialog, Transition } from "@headlessui/react";
|
import { Dialog, Transition } from "@headlessui/react";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { Loader } from "@plane/ui";
|
||||||
// store hooks
|
// store hooks
|
||||||
import { usePublish } from "@/hooks/store/publish";
|
import { usePublish } from "@/hooks/store/publish";
|
||||||
// types
|
// types
|
||||||
import { IIssue } from "@/types/issue";
|
import type { IIssue } from "@/types/issue";
|
||||||
// local imports
|
// local imports
|
||||||
import { PeekOverviewHeader } from "./header";
|
import { PeekOverviewHeader } from "./header";
|
||||||
import { PeekOverviewIssueActivity } from "./issue-activity";
|
import { PeekOverviewIssueActivity } from "./issue-activity";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { RefObject, useEffect } from "react";
|
import type { RefObject } from "react";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
|
||||||
export type UseIntersectionObserverProps = {
|
export type UseIntersectionObserverProps = {
|
||||||
containerRef: RefObject<HTMLDivElement | null> | undefined;
|
containerRef: RefObject<HTMLDivElement | null> | undefined;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { useRef, useEffect } from "react";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { UserService } from "@plane/services";
|
import { UserService } from "@plane/services";
|
||||||
import { IUser } from "@plane/types";
|
import type { IUser } from "@plane/types";
|
||||||
|
|
||||||
export const useMention = () => {
|
export const useMention = () => {
|
||||||
const userService = new UserService();
|
const userService = new UserService();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { ReactNode, createContext } from "react";
|
import type { ReactNode } from "react";
|
||||||
|
import { createContext } from "react";
|
||||||
// plane web store
|
// plane web store
|
||||||
import { RootStore } from "@/plane-web/store/root.store";
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { Toast } from "@plane/propel/toast";
|
import { Toast } from "@plane/propel/toast";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { action, makeObservable, observable, runInAction } from "mobx";
|
import { action, makeObservable, observable, runInAction } from "mobx";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { SitesCycleService } from "@plane/services";
|
import { SitesCycleService } from "@plane/services";
|
||||||
import { TPublicCycle } from "@/types/cycle";
|
import type { TPublicCycle } from "@/types/cycle";
|
||||||
// store
|
// store
|
||||||
import type { CoreRootStore } from "./root.store";
|
import type { CoreRootStore } from "./root.store";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { EIssueGroupByToServerOptions, EServerGroupByToFilterOptions } from "@plane/constants";
|
import { EIssueGroupByToServerOptions, EServerGroupByToFilterOptions } from "@plane/constants";
|
||||||
import { IssuePaginationOptions, TIssueParams } from "@plane/types";
|
import type { IssuePaginationOptions, TIssueParams } from "@plane/types";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This Method is used to construct the url params along with paginated values
|
* This Method is used to construct the url params along with paginated values
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { set } from "lodash-es";
|
||||||
import { observable, action, makeObservable, runInAction } from "mobx";
|
import { observable, action, makeObservable, runInAction } from "mobx";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { InstanceService } from "@plane/services";
|
import { InstanceService } from "@plane/services";
|
||||||
import { IInstance, IInstanceConfig } from "@plane/types";
|
import type { IInstance, IInstanceConfig } from "@plane/types";
|
||||||
// store
|
// store
|
||||||
import type { CoreRootStore } from "@/store/root.store";
|
import type { CoreRootStore } from "@/store/root.store";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@ import { computedFn } from "mobx-utils";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { SitesFileService, SitesIssueService } from "@plane/services";
|
import { SitesFileService, SitesIssueService } from "@plane/services";
|
||||||
import { EFileAssetType, TFileSignedURLResponse, TIssuePublicComment } from "@plane/types";
|
import type { TFileSignedURLResponse, TIssuePublicComment } from "@plane/types";
|
||||||
|
import { EFileAssetType } from "@plane/types";
|
||||||
// store
|
// store
|
||||||
import type { CoreRootStore } from "@/store/root.store";
|
import type { CoreRootStore } from "@/store/root.store";
|
||||||
// types
|
// types
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ import type { IssuePaginationOptions, TLoader } from "@plane/types";
|
||||||
// store
|
// store
|
||||||
import type { CoreRootStore } from "@/store/root.store";
|
import type { CoreRootStore } from "@/store/root.store";
|
||||||
// types
|
// types
|
||||||
import { BaseIssuesStore, type IBaseIssuesStore } from "./helpers/base-issues.store";
|
import { BaseIssuesStore } from "./helpers/base-issues.store";
|
||||||
|
import type { IBaseIssuesStore } from "./helpers/base-issues.store";
|
||||||
|
|
||||||
export interface IIssueStore extends IBaseIssuesStore {
|
export interface IIssueStore extends IBaseIssuesStore {
|
||||||
// actions
|
// actions
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@ import { set } from "lodash-es";
|
||||||
import { action, makeObservable, observable, runInAction } from "mobx";
|
import { action, makeObservable, observable, runInAction } from "mobx";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { UserService } from "@plane/services";
|
import { UserService } from "@plane/services";
|
||||||
import { EStartOfTheWeek, TUserProfile } from "@plane/types";
|
import type { TUserProfile } from "@plane/types";
|
||||||
|
import { EStartOfTheWeek } from "@plane/types";
|
||||||
// store
|
// store
|
||||||
import type { CoreRootStore } from "@/store/root.store";
|
import type { CoreRootStore } from "@/store/root.store";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { observable, makeObservable, computed } from "mobx";
|
import { observable, makeObservable, computed } from "mobx";
|
||||||
// types
|
// types
|
||||||
import {
|
import type {
|
||||||
IWorkspaceLite,
|
IWorkspaceLite,
|
||||||
TProjectDetails,
|
TProjectDetails,
|
||||||
TPublishEntityType,
|
TPublishEntityType,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { set } from "lodash-es";
|
||||||
import { makeObservable, observable, runInAction, action } from "mobx";
|
import { makeObservable, observable, runInAction, action } from "mobx";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { SitesProjectPublishService } from "@plane/services";
|
import { SitesProjectPublishService } from "@plane/services";
|
||||||
import { TProjectPublishSettings } from "@plane/types";
|
import type { TProjectPublishSettings } from "@plane/types";
|
||||||
// store
|
// store
|
||||||
import { PublishStore } from "@/store/publish/publish.store";
|
import { PublishStore } from "@/store/publish/publish.store";
|
||||||
import type { CoreRootStore } from "@/store/root.store";
|
import type { CoreRootStore } from "@/store/root.store";
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,27 @@
|
||||||
import { enableStaticRendering } from "mobx-react";
|
import { enableStaticRendering } from "mobx-react";
|
||||||
// store imports
|
// store imports
|
||||||
import { IInstanceStore, InstanceStore } from "@/store/instance.store";
|
import type { IInstanceStore } from "@/store/instance.store";
|
||||||
import { IssueDetailStore, IIssueDetailStore } from "@/store/issue-detail.store";
|
import { InstanceStore } from "@/store/instance.store";
|
||||||
import { IssueStore, IIssueStore } from "@/store/issue.store";
|
import type { IIssueDetailStore } from "@/store/issue-detail.store";
|
||||||
import { IUserStore, UserStore } from "@/store/user.store";
|
import { IssueDetailStore } from "@/store/issue-detail.store";
|
||||||
import { CycleStore, ICycleStore } from "./cycle.store";
|
import type { IIssueStore } from "@/store/issue.store";
|
||||||
import { IssueFilterStore, IIssueFilterStore } from "./issue-filters.store";
|
import { IssueStore } from "@/store/issue.store";
|
||||||
import { IIssueLabelStore, LabelStore } from "./label.store";
|
import type { IUserStore } from "@/store/user.store";
|
||||||
import { IIssueMemberStore, MemberStore } from "./members.store";
|
import { UserStore } from "@/store/user.store";
|
||||||
import { IIssueModuleStore, ModuleStore } from "./module.store";
|
import type { ICycleStore } from "./cycle.store";
|
||||||
import { IPublishListStore, PublishListStore } from "./publish/publish_list.store";
|
import { CycleStore } from "./cycle.store";
|
||||||
import { IStateStore, StateStore } from "./state.store";
|
import type { IIssueFilterStore } from "./issue-filters.store";
|
||||||
|
import { IssueFilterStore } from "./issue-filters.store";
|
||||||
|
import type { IIssueLabelStore } from "./label.store";
|
||||||
|
import { LabelStore } from "./label.store";
|
||||||
|
import type { IIssueMemberStore } from "./members.store";
|
||||||
|
import { MemberStore } from "./members.store";
|
||||||
|
import type { IIssueModuleStore } from "./module.store";
|
||||||
|
import { ModuleStore } from "./module.store";
|
||||||
|
import type { IPublishListStore } from "./publish/publish_list.store";
|
||||||
|
import { PublishListStore } from "./publish/publish_list.store";
|
||||||
|
import type { IStateStore } from "./state.store";
|
||||||
|
import { StateStore } from "./state.store";
|
||||||
|
|
||||||
enableStaticRendering(typeof window === "undefined");
|
enableStaticRendering(typeof window === "undefined");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { clone } from "lodash-es";
|
||||||
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { SitesStateService } from "@plane/services";
|
import { SitesStateService } from "@plane/services";
|
||||||
import { IState } from "@plane/types";
|
import type { IState } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { sortStates } from "@/helpers/state.helper";
|
import { sortStates } from "@/helpers/state.helper";
|
||||||
// store
|
// store
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,10 @@ import { set } from "lodash-es";
|
||||||
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
||||||
// plane imports
|
// plane imports
|
||||||
import { UserService } from "@plane/services";
|
import { UserService } from "@plane/services";
|
||||||
import { ActorDetail, IUser } from "@plane/types";
|
import type { ActorDetail, IUser } from "@plane/types";
|
||||||
// store types
|
// store types
|
||||||
import { ProfileStore, IProfileStore } from "@/store/profile.store";
|
import type { IProfileStore } from "@/store/profile.store";
|
||||||
|
import { ProfileStore } from "@/store/profile.store";
|
||||||
// store
|
// store
|
||||||
import type { CoreRootStore } from "@/store/root.store";
|
import type { CoreRootStore } from "@/store/root.store";
|
||||||
|
|
||||||
|
|
|
||||||
2
apps/space/core/types/issue.d.ts
vendored
2
apps/space/core/types/issue.d.ts
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
import { ActorDetail, TIssue, TIssuePriorities, TStateGroups, TIssuePublicComment } from "@plane/types";
|
import type { ActorDetail, TIssue, TIssuePriorities, TStateGroups, TIssuePublicComment } from "@plane/types";
|
||||||
|
|
||||||
export type TIssueLayout = "list" | "kanban" | "calendar" | "spreadsheet" | "gantt";
|
export type TIssueLayout = "list" | "kanban" | "calendar" | "spreadsheet" | "gantt";
|
||||||
export type TIssueLayoutOptions = {
|
export type TIssueLayoutOptions = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
// helpers
|
// helpers
|
||||||
import { SUPPORT_EMAIL } from "./common.helper";
|
import { SUPPORT_EMAIL } from "./common.helper";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { clsx, type ClassValue } from "clsx";
|
import { clsx } from "clsx";
|
||||||
|
import type { ClassValue } from "clsx";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
export const SUPPORT_EMAIL = process.env.NEXT_PUBLIC_SUPPORT_EMAIL || "";
|
export const SUPPORT_EMAIL = process.env.NEXT_PUBLIC_SUPPORT_EMAIL || "";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// plane imports
|
// plane imports
|
||||||
import { MAX_FILE_SIZE } from "@plane/constants";
|
import { MAX_FILE_SIZE } from "@plane/constants";
|
||||||
import { TFileHandler } from "@plane/editor";
|
import type { TFileHandler } from "@plane/editor";
|
||||||
import { SitesFileService } from "@plane/services";
|
import { SitesFileService } from "@plane/services";
|
||||||
import { getFileURL } from "@plane/utils";
|
import { getFileURL } from "@plane/utils";
|
||||||
// services
|
// services
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { differenceInCalendarDays } from "date-fns/differenceInCalendarDays";
|
import { differenceInCalendarDays } from "date-fns/differenceInCalendarDays";
|
||||||
// plane internal
|
// plane internal
|
||||||
import { STATE_GROUPS } from "@plane/constants";
|
import { STATE_GROUPS } from "@plane/constants";
|
||||||
import { TStateGroups } from "@plane/types";
|
import type { TStateGroups } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { getDate } from "@/helpers/date-time.helper";
|
import { getDate } from "@/helpers/date-time.helper";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { STATE_GROUPS } from "@plane/constants";
|
import { STATE_GROUPS } from "@plane/constants";
|
||||||
import { IState } from "@plane/types";
|
import type { IState } from "@plane/types";
|
||||||
|
|
||||||
export const sortStates = (states: IState[]) => {
|
export const sortStates = (states: IState[]) => {
|
||||||
if (!states || states.length === 0) return;
|
if (!states || states.length === 0) return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue