chore: lint related changes and packaging fixes (#6163)
* fix: lint related changes and packaging fixes * adding color validations
This commit is contained in:
parent
b1c340b199
commit
4b5a2bc4e5
71 changed files with 1025 additions and 896 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
import { FC, useEffect, useRef } from "react";
|
import { FC, useEffect, useRef } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// components
|
// components
|
||||||
import { HelpSection, SidebarMenu, SidebarDropdown } from "@/components/admin-sidebar";
|
import { HelpSection, SidebarMenu, SidebarDropdown } from "@/components/admin-sidebar";
|
||||||
// hooks
|
// hooks
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,10 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@headlessui/react": "^1.7.19",
|
"@headlessui/react": "^1.7.19",
|
||||||
"@plane/constants": "*",
|
"@plane/constants": "*",
|
||||||
"@plane/helpers": "*",
|
"@plane/hooks": "*",
|
||||||
"@plane/types": "*",
|
"@plane/types": "*",
|
||||||
"@plane/ui": "*",
|
"@plane/ui": "*",
|
||||||
|
"@plane/utils": "*",
|
||||||
"@sentry/nextjs": "^8.32.0",
|
"@sentry/nextjs": "^8.32.0",
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
"@types/lodash": "^4.17.0",
|
"@types/lodash": "^4.17.0",
|
||||||
|
|
@ -26,7 +27,7 @@
|
||||||
"lucide-react": "^0.356.0",
|
"lucide-react": "^0.356.0",
|
||||||
"mobx": "^6.12.0",
|
"mobx": "^6.12.0",
|
||||||
"mobx-react": "^9.1.1",
|
"mobx-react": "^9.1.1",
|
||||||
"next": "^14.2.12",
|
"next": "^14.2.20",
|
||||||
"next-themes": "^0.2.1",
|
"next-themes": "^0.2.1",
|
||||||
"postcss": "^8.4.38",
|
"postcss": "^8.4.38",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
"dev": "tsup --watch",
|
"dev": "tsup --watch",
|
||||||
"check-types": "tsc --noEmit",
|
"check-types": "tsc --noEmit",
|
||||||
"lint": "eslint src --ext .ts,.tsx",
|
"lint": "eslint src --ext .ts,.tsx",
|
||||||
|
"lint:errors": "eslint src --ext .ts,.tsx --quiet",
|
||||||
"format": "prettier --write \"**/*.{ts,tsx,md}\""
|
"format": "prettier --write \"**/*.{ts,tsx,md}\""
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
|
@ -36,8 +37,8 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@floating-ui/react": "^0.26.4",
|
"@floating-ui/react": "^0.26.4",
|
||||||
"@hocuspocus/provider": "^2.13.5",
|
"@hocuspocus/provider": "^2.13.5",
|
||||||
"@plane/helpers": "*",
|
|
||||||
"@plane/ui": "*",
|
"@plane/ui": "*",
|
||||||
|
"@plane/utils": "*",
|
||||||
"@tiptap/core": "^2.1.13",
|
"@tiptap/core": "^2.1.13",
|
||||||
"@tiptap/extension-blockquote": "^2.1.13",
|
"@tiptap/extension-blockquote": "^2.1.13",
|
||||||
"@tiptap/extension-character-count": "^2.6.5",
|
"@tiptap/extension-character-count": "^2.6.5",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { convertHexEmojiToDecimal } from "@plane/helpers";
|
import { convertHexEmojiToDecimal } from "@plane/utils";
|
||||||
// plane ui
|
// plane ui
|
||||||
import { EmojiIconPicker, EmojiIconPickerTypes, Logo, TEmojiLogoProps } from "@plane/ui";
|
import { EmojiIconPicker, EmojiIconPickerTypes, Logo, TEmojiLogoProps } from "@plane/ui";
|
||||||
// helpers
|
// helpers
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { sanitizeHTML } from "@plane/helpers";
|
import { sanitizeHTML } from "@plane/utils";
|
||||||
// plane ui
|
// plane ui
|
||||||
import { TEmojiLogoProps } from "@plane/ui";
|
import { TEmojiLogoProps } from "@plane/ui";
|
||||||
// types
|
// types
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^8.6.0",
|
"@typescript-eslint/eslint-plugin": "^8.6.0",
|
||||||
"@typescript-eslint/parser": "^8.6.0",
|
"@typescript-eslint/parser": "^8.6.0",
|
||||||
"eslint": "8",
|
"eslint": "8.57.1",
|
||||||
"eslint-config-next": "^14.1.0",
|
"eslint-config-next": "^14.1.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-config-turbo": "^1.12.4",
|
"eslint-config-turbo": "^1.12.4",
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
export const convertHexEmojiToDecimal = (emojiUnified: string): string => {
|
|
||||||
if (!emojiUnified) return "";
|
|
||||||
|
|
||||||
return emojiUnified
|
|
||||||
.toString()
|
|
||||||
.split("-")
|
|
||||||
.map((e) => parseInt(e, 16))
|
|
||||||
.join("-");
|
|
||||||
};
|
|
||||||
|
|
||||||
export const emojiCodeToUnicode = (emoji: string) => {
|
|
||||||
if (!emoji) return "";
|
|
||||||
|
|
||||||
// convert emoji code to unicode
|
|
||||||
const uniCodeEmoji = emoji
|
|
||||||
.toString()
|
|
||||||
.split("-")
|
|
||||||
.map((emoji) => parseInt(emoji, 10).toString(16))
|
|
||||||
.join("-");
|
|
||||||
|
|
||||||
return uniCodeEmoji;
|
|
||||||
};
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
export * from "./emoji.helper"
|
|
||||||
export * from "./string.helper"
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
export * from "./helpers";
|
|
||||||
export * from "./hooks";
|
|
||||||
3
packages/hooks/.eslintignore
Normal file
3
packages/hooks/.eslintignore
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
build/*
|
||||||
|
dist/*
|
||||||
|
out/*
|
||||||
9
packages/hooks/.eslintrc.js
Normal file
9
packages/hooks/.eslintrc.js
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
/** @type {import("eslint").Linter.Config} */
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
project: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
4
packages/hooks/.prettierignore
Normal file
4
packages/hooks/.prettierignore
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
.turbo
|
||||||
|
out/
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
5
packages/hooks/.prettierrc
Normal file
5
packages/hooks/.prettierrc
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"printWidth": 120,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"trailingComma": "es5"
|
||||||
|
}
|
||||||
27
packages/hooks/package.json
Normal file
27
packages/hooks/package.json
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"name": "@plane/hooks",
|
||||||
|
"version": "0.24.0",
|
||||||
|
"description": "React hooks that are shared across multiple apps internally",
|
||||||
|
"private": true,
|
||||||
|
"main": "./dist/index.js",
|
||||||
|
"module": "./dist/index.mjs",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"files": [
|
||||||
|
"dist/**"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsup ./src/index.ts --format esm,cjs --dts --external react --minify",
|
||||||
|
"lint": "eslint . --ext .ts,.tsx",
|
||||||
|
"lint:errors": "eslint . --ext .ts,.tsx --quiet"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"react": "^18.3.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@plane/eslint-config": "*",
|
||||||
|
"@types/node": "^22.5.4",
|
||||||
|
"@types/react": "^18.3.11",
|
||||||
|
"tsup": "^7.2.0",
|
||||||
|
"typescript": "^5.3.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,6 @@
|
||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
"lib": ["esnext", "dom"]
|
"lib": ["esnext", "dom"]
|
||||||
},
|
},
|
||||||
"include": ["."],
|
"include": ["./src"],
|
||||||
"exclude": ["dist", "build", "node_modules"]
|
"exclude": ["dist", "build", "node_modules"]
|
||||||
}
|
}
|
||||||
|
|
@ -18,7 +18,8 @@
|
||||||
"storybook": "storybook dev -p 6006",
|
"storybook": "storybook dev -p 6006",
|
||||||
"build-storybook": "storybook build",
|
"build-storybook": "storybook build",
|
||||||
"postcss": "postcss styles/globals.css -o styles/output.css --watch",
|
"postcss": "postcss styles/globals.css -o styles/output.css --watch",
|
||||||
"lint": "eslint src --ext .ts,.tsx"
|
"lint": "eslint src --ext .ts,.tsx",
|
||||||
|
"lint:errors": "eslint src --ext .ts,.tsx --quiet"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
|
|
@ -31,7 +32,8 @@
|
||||||
"@blueprintjs/popover2": "^1.13.3",
|
"@blueprintjs/popover2": "^1.13.3",
|
||||||
"@headlessui/react": "^1.7.3",
|
"@headlessui/react": "^1.7.3",
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
"@plane/helpers": "*",
|
"@plane/hooks": "*",
|
||||||
|
"@plane/utils": "*",
|
||||||
"clsx": "^2.0.0",
|
"clsx": "^2.0.0",
|
||||||
"emoji-picker-react": "^4.5.16",
|
"emoji-picker-react": "^4.5.16",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { Combobox } from "@headlessui/react";
|
||||||
// popper-js
|
// popper-js
|
||||||
import { usePopper } from "react-popper";
|
import { usePopper } from "react-popper";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// components
|
// components
|
||||||
import { DropdownButton } from "./common";
|
import { DropdownButton } from "./common";
|
||||||
import { DropdownOptions } from "./common/options";
|
import { DropdownOptions } from "./common/options";
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { Combobox } from "@headlessui/react";
|
||||||
// popper-js
|
// popper-js
|
||||||
import { usePopper } from "react-popper";
|
import { usePopper } from "react-popper";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// components
|
// components
|
||||||
import { DropdownButton } from "./common";
|
import { DropdownButton } from "./common";
|
||||||
import { DropdownOptions } from "./common/options";
|
import { DropdownOptions } from "./common/options";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useEffect, useRef, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// components
|
// components
|
||||||
import { ContextMenuItem } from "./item";
|
import { ContextMenuItem } from "./item";
|
||||||
// helpers
|
// helpers
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { Menu } from "@headlessui/react";
|
||||||
import { usePopper } from "react-popper";
|
import { usePopper } from "react-popper";
|
||||||
import { ChevronDown, MoreHorizontal } from "lucide-react";
|
import { ChevronDown, MoreHorizontal } from "lucide-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// hooks
|
// hooks
|
||||||
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
||||||
// helpers
|
// helpers
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { Combobox } from "@headlessui/react";
|
||||||
import { Check, ChevronDown, Info, Search } from "lucide-react";
|
import { Check, ChevronDown, Info, Search } from "lucide-react";
|
||||||
import { createPortal } from "react-dom";
|
import { createPortal } from "react-dom";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// hooks
|
// hooks
|
||||||
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
||||||
// helpers
|
// helpers
|
||||||
|
|
@ -97,10 +97,11 @@ export const CustomSearchSelect = (props: ICustomSearchSelectProps) => {
|
||||||
<button
|
<button
|
||||||
ref={setReferenceElement}
|
ref={setReferenceElement}
|
||||||
type="button"
|
type="button"
|
||||||
className={`flex w-full items-center justify-between gap-1 text-xs ${disabled
|
className={`flex w-full items-center justify-between gap-1 text-xs ${
|
||||||
? "cursor-not-allowed text-custom-text-200"
|
disabled
|
||||||
: "cursor-pointer hover:bg-custom-background-80"
|
? "cursor-not-allowed text-custom-text-200"
|
||||||
} ${customButtonClassName}`}
|
: "cursor-pointer hover:bg-custom-background-80"
|
||||||
|
} ${customButtonClassName}`}
|
||||||
onClick={toggleDropdown}
|
onClick={toggleDropdown}
|
||||||
>
|
>
|
||||||
{customButton}
|
{customButton}
|
||||||
|
|
@ -186,15 +187,13 @@ export const CustomSearchSelect = (props: ICustomSearchSelectProps) => {
|
||||||
{selected && <Check className="h-3.5 w-3.5 flex-shrink-0" />}
|
{selected && <Check className="h-3.5 w-3.5 flex-shrink-0" />}
|
||||||
{option.tooltip && (
|
{option.tooltip && (
|
||||||
<>
|
<>
|
||||||
{
|
{typeof option.tooltip === "string" ? (
|
||||||
typeof option.tooltip === "string" ? (
|
<Tooltip tooltipContent={option.tooltip}>
|
||||||
<Tooltip tooltipContent={option.tooltip}>
|
<Info className="h-3.5 w-3.5 flex-shrink-0 cursor-pointer text-custom-text-200" />
|
||||||
<Info className="h-3.5 w-3.5 flex-shrink-0 cursor-pointer text-custom-text-200" />
|
</Tooltip>
|
||||||
</Tooltip>
|
) : (
|
||||||
) : (
|
option.tooltip
|
||||||
option.tooltip
|
)}
|
||||||
)
|
|
||||||
}
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { usePopper } from "react-popper";
|
||||||
import { Listbox } from "@headlessui/react";
|
import { Listbox } from "@headlessui/react";
|
||||||
import { Check, ChevronDown } from "lucide-react";
|
import { Check, ChevronDown } from "lucide-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// hooks
|
// hooks
|
||||||
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
||||||
// helpers
|
// helpers
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { usePopper } from "react-popper";
|
||||||
import { Popover, Tab } from "@headlessui/react";
|
import { Popover, Tab } from "@headlessui/react";
|
||||||
import EmojiPicker from "emoji-picker-react";
|
import EmojiPicker from "emoji-picker-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../../helpers";
|
||||||
// hooks
|
// hooks
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { usePopper } from "react-popper";
|
||||||
import EmojiPicker from "emoji-picker-react";
|
import EmojiPicker from "emoji-picker-react";
|
||||||
import { Popover, Tab } from "@headlessui/react";
|
import { Popover, Tab } from "@headlessui/react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// components
|
// components
|
||||||
import { IconsList } from "./icons-list";
|
import { IconsList } from "./icons-list";
|
||||||
// helpers
|
// helpers
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { FC, Fragment } from "react";
|
||||||
import { Tab } from "@headlessui/react";
|
import { Tab } from "@headlessui/react";
|
||||||
import { LucideProps } from "lucide-react";
|
import { LucideProps } from "lucide-react";
|
||||||
// helpers
|
// helpers
|
||||||
import { useLocalStorage } from "@plane/helpers";
|
import { useLocalStorage } from "@plane/hooks";
|
||||||
import { cn } from "../../helpers";
|
import { cn } from "../../helpers";
|
||||||
|
|
||||||
type TabItem = {
|
type TabItem = {
|
||||||
|
|
|
||||||
3
packages/utils/.eslintignore
Normal file
3
packages/utils/.eslintignore
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
build/*
|
||||||
|
dist/*
|
||||||
|
out/*
|
||||||
9
packages/utils/.eslintrc.js
Normal file
9
packages/utils/.eslintrc.js
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
/** @type {import("eslint").Linter.Config} */
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
project: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
5
packages/utils/.prettierrc
Normal file
5
packages/utils/.prettierrc
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"printWidth": 120,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"trailingComma": "es5"
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "@plane/helpers",
|
"name": "@plane/utils",
|
||||||
"version": "0.24.0",
|
"version": "0.24.0",
|
||||||
"description": "Helper functions shared across multiple apps internally",
|
"description": "Helper functions shared across multiple apps internally",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|
@ -10,16 +10,19 @@
|
||||||
"dist/**"
|
"dist/**"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup ./index.ts --format esm,cjs --dts --external react --minify"
|
"build": "tsup ./src/index.ts --format esm,cjs --dts --external react --minify",
|
||||||
},
|
"lint": "eslint . --ext .ts,.tsx",
|
||||||
"devDependencies": {
|
"lint:errors": "eslint . --ext .ts,.tsx --quiet"
|
||||||
"@types/node": "^22.5.4",
|
|
||||||
"@types/react": "^18.3.11",
|
|
||||||
"tsup": "^7.2.0",
|
|
||||||
"typescript": "^5.6.2"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"isomorphic-dompurify": "^2.16.0",
|
"isomorphic-dompurify": "^2.16.0",
|
||||||
"react": "^18.3.1"
|
"react": "^18.3.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@plane/eslint-config": "*",
|
||||||
|
"@types/node": "^22.5.4",
|
||||||
|
"@types/react": "^18.3.11",
|
||||||
|
"tsup": "^7.2.0",
|
||||||
|
"typescript": "^5.3.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
60
packages/utils/src/color.ts
Normal file
60
packages/utils/src/color.ts
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
/**
|
||||||
|
* Represents an RGB color with numeric values for red, green, and blue components
|
||||||
|
* @typedef {Object} RGB
|
||||||
|
* @property {number} r - Red component (0-255)
|
||||||
|
* @property {number} g - Green component (0-255)
|
||||||
|
* @property {number} b - Blue component (0-255)
|
||||||
|
*/
|
||||||
|
export type RGB = { r: number; g: number; b: number };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validates and clamps color values to RGB range (0-255)
|
||||||
|
* @param {number} value - The color value to validate
|
||||||
|
* @returns {number} Clamped and floored value between 0-255
|
||||||
|
*/
|
||||||
|
export const validateColor = (value: number) => {
|
||||||
|
if (value < 0) return 0;
|
||||||
|
if (value > 255) return 255;
|
||||||
|
return Math.floor(value);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a decimal color value to two-character hex
|
||||||
|
* @param {number} value - Decimal color value (0-255)
|
||||||
|
* @returns {string} Two-character hex value with leading zero if needed
|
||||||
|
*/
|
||||||
|
export const toHex = (value: number) => validateColor(value).toString(16).padStart(2, "0");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a hexadecimal color code to RGB values
|
||||||
|
* @param {string} hex - The hexadecimal color code (e.g., "#ff0000" for red)
|
||||||
|
* @returns {RGB} An object containing the RGB values
|
||||||
|
* @example
|
||||||
|
* hexToRgb("#ff0000") // returns { r: 255, g: 0, b: 0 }
|
||||||
|
* hexToRgb("#00ff00") // returns { r: 0, g: 255, b: 0 }
|
||||||
|
* hexToRgb("#0000ff") // returns { r: 0, g: 0, b: 255 }
|
||||||
|
*/
|
||||||
|
export const hexToRgb = (hex: string): RGB => {
|
||||||
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex.trim());
|
||||||
|
return result
|
||||||
|
? {
|
||||||
|
r: parseInt(result[1], 16),
|
||||||
|
g: parseInt(result[2], 16),
|
||||||
|
b: parseInt(result[3], 16),
|
||||||
|
}
|
||||||
|
: { r: 0, g: 0, b: 0 };
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts RGB values to a hexadecimal color code
|
||||||
|
* @param {RGB} rgb - An object containing RGB values
|
||||||
|
* @param {number} rgb.r - Red component (0-255)
|
||||||
|
* @param {number} rgb.g - Green component (0-255)
|
||||||
|
* @param {number} rgb.b - Blue component (0-255)
|
||||||
|
* @returns {string} The hexadecimal color code (e.g., "#ff0000" for red)
|
||||||
|
* @example
|
||||||
|
* rgbToHex({ r: 255, g: 0, b: 0 }) // returns "#ff0000"
|
||||||
|
* rgbToHex({ r: 0, g: 255, b: 0 }) // returns "#00ff00"
|
||||||
|
* rgbToHex({ r: 0, g: 0, b: 255 }) // returns "#0000ff"
|
||||||
|
*/
|
||||||
|
export const rgbToHex = ({ r, g, b }: RGB): string => `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
||||||
40
packages/utils/src/emoji.ts
Normal file
40
packages/utils/src/emoji.ts
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
/**
|
||||||
|
* Converts a hyphen-separated hexadecimal emoji code to its decimal representation
|
||||||
|
* @param {string} emojiUnified - The unified emoji code in hexadecimal format (e.g., "1f600" or "1f1e6-1f1e8")
|
||||||
|
* @returns {string} The decimal representation of the emoji code (e.g., "128512" or "127462-127464")
|
||||||
|
* @example
|
||||||
|
* convertHexEmojiToDecimal("1f600") // returns "128512"
|
||||||
|
* convertHexEmojiToDecimal("1f1e6-1f1e8") // returns "127462-127464"
|
||||||
|
* convertHexEmojiToDecimal("") // returns ""
|
||||||
|
*/
|
||||||
|
export const convertHexEmojiToDecimal = (emojiUnified: string): string => {
|
||||||
|
if (!emojiUnified) return "";
|
||||||
|
|
||||||
|
return emojiUnified
|
||||||
|
.toString()
|
||||||
|
.split("-")
|
||||||
|
.map((e) => parseInt(e, 16))
|
||||||
|
.join("-");
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a hyphen-separated decimal emoji code back to its hexadecimal representation
|
||||||
|
* @param {string} emoji - The emoji code in decimal format (e.g., "128512" or "127462-127464")
|
||||||
|
* @returns {string} The hexadecimal representation of the emoji code (e.g., "1f600" or "1f1e6-1f1e8")
|
||||||
|
* @example
|
||||||
|
* emojiCodeToUnicode("128512") // returns "1f600"
|
||||||
|
* emojiCodeToUnicode("127462-127464") // returns "1f1e6-1f1e8"
|
||||||
|
* emojiCodeToUnicode("") // returns ""
|
||||||
|
*/
|
||||||
|
export const emojiCodeToUnicode = (emoji: string): string => {
|
||||||
|
if (!emoji) return "";
|
||||||
|
|
||||||
|
// convert emoji code to unicode
|
||||||
|
const uniCodeEmoji = emoji
|
||||||
|
.toString()
|
||||||
|
.split("-")
|
||||||
|
.map((emoji) => parseInt(emoji, 10).toString(16))
|
||||||
|
.join("-");
|
||||||
|
|
||||||
|
return uniCodeEmoji;
|
||||||
|
};
|
||||||
3
packages/utils/src/index.ts
Normal file
3
packages/utils/src/index.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
export * from "./color";
|
||||||
|
export * from "./emoji";
|
||||||
|
export * from "./string";
|
||||||
|
|
@ -12,4 +12,4 @@ import DOMPurify from "isomorphic-dompurify";
|
||||||
export const sanitizeHTML = (htmlString: string) => {
|
export const sanitizeHTML = (htmlString: string) => {
|
||||||
const sanitizedText = DOMPurify.sanitize(htmlString, { ALLOWED_TAGS: [] }); // sanitize the string to remove all HTML tags
|
const sanitizedText = DOMPurify.sanitize(htmlString, { ALLOWED_TAGS: [] }); // sanitize the string to remove all HTML tags
|
||||||
return sanitizedText.trim(); // trim the string to remove leading and trailing whitespaces
|
return sanitizedText.trim(); // trim the string to remove leading and trailing whitespaces
|
||||||
};
|
};
|
||||||
9
packages/utils/tsconfig.json
Normal file
9
packages/utils/tsconfig.json
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"extends": "@plane/typescript-config/react-library.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"jsx": "react",
|
||||||
|
"lib": ["esnext", "dom"]
|
||||||
|
},
|
||||||
|
"include": ["./src"],
|
||||||
|
"exclude": ["dist", "build", "node_modules"]
|
||||||
|
}
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
"mobx": "^6.10.0",
|
"mobx": "^6.10.0",
|
||||||
"mobx-react": "^9.1.1",
|
"mobx-react": "^9.1.1",
|
||||||
"mobx-utils": "^6.0.8",
|
"mobx-utils": "^6.0.8",
|
||||||
"next": "^14.2.12",
|
"next": "^14.2.20",
|
||||||
"next-themes": "^0.2.1",
|
"next-themes": "^0.2.1",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
.next
|
.next
|
||||||
.vercel
|
.turbo
|
||||||
.tubro
|
|
||||||
out/
|
out/
|
||||||
dis/
|
dist/
|
||||||
build/
|
build/
|
||||||
|
|
@ -2,7 +2,7 @@ import { FC, useEffect, useRef } from "react";
|
||||||
import isEmpty from "lodash/isEmpty";
|
import isEmpty from "lodash/isEmpty";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// components
|
// components
|
||||||
import {
|
import {
|
||||||
SidebarDropdown,
|
SidebarDropdown,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { usePathname } from "next/navigation";
|
||||||
// icons
|
// icons
|
||||||
import { ChevronLeft, LogOut, MoveLeft, Plus, UserPlus } from "lucide-react";
|
import { ChevronLeft, LogOut, MoveLeft, Plus, UserPlus } from "lucide-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// ui
|
// ui
|
||||||
import { TOAST_TYPE, Tooltip, setToast } from "@plane/ui";
|
import { TOAST_TYPE, Tooltip, setToast } from "@plane/ui";
|
||||||
// components
|
// components
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { FC, useEffect, useRef } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { UseFormRegister, UseFormSetFocus } from "react-hook-form";
|
import { UseFormRegister, UseFormSetFocus } from "react-hook-form";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// types
|
// types
|
||||||
import { TIssue } from "@plane/types";
|
import { TIssue } from "@plane/types";
|
||||||
// components
|
// components
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { Emoji } from "emoji-picker-react";
|
import { Emoji } from "emoji-picker-react";
|
||||||
|
// Due to some weird issue with the import order, the import of useFontFaceObserver
|
||||||
|
// 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";
|
import useFontFaceObserver from "use-font-face-observer";
|
||||||
// types
|
// types
|
||||||
import { TLogoProps } from "@plane/types";
|
import { TLogoProps } from "@plane/types";
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { Control, Controller } from "react-hook-form";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { Tab, Popover } from "@headlessui/react";
|
import { Tab, Popover } from "@headlessui/react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// plane types
|
// plane types
|
||||||
import { EFileAssetType } from "@plane/types/src/enums";
|
import { EFileAssetType } from "@plane/types/src/enums";
|
||||||
// ui
|
// ui
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { useParams } from "next/navigation";
|
||||||
// icons
|
// icons
|
||||||
import { ListFilter, Search, X } from "lucide-react";
|
import { ListFilter, Search, X } from "lucide-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// types
|
// types
|
||||||
import type { TCycleFilters } from "@plane/types";
|
import type { TCycleFilters } from "@plane/types";
|
||||||
// components
|
// components
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { observer } from "mobx-react";
|
||||||
// icons
|
// icons
|
||||||
import { ListFilter, Search, X } from "lucide-react";
|
import { ListFilter, Search, X } from "lucide-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// types
|
// types
|
||||||
import { TCycleFilters } from "@plane/types";
|
import { TCycleFilters } from "@plane/types";
|
||||||
// components
|
// components
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
||||||
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
||||||
import { attachInstruction, extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";
|
import { attachInstruction, extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
import { DropIndicator, TOAST_TYPE, setToast } from "@plane/ui";
|
import { DropIndicator, TOAST_TYPE, setToast } from "@plane/ui";
|
||||||
import { HIGHLIGHT_WITH_LINE, highlightIssueOnDrop } from "@/components/issues/issue-layouts/utils";
|
import { HIGHLIGHT_WITH_LINE, highlightIssueOnDrop } from "@/components/issues/issue-layouts/utils";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
||||||
import { draggable } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
import { draggable } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// components
|
// components
|
||||||
import { CalendarIssueBlock } from "@/components/issues";
|
import { CalendarIssueBlock } from "@/components/issues";
|
||||||
import { useIssueDetail } from "@/hooks/store";
|
import { useIssueDetail } from "@/hooks/store";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { observer } from "mobx-react";
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
import { MoreHorizontal } from "lucide-react";
|
import { MoreHorizontal } from "lucide-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// types
|
// types
|
||||||
import { TIssue } from "@plane/types";
|
import { TIssue } from "@plane/types";
|
||||||
// ui
|
// ui
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-d
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// types
|
// types
|
||||||
import { TIssue, IIssueDisplayProperties, IIssueMap } from "@plane/types";
|
import { TIssue, IIssueDisplayProperties, IIssueMap } from "@plane/types";
|
||||||
// ui
|
// ui
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element
|
||||||
import { attachInstruction, extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";
|
import { attachInstruction, extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// types
|
// types
|
||||||
import { IIssueDisplayProperties, TIssue, TIssueMap } from "@plane/types";
|
import { IIssueDisplayProperties, TIssue, TIssueMap } from "@plane/types";
|
||||||
// components
|
// components
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import { usePopper } from "react-popper";
|
||||||
import { Check, ChevronDown, Search, Tags } from "lucide-react";
|
import { Check, ChevronDown, Search, Tags } from "lucide-react";
|
||||||
import { Combobox } from "@headlessui/react";
|
import { Combobox } from "@headlessui/react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// types
|
// types
|
||||||
import { IIssueLabel } from "@plane/types";
|
import { IIssueLabel } from "@plane/types";
|
||||||
// ui
|
// ui
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { observer } from "mobx-react";
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// types
|
// types
|
||||||
import { IIssueDisplayProperties, TIssue } from "@plane/types";
|
import { IIssueDisplayProperties, TIssue } from "@plane/types";
|
||||||
// ui
|
// ui
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { usePopper } from "react-popper";
|
||||||
import { Check, Component, Plus, Search, Tag } from "lucide-react";
|
import { Check, Component, Plus, Search, Tag } from "lucide-react";
|
||||||
import { Combobox } from "@headlessui/react";
|
import { Combobox } from "@headlessui/react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// components
|
// components
|
||||||
import { IssueLabelsList } from "@/components/ui";
|
import { IssueLabelsList } from "@/components/ui";
|
||||||
// helpers
|
// helpers
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
import { MutableRefObject, useRef, useState } from "react";
|
import { MutableRefObject, useRef, useState } from "react";
|
||||||
import { LucideIcon, X } from "lucide-react";
|
import { LucideIcon, X } from "lucide-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// types
|
// types
|
||||||
import { IIssueLabel } from "@plane/types";
|
import { IIssueLabel } from "@plane/types";
|
||||||
// ui
|
// ui
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { useParams } from "next/navigation";
|
||||||
// icons
|
// icons
|
||||||
import { ListFilter, Search, X } from "lucide-react";
|
import { ListFilter, Search, X } from "lucide-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// types
|
// types
|
||||||
import type { TModuleFilters } from "@plane/types";
|
import type { TModuleFilters } from "@plane/types";
|
||||||
// components
|
// components
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import { ListFilter, Search, X } from "lucide-react";
|
||||||
// editor
|
// editor
|
||||||
import { cn } from "@plane/editor";
|
import { cn } from "@plane/editor";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// types
|
// types
|
||||||
import { TModuleFilters } from "@plane/types";
|
import { TModuleFilters } from "@plane/types";
|
||||||
// ui
|
// ui
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { FC, useState, useRef, useEffect } from "react";
|
import { FC, useState, useRef, useEffect } from "react";
|
||||||
import { Search, X } from "lucide-react";
|
import { Search, X } from "lucide-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "@/helpers/common.helper";
|
import { cn } from "@/helpers/common.helper";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { ChevronDown, Pencil } from "lucide-react";
|
||||||
// headless ui
|
// headless ui
|
||||||
import { Disclosure, Transition } from "@headlessui/react";
|
import { Disclosure, Transition } from "@headlessui/react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// types
|
// types
|
||||||
import { IUserProfileProjectSegregation } from "@plane/types";
|
import { IUserProfileProjectSegregation } from "@plane/types";
|
||||||
// plane ui
|
// plane ui
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { observer } from "mobx-react";
|
||||||
import { usePathname } from "next/navigation";
|
import { usePathname } from "next/navigation";
|
||||||
import { Search, Briefcase, X } from "lucide-react";
|
import { Search, Briefcase, X } from "lucide-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// ui
|
// ui
|
||||||
import { Breadcrumbs, Button, Header } from "@plane/ui";
|
import { Breadcrumbs, Button, Header } from "@plane/ui";
|
||||||
// components
|
// components
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { observer } from "mobx-react";
|
||||||
// icons
|
// icons
|
||||||
import { ListFilter, Search, X } from "lucide-react";
|
import { ListFilter, Search, X } from "lucide-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// helpers
|
// helpers
|
||||||
import { cn } from "@/helpers/common.helper";
|
import { cn } from "@/helpers/common.helper";
|
||||||
// hooks
|
// hooks
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,11 @@
|
||||||
|
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
||||||
import { DragLocationHistory, ElementDragPayload, DropTargetRecord } from "@atlaskit/pragmatic-drag-and-drop/dist/types/internal-types";
|
import {
|
||||||
|
DragLocationHistory,
|
||||||
|
ElementDragPayload,
|
||||||
|
DropTargetRecord,
|
||||||
|
} from "@atlaskit/pragmatic-drag-and-drop/dist/types/internal-types";
|
||||||
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
||||||
import { pointerOutsideOfPreview } from "@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview";
|
import { pointerOutsideOfPreview } from "@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview";
|
||||||
import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview";
|
import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview";
|
||||||
|
|
@ -15,7 +19,7 @@ import { PenSquare, Star, MoreHorizontal, ChevronRight, GripVertical } from "luc
|
||||||
import { Disclosure, Transition } from "@headlessui/react";
|
import { Disclosure, Transition } from "@headlessui/react";
|
||||||
|
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// ui
|
// ui
|
||||||
import { IFavorite, InstructionType } from "@plane/types";
|
import { IFavorite, InstructionType } from "@plane/types";
|
||||||
import { CustomMenu, Tooltip, DropIndicator, FavoriteFolderIcon, DragHandle } from "@plane/ui";
|
import { CustomMenu, Tooltip, DropIndicator, FavoriteFolderIcon, DragHandle } from "@plane/ui";
|
||||||
|
|
@ -34,7 +38,7 @@ type Props = {
|
||||||
favorite: IFavorite;
|
favorite: IFavorite;
|
||||||
handleRemoveFromFavorites: (favorite: IFavorite) => void;
|
handleRemoveFromFavorites: (favorite: IFavorite) => void;
|
||||||
handleRemoveFromFavoritesFolder: (favoriteId: string) => void;
|
handleRemoveFromFavoritesFolder: (favoriteId: string) => void;
|
||||||
handleDrop: (self: DropTargetRecord,source: ElementDragPayload, location: DragLocationHistory) => void;
|
handleDrop: (self: DropTargetRecord, source: ElementDragPayload, location: DragLocationHistory) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FavoriteFolder: React.FC<Props> = (props) => {
|
export const FavoriteFolder: React.FC<Props> = (props) => {
|
||||||
|
|
@ -65,7 +69,7 @@ export const FavoriteFolder: React.FC<Props> = (props) => {
|
||||||
element,
|
element,
|
||||||
getInitialData: () => initialData,
|
getInitialData: () => initialData,
|
||||||
onDragStart: () => setIsDragging(true),
|
onDragStart: () => setIsDragging(true),
|
||||||
onGenerateDragPreview: ({ nativeSetDragImage }) =>{
|
onGenerateDragPreview: ({ nativeSetDragImage }) => {
|
||||||
setCustomNativeDragPreview({
|
setCustomNativeDragPreview({
|
||||||
getOffset: pointerOutsideOfPreview({ x: "0px", y: "0px" }),
|
getOffset: pointerOutsideOfPreview({ x: "0px", y: "0px" }),
|
||||||
render: ({ container }) => {
|
render: ({ container }) => {
|
||||||
|
|
@ -84,44 +88,42 @@ export const FavoriteFolder: React.FC<Props> = (props) => {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onDrop: () => {
|
onDrop: () => {
|
||||||
setIsDragging(false)
|
setIsDragging(false);
|
||||||
}, // canDrag: () => isDraggable,
|
}, // canDrag: () => isDraggable,
|
||||||
}),
|
}),
|
||||||
dropTargetForElements({
|
dropTargetForElements({
|
||||||
element,
|
element,
|
||||||
canDrop: ({ source }) => getCanDrop(source, favorite, false),
|
canDrop: ({ source }) => getCanDrop(source, favorite, false),
|
||||||
getData: ({ input, element }) =>{
|
getData: ({ input, element }) => {
|
||||||
|
|
||||||
const blockedStates: InstructionType[] = [];
|
const blockedStates: InstructionType[] = [];
|
||||||
if(!isLastChild){
|
if (!isLastChild) {
|
||||||
blockedStates.push('reorder-below');
|
blockedStates.push("reorder-below");
|
||||||
}
|
}
|
||||||
|
|
||||||
return attachInstruction(initialData,{
|
return attachInstruction(initialData, {
|
||||||
input,
|
input,
|
||||||
element,
|
element,
|
||||||
currentLevel: 0,
|
currentLevel: 0,
|
||||||
indentPerLevel: 0,
|
indentPerLevel: 0,
|
||||||
mode: isLastChild ? 'last-in-group' : 'standard',
|
mode: isLastChild ? "last-in-group" : "standard",
|
||||||
block: blockedStates
|
block: blockedStates,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
onDrag: ({source, self, location}) => {
|
onDrag: ({ source, self, location }) => {
|
||||||
const instruction = getInstructionFromPayload(self,source, location);
|
const instruction = getInstructionFromPayload(self, source, location);
|
||||||
setInstruction(instruction);
|
setInstruction(instruction);
|
||||||
},
|
},
|
||||||
onDragLeave: () => {
|
onDragLeave: () => {
|
||||||
setInstruction(undefined);
|
setInstruction(undefined);
|
||||||
},
|
},
|
||||||
onDrop: ({ self, source, location})=>{
|
onDrop: ({ self, source, location }) => {
|
||||||
setInstruction(undefined);
|
setInstruction(undefined);
|
||||||
handleDrop(self, source,location);
|
handleDrop(self, source, location);
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [isDragging, favorite.id ]);
|
}, [isDragging, favorite.id]);
|
||||||
|
|
||||||
|
|
||||||
useOutsideClickDetector(actionSectionRef, () => setIsMenuActive(false));
|
useOutsideClickDetector(actionSectionRef, () => setIsMenuActive(false));
|
||||||
|
|
||||||
|
|
@ -140,11 +142,11 @@ export const FavoriteFolder: React.FC<Props> = (props) => {
|
||||||
// id={`sidebar-${projectId}-${projectListType}`}
|
// id={`sidebar-${projectId}-${projectListType}`}
|
||||||
className={cn("relative", {
|
className={cn("relative", {
|
||||||
"bg-custom-sidebar-background-80 opacity-60": isDragging,
|
"bg-custom-sidebar-background-80 opacity-60": isDragging,
|
||||||
"border-[2px] border-custom-primary-100" : instruction === 'make-child'
|
"border-[2px] border-custom-primary-100": instruction === "make-child",
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{/* draggable drop top indicator */}
|
{/* draggable drop top indicator */}
|
||||||
<DropIndicator isVisible={instruction === "reorder-above"}/>
|
<DropIndicator isVisible={instruction === "reorder-above"} />
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"group/project-item relative w-full px-2 py-1.5 flex items-center rounded-md text-custom-sidebar-text-100 hover:bg-custom-sidebar-background-90",
|
"group/project-item relative w-full px-2 py-1.5 flex items-center rounded-md text-custom-sidebar-text-100 hover:bg-custom-sidebar-background-90",
|
||||||
|
|
@ -283,7 +285,7 @@ export const FavoriteFolder: React.FC<Props> = (props) => {
|
||||||
"px-2": !isSidebarCollapsed,
|
"px-2": !isSidebarCollapsed,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{orderBy(favorite.children,'sequence','desc').map((child,index) => (
|
{orderBy(favorite.children, "sequence", "desc").map((child, index) => (
|
||||||
<FavoriteRoot
|
<FavoriteRoot
|
||||||
key={child.id}
|
key={child.id}
|
||||||
workspaceSlug={workspaceSlug.toString()}
|
workspaceSlug={workspaceSlug.toString()}
|
||||||
|
|
@ -298,7 +300,7 @@ export const FavoriteFolder: React.FC<Props> = (props) => {
|
||||||
</Transition>
|
</Transition>
|
||||||
)}
|
)}
|
||||||
{/* draggable drop bottom indicator */}
|
{/* draggable drop bottom indicator */}
|
||||||
{ isLastChild && <DropIndicator isVisible={instruction === "reorder-below"} />}
|
{isLastChild && <DropIndicator isVisible={instruction === "reorder-below"} />}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Disclosure>
|
</Disclosure>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,11 @@
|
||||||
import React, { FC, useEffect, useRef, useState } from "react";
|
import React, { FC, useEffect, useRef, useState } from "react";
|
||||||
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
|
||||||
import { DropTargetRecord, DragLocationHistory } from "@atlaskit/pragmatic-drag-and-drop/dist/types/internal-types";
|
import { DropTargetRecord, DragLocationHistory } from "@atlaskit/pragmatic-drag-and-drop/dist/types/internal-types";
|
||||||
import { draggable, dropTargetForElements, ElementDragPayload } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
import {
|
||||||
|
draggable,
|
||||||
|
dropTargetForElements,
|
||||||
|
ElementDragPayload,
|
||||||
|
} from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
|
||||||
import { pointerOutsideOfPreview } from "@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview";
|
import { pointerOutsideOfPreview } from "@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview";
|
||||||
import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview";
|
import { setCustomNativeDragPreview } from "@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview";
|
||||||
import { attachInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";
|
import { attachInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";
|
||||||
|
|
@ -11,7 +15,7 @@ import { attachInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { createRoot } from "react-dom/client";
|
import { createRoot } from "react-dom/client";
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// ui
|
// ui
|
||||||
import { IFavorite, InstructionType } from "@plane/types";
|
import { IFavorite, InstructionType } from "@plane/types";
|
||||||
// components
|
// components
|
||||||
|
|
@ -26,8 +30,7 @@ import {
|
||||||
import { useAppTheme } from "@/hooks/store";
|
import { useAppTheme } from "@/hooks/store";
|
||||||
import { useFavoriteItemDetails } from "@/hooks/use-favorite-item-details";
|
import { useFavoriteItemDetails } from "@/hooks/use-favorite-item-details";
|
||||||
//helpers
|
//helpers
|
||||||
import { getCanDrop, getInstructionFromPayload} from "../favorites.helpers";
|
import { getCanDrop, getInstructionFromPayload } from "../favorites.helpers";
|
||||||
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
isLastChild: boolean;
|
isLastChild: boolean;
|
||||||
|
|
@ -35,19 +38,12 @@ type Props = {
|
||||||
workspaceSlug: string;
|
workspaceSlug: string;
|
||||||
favorite: IFavorite;
|
favorite: IFavorite;
|
||||||
handleRemoveFromFavorites: (favorite: IFavorite) => void;
|
handleRemoveFromFavorites: (favorite: IFavorite) => void;
|
||||||
handleDrop: (self: DropTargetRecord,source: ElementDragPayload, location: DragLocationHistory) => void;
|
handleDrop: (self: DropTargetRecord, source: ElementDragPayload, location: DragLocationHistory) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FavoriteRoot: FC<Props> = observer((props) => {
|
export const FavoriteRoot: FC<Props> = observer((props) => {
|
||||||
// props
|
// props
|
||||||
const {
|
const { isLastChild, parentId, workspaceSlug, favorite, handleRemoveFromFavorites, handleDrop } = props;
|
||||||
isLastChild,
|
|
||||||
parentId,
|
|
||||||
workspaceSlug,
|
|
||||||
favorite,
|
|
||||||
handleRemoveFromFavorites,
|
|
||||||
handleDrop,
|
|
||||||
} = props;
|
|
||||||
// store hooks
|
// store hooks
|
||||||
const { sidebarCollapsed } = useAppTheme();
|
const { sidebarCollapsed } = useAppTheme();
|
||||||
const { itemLink, itemIcon, itemTitle } = useFavoriteItemDetails(workspaceSlug, favorite);
|
const { itemLink, itemIcon, itemTitle } = useFavoriteItemDetails(workspaceSlug, favorite);
|
||||||
|
|
@ -62,7 +58,6 @@ export const FavoriteRoot: FC<Props> = observer((props) => {
|
||||||
|
|
||||||
const handleQuickAction = (value: boolean) => setIsMenuActive(value);
|
const handleQuickAction = (value: boolean) => setIsMenuActive(value);
|
||||||
|
|
||||||
|
|
||||||
// drag and drop
|
// drag and drop
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const element = elementRef.current;
|
const element = elementRef.current;
|
||||||
|
|
@ -107,21 +102,20 @@ export const FavoriteRoot: FC<Props> = observer((props) => {
|
||||||
onDragStart: () => {
|
onDragStart: () => {
|
||||||
setIsDragging(true);
|
setIsDragging(true);
|
||||||
},
|
},
|
||||||
getData: ({ input, element }) =>{
|
getData: ({ input, element }) => {
|
||||||
|
const blockedStates: InstructionType[] = ["make-child"];
|
||||||
const blockedStates: InstructionType[] = ['make-child'];
|
if (!isLastChild) {
|
||||||
if(!isLastChild){
|
blockedStates.push("reorder-below");
|
||||||
blockedStates.push('reorder-below');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return attachInstruction(initialData,{
|
return attachInstruction(initialData, {
|
||||||
input,
|
input,
|
||||||
element,
|
element,
|
||||||
currentLevel: 1,
|
currentLevel: 1,
|
||||||
indentPerLevel: 0,
|
indentPerLevel: 0,
|
||||||
mode: isLastChild ? 'last-in-group' : 'standard',
|
mode: isLastChild ? "last-in-group" : "standard",
|
||||||
block: blockedStates
|
block: blockedStates,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
onDrag: ({ self, source, location }) => {
|
onDrag: ({ self, source, location }) => {
|
||||||
const instruction = getInstructionFromPayload(self, source, location);
|
const instruction = getInstructionFromPayload(self, source, location);
|
||||||
|
|
@ -130,9 +124,9 @@ export const FavoriteRoot: FC<Props> = observer((props) => {
|
||||||
onDragLeave: () => {
|
onDragLeave: () => {
|
||||||
setInstruction(undefined);
|
setInstruction(undefined);
|
||||||
},
|
},
|
||||||
onDrop: ({ self, source, location }) => {
|
onDrop: ({ self, source, location }) => {
|
||||||
setInstruction(undefined);
|
setInstruction(undefined);
|
||||||
handleDrop(self,source,location)
|
handleDrop(self, source, location);
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
@ -143,7 +137,7 @@ export const FavoriteRoot: FC<Props> = observer((props) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<DropIndicator isVisible={instruction === "reorder-above"}/>
|
<DropIndicator isVisible={instruction === "reorder-above"} />
|
||||||
<FavoriteItemWrapper elementRef={elementRef} isMenuActive={isMenuActive} sidebarCollapsed={sidebarCollapsed}>
|
<FavoriteItemWrapper elementRef={elementRef} isMenuActive={isMenuActive} sidebarCollapsed={sidebarCollapsed}>
|
||||||
{!sidebarCollapsed && <FavoriteItemDragHandle isDragging={isDragging} sort_order={favorite.sort_order} />}
|
{!sidebarCollapsed && <FavoriteItemDragHandle isDragging={isDragging} sort_order={favorite.sort_order} />}
|
||||||
<FavoriteItemTitle href={itemLink} icon={itemIcon} title={itemTitle} isSidebarCollapsed={!!sidebarCollapsed} />
|
<FavoriteItemTitle href={itemLink} icon={itemIcon} title={itemTitle} isSidebarCollapsed={!!sidebarCollapsed} />
|
||||||
|
|
@ -157,7 +151,7 @@ export const FavoriteRoot: FC<Props> = observer((props) => {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</FavoriteItemWrapper>
|
</FavoriteItemWrapper>
|
||||||
{ isLastChild && <DropIndicator isVisible={instruction === "reorder-below"} />}
|
{isLastChild && <DropIndicator isVisible={instruction === "reorder-below"} />}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { observer } from "mobx-react";
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
import { Controller, SubmitHandler, useForm } from "react-hook-form";
|
import { Controller, SubmitHandler, useForm } from "react-hook-form";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// plane ui
|
// plane ui
|
||||||
import { FavoriteFolderIcon, Input, setToast, TOAST_TYPE } from "@plane/ui";
|
import { FavoriteFolderIcon, Input, setToast, TOAST_TYPE } from "@plane/ui";
|
||||||
// hooks
|
// hooks
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import {
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { Disclosure, Transition } from "@headlessui/react";
|
import { Disclosure, Transition } from "@headlessui/react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// ui
|
// ui
|
||||||
import {
|
import {
|
||||||
CustomMenu,
|
CustomMenu,
|
||||||
|
|
@ -298,7 +298,7 @@ export const SidebarProjectsListItem: React.FC<Props> = observer((props) => {
|
||||||
<>
|
<>
|
||||||
<PublishProjectModal isOpen={publishModalOpen} project={project} onClose={() => setPublishModal(false)} />
|
<PublishProjectModal isOpen={publishModalOpen} project={project} onClose={() => setPublishModal(false)} />
|
||||||
<LeaveProjectModal project={project} isOpen={leaveProjectModalOpen} onClose={() => setLeaveProjectModal(false)} />
|
<LeaveProjectModal project={project} isOpen={leaveProjectModalOpen} onClose={() => setLeaveProjectModal(false)} />
|
||||||
<Disclosure key={`${project.id}_${URLProjectId}`} defaultOpen={isProjectListOpen} as="div">
|
<Disclosure key={`${project.id}_${URLProjectId}`} defaultOpen={isProjectListOpen} as="div">
|
||||||
<div
|
<div
|
||||||
id={`sidebar-${projectId}-${projectListType}`}
|
id={`sidebar-${projectId}-${projectListType}`}
|
||||||
className={cn("relative", {
|
className={cn("relative", {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { useParams, usePathname } from "next/navigation";
|
||||||
import { ArchiveIcon, ChevronRight, MoreHorizontal, Settings } from "lucide-react";
|
import { ArchiveIcon, ChevronRight, MoreHorizontal, Settings } from "lucide-react";
|
||||||
import { Disclosure, Transition } from "@headlessui/react";
|
import { Disclosure, Transition } from "@headlessui/react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// ui
|
// ui
|
||||||
import { CustomMenu, Tooltip } from "@plane/ui";
|
import { CustomMenu, Tooltip } from "@plane/ui";
|
||||||
// components
|
// components
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
// hooks
|
// hooks
|
||||||
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
|
import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down";
|
||||||
import { usePlatformOS } from "./use-platform-os";
|
import { usePlatformOS } from "./use-platform-os";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { useCallback, useEffect } from "react";
|
import React, { useCallback, useEffect } from "react";
|
||||||
// plane helpers
|
// plane helpers
|
||||||
import { useOutsideClickDetector } from "@plane/helpers";
|
import { useOutsideClickDetector } from "@plane/hooks";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom hook for dynamic dropdown position calculation.
|
* Custom hook for dynamic dropdown position calculation.
|
||||||
|
|
|
||||||
|
|
@ -121,8 +121,6 @@ export class WorkspaceRootStore implements IWorkspaceRootStore {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return workspaceResponse;
|
return workspaceResponse;
|
||||||
} catch (e) {
|
|
||||||
throw e;
|
|
||||||
} finally {
|
} finally {
|
||||||
this.loader = false;
|
this.loader = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,10 @@
|
||||||
"@nivo/scatterplot": "^0.88.0",
|
"@nivo/scatterplot": "^0.88.0",
|
||||||
"@plane/constants": "*",
|
"@plane/constants": "*",
|
||||||
"@plane/editor": "*",
|
"@plane/editor": "*",
|
||||||
"@plane/helpers": "*",
|
"@plane/hooks": "*",
|
||||||
"@plane/types": "*",
|
"@plane/types": "*",
|
||||||
"@plane/ui": "*",
|
"@plane/ui": "*",
|
||||||
|
"@plane/utils": "*",
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
"@react-pdf/renderer": "^3.4.5",
|
"@react-pdf/renderer": "^3.4.5",
|
||||||
"@sentry/nextjs": "^8.32.0",
|
"@sentry/nextjs": "^8.32.0",
|
||||||
|
|
@ -48,7 +49,7 @@
|
||||||
"mobx": "^6.10.0",
|
"mobx": "^6.10.0",
|
||||||
"mobx-react": "^9.1.1",
|
"mobx-react": "^9.1.1",
|
||||||
"mobx-utils": "^6.0.8",
|
"mobx-utils": "^6.0.8",
|
||||||
"next": "^14.2.12",
|
"next": "^14.2.20",
|
||||||
"next-themes": "^0.2.1",
|
"next-themes": "^0.2.1",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"posthog-js": "^1.131.3",
|
"posthog-js": "^1.131.3",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue