chore: format files using prettier (#7364)

* chore: format files using prettier

* chore: api server files formatted
This commit is contained in:
sriram veeraghanta 2025-07-08 20:41:11 +05:30 committed by GitHub
parent 0225d806cc
commit 6ce700fd5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
149 changed files with 1518 additions and 919 deletions

View file

@ -12,7 +12,8 @@ export const OAuthOptions: React.FC<TOAuthOptionProps> = observer(() => {
// hooks
const { config } = useInstance();
const isOAuthEnabled = (config && (config?.is_google_enabled || config?.is_github_enabled || config?.is_gitlab_enabled)) || false;
const isOAuthEnabled =
(config && (config?.is_google_enabled || config?.is_github_enabled || config?.is_gitlab_enabled)) || false;
if (!isOAuthEnabled) return null;

View file

@ -47,11 +47,11 @@ export const ProjectSelect: React.FC<Props> = observer((props) => {
{value && value.length > 3
? `3+ projects`
: value && value.length > 0
? projectIds
?.filter((p) => value.includes(p))
.map((p) => getProjectById(p)?.name)
.join(", ")
: "All projects"}
? projectIds
?.filter((p) => value.includes(p))
.map((p) => getProjectById(p)?.name)
.join(", ")
: "All projects"}
</div>
}
multiple

View file

@ -21,7 +21,6 @@ import { InsightTable } from "../insight-table";
const analyticsService = new AnalyticsService();
declare module "@tanstack/react-table" {
interface ColumnMeta<TData extends RowData, TValue> {
export: {

View file

@ -251,4 +251,4 @@ export const CreateApiTokenForm: React.FC<Props> = (props) => {
</div>
</form>
);
};
};

View file

@ -60,4 +60,4 @@ export const ApiTokenListItem: React.FC<Props> = (props) => {
</div>
</>
);
};
};

View file

@ -39,7 +39,7 @@ export const AutoArchiveAutomation: React.FC<Props> = observer((props) => {
EUserPermissionsLevel.PROJECT,
workspaceSlug?.toString(),
currentProjectDetails?.id
);
);
return (
<>

View file

@ -1,7 +1,13 @@
import { getWeekOfMonth, isValid } from "date-fns";
import { CHART_X_AXIS_DATE_PROPERTIES, ChartXAxisDateGrouping, TO_CAPITALIZE_PROPERTIES } from "@plane/constants";
import { ChartXAxisProperty, TChart, TChartDatum } from "@plane/types";
import { capitalizeFirstLetter, hexToHsl, hslToHex, renderFormattedDate, renderFormattedDateWithoutYear } from "@plane/utils";
import {
capitalizeFirstLetter,
hexToHsl,
hslToHex,
renderFormattedDate,
renderFormattedDateWithoutYear,
} from "@plane/utils";
//
const getDateGroupingName = (date: string, dateGrouping: ChartXAxisDateGrouping): string => {
@ -61,7 +67,7 @@ export const parseChartData = (
const updatedWidgetData: TChartDatum[] = widgetData.map((datum) => {
const keys = Object.keys(datum);
const missingKeys = allKeys.filter((key) => !keys.includes(key));
const missingValues: Record<string, number> = Object.fromEntries(missingKeys.map(key => [key, 0]));
const missingValues: Record<string, number> = Object.fromEntries(missingKeys.map((key) => [key, 0]));
if (xAxisProperty) {
// capitalize first letter if xAxisProperty is in TO_CAPITALIZE_PROPERTIES and no groupByProperty is set
@ -163,4 +169,4 @@ export const generateExtendedColors = (baseColorSet: string[], targetCount: numb
}
return colors.slice(0, targetCount);
};
};

View file

@ -13,51 +13,51 @@ export const ProductUpdatesFooter = () => {
<div className="flex items-center justify-between flex-shrink-0 gap-4 m-6 mb-4">
<div className="flex items-center gap-2">
<a
href="https://go.plane.so/p-docs"
target="_blank"
className="text-sm text-custom-text-200 hover:text-custom-text-100 hover:underline underline-offset-1 outline-none"
href="https://go.plane.so/p-docs"
target="_blank"
className="text-sm text-custom-text-200 hover:text-custom-text-100 hover:underline underline-offset-1 outline-none"
>
{t("docs")}
</a>
<svg viewBox="0 0 2 2" className="h-0.5 w-0.5 fill-current">
<circle cx={1} cy={1} r={1} />
</svg>
<a
href="https://go.plane.so/p-changelog"
target="_blank"
className="text-sm text-custom-text-200 hover:text-custom-text-100 hover:underline underline-offset-1 outline-none"
</svg>
<a
href="https://go.plane.so/p-changelog"
target="_blank"
className="text-sm text-custom-text-200 hover:text-custom-text-100 hover:underline underline-offset-1 outline-none"
>
{t("full_changelog")}
</a>
<svg viewBox="0 0 2 2" className="h-0.5 w-0.5 fill-current">
<circle cx={1} cy={1} r={1} />
</svg>
<a
href="mailto:support@plane.so"
target="_blank"
className="text-sm text-custom-text-200 hover:text-custom-text-100 hover:underline underline-offset-1 outline-none"
</svg>
<a
href="mailto:support@plane.so"
target="_blank"
className="text-sm text-custom-text-200 hover:text-custom-text-100 hover:underline underline-offset-1 outline-none"
>
{t("support")}
</a>
<svg viewBox="0 0 2 2" className="h-0.5 w-0.5 fill-current">
<circle cx={1} cy={1} r={1} />
</svg>
</svg>
<a
href="https://go.plane.so/p-discord"
target="_blank"
className="text-sm text-custom-text-200 hover:text-custom-text-100 hover:underline underline-offset-1 outline-none"
>
Discord
</a>
</div>
<a
href="https://go.plane.so/p-discord"
href="https://plane.so/pages"
target="_blank"
className="text-sm text-custom-text-200 hover:text-custom-text-100 hover:underline underline-offset-1 outline-none"
className={cn(
getButtonStyling("accent-primary", "sm"),
"flex gap-1.5 items-center text-center font-medium hover:underline underline-offset-2 outline-none"
)}
>
Discord
</a>
</div>
<a
href="https://plane.so/pages"
target="_blank"
className={cn(
getButtonStyling("accent-primary", "sm"),
"flex gap-1.5 items-center text-center font-medium hover:underline underline-offset-2 outline-none"
)}
>
<Image src={PlaneLogo} alt="Plane" width={12} height={12} />
{t("powered_by_plane_pages")}
</a>

View file

@ -6,7 +6,12 @@ import { EIssueFilterType, ISSUE_DISPLAY_FILTERS_BY_PAGE } from "@plane/constant
// i18n
import { useTranslation } from "@plane/i18n";
// types
import { EIssuesStoreType, IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions } from "@plane/types";
import {
EIssuesStoreType,
IIssueDisplayFilterOptions,
IIssueDisplayProperties,
IIssueFilterOptions,
} from "@plane/types";
// components
import { isIssueFilterActive } from "@plane/utils";
import { ArchiveTabsList } from "@/components/archives";
@ -74,7 +79,11 @@ export const ArchivedIssuesHeader: FC = observer(() => {
</div>
{/* filter options */}
<div className="flex items-center gap-2 px-8">
<FiltersDropdown title={t("common.filters")} placement="bottom-end" isFiltersApplied={isIssueFilterActive(issueFilters)}>
<FiltersDropdown
title={t("common.filters")}
placement="bottom-end"
isFiltersApplied={isIssueFilterActive(issueFilters)}
>
<FilterSelection
filters={issueFilters?.filters || {}}
handleFiltersUpdate={handleFiltersUpdate}

View file

@ -6,7 +6,14 @@ import Link from "next/link";
import { AlertCircle, X } from "lucide-react";
// ui
import { Tooltip } from "@plane/ui";
import { convertBytesToSize, getFileExtension, getFileName, getFileURL, renderFormattedDate, truncateText } from "@plane/utils";
import {
convertBytesToSize,
getFileExtension,
getFileName,
getFileURL,
renderFormattedDate,
truncateText,
} from "@plane/utils";
// icons
//
import { getFileIcon } from "@/components/icons";

View file

@ -7,7 +7,12 @@ import { EIssueLayoutTypes, EIssueFilterType, ISSUE_STORE_TO_FILTERS_MAP } from
// i18n
import { useTranslation } from "@plane/i18n";
// types
import { EIssuesStoreType, IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions } from "@plane/types";
import {
EIssuesStoreType,
IIssueDisplayFilterOptions,
IIssueDisplayProperties,
IIssueFilterOptions,
} from "@plane/types";
import { Button } from "@plane/ui";
// components
import { isIssueFilterActive } from "@plane/utils";

View file

@ -18,14 +18,7 @@ import { ArchiveIssueModal, DeleteIssueModal, IssueSubscription } from "@/compon
// helpers
// hooks
import { captureError, captureSuccess } from "@/helpers/event-tracker.helper";
import {
useIssueDetail,
useIssues,
useProject,
useProjectState,
useUser,
useUserPermissions,
} from "@/hooks/store";
import { useIssueDetail, useIssues, useProject, useProjectState, useUser, useUserPermissions } from "@/hooks/store";
import { useAppRouter } from "@/hooks/use-app-router";
import { usePlatformOS } from "@/hooks/use-platform-os";

View file

@ -1,3 +1,2 @@
export * from "./blocks";
export * from "./base-gantt-root";

View file

@ -2,7 +2,13 @@ import { FC, useCallback, useEffect } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
// plane imports
import { ALL_ISSUES, EIssueLayoutTypes, EIssueFilterType, EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
import {
ALL_ISSUES,
EIssueLayoutTypes,
EIssueFilterType,
EUserPermissions,
EUserPermissionsLevel,
} from "@plane/constants";
import { EIssuesStoreType, IIssueDisplayFilterOptions } from "@plane/types";
// hooks
import { useIssues, useUserPermissions } from "@/hooks/store";

View file

@ -12,7 +12,14 @@ import { useTranslation } from "@plane/i18n";
import { EIssuesStoreType, TIssue, TWorkspaceDraftIssue } from "@plane/types";
// hooks
import { Button, ToggleSwitch, TOAST_TYPE, setToast } from "@plane/ui";
import { convertWorkItemDataToSearchResponse, getUpdateFormDataForReset, cn, getTextContent, getChangedIssuefields, getTabIndex } from "@plane/utils";
import {
convertWorkItemDataToSearchResponse,
getUpdateFormDataForReset,
cn,
getTextContent,
getChangedIssuefields,
getTabIndex,
} from "@plane/utils";
// components
import {
IssueDefaultProperties,

View file

@ -137,7 +137,12 @@ export const IssueLabelSelect: React.FC<Props> = observer((props) => {
/>
</span>
) : (
<div className={cn("h-full flex items-center justify-center gap-1 rounded border-[0.5px] border-custom-border-300 px-2 py-1 text-xs hover:bg-custom-background-80", buttonClassName)}>
<div
className={cn(
"h-full flex items-center justify-center gap-1 rounded border-[0.5px] border-custom-border-300 px-2 py-1 text-xs hover:bg-custom-background-80",
buttonClassName
)}
>
<Tag className="h-3 w-3 flex-shrink-0" />
<span>{t("labels")}</span>
</div>

View file

@ -43,7 +43,7 @@ export const WorkspaceDraftEmptyState: FC = observer(() => {
onClick: () => {
setIsDraftIssueModalOpen(true);
},
disabled: !canPerformEmptyStateActions
disabled: !canPerformEmptyStateActions,
}}
/>
</div>

View file

@ -3,10 +3,7 @@ import { useParams } from "next/navigation";
// PLane
import { IBlockUpdateData, IBlockUpdateDependencyData, IModule } from "@plane/types";
// components
import {
GanttChartRoot,
ModuleGanttSidebar,
} from "@/components/gantt-chart";
import { GanttChartRoot, ModuleGanttSidebar } from "@/components/gantt-chart";
import { ETimeLineTypeType, TimeLineTypeContext } from "@/components/gantt-chart/contexts";
import { ModuleGanttBlock } from "@/components/modules";
// hooks

View file

@ -63,7 +63,9 @@ export const ProfileActivity = observer(() => {
<div className="-mt-1 w-4/5 break-words">
<p className="inline text-sm text-custom-text-200">
<span className="font-medium text-custom-text-100">
{currentUser?.id === activity.actor_detail?.id ? "You" : activity.actor_detail?.display_name}{" "}
{currentUser?.id === activity.actor_detail?.id
? "You"
: activity.actor_detail?.display_name}{" "}
</span>
{activity.field ? (
<ActivityMessage activity={activity} showIssue />

View file

@ -6,7 +6,12 @@ import { EIssueLayoutTypes, EIssueFilterType, ISSUE_DISPLAY_FILTERS_BY_PAGE } fr
// i18n
import { useTranslation } from "@plane/i18n";
// types
import { EIssuesStoreType, IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions } from "@plane/types";
import {
EIssuesStoreType,
IIssueDisplayFilterOptions,
IIssueDisplayProperties,
IIssueFilterOptions,
} from "@plane/types";
// components
import { isIssueFilterActive } from "@plane/utils";
import { DisplayFiltersSelection, FilterSelection, FiltersDropdown, LayoutSelection } from "@/components/issues";
@ -107,7 +112,11 @@ export const ProfileIssuesFilter = observer(() => {
selectedLayout={activeLayout}
/>
<FiltersDropdown title={t("common.filters")} placement="bottom-end" isFiltersApplied={isIssueFilterActive(issueFilters)}>
<FiltersDropdown
title={t("common.filters")}
placement="bottom-end"
isFiltersApplied={isIssueFilterActive(issueFilters)}
>
<FilterSelection
layoutDisplayFiltersOptions={
activeLayout ? ISSUE_DISPLAY_FILTERS_BY_PAGE.profile_issues[activeLayout] : undefined

View file

@ -1,6 +1,12 @@
import { FC } from "react";
import { TNotification } from "@plane/types";
import { convertMinutesToHoursMinutesString, renderFormattedDate, sanitizeCommentForNotification, replaceUnderscoreIfSnakeCase, stripAndTruncateHTML } from "@plane/utils";
import {
convertMinutesToHoursMinutesString,
renderFormattedDate,
sanitizeCommentForNotification,
replaceUnderscoreIfSnakeCase,
stripAndTruncateHTML,
} from "@plane/utils";
// components
// helpers
import { LiteTextReadOnlyEditor } from "@/components/editor";

View file

@ -3,7 +3,6 @@ import { observer } from "mobx-react";
import { useTranslation } from "@plane/i18n";
import { cn, getFileURL } from "@plane/utils";
type Props = {
logo: string | null | undefined;
name: string | undefined;

View file

@ -7,7 +7,7 @@ export type TargetData = {
parentId: string | null;
isGroup: boolean;
isChild: boolean;
}
};
/**
* extracts the Payload and translates the instruction for the current dropTarget based on drag and drop payload
@ -58,11 +58,10 @@ export const getCanDrop = (source: TDropTarget, favorite: IFavorite | undefined,
if (!sourceData) return false;
// a favorite cannot be dropped on to itself
if (sourceData.id === favorite?.id ) return false;
if (sourceData.id === favorite?.id) return false;
// if current dropTarget is a child and the favorite being dropped is a group then don't enable drop
if (isCurrentChild && sourceData.isGroup) return false;
return true;
};
};

View file

@ -2,4 +2,4 @@ export * from "./favorite-folder";
export * from "./favorite-items";
export * from "./favorites-menu";
export * from "./favorites.helpers";
export * from "./new-fav-folder";
export * from "./new-fav-folder";

View file

@ -112,7 +112,9 @@ export const GlobalViewsHeader: React.FC = observer(() => {
<DefaultViewTab key={`${tab.key}-${index}`} tab={tab} />
))}
{currentWorkspaceViews?.map((viewId) => <ViewTab key={viewId} viewId={viewId} />)}
{currentWorkspaceViews?.map((viewId) => (
<ViewTab key={viewId} viewId={viewId} />
))}
</div>
{isAuthorizedUser ? (

View file

@ -1,9 +1,6 @@
import { start, done } from 'nprogress';
import {
AppProgressBar as AppProgressBarComponent,
useRouter,
} from './AppProgressBar';
import withSuspense from './withSuspense';
import { start, done } from "nprogress";
import { AppProgressBar as AppProgressBarComponent, useRouter } from "./AppProgressBar";
import withSuspense from "./withSuspense";
export interface NProgressOptions {
minimum?: number;

View file

@ -1,16 +1,13 @@
export function isSameURL(target: URL, current: URL) {
const cleanTarget =
target.protocol + '//' + target.host + target.pathname + target.search;
const cleanCurrent =
current.protocol + '//' + current.host + current.pathname + current.search;
const cleanTarget = target.protocol + "//" + target.host + target.pathname + target.search;
const cleanCurrent = current.protocol + "//" + current.host + current.pathname + current.search;
return cleanTarget === cleanCurrent;
}
export function isSameURLWithoutSearch(target: URL, current: URL) {
const cleanTarget = target.protocol + '//' + target.host + target.pathname;
const cleanCurrent =
current.protocol + '//' + current.host + current.pathname;
const cleanTarget = target.protocol + "//" + target.host + target.pathname;
const cleanCurrent = current.protocol + "//" + current.host + current.pathname;
return cleanTarget === cleanCurrent;
}

View file

@ -1,9 +1,9 @@
'use client'
"use client";
import { useEffect } from "react";
import { usePathname, useSearchParams } from "next/navigation";
// posthog
import { usePostHog } from 'posthog-js/react';
import { usePostHog } from "posthog-js/react";
export default function PostHogPageView(): null {
const pathname = usePathname();
@ -12,18 +12,15 @@ export default function PostHogPageView(): null {
useEffect(() => {
// Track pageviews
if (pathname && posthog) {
let url = window.origin + pathname
let url = window.origin + pathname;
if (searchParams.toString()) {
url = url + `?${searchParams.toString()}`
url = url + `?${searchParams.toString()}`;
}
posthog.capture(
'$pageview',
{
'$current_url': url,
}
)
posthog.capture("$pageview", {
$current_url: url,
});
}
}, [pathname, searchParams, posthog])
}, [pathname, searchParams, posthog]);
return null
return null;
}

View file

@ -17,4 +17,6 @@ const initializeStore = () => {
export const store = initializeStore();
export const StoreProvider = ({ children }: { children: ReactElement }) => <StoreContext.Provider value={store}>{children}</StoreContext.Provider>;
export const StoreProvider = ({ children }: { children: ReactElement }) => (
<StoreContext.Provider value={store}>{children}</StoreContext.Provider>
);

View file

@ -59,4 +59,4 @@ declare var _modRename;
declare var _jsAuth;
declare var _jsProgress;
declare var _jsProgress;

View file

@ -15,7 +15,7 @@
* each element converted to a byte); SQLite always returns blob data as
* `Uint8Array`
*/
type SQLiteCompatibleType = number|string|Uint8Array|Array<number>|bigint|null;
type SQLiteCompatibleType = number | string | Uint8Array | Array<number> | bigint | null;
/**
* SQLite Virtual File System object
@ -37,83 +37,50 @@ declare interface SQLiteVFS {
/** Maximum length of a file path in UTF-8 bytes (default 64) */
mxPathName?: number;
close(): void|Promise<void>;
isReady(): boolean|Promise<boolean>;
close(): void | Promise<void>;
isReady(): boolean | Promise<boolean>;
/** @see https://sqlite.org/c3ref/io_methods.html */
xClose(fileId: number): number|Promise<number>;
xClose(fileId: number): number | Promise<number>;
/** @see https://sqlite.org/c3ref/io_methods.html */
xRead(
fileId: number,
pData: number,
iAmt: number,
iOffsetLo: number,
iOffsetHi: number
): number|Promise<number>;
xRead(fileId: number, pData: number, iAmt: number, iOffsetLo: number, iOffsetHi: number): number | Promise<number>;
/** @see https://sqlite.org/c3ref/io_methods.html */
xWrite(
fileId: number,
pData: number,
iAmt: number,
iOffsetLo: number,
iOffsetHi: number
): number|Promise<number>;
xWrite(fileId: number, pData: number, iAmt: number, iOffsetLo: number, iOffsetHi: number): number | Promise<number>;
/** @see https://sqlite.org/c3ref/io_methods.html */
xTruncate(fileId: number, iSizeLo: number, iSizeHi): number|Promise<number>;
xTruncate(fileId: number, iSizeLo: number, iSizeHi): number | Promise<number>;
/** @see https://sqlite.org/c3ref/io_methods.html */
xSync(fileId: number, flags: number): number|Promise<number>;
xSync(fileId: number, flags: number): number | Promise<number>;
/** @see https://sqlite.org/c3ref/io_methods.html */
xFileSize(
fileId: number,
pSize64: number
): number|Promise<number>;
xFileSize(fileId: number, pSize64: number): number | Promise<number>;
/** @see https://sqlite.org/c3ref/io_methods.html */
xLock(fileId: number, flags: number): number|Promise<number>;
xLock(fileId: number, flags: number): number | Promise<number>;
/** @see https://sqlite.org/c3ref/io_methods.html */
xUnlock(fileId: number, flags: number): number|Promise<number>;
xUnlock(fileId: number, flags: number): number | Promise<number>;
/** @see https://sqlite.org/c3ref/io_methods.html */
xCheckReservedLock(
fileId: number,
pResOut: number
): number|Promise<number>;
xCheckReservedLock(fileId: number, pResOut: number): number | Promise<number>;
/** @see https://sqlite.org/c3ref/io_methods.html */
xFileControl(
fileId: number,
flags: number,
pOut: number
): number|Promise<number>;
xFileControl(fileId: number, flags: number, pOut: number): number | Promise<number>;
/** @see https://sqlite.org/c3ref/io_methods.html */
xDeviceCharacteristics(fileId: number): number|Promise<number>;
xDeviceCharacteristics(fileId: number): number | Promise<number>;
/** @see https://sqlite.org/c3ref/vfs.html */
xOpen(
pVfs: number,
zName: number,
pFile: number,
flags: number,
pOutFlags: number
): number|Promise<number>;
xOpen(pVfs: number, zName: number, pFile: number, flags: number, pOutFlags: number): number | Promise<number>;
/** @see https://sqlite.org/c3ref/vfs.html */
xDelete(pVfs: number, zName: number, syncDir: number): number|Promise<number>;
xDelete(pVfs: number, zName: number, syncDir: number): number | Promise<number>;
/** @see https://sqlite.org/c3ref/vfs.html */
xAccess(
pVfs: number,
zName: number,
flags: number,
pResOut: number
): number|Promise<number>;
xAccess(pVfs: number, zName: number, flags: number, pResOut: number): number | Promise<number>;
}
/**
@ -217,7 +184,7 @@ declare interface SQLiteAPI {
*/
bind_collection(
stmt: number,
bindings: {[index: string]: SQLiteCompatibleType|null}|Array<SQLiteCompatibleType|null>
bindings: { [index: string]: SQLiteCompatibleType | null } | Array<SQLiteCompatibleType | null>
): number;
/**
@ -230,7 +197,7 @@ declare interface SQLiteAPI {
* @param value
* @returns `SQLITE_OK` (throws exception on error)
*/
bind(stmt: number, i: number, value: SQLiteCompatibleType|null): number;
bind(stmt: number, i: number, value: SQLiteCompatibleType | null): number;
/**
* Bind blob to prepared statement parameter
@ -242,7 +209,7 @@ declare interface SQLiteAPI {
* @param value
* @returns `SQLITE_OK` (throws exception on error)
*/
bind_blob(stmt: number, i: number, value: Uint8Array|Array<number>): number;
bind_blob(stmt: number, i: number, value: Uint8Array | Array<number>): number;
/**
* Bind number to prepared statement parameter
@ -254,9 +221,9 @@ declare interface SQLiteAPI {
* @param value
* @returns `SQLITE_OK` (throws exception on error)
*/
bind_double(stmt: number, i: number, value: number): number;
bind_double(stmt: number, i: number, value: number): number;
/**
/**
* Bind number to prepared statement parameter
*
* Note that binding indices begin with 1.
@ -268,7 +235,7 @@ declare interface SQLiteAPI {
*/
bind_int(stmt: number, i: number, value: number): number;
/**
/**
* Bind number to prepared statement parameter
*
* Note that binding indices begin with 1.
@ -278,9 +245,9 @@ declare interface SQLiteAPI {
* @param value
* @returns `SQLITE_OK` (throws exception on error)
*/
bind_int64(stmt: number, i: number, value: bigint): number;
bind_int64(stmt: number, i: number, value: bigint): number;
/**
/**
* Bind null to prepared statement
*
* Note that binding indices begin with 1.
@ -310,7 +277,7 @@ declare interface SQLiteAPI {
*/
bind_parameter_name(stmt: number, i: number): string;
/**
/**
* Bind string to prepared statement
*
* Note that binding indices begin with 1.
@ -419,7 +386,7 @@ declare interface SQLiteAPI {
*/
column_int64(stmt: number, i: number): bigint;
/**
/**
* Get a column name for a prepared statement
* @see https://www.sqlite.org/c3ref/column_blob.html
* @param stmt prepared statement pointer
@ -482,9 +449,10 @@ declare interface SQLiteAPI {
nArg: number,
eTextRep: number,
pApp: number,
xFunc?: (context: number, values: Uint32Array) => void|Promise<void>,
xStep?: (context: number, values: Uint32Array) => void|Promise<void>,
xFinal?: (context: number) => void|Promise<void>): number;
xFunc?: (context: number, values: Uint32Array) => void | Promise<void>,
xStep?: (context: number, values: Uint32Array) => void | Promise<void>,
xFinal?: (context: number) => void | Promise<void>
): number;
/**
* Get number of columns in current row of a prepared statement
@ -509,7 +477,7 @@ declare interface SQLiteAPI {
exec(
db: number,
zSQL: string,
callback?: (row: Array<SQLiteCompatibleType|null>, columns: string[]) => void
callback?: (row: Array<SQLiteCompatibleType | null>, columns: string[]) => void
): Promise<number>;
/**
@ -543,7 +511,7 @@ declare interface SQLiteAPI {
* @see https://www.sqlite.org/c3ref/libversion.html
* @returns version number, e.g. 3035005
*/
libversion_number(): number
libversion_number(): number;
/**
* Set a usage limit on a connection.
@ -553,10 +521,7 @@ declare interface SQLiteAPI {
* @param newVal
* @returns previous setting
*/
limit(
db: number,
id: number,
newVal: number): number;
limit(db: number, id: number, newVal: number): number;
/**
* Opening a new database connection.
@ -570,11 +535,7 @@ declare interface SQLiteAPI {
* @param zVfs VFS name
* @returns Promise-wrapped database pointer.
*/
open_v2(
zFilename: string,
iFlags?: number,
zVfs?: string
): Promise<number>;
open_v2(zFilename: string, iFlags?: number, zVfs?: string): Promise<number>;
/**
* Specify callback to be invoked between long-running queries
@ -588,7 +549,7 @@ declare interface SQLiteAPI {
* @param handler
* @param userData
*/
progress_handler(db: number, nProgressOps: number, handler: (userData: any) => number|Promise<number>, userData);
progress_handler(db: number, nProgressOps: number, handler: (userData: any) => number | Promise<number>, userData);
/**
* Reset a prepared statement object
@ -603,7 +564,7 @@ declare interface SQLiteAPI {
* @param context context pointer
* @param value
*/
result(context: number, value: (SQLiteCompatibleType|number[])|null): void;
result(context: number, value: (SQLiteCompatibleType | number[]) | null): void;
/**
* Set the result of a function or vtable column
@ -611,7 +572,7 @@ declare interface SQLiteAPI {
* @param context context pointer
* @param value
*/
result_blob(context: number, value: Uint8Array|number[]): void;
result_blob(context: number, value: Uint8Array | number[]): void;
/**
* Set the result of a function or vtable column
@ -650,19 +611,19 @@ declare interface SQLiteAPI {
* @param context context pointer
* @param value
*/
result_text(context: number, value: string): void;
result_text(context: number, value: string): void;
/**
* Get all column data for a row from a prepared statement step
*
* This convenience function will return a copy of any blob, unlike
* {@link column_blob} which returns a value referencing volatile WASM
* memory with short validity. Like {@link column}, it will return a
* BigInt for integers outside the safe integer bounds for Number.
* @param stmt prepared statement pointer
* @returns row data
*/
row(stmt: number): Array<SQLiteCompatibleType|null>;
/**
* Get all column data for a row from a prepared statement step
*
* This convenience function will return a copy of any blob, unlike
* {@link column_blob} which returns a value referencing volatile WASM
* memory with short validity. Like {@link column}, it will return a
* BigInt for integers outside the safe integer bounds for Number.
* @param stmt prepared statement pointer
* @returns row data
*/
row(stmt: number): Array<SQLiteCompatibleType | null>;
/**
* Register a callback function that is invoked to authorize certain SQL statement actions.
@ -673,8 +634,16 @@ declare interface SQLiteAPI {
*/
set_authorizer(
db: number,
authFunction: (userData: any, iActionCode: number, param3: string|null, param4: string|null, param5: string|null, param6: string|null) => number|Promise<number>,
userData: any): number;
authFunction: (
userData: any,
iActionCode: number,
param3: string | null,
param4: string | null,
param5: string | null,
param6: string | null
) => number | Promise<number>,
userData: any
): number;
/**
* Get statement SQL
@ -733,7 +702,7 @@ declare interface SQLiteAPI {
*/
step(stmt: number): Promise<number>;
/**
/**
* Register an update hook
*
* The callback is invoked whenever a row is updated, inserted, or deleted
@ -749,9 +718,10 @@ declare interface SQLiteAPI {
* @param db database pointer
* @param callback
*/
update_hook(
update_hook(
db: number,
callback: (updateType: number, dbName: string|null, tblName: string|null, rowid: bigint) => void): void;
callback: (updateType: number, dbName: string | null, tblName: string | null, rowid: bigint) => void
): void;
/**
* Extract a value from `sqlite3_value`
@ -809,7 +779,7 @@ declare interface SQLiteAPI {
* @param pValue `sqlite3_value` pointer
* @returns value
*/
value_int64(pValue: number): bigint;
value_int64(pValue: number): bigint;
/**
* Extract a value from `sqlite3_value`
@ -839,7 +809,7 @@ declare interface SQLiteAPI {
}
/** @ignore */
declare module 'wa-sqlite/src/sqlite-constants.js' {
declare module "wa-sqlite/src/sqlite-constants.js" {
export const SQLITE_OK: 0;
export const SQLITE_ERROR: 1;
export const SQLITE_INTERNAL: 2;
@ -1074,8 +1044,8 @@ declare module 'wa-sqlite/src/sqlite-constants.js' {
export const SQLITE_PREPARE_NO_VTAB: 0x04;
}
declare module 'wa-sqlite' {
export * from 'wa-sqlite/src/sqlite-constants.js';
declare module "wa-sqlite" {
export * from "wa-sqlite/src/sqlite-constants.js";
/**
* @ignore
@ -1088,26 +1058,26 @@ declare module 'wa-sqlite' {
export function Factory(Module: any): SQLiteAPI;
export class SQLiteError extends Error {
constructor(message: any, code: any);
code: any;
constructor(message: any, code: any);
code: any;
}
}
/** @ignore */
declare module 'wa-sqlite/dist/wa-sqlite.mjs' {
declare module "wa-sqlite/dist/wa-sqlite.mjs" {
function ModuleFactory(config?: object): Promise<any>;
export = ModuleFactory;
}
/** @ignore */
declare module 'wa-sqlite/dist/wa-sqlite-async.mjs' {
declare module "wa-sqlite/dist/wa-sqlite-async.mjs" {
function ModuleFactory(config?: object): Promise<any>;
export = ModuleFactory;
}
/** @ignore */
declare module 'wa-sqlite/src/VFS.js' {
export * from 'wa-sqlite/src/sqlite-constants.js';
declare module "wa-sqlite/src/VFS.js" {
export * from "wa-sqlite/src/sqlite-constants.js";
export class Base {
mxPathName: number;
@ -1122,20 +1092,28 @@ declare module 'wa-sqlite/src/VFS.js' {
* @param {number} iOffset
* @returns {number}
*/
xRead(fileId: number, pData: {
xRead(
fileId: number,
pData: {
size: number;
value: Uint8Array;
}, iOffset: number): number;
},
iOffset: number
): number;
/**
* @param {number} fileId
* @param {Uint8Array} pData
* @param {number} iOffset
* @returns {number}
*/
xWrite(fileId: number, pData: {
xWrite(
fileId: number,
pData: {
size: number;
value: Uint8Array;
}, iOffset: number): number;
},
iOffset: number
): number;
/**
* @param {number} fileId
* @param {number} iSize
@ -1222,7 +1200,7 @@ declare module 'wa-sqlite/src/VFS.js' {
}
/** @ignore */
declare module 'wa-sqlite/src/examples/IndexedDbVFS.js' {
declare module "wa-sqlite/src/examples/IndexedDbVFS.js" {
import * as VFS from "wa-sqlite/src/VFS.js";
export class IndexedDbVFS extends VFS.Base {
/**
@ -1275,7 +1253,7 @@ declare module 'wa-sqlite/src/examples/IndexedDbVFS.js' {
}
/** @ignore */
declare module 'wa-sqlite/src/examples/MemoryVFS.js' {
declare module "wa-sqlite/src/examples/MemoryVFS.js" {
// eslint-disable-next-line no-duplicate-imports
import * as VFS from "wa-sqlite/src/VFS.js";
/** @ignore */
@ -1287,14 +1265,13 @@ declare module 'wa-sqlite/src/examples/MemoryVFS.js' {
}
/** @ignore */
declare module 'wa-sqlite/src/examples/MemoryAsyncVFS.js' {
declare module "wa-sqlite/src/examples/MemoryAsyncVFS.js" {
import { MemoryVFS } from "wa-sqlite/src/examples/MemoryVFS.js";
export class MemoryAsyncVFS extends MemoryVFS {
}
export class MemoryAsyncVFS extends MemoryVFS {}
}
/** @ignore */
declare module 'wa-sqlite/src/examples/tag.js' {
declare module "wa-sqlite/src/examples/tag.js" {
/**
* @ignore
* Template tag builder. This function creates a tag with an API and

View file

@ -2,7 +2,14 @@ import { action, makeObservable, runInAction } from "mobx";
// base class
// services
// types
import { TIssue, TLoader, ViewFlags, IssuePaginationOptions, TIssuesResponse, TBulkOperationsPayload } from "@plane/types";
import {
TIssue,
TLoader,
ViewFlags,
IssuePaginationOptions,
TIssuesResponse,
TBulkOperationsPayload,
} from "@plane/types";
import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store";
import { IIssueRootStore } from "../root.store";
import { IDraftIssuesFilter } from "./filter.store";

View file

@ -830,7 +830,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore {
updates: { id: string; start_date?: string; target_date?: string }[],
projectId?: string
) {
if(!projectId) return;
if (!projectId) return;
const issueDatesBeforeChange: { id: string; start_date?: string; target_date?: string }[] = [];
try {
const getIssueById = this.rootIssueStore.issues.getIssueById;

View file

@ -1,6 +1,13 @@
import { action, observable, makeObservable, computed, runInAction } from "mobx";
// base class
import { TIssue, TLoader, IssuePaginationOptions, TIssuesResponse, ViewFlags, TBulkOperationsPayload } from "@plane/types";
import {
TIssue,
TLoader,
IssuePaginationOptions,
TIssuesResponse,
ViewFlags,
TBulkOperationsPayload,
} from "@plane/types";
import { UserService } from "@/services/user.service";
// services

View file

@ -1,7 +1,16 @@
import isEmpty from "lodash/isEmpty";
import { autorun, makeObservable, observable } from "mobx";
// types
import { EIssueServiceType, ICycle, IIssueLabel, IModule, IProject, IState, IUserLite, TIssueServiceType } from "@plane/types";
import {
EIssueServiceType,
ICycle,
IIssueLabel,
IModule,
IProject,
IState,
IUserLite,
TIssueServiceType,
} from "@plane/types";
// plane web store
import { IProjectEpics, IProjectEpicsFilter, ProjectEpics, ProjectEpicsFilter } from "@/plane-web/store/issue/epic";
import { IIssueDetail, IssueDetail } from "@/plane-web/store/issue/issue-details/root.store";

View file

@ -1,5 +1,4 @@
import
isEmpty from "lodash/isEmpty";
import isEmpty from "lodash/isEmpty";
import set from "lodash/set";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// base class

View file

@ -171,7 +171,6 @@ export class ProfileStore implements IUserProfileStore {
runInAction(() => {
this.mutateUserProfile({ ...dataToUpdate, is_onboarded: true });
});
} catch (error) {
runInAction(() => {
this.error = {
@ -181,7 +180,7 @@ export class ProfileStore implements IUserProfileStore {
});
throw error;
}
}
};
/**
* @description updates the user tour completed status

View file

@ -20,7 +20,12 @@ export interface IHomeStore {
// actions
toggleWidgetSettings: (value?: boolean) => void;
fetchWidgets: (workspaceSlug: string) => Promise<void>;
reorderWidget: (workspaceSlug: string, widgetKey: string, destinationId: string, edge: string | undefined) => Promise<void>;
reorderWidget: (
workspaceSlug: string,
widgetKey: string,
destinationId: string,
edge: string | undefined
) => Promise<void>;
toggleWidget: (workspaceSlug: string, widgetKey: string, is_enabled: boolean) => void;
}