fix: circular dependencies between packages (#7277)
This commit is contained in:
parent
d3f1b511ad
commit
fa9c63716c
336 changed files with 3629 additions and 4374 deletions
|
|
@ -33,7 +33,7 @@
|
|||
"mobx-react": "^9.1.1",
|
||||
"next": "14.2.30",
|
||||
"next-themes": "^0.2.1",
|
||||
"postcss": "^8.4.38",
|
||||
"postcss": "^8.4.49",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-hook-form": "7.51.5",
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"modules": false
|
||||
}
|
||||
],
|
||||
"@babel/preset-typescript"
|
||||
],
|
||||
"plugins": [
|
||||
[
|
||||
"module-resolver",
|
||||
{
|
||||
"root": ["./src"],
|
||||
"alias": {
|
||||
"@/core": "./src/core",
|
||||
"@/plane-live": "./src/ce"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
|
@ -7,8 +7,8 @@
|
|||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "PORT=3100 concurrently \"babel src --out-dir dist --extensions '.ts,.js' --watch\" \"nodemon dist/server.js\"",
|
||||
"build": "babel src --out-dir dist --extensions \".ts,.js\"",
|
||||
"dev": "tsup --watch --onSuccess 'node --env-file=.env dist/server.js'",
|
||||
"build": "tsup",
|
||||
"start": "node dist/server.js",
|
||||
"lint": "eslint src --ext .ts,.tsx",
|
||||
"lint:errors": "eslint src --ext .ts,.tsx --quiet"
|
||||
|
|
@ -21,7 +21,9 @@
|
|||
"@hocuspocus/extension-redis": "^2.15.0",
|
||||
"@hocuspocus/server": "^2.15.0",
|
||||
"@plane/constants": "*",
|
||||
"@plane/decorators": "*",
|
||||
"@plane/editor": "*",
|
||||
"@plane/logger": "*",
|
||||
"@plane/types": "*",
|
||||
"@tiptap/core": "2.10.4",
|
||||
"@tiptap/html": "2.11.0",
|
||||
|
|
@ -43,17 +45,14 @@
|
|||
"yjs": "^13.6.20"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.25.6",
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.4",
|
||||
"@babel/preset-typescript": "^7.24.7",
|
||||
"@types/compression": "^1.7.5",
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/dotenv": "^8.2.0",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/express-ws": "^3.0.4",
|
||||
"@types/node": "^20.14.9",
|
||||
"babel-plugin-module-resolver": "^5.0.2",
|
||||
"@types/pino-http": "^5.8.4",
|
||||
"@plane/typescript-config": "*",
|
||||
"concurrently": "^9.0.1",
|
||||
"nodemon": "^3.1.7",
|
||||
"ts-node": "^10.9.2",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { pinoHttp } from "pino-http";
|
||||
import { Logger } from "pino";
|
||||
|
||||
const transport = {
|
||||
target: "pino-pretty",
|
||||
|
|
@ -35,4 +36,4 @@ export const logger = pinoHttp({
|
|||
},
|
||||
});
|
||||
|
||||
export const manualLogger = logger.logger;
|
||||
export const manualLogger: Logger = logger.logger;
|
||||
|
|
|
|||
|
|
@ -2,10 +2,19 @@ import { defineConfig, Options } from "tsup";
|
|||
|
||||
export default defineConfig((options: Options) => ({
|
||||
entry: ["src/server.ts"],
|
||||
format: ["cjs", "esm"],
|
||||
dts: true,
|
||||
clean: false,
|
||||
external: ["react"],
|
||||
injectStyle: true,
|
||||
format: ["esm"],
|
||||
dts: false,
|
||||
clean: true,
|
||||
target: "node18",
|
||||
sourcemap: true,
|
||||
splitting: false,
|
||||
bundle: true,
|
||||
outDir: "dist",
|
||||
esbuildOptions(options) {
|
||||
options.alias = {
|
||||
"@/core": "./src/core",
|
||||
"@/plane-live": "./src/ce"
|
||||
};
|
||||
},
|
||||
...options,
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { TAnalyticsTabsBase } from "@plane/types";
|
||||
import { ChartXAxisProperty, ChartYAxisMetric } from "../chart";
|
||||
import { ChartXAxisProperty, ChartYAxisMetric, TAnalyticsTabsBase } from "@plane/types";
|
||||
|
||||
export interface IInsightField {
|
||||
key: string;
|
||||
|
|
|
|||
|
|
@ -1,40 +1,9 @@
|
|||
import { TChartColorScheme } from "@plane/types";
|
||||
import { ChartXAxisProperty, TChartColorScheme } from "@plane/types";
|
||||
|
||||
export const LABEL_CLASSNAME = "uppercase text-custom-text-300/60 text-sm tracking-wide";
|
||||
export const AXIS_LABEL_CLASSNAME = "uppercase text-custom-text-300/60 text-sm tracking-wide";
|
||||
|
||||
|
||||
export enum ChartXAxisProperty {
|
||||
STATES = "STATES",
|
||||
STATE_GROUPS = "STATE_GROUPS",
|
||||
LABELS = "LABELS",
|
||||
ASSIGNEES = "ASSIGNEES",
|
||||
ESTIMATE_POINTS = "ESTIMATE_POINTS",
|
||||
CYCLES = "CYCLES",
|
||||
MODULES = "MODULES",
|
||||
PRIORITY = "PRIORITY",
|
||||
START_DATE = "START_DATE",
|
||||
TARGET_DATE = "TARGET_DATE",
|
||||
CREATED_AT = "CREATED_AT",
|
||||
COMPLETED_AT = "COMPLETED_AT",
|
||||
CREATED_BY = "CREATED_BY",
|
||||
WORK_ITEM_TYPES = "WORK_ITEM_TYPES",
|
||||
PROJECTS = "PROJECTS",
|
||||
EPICS = "EPICS",
|
||||
}
|
||||
|
||||
export enum ChartYAxisMetric {
|
||||
WORK_ITEM_COUNT = "WORK_ITEM_COUNT",
|
||||
ESTIMATE_POINT_COUNT = "ESTIMATE_POINT_COUNT",
|
||||
PENDING_WORK_ITEM_COUNT = "PENDING_WORK_ITEM_COUNT",
|
||||
COMPLETED_WORK_ITEM_COUNT = "COMPLETED_WORK_ITEM_COUNT",
|
||||
IN_PROGRESS_WORK_ITEM_COUNT = "IN_PROGRESS_WORK_ITEM_COUNT",
|
||||
WORK_ITEM_DUE_THIS_WEEK_COUNT = "WORK_ITEM_DUE_THIS_WEEK_COUNT",
|
||||
WORK_ITEM_DUE_TODAY_COUNT = "WORK_ITEM_DUE_TODAY_COUNT",
|
||||
BLOCKED_WORK_ITEM_COUNT = "BLOCKED_WORK_ITEM_COUNT",
|
||||
}
|
||||
|
||||
|
||||
export enum ChartXAxisDateGrouping {
|
||||
DAY = "DAY",
|
||||
WEEK = "WEEK",
|
||||
|
|
|
|||
|
|
@ -1,36 +1,4 @@
|
|||
import { TInboxDuplicateIssueDetails, TIssue } from "@plane/types";
|
||||
|
||||
export enum EInboxIssueCurrentTab {
|
||||
OPEN = "open",
|
||||
CLOSED = "closed",
|
||||
}
|
||||
|
||||
export enum EInboxIssueStatus {
|
||||
PENDING = -2,
|
||||
DECLINED = -1,
|
||||
SNOOZED = 0,
|
||||
ACCEPTED = 1,
|
||||
DUPLICATE = 2,
|
||||
}
|
||||
|
||||
export enum EInboxIssueSource {
|
||||
IN_APP = "IN_APP",
|
||||
FORMS = "FORMS",
|
||||
EMAIL = "EMAIL",
|
||||
}
|
||||
|
||||
export type TInboxIssueCurrentTab = EInboxIssueCurrentTab;
|
||||
export type TInboxIssueStatus = EInboxIssueStatus;
|
||||
export type TInboxIssue = {
|
||||
id: string;
|
||||
status: TInboxIssueStatus;
|
||||
snoozed_till: Date | null;
|
||||
duplicate_to: string | undefined;
|
||||
source: EInboxIssueSource | undefined;
|
||||
issue: TIssue;
|
||||
created_by: string;
|
||||
duplicate_issue_detail: TInboxDuplicateIssueDetails | undefined;
|
||||
};
|
||||
import { EInboxIssueStatus, TInboxIssueStatus } from "@plane/types";
|
||||
|
||||
export const INBOX_STATUS: {
|
||||
key: string;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import {
|
|||
IIssueDisplayProperties,
|
||||
IIssueFilterOptions,
|
||||
TIssue,
|
||||
EIssuesStoreType,
|
||||
} from "@plane/types";
|
||||
|
||||
export const ALL_ISSUES = "All Issues";
|
||||
|
|
@ -44,28 +45,6 @@ export enum EIssueGroupBYServerToProperty {
|
|||
"created_by" = "created_by",
|
||||
}
|
||||
|
||||
export enum EIssueServiceType {
|
||||
ISSUES = "issues",
|
||||
EPICS = "epics",
|
||||
WORK_ITEMS = "work-items",
|
||||
}
|
||||
|
||||
export enum EIssuesStoreType {
|
||||
GLOBAL = "GLOBAL",
|
||||
PROFILE = "PROFILE",
|
||||
TEAM = "TEAM",
|
||||
PROJECT = "PROJECT",
|
||||
CYCLE = "CYCLE",
|
||||
MODULE = "MODULE",
|
||||
TEAM_VIEW = "TEAM_VIEW",
|
||||
PROJECT_VIEW = "PROJECT_VIEW",
|
||||
ARCHIVED = "ARCHIVED",
|
||||
DRAFT = "DRAFT",
|
||||
DEFAULT = "DEFAULT",
|
||||
WORKSPACE_DRAFT = "WORKSPACE_DRAFT",
|
||||
EPIC = "EPIC",
|
||||
}
|
||||
|
||||
export enum EIssueCommentAccessSpecifier {
|
||||
EXTERNAL = "EXTERNAL",
|
||||
INTERNAL = "INTERNAL",
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import { ILayoutDisplayFiltersOptions, TIssueActivityComment } from "@plane/types";
|
||||
import { EIssuesStoreType, ILayoutDisplayFiltersOptions, TIssueActivityComment } from "@plane/types";
|
||||
import {
|
||||
TIssueFilterPriorityObject,
|
||||
ISSUE_DISPLAY_PROPERTIES_KEYS,
|
||||
EIssuesStoreType,
|
||||
SUB_ISSUES_DISPLAY_PROPERTIES_KEYS,
|
||||
} from "./common";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,4 @@
|
|||
import { IPaymentProduct, TBillingFrequency, TProductBillingFrequency } from "@plane/types";
|
||||
|
||||
/**
|
||||
* Enum representing different product subscription types
|
||||
*/
|
||||
export enum EProductSubscriptionEnum {
|
||||
FREE = "FREE",
|
||||
ONE = "ONE",
|
||||
PRO = "PRO",
|
||||
BUSINESS = "BUSINESS",
|
||||
ENTERPRISE = "ENTERPRISE",
|
||||
}
|
||||
import { EProductSubscriptionEnum, IPaymentProduct, TBillingFrequency, TProductBillingFrequency } from "@plane/types";
|
||||
|
||||
/**
|
||||
* Default billing frequency for each product subscription type
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import { EStartOfTheWeek } from "@plane/types";
|
||||
|
||||
export const PROFILE_SETTINGS = {
|
||||
profile: {
|
||||
key: "profile",
|
||||
|
|
@ -103,20 +105,6 @@ export const PREFERENCE_OPTIONS: {
|
|||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* @description The start of the week for the user
|
||||
* @enum {number}
|
||||
*/
|
||||
export enum EStartOfTheWeek {
|
||||
SUNDAY = 0,
|
||||
MONDAY = 1,
|
||||
TUESDAY = 2,
|
||||
WEDNESDAY = 3,
|
||||
THURSDAY = 4,
|
||||
FRIDAY = 5,
|
||||
SATURDAY = 6,
|
||||
}
|
||||
|
||||
/**
|
||||
* @description The options for the start of the week
|
||||
* @type {Array<{value: EStartOfTheWeek, label: string}>}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
"use client"
|
||||
|
||||
export type TStateGroups = "backlog" | "unstarted" | "started" | "completed" | "cancelled";
|
||||
import { TStateGroups } from "@plane/types";
|
||||
|
||||
export type TDraggableData = {
|
||||
groupKey: TStateGroups;
|
||||
|
|
@ -56,6 +54,34 @@ export const PENDING_STATE_GROUPS = [
|
|||
STATE_GROUPS.cancelled.key,
|
||||
];
|
||||
|
||||
export const STATE_DISTRIBUTION = {
|
||||
[STATE_GROUPS.backlog.key]: {
|
||||
key: STATE_GROUPS.backlog.key,
|
||||
issues: "backlog_issues",
|
||||
points: "backlog_estimate_points",
|
||||
},
|
||||
[STATE_GROUPS.unstarted.key]: {
|
||||
key: STATE_GROUPS.unstarted.key,
|
||||
issues: "unstarted_issues",
|
||||
points: "unstarted_estimate_points",
|
||||
},
|
||||
[STATE_GROUPS.started.key]: {
|
||||
key: STATE_GROUPS.started.key,
|
||||
issues: "started_issues",
|
||||
points: "started_estimate_points",
|
||||
},
|
||||
[STATE_GROUPS.completed.key]: {
|
||||
key: STATE_GROUPS.completed.key,
|
||||
issues: "completed_issues",
|
||||
points: "completed_estimate_points",
|
||||
},
|
||||
[STATE_GROUPS.cancelled.key]: {
|
||||
key: STATE_GROUPS.cancelled.key,
|
||||
issues: "cancelled_issues",
|
||||
points: "cancelled_estimate_points",
|
||||
},
|
||||
};
|
||||
|
||||
export const PROGRESS_STATE_GROUPS_DETAILS = [
|
||||
{
|
||||
key: "completed_issues",
|
||||
|
|
@ -79,5 +105,4 @@ export const PROGRESS_STATE_GROUPS_DETAILS = [
|
|||
},
|
||||
];
|
||||
|
||||
|
||||
export const DISPLAY_WORKFLOW_PRO_CTA = false;
|
||||
|
|
|
|||
|
|
@ -25,18 +25,6 @@ export enum EUserPermissionsLevel {
|
|||
PROJECT = "PROJECT",
|
||||
}
|
||||
|
||||
export enum EUserWorkspaceRoles {
|
||||
ADMIN = 20,
|
||||
MEMBER = 15,
|
||||
GUEST = 5,
|
||||
}
|
||||
|
||||
export enum EUserProjectRoles {
|
||||
ADMIN = 20,
|
||||
MEMBER = 15,
|
||||
GUEST = 5,
|
||||
}
|
||||
|
||||
export type TUserPermissionsLevel = EUserPermissionsLevel;
|
||||
|
||||
export enum EUserPermissions {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
export enum EViewAccess {
|
||||
PRIVATE,
|
||||
PUBLIC,
|
||||
}
|
||||
import { EViewAccess } from "@plane/types";
|
||||
|
||||
export const VIEW_ACCESS_SPECIFIERS: {
|
||||
key: EViewAccess;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { TStaticViewTypes, IWorkspaceSearchResults } from "@plane/types";
|
||||
import { EUserWorkspaceRoles } from "./user";
|
||||
import { TStaticViewTypes, IWorkspaceSearchResults, EUserWorkspaceRoles } from "@plane/types";
|
||||
|
||||
export const ORGANIZATION_SIZE = [
|
||||
"Just myself", // TODO: translate
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ This package is part of the Plane workspace and can be used by adding it to your
|
|||
```json
|
||||
{
|
||||
"dependencies": {
|
||||
"@plane/decorators": "*"
|
||||
"@plane/decorators": "workspace:*"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -34,8 +34,11 @@
|
|||
"react-dom": "18.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@floating-ui/dom": "^1.7.1",
|
||||
"@floating-ui/react": "^0.26.4",
|
||||
"@headlessui/react": "^1.7.3",
|
||||
"@hocuspocus/provider": "^2.15.0",
|
||||
"@plane/constants": "*",
|
||||
"@plane/types": "*",
|
||||
"@plane/ui": "*",
|
||||
"@plane/utils": "*",
|
||||
|
|
|
|||
|
|
@ -11,20 +11,22 @@
|
|||
"dist/**"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
"dev": "tsup --watch",
|
||||
"build": "tsc",
|
||||
"dev": "tsc --watch",
|
||||
"lint": "eslint src --ext .ts,.tsx",
|
||||
"lint:errors": "eslint src --ext .ts,.tsx --quiet",
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
||||
},
|
||||
"dependencies": {
|
||||
"winston": "^3.17.0",
|
||||
"winston-daily-rotate-file": "^5.0.0"
|
||||
"@types/express": "^4.17.21",
|
||||
"express": "^4.21.2",
|
||||
"winston-daily-rotate-file": "^5.0.0",
|
||||
"winston": "^3.17.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@plane/eslint-config": "*",
|
||||
"@plane/typescript-config": "*",
|
||||
"@types/node": "^22.5.4",
|
||||
"tsup": "8.4.0",
|
||||
"typescript": "5.8.3"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
"version": "0.27.0",
|
||||
"license": "AGPL-3.0",
|
||||
"private": true,
|
||||
"types": "./src/index.d.ts",
|
||||
"main": "./src/index.d.ts"
|
||||
"types": "./src/index.ts",
|
||||
"main": "./src/index.ts"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { IProjectLite, IWorkspaceLite } from "@plane/types";
|
||||
import { IProjectLite } from "./project";
|
||||
import { IWorkspaceLite } from "./workspace";
|
||||
|
||||
export interface IGptResponse {
|
||||
response: string;
|
||||
|
|
@ -1,6 +1,35 @@
|
|||
import { ChartXAxisProperty, ChartYAxisMetric } from "@plane/constants";
|
||||
import { TChartData } from "./charts";
|
||||
import { Row } from "@tanstack/react-table";
|
||||
|
||||
export enum ChartXAxisProperty {
|
||||
STATES = "STATES",
|
||||
STATE_GROUPS = "STATE_GROUPS",
|
||||
LABELS = "LABELS",
|
||||
ASSIGNEES = "ASSIGNEES",
|
||||
ESTIMATE_POINTS = "ESTIMATE_POINTS",
|
||||
CYCLES = "CYCLES",
|
||||
MODULES = "MODULES",
|
||||
PRIORITY = "PRIORITY",
|
||||
START_DATE = "START_DATE",
|
||||
TARGET_DATE = "TARGET_DATE",
|
||||
CREATED_AT = "CREATED_AT",
|
||||
COMPLETED_AT = "COMPLETED_AT",
|
||||
CREATED_BY = "CREATED_BY",
|
||||
WORK_ITEM_TYPES = "WORK_ITEM_TYPES",
|
||||
PROJECTS = "PROJECTS",
|
||||
EPICS = "EPICS",
|
||||
}
|
||||
|
||||
export enum ChartYAxisMetric {
|
||||
WORK_ITEM_COUNT = "WORK_ITEM_COUNT",
|
||||
ESTIMATE_POINT_COUNT = "ESTIMATE_POINT_COUNT",
|
||||
PENDING_WORK_ITEM_COUNT = "PENDING_WORK_ITEM_COUNT",
|
||||
COMPLETED_WORK_ITEM_COUNT = "COMPLETED_WORK_ITEM_COUNT",
|
||||
IN_PROGRESS_WORK_ITEM_COUNT = "IN_PROGRESS_WORK_ITEM_COUNT",
|
||||
WORK_ITEM_DUE_THIS_WEEK_COUNT = "WORK_ITEM_DUE_THIS_WEEK_COUNT",
|
||||
WORK_ITEM_DUE_TODAY_COUNT = "WORK_ITEM_DUE_TODAY_COUNT",
|
||||
BLOCKED_WORK_ITEM_COUNT = "BLOCKED_WORK_ITEM_COUNT",
|
||||
}
|
||||
|
||||
|
||||
export type TAnalyticsTabsBase = "overview" | "work-items";
|
||||
export type TAnalyticsGraphsBase = "projects" | "work-items" | "custom-work-items";
|
||||
|
|
@ -59,9 +88,3 @@ export interface IAnalyticsParams {
|
|||
y_axis: ChartYAxisMetric;
|
||||
group_by?: ChartXAxisProperty;
|
||||
}
|
||||
|
||||
export type ExportConfig<T> = {
|
||||
key: string;
|
||||
value: (row: Row<T>) => string | number;
|
||||
label?: string;
|
||||
};
|
||||
|
|
@ -21,7 +21,7 @@ export type TChartData<K extends string, T extends string> = {
|
|||
[key in K]: string | number;
|
||||
} & Record<T, any>;
|
||||
|
||||
type TChartProps<K extends string, T extends string> = {
|
||||
export type TChartProps<K extends string, T extends string> = {
|
||||
data: TChartData<K, T>[];
|
||||
xAxis: {
|
||||
key: keyof TChartData<K, T>;
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
import type { TIssue, IIssueFilterOptions } from "@plane/types";
|
||||
import type { TIssue } from "../issues/issue";
|
||||
import type { IIssueFilterOptions } from "../view-props";
|
||||
|
||||
export type TCycleGroups = "current" | "upcoming" | "completed" | "draft";
|
||||
|
||||
|
|
@ -2,7 +2,7 @@ import { EDurationFilters } from "./enums";
|
|||
import { IIssueActivity, TIssuePriorities } from "./issues";
|
||||
import { TIssue } from "./issues/issue";
|
||||
import { TStateGroups } from "./state";
|
||||
import { TIssueRelationTypes } from "@/plane-web/types";
|
||||
import { TIssueRelationTypes } from "./issues/issue_relation";
|
||||
|
||||
export type TWidgetKeys =
|
||||
| "overview_stats"
|
||||
|
|
@ -161,7 +161,7 @@ export type TWidgetStatsResponse =
|
|||
| TRecentCollaboratorsWidgetResponse[];
|
||||
|
||||
// dashboard
|
||||
export type TDashboard = {
|
||||
export type TDeprecatedDashboard = {
|
||||
created_at: string;
|
||||
created_by: string | null;
|
||||
description_html: string;
|
||||
|
|
@ -176,6 +176,6 @@ export type TDashboard = {
|
|||
};
|
||||
|
||||
export type THomeDashboardResponse = {
|
||||
dashboard: TDashboard;
|
||||
dashboard: TDeprecatedDashboard;
|
||||
widgets: TWidget[];
|
||||
};
|
||||
|
|
@ -44,7 +44,7 @@ export interface IJiraResponseUser {
|
|||
accountId: string;
|
||||
accountType: string;
|
||||
emailAddress: string;
|
||||
avatarUrls: AvatarUrls;
|
||||
avatarUrls: IJiraResponseAvatarUrls;
|
||||
displayName: string;
|
||||
active: boolean;
|
||||
locale: string;
|
||||
|
|
@ -1,8 +1,40 @@
|
|||
// plane constants
|
||||
import { TInboxIssue, TInboxIssueStatus } from "@plane/constants";
|
||||
// plane types
|
||||
import { TPaginationInfo } from "./common";
|
||||
import { TIssuePriorities } from "./issues";
|
||||
import { TIssue } from "./issues/issue";
|
||||
|
||||
export enum EInboxIssueCurrentTab {
|
||||
OPEN = "open",
|
||||
CLOSED = "closed",
|
||||
}
|
||||
|
||||
export type TInboxIssueCurrentTab = EInboxIssueCurrentTab;
|
||||
|
||||
export enum EInboxIssueStatus {
|
||||
PENDING = -2,
|
||||
DECLINED = -1,
|
||||
SNOOZED = 0,
|
||||
ACCEPTED = 1,
|
||||
DUPLICATE = 2,
|
||||
}
|
||||
|
||||
export enum EInboxIssueSource {
|
||||
IN_APP = "IN_APP",
|
||||
FORMS = "FORMS",
|
||||
EMAIL = "EMAIL",
|
||||
}
|
||||
|
||||
export type TInboxIssueStatus = EInboxIssueStatus;
|
||||
export type TInboxIssue = {
|
||||
id: string;
|
||||
status: TInboxIssueStatus;
|
||||
snoozed_till: Date | null;
|
||||
duplicate_to: string | undefined;
|
||||
source: EInboxIssueSource | undefined;
|
||||
issue: TIssue;
|
||||
created_by: string;
|
||||
duplicate_issue_detail: TInboxDuplicateIssueDetails | undefined;
|
||||
};
|
||||
|
||||
// filters
|
||||
export type TInboxIssueFilterMemberKeys = "assignees" | "created_by";
|
||||
|
|
@ -29,7 +29,7 @@ export type TInstanceGitlabAuthenticationConfigurationKeys =
|
|||
| "GITLAB_CLIENT_ID"
|
||||
| "GITLAB_CLIENT_SECRET";
|
||||
|
||||
type TInstanceAuthenticationConfigurationKeys =
|
||||
export type TInstanceAuthenticationConfigurationKeys =
|
||||
| TInstanceGoogleAuthenticationConfigurationKeys
|
||||
| TInstanceGithubAuthenticationConfigurationKeys
|
||||
| TInstanceGitlabAuthenticationConfigurationKeys;
|
||||
|
|
@ -26,7 +26,7 @@ export interface IWorkspaceIntegration {
|
|||
created_by: string;
|
||||
id: string;
|
||||
integration: string;
|
||||
integration_detail: IIntegrations;
|
||||
integration_detail: IAppIntegration;
|
||||
metadata: any;
|
||||
updated_at: string;
|
||||
updated_by: string;
|
||||
|
|
@ -1,22 +1,18 @@
|
|||
import { ReactElement } from "react";
|
||||
import { KeyedMutator } from "swr";
|
||||
import type {
|
||||
ICycle,
|
||||
IModule,
|
||||
IUserLite,
|
||||
IProjectLite,
|
||||
IWorkspaceLite,
|
||||
IStateLite,
|
||||
Properties,
|
||||
IIssueDisplayFilterOptions,
|
||||
TIssue,
|
||||
IIssueFilterOptions,
|
||||
import { ICycle } from "./cycle";
|
||||
import { TIssue } from "./issues/issue";
|
||||
import { IModule } from "./module";
|
||||
import { IProjectLite } from "./project";
|
||||
import { IStateLite } from "./state";
|
||||
import { IUserLite } from "./users";
|
||||
import {
|
||||
IIssueDisplayProperties,
|
||||
TIssueGroupByOptions,
|
||||
TIssueOrderByOptions,
|
||||
TIssueGroupingFilters,
|
||||
IIssueFilterOptions,
|
||||
TIssueExtraOptions,
|
||||
} from "@plane/types";
|
||||
TIssueGroupByOptions,
|
||||
TIssueGroupingFilters,
|
||||
TIssueOrderByOptions,
|
||||
} from "./view-props";
|
||||
import { IWorkspaceLite, Properties } from "./workspace";
|
||||
|
||||
export interface IIssueCycle {
|
||||
id: string;
|
||||
|
|
@ -70,17 +66,6 @@ export interface ILinkDetails {
|
|||
url: string;
|
||||
}
|
||||
|
||||
export type IssueRelationType = "duplicate" | "relates_to" | "blocked_by";
|
||||
|
||||
export interface IssueRelation {
|
||||
id: string;
|
||||
issue: string;
|
||||
issue_detail: BlockeIssueDetail;
|
||||
relation_type: IssueRelationType;
|
||||
related_issue: string;
|
||||
relation: "blocking" | null;
|
||||
}
|
||||
|
||||
export interface ISubIssuesState {
|
||||
backlog: number;
|
||||
unstarted: number;
|
||||
|
|
@ -186,20 +171,6 @@ export interface IIssueAttachment {
|
|||
workspace: string;
|
||||
}
|
||||
|
||||
export interface IIssueViewProps {
|
||||
groupedIssues: { [key: string]: TIssue[] } | undefined;
|
||||
displayFilters: IIssueDisplayFilterOptions | undefined;
|
||||
isEmpty: boolean;
|
||||
mutateIssues: KeyedMutator<
|
||||
| TIssue[]
|
||||
| {
|
||||
[key: string]: TIssue[];
|
||||
}
|
||||
>;
|
||||
params: any;
|
||||
properties: Properties;
|
||||
}
|
||||
|
||||
export type TIssuePriorities = "urgent" | "high" | "medium" | "low" | "none";
|
||||
|
||||
export interface ViewFlags {
|
||||
|
|
@ -220,7 +191,7 @@ export type GroupByColumnTypes =
|
|||
| "created_by"
|
||||
| "team_project";
|
||||
|
||||
type TGetColumns = {
|
||||
export type TGetColumns = {
|
||||
isWorkspaceLevel?: boolean;
|
||||
projectId?: string;
|
||||
};
|
||||
|
|
@ -228,7 +199,7 @@ type TGetColumns = {
|
|||
export interface IGroupByColumn {
|
||||
id: string;
|
||||
name: string;
|
||||
icon?: ReactElement | undefined;
|
||||
icon?: React.ReactElement | undefined;
|
||||
payload: Partial<TIssue>;
|
||||
isDropDisabled?: boolean;
|
||||
dropErrorMessage?: string;
|
||||
|
|
@ -243,7 +214,7 @@ export interface IIssueListRow {
|
|||
groupId: string;
|
||||
type: "HEADER" | "NO_ISSUES" | "QUICK_ADD" | "ISSUE";
|
||||
name?: string;
|
||||
icon?: ReactElement | undefined;
|
||||
icon?: React.ReactElement | undefined;
|
||||
payload?: Partial<TIssue>;
|
||||
}
|
||||
|
||||
|
|
@ -2,7 +2,7 @@ export * from "./issue_activity";
|
|||
export * from "./issue_comment";
|
||||
export * from "./issue_comment_reaction";
|
||||
|
||||
import { TIssuePriorities } from "../issues";
|
||||
import { TIssuePriorities } from "../../issues";
|
||||
|
||||
// root types
|
||||
export type TIssueActivityWorkspaceDetail = {
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
// plane imports
|
||||
import { EInboxIssueSource } from "@plane/constants";
|
||||
// local imports
|
||||
import {
|
||||
TIssueActivityWorkspaceDetail,
|
||||
|
|
@ -7,6 +5,7 @@ import {
|
|||
TIssueActivityIssueDetail,
|
||||
TIssueActivityUserDetail,
|
||||
} from "./base";
|
||||
import { EInboxIssueSource } from "../../inbox";
|
||||
|
||||
export type TIssueActivity = {
|
||||
id: string;
|
||||
|
|
@ -7,6 +7,7 @@ import {
|
|||
import { EIssueCommentAccessSpecifier } from "../../enums";
|
||||
import { TFileSignedURLResponse } from "../../file";
|
||||
import { IUserLite } from "../../users";
|
||||
import { IWorkspaceLite } from "../../workspace";
|
||||
|
||||
export type TCommentReaction = {
|
||||
id: string;
|
||||
|
|
@ -64,6 +65,57 @@ export type TIssueCommentIdMap = {
|
|||
[issue_id: string]: string[];
|
||||
};
|
||||
|
||||
export interface ActorDetail {
|
||||
avatar_url?: string;
|
||||
display_name?: string;
|
||||
first_name?: string;
|
||||
is_bot?: boolean;
|
||||
id?: string;
|
||||
last_name?: string;
|
||||
}
|
||||
|
||||
export interface IssueDetail {
|
||||
id: string;
|
||||
name: string;
|
||||
description: Description;
|
||||
description_html: string;
|
||||
priority: string;
|
||||
start_date: null;
|
||||
target_date: null;
|
||||
sequence_id: number;
|
||||
sort_order: number;
|
||||
}
|
||||
|
||||
export interface Description {
|
||||
type: string;
|
||||
content: DescriptionContent[];
|
||||
}
|
||||
|
||||
export interface DescriptionContent {
|
||||
type: string;
|
||||
attrs?: Attrs;
|
||||
content: ContentContent[];
|
||||
}
|
||||
|
||||
export interface Attrs {
|
||||
level: number;
|
||||
}
|
||||
|
||||
export interface ContentContent {
|
||||
text: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface ProjectDetail {
|
||||
id: string;
|
||||
identifier: string;
|
||||
name: string;
|
||||
cover_image: string;
|
||||
icon_prop: null;
|
||||
emoji: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export type TIssuePublicComment = {
|
||||
actor_detail: ActorDetail;
|
||||
access: string;
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
import { StateGroup } from "components/states";
|
||||
import { TIssuePriorities } from "../issues";
|
||||
|
||||
// issues
|
||||
export * from "./issue";
|
||||
export * from "./issue_reaction";
|
||||
|
|
@ -1,11 +1,31 @@
|
|||
import { EIssueServiceType, EIssuesStoreType } from "@plane/constants";
|
||||
import { TIssuePriorities } from "../issues";
|
||||
import { TIssueAttachment } from "./issue_attachment";
|
||||
import { TIssueLink } from "./issue_link";
|
||||
import { TIssueReaction, IIssuePublicReaction, IPublicVote } from "./issue_reaction";
|
||||
import { TIssueRelationTypes, TIssuePublicComment } from "@/plane-web/types";
|
||||
import { TIssueRelationTypes } from "./issue_relation";
|
||||
import { TIssuePublicComment } from "./activity/issue_comment";
|
||||
|
||||
// new issue structure types
|
||||
export enum EIssueServiceType {
|
||||
ISSUES = "issues",
|
||||
EPICS = "epics",
|
||||
WORK_ITEMS = "work-items",
|
||||
}
|
||||
|
||||
export enum EIssuesStoreType {
|
||||
GLOBAL = "GLOBAL",
|
||||
PROFILE = "PROFILE",
|
||||
TEAM = "TEAM",
|
||||
PROJECT = "PROJECT",
|
||||
CYCLE = "CYCLE",
|
||||
MODULE = "MODULE",
|
||||
TEAM_VIEW = "TEAM_VIEW",
|
||||
PROJECT_VIEW = "PROJECT_VIEW",
|
||||
ARCHIVED = "ARCHIVED",
|
||||
DRAFT = "DRAFT",
|
||||
DEFAULT = "DEFAULT",
|
||||
WORKSPACE_DRAFT = "WORKSPACE_DRAFT",
|
||||
EPIC = "EPIC",
|
||||
}
|
||||
|
||||
export type TBaseIssue = {
|
||||
id: string;
|
||||
|
|
@ -71,7 +91,7 @@ export type TIssueMap = {
|
|||
[issue_id: string]: TIssue;
|
||||
};
|
||||
|
||||
type TIssueResponseResults =
|
||||
export type TIssueResponseResults =
|
||||
| TBaseIssue[]
|
||||
| {
|
||||
[key: string]: {
|
||||
|
|
@ -153,7 +173,7 @@ export interface IPublicIssue
|
|||
vote_items: IPublicVote[];
|
||||
}
|
||||
|
||||
type TPublicIssueResponseResults =
|
||||
export type TPublicIssueResponseResults =
|
||||
| IPublicIssue[]
|
||||
| {
|
||||
[key: string]: {
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
import { TIssueRelationTypes } from "@/plane-web/types";
|
||||
import { TIssue } from "./issues";
|
||||
import { TIssue } from "./issue";
|
||||
|
||||
export type TIssueRelation = Record<TIssueRelationTypes, TIssue[]>;
|
||||
|
||||
|
|
@ -8,3 +7,5 @@ export type TIssueRelationMap = {
|
|||
};
|
||||
|
||||
export type TIssueRelationIdMap = Record<TIssueRelationTypes, string[]>;
|
||||
|
||||
export type TIssueRelationTypes = "blocking" | "blocked_by" | "duplicate" | "relates_to";
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
import type { TIssue, IIssueFilterOptions, ILinkDetails } from "@plane/types";
|
||||
import type { TIssue } from "../issues/issue";
|
||||
import type { IIssueFilterOptions } from "../view-props";
|
||||
import type { ILinkDetails } from "../issues";
|
||||
|
||||
export type TModuleStatus =
|
||||
| "backlog"
|
||||
|
|
@ -1,4 +1,10 @@
|
|||
import { EProductSubscriptionEnum } from "@plane/constants";
|
||||
export enum EProductSubscriptionEnum {
|
||||
FREE = "FREE",
|
||||
ONE = "ONE",
|
||||
PRO = "PRO",
|
||||
BUSINESS = "BUSINESS",
|
||||
ENTERPRISE = "ENTERPRISE",
|
||||
}
|
||||
|
||||
export type TBillingFrequency = "month" | "year";
|
||||
|
||||
|
|
@ -1,6 +1,14 @@
|
|||
import { EUserProjectRoles } from "@plane/constants";
|
||||
import type { IUser, IUserLite, IWorkspace, TLogoProps, TStateGroups } from "..";
|
||||
import { TLogoProps } from "../common";
|
||||
import { TUserPermissions } from "../enums";
|
||||
import { TStateGroups } from "../state";
|
||||
import type { IUser, IUserLite } from "../users";
|
||||
import type { IWorkspace } from "../workspace";
|
||||
|
||||
export enum EUserProjectRoles {
|
||||
ADMIN = 20,
|
||||
MEMBER = 15,
|
||||
GUEST = 5,
|
||||
}
|
||||
|
||||
export interface IPartialProject {
|
||||
id: string;
|
||||
|
|
@ -65,7 +73,7 @@ export interface IProjectLite {
|
|||
logo_props: TLogoProps;
|
||||
}
|
||||
|
||||
type ProjectPreferences = {
|
||||
export type ProjectPreferences = {
|
||||
pages: {
|
||||
block_display: boolean;
|
||||
};
|
||||
|
|
@ -1,13 +1,9 @@
|
|||
import { IProject, IProjectLite, IWorkspaceLite } from "@plane/types";
|
||||
import { IProject, IProjectLite } from "./project";
|
||||
import { IWorkspaceLite } from "./workspace";
|
||||
|
||||
export type TPublishEntityType = "project" | "page";
|
||||
|
||||
export type TProjectPublishLayouts =
|
||||
| "calendar"
|
||||
| "gantt"
|
||||
| "kanban"
|
||||
| "list"
|
||||
| "spreadsheet";
|
||||
export type TProjectPublishLayouts = "calendar" | "gantt" | "kanban" | "list" | "spreadsheet";
|
||||
|
||||
export type TProjectPublishViewProps = {
|
||||
calendar?: boolean;
|
||||
|
|
@ -17,10 +13,9 @@ export type TProjectPublishViewProps = {
|
|||
spreadsheet?: boolean;
|
||||
};
|
||||
|
||||
export type TProjectDetails = IProjectLite &
|
||||
Pick<IProject, "cover_image" | "logo_props" | "description">;
|
||||
export type TProjectDetails = IProjectLite & Pick<IProject, "cover_image" | "logo_props" | "description">;
|
||||
|
||||
type TPublishSettings = {
|
||||
export type TPublishSettings = {
|
||||
anchor: string | undefined;
|
||||
created_at: string | undefined;
|
||||
created_by: string | undefined;
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
import { IProject, IProjectLite, IWorkspaceLite } from "@plane/types";
|
||||
|
||||
export type TStateGroups = "backlog" | "unstarted" | "started" | "completed" | "cancelled";
|
||||
|
||||
export interface IState {
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
export type TSticky = {
|
||||
id: string;
|
||||
name?: string;
|
||||
description_html?: string;
|
||||
color?: string;
|
||||
createdAt?: Date;
|
||||
updatedAt?: Date;
|
||||
};
|
||||
|
|
@ -1,8 +1,21 @@
|
|||
import { EStartOfTheWeek } from "@plane/constants";
|
||||
import { IIssueActivity, TIssuePriorities, TStateGroups } from ".";
|
||||
import { TUserPermissions } from "./enums";
|
||||
|
||||
type TLoginMediums = "email" | "magic-code" | "github" | "gitlab" | "google";
|
||||
/**
|
||||
* @description The start of the week for the user
|
||||
* @enum {number}
|
||||
*/
|
||||
export enum EStartOfTheWeek {
|
||||
SUNDAY = 0,
|
||||
MONDAY = 1,
|
||||
TUESDAY = 2,
|
||||
WEDNESDAY = 3,
|
||||
THURSDAY = 4,
|
||||
FRIDAY = 5,
|
||||
SATURDAY = 6,
|
||||
}
|
||||
|
||||
export type TLoginMediums = "email" | "magic-code" | "github" | "gitlab" | "google";
|
||||
|
||||
export interface IUserLite {
|
||||
avatar_url: string;
|
||||
|
|
@ -19,7 +32,7 @@ export interface IUser extends IUserLite {
|
|||
cover_image_asset?: string | null;
|
||||
cover_image?: string | null;
|
||||
// only for rendering the cover image
|
||||
cover_image_url: readonly (string | null);
|
||||
cover_image_url: string | null;
|
||||
date_joined: string;
|
||||
email: string;
|
||||
is_active: boolean;
|
||||
|
|
@ -160,13 +160,6 @@ export interface IWorkspaceIssueFilterOptions {
|
|||
project?: string[] | null;
|
||||
}
|
||||
|
||||
export interface IWorkspaceGlobalViewDisplayFilterOptions {
|
||||
order_by?: string | undefined;
|
||||
type?: "active" | "backlog" | null;
|
||||
sub_issue?: boolean;
|
||||
layout?: TIssueViewOptions;
|
||||
}
|
||||
|
||||
export interface IWorkspaceViewIssuesParams {
|
||||
assignees?: string | undefined;
|
||||
created_by?: string | undefined;
|
||||
|
|
@ -193,11 +186,6 @@ export interface IWorkspaceViewProps {
|
|||
display_filters: IIssueDisplayFilterOptions | undefined;
|
||||
display_properties: IIssueDisplayProperties;
|
||||
}
|
||||
export interface IWorkspaceGlobalViewProps {
|
||||
filters: IWorkspaceIssueFilterOptions;
|
||||
display_filters: IWorkspaceIssueDisplayFilterOptions | undefined;
|
||||
display_properties: IIssueDisplayProperties;
|
||||
}
|
||||
|
||||
export interface IssuePaginationOptions {
|
||||
canGroup: boolean;
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
import { EViewAccess } from "@plane/constants";
|
||||
import { TLogoProps } from "./common";
|
||||
import {
|
||||
IIssueDisplayFilterOptions,
|
||||
|
|
@ -6,6 +5,11 @@ import {
|
|||
IIssueFilterOptions,
|
||||
} from "./view-props";
|
||||
|
||||
export enum EViewAccess {
|
||||
PRIVATE,
|
||||
PUBLIC,
|
||||
}
|
||||
|
||||
export interface IProjectView {
|
||||
id: string;
|
||||
access: EViewAccess;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
import { EViewAccess } from "@plane/constants";
|
||||
import {
|
||||
IWorkspaceViewProps,
|
||||
IIssueDisplayFilterOptions,
|
||||
IIssueDisplayProperties,
|
||||
IIssueFilterOptions,
|
||||
} from "./view-props";
|
||||
import { EViewAccess } from "./views";
|
||||
|
||||
export interface IWorkspaceView {
|
||||
id: string;
|
||||
|
|
@ -16,7 +16,7 @@ export interface IWorkspaceView {
|
|||
updated_by: string;
|
||||
name: string;
|
||||
description: string;
|
||||
filters: IIssueIIFilterOptions;
|
||||
filters: IIssueFilterOptions;
|
||||
display_filters: IIssueDisplayFilterOptions;
|
||||
display_properties: IIssueDisplayProperties;
|
||||
query: any;
|
||||
|
|
@ -1,6 +1,15 @@
|
|||
import type { ICycle, TProjectMembership, IUser, IUserLite, IWorkspaceViewProps, TPaginationInfo } from "@plane/types";
|
||||
import { EUserWorkspaceRoles } from "@plane/constants"; // TODO: check if importing this over here causes circular dependency
|
||||
import type { TPaginationInfo } from "./common";
|
||||
import type { ICycle } from "./cycle";
|
||||
import { TUserPermissions } from "./enums";
|
||||
import { TProjectMembership } from "./project";
|
||||
import type { IUser, IUserLite } from "./users";
|
||||
import type { IWorkspaceViewProps } from "./view-props";
|
||||
|
||||
export enum EUserWorkspaceRoles {
|
||||
ADMIN = 20,
|
||||
MEMBER = 15,
|
||||
GUEST = 5,
|
||||
}
|
||||
|
||||
export interface IWorkspace {
|
||||
readonly id: string;
|
||||
|
|
@ -67,7 +67,6 @@
|
|||
"@types/react-color": "^3.0.9",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"classnames": "^2.3.2",
|
||||
"postcss-cli": "^11.0.0",
|
||||
"postcss-nested": "^6.0.1",
|
||||
"storybook": "^8.1.1",
|
||||
|
|
|
|||
|
|
@ -16,18 +16,23 @@
|
|||
"lint:errors": "eslint src --ext .ts,.tsx --quiet"
|
||||
},
|
||||
"dependencies": {
|
||||
"@plane/constants": "*",
|
||||
"@plane/types": "*",
|
||||
"clsx": "^2.1.1",
|
||||
"date-fns": "^4.1.0",
|
||||
"isomorphic-dompurify": "^2.16.0",
|
||||
"lodash": "^4.17.21",
|
||||
"react": "^18.3.1",
|
||||
"tailwind-merge": "^2.5.5",
|
||||
"uuid": "^10.0.0",
|
||||
"zxcvbn": "^4.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@plane/eslint-config": "*",
|
||||
"@plane/typescript-config": "*",
|
||||
"@types/node": "^22.5.4",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/uuid": "^9.0.8",
|
||||
"@types/zxcvbn": "^4.4.5",
|
||||
"tsup": "8.4.0",
|
||||
"typescript": "5.8.3"
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue