UNPKG

@activecollab/components

Version:

ActiveCollab Components

67 lines 2.47 kB
import { ReactElement, ReactNode } from "react"; /** * Task identifier cell — the `#<id>` value as a copy-link control, mirroring * how `tasks/Metadata.js` turns `Task #248` into the task's Copy Link action: * the click writes the task URL to the clipboard and reports back so the page * can raise the app's "Link copied to clipboard." toast (utils/copyLinkToClipboard). * It never navigates — the row itself is the navigation target. */ export declare const IdentifierCell: ({ identifier, link, onCopy, }: { identifier: number; /** absolute task URL — what lands on the clipboard */ link: string; /** raised after the copy attempt so the page can show a toast */ onCopy?: (copied: boolean) => void; }) => ReactElement; export interface TaskLabel { id: string; name: string; /** chip background + dot colour (label colours are data, not theme) */ color: string; /** the label's own text colour, used in the picker list */ textColor: string; } /** * Holds the label catalogue for the whole list, so a label created in one * task's picker shows up in every other picker too. */ export declare const LabelsProvider: ({ children, }: { children: ReactNode; }) => ReactElement; export declare const LabelCell: ({ labelIds, completed, }: { labelIds?: string[]; completed?: boolean; }) => ReactElement; /** Build a mock timestamp N days from today (negative = in the past). */ export declare const dayOffset: (offset: number) => number; /** mirrors utils/date.js → formatDateRange (month-first format) */ export declare const formatDateRange: (from?: number, to?: number) => string | undefined; export declare const isOverdue: (dueOn?: number, completed?: boolean) => boolean; export declare const DateCell: ({ startOn, dueOn, completed, }: { startOn?: number; dueOn?: number; completed?: boolean; }) => ReactElement; export interface TimeRecord { id: number; date: number; userId: string; userName: string; jobType: string; hours: number; billable: boolean; description?: string; } export interface TimeCellUser { id: string; name: string; } export declare const TimeCell: ({ taskName, tracked, estimated, users, currentUserId, completed, }: { taskName: string; tracked?: number; estimated?: number; users: TimeCellUser[]; currentUserId: string; completed?: boolean; }) => ReactElement; //# sourceMappingURL=columns.d.ts.map