@pstdio/ui 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/breadcrumb.d.ts +2 -0
- package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -2
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
- package/dist/components/{tickets/ticket-board.d.ts → data-renderer/data-renderer-board.d.ts} +14 -14
- package/dist/components/{tickets/ticket-card.d.ts → data-renderer/data-renderer-card.d.ts} +8 -8
- package/dist/components/data-renderer/data-renderer-grouping.d.ts +22 -0
- package/dist/components/data-renderer/data-renderer-helpers.d.ts +18 -0
- package/dist/components/{tickets/ticket-list.d.ts → data-renderer/data-renderer-list.d.ts} +10 -10
- package/dist/components/{tickets/tickets-workspace.d.ts → data-renderer/data-renderer.d.ts} +14 -12
- package/dist/components/{tickets → data-renderer}/display-menu.d.ts +6 -6
- package/dist/components/data-renderer/filter-menu.d.ts +11 -0
- package/dist/components/{tickets → data-renderer}/tag-badge.d.ts +2 -2
- package/dist/components/{tickets → data-renderer}/types.d.ts +18 -18
- package/dist/components/data-renderer/use-data-renderer-store.d.ts +52 -0
- package/dist/components/resource-context-menu.d.ts +1 -1
- package/dist/index.d.ts +12 -11
- package/dist/index.js +5163 -5137
- package/dist/index.js.map +1 -1
- package/dist/theme/recipes/menu.d.ts +1 -1
- package/package.json +2 -2
- package/dist/components/tickets/filter-menu.d.ts +0 -11
- package/dist/components/tickets/ticket-grouping.d.ts +0 -22
- package/dist/components/tickets/use-workspace-store.d.ts +0 -51
- package/dist/components/tickets/workspace-helpers.d.ts +0 -18
- /package/dist/components/{tickets → data-renderer}/tag-option-icon.d.ts +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Breadcrumb as ChakraBreadcrumb, SystemStyleObject } from '@chakra-ui/react';
|
|
2
|
+
import { ResourceContextAction } from './resource-context-menu';
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
export interface BreadcrumbItem {
|
|
4
5
|
title: React.ReactNode;
|
|
5
6
|
url?: string;
|
|
6
7
|
onClick?: () => void;
|
|
8
|
+
contextMenuActions?: ResourceContextAction[];
|
|
7
9
|
}
|
|
8
10
|
export interface BreadcrumbLinkProps {
|
|
9
11
|
to: string;
|
|
@@ -5,7 +5,7 @@ export declare const buildTimelineDocFromInvocations: (invocations: ToolPart[],
|
|
|
5
5
|
items: (import('../components/timeline').Item | {
|
|
6
6
|
indicator: {
|
|
7
7
|
readonly type: "icon";
|
|
8
|
-
readonly icon: "search" | "dot" | "
|
|
8
|
+
readonly icon: "search" | "dot" | "danger" | "file" | "shell" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo" | "terminal";
|
|
9
9
|
};
|
|
10
10
|
title: TitleSegment[];
|
|
11
11
|
blocks: Block[];
|
|
@@ -15,7 +15,7 @@ export declare const createToolTimelineBuilder: (toolRenderers: ToolRenderersMap
|
|
|
15
15
|
items: (import('../components/timeline').Item | {
|
|
16
16
|
indicator: {
|
|
17
17
|
readonly type: "icon";
|
|
18
|
-
readonly icon: "search" | "dot" | "
|
|
18
|
+
readonly icon: "search" | "dot" | "danger" | "file" | "shell" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo" | "terminal";
|
|
19
19
|
};
|
|
20
20
|
title: TitleSegment[];
|
|
21
21
|
blocks: Block[];
|
|
@@ -15,7 +15,7 @@ export declare const getStateLabel: (invocation: ToolPart) => string | null;
|
|
|
15
15
|
export declare const isErrorState: (invocation: ToolPart) => boolean;
|
|
16
16
|
export declare const buildIndicator: (invocation: ToolPart) => {
|
|
17
17
|
readonly type: "icon";
|
|
18
|
-
readonly icon: "search" | "dot" | "
|
|
18
|
+
readonly icon: "search" | "dot" | "danger" | "file" | "shell" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo" | "terminal";
|
|
19
19
|
};
|
|
20
20
|
export declare const buildBaseTitle: (invocation: ToolPart, detail?: string, labelOverride?: string) => TitleSegment[];
|
|
21
21
|
export declare const getInputObject: (invocation: ToolPart) => Record<string, unknown> | null;
|
package/dist/components/{tickets/ticket-board.d.ts → data-renderer/data-renderer-board.d.ts}
RENAMED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { ComponentProps, ComponentType } from 'react';
|
|
2
2
|
import { ResourceContextAction } from '../resource-context-menu';
|
|
3
|
-
import {
|
|
4
|
-
type
|
|
5
|
-
export interface
|
|
3
|
+
import { DataRendererCard } from './data-renderer-card';
|
|
4
|
+
type DataRendererCardProps = ComponentProps<typeof DataRendererCard>;
|
|
5
|
+
export interface DataRendererBoardItem {
|
|
6
6
|
id: string;
|
|
7
|
-
cardProps: Omit<
|
|
7
|
+
cardProps: Omit<DataRendererCardProps, "draggable" | "onDragStart" | "onDragEnd" | "isSelected">;
|
|
8
8
|
contextMenuActions?: ResourceContextAction[];
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface DataRendererBoardColumnAction {
|
|
11
11
|
id: string;
|
|
12
12
|
label: string;
|
|
13
13
|
icon: ComponentType<{
|
|
14
14
|
size?: number | string;
|
|
15
15
|
}>;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface DataRendererBoardGroup {
|
|
18
18
|
key: string;
|
|
19
19
|
label: string;
|
|
20
|
-
items:
|
|
20
|
+
items: DataRendererBoardItem[];
|
|
21
21
|
}
|
|
22
|
-
export interface
|
|
22
|
+
export interface DataRendererBoardColumn {
|
|
23
23
|
id: string;
|
|
24
24
|
label: string;
|
|
25
25
|
color?: string;
|
|
26
|
-
items:
|
|
27
|
-
groups?:
|
|
26
|
+
items: DataRendererBoardItem[];
|
|
27
|
+
groups?: DataRendererBoardGroup[];
|
|
28
28
|
canDragIn: boolean;
|
|
29
29
|
canDragOut: boolean;
|
|
30
30
|
canCreate: boolean;
|
|
31
|
-
actions:
|
|
31
|
+
actions: DataRendererBoardColumnAction[];
|
|
32
32
|
}
|
|
33
|
-
interface
|
|
34
|
-
columns:
|
|
33
|
+
interface DataRendererBoardProps {
|
|
34
|
+
columns: DataRendererBoardColumn[];
|
|
35
35
|
selectedItemId?: string | null;
|
|
36
36
|
onMoveItem?: (itemId: string, targetColumnId: string, context?: {
|
|
37
37
|
beforeItemId?: string;
|
|
@@ -42,5 +42,5 @@ interface TicketBoardProps {
|
|
|
42
42
|
onCreateStart?: (columnId: string) => void;
|
|
43
43
|
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
44
44
|
}
|
|
45
|
-
export declare const
|
|
45
|
+
export declare const DataRendererBoard: (props: DataRendererBoardProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
46
|
export {};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { DragEventHandler } from 'react';
|
|
2
2
|
import { WorkspaceBadgeProps } from '../workspace-badge';
|
|
3
|
-
import {
|
|
4
|
-
export interface
|
|
3
|
+
import { DataRendererTagOption } from './types';
|
|
4
|
+
export interface DataRendererCardBadge {
|
|
5
5
|
label: string;
|
|
6
6
|
color?: string;
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
8
|
+
export interface DataRendererCardTagBadge {
|
|
9
9
|
tagName: string;
|
|
10
10
|
label: string;
|
|
11
11
|
value: string | null;
|
|
12
12
|
color?: string;
|
|
13
|
-
options:
|
|
13
|
+
options: DataRendererTagOption[];
|
|
14
14
|
}
|
|
15
|
-
interface
|
|
15
|
+
interface DataRendererCardProps {
|
|
16
16
|
ticketId: string;
|
|
17
17
|
parentPath?: string[];
|
|
18
18
|
title: string;
|
|
19
|
-
badges?:
|
|
20
|
-
tagBadges?:
|
|
19
|
+
badges?: DataRendererCardBadge[];
|
|
20
|
+
tagBadges?: DataRendererCardTagBadge[];
|
|
21
21
|
workspaceBadge?: WorkspaceBadgeProps;
|
|
22
22
|
isSelected?: boolean;
|
|
23
23
|
draggable?: boolean;
|
|
@@ -26,5 +26,5 @@ interface TicketCardProps {
|
|
|
26
26
|
onClick?: () => void;
|
|
27
27
|
onTagChange?: (tagName: string, newValue: string) => void;
|
|
28
28
|
}
|
|
29
|
-
export declare const
|
|
29
|
+
export declare const DataRendererCard: (props: DataRendererCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DataRendererFilterState, DataRendererOrdering, DataRendererRow, DataRendererTagDefinition, FilterCategory, GroupingField } from './types';
|
|
2
|
+
interface GroupingOptions {
|
|
3
|
+
columnGrouping: GroupingField;
|
|
4
|
+
rowGrouping: GroupingField;
|
|
5
|
+
knownColumnKeys?: string[];
|
|
6
|
+
}
|
|
7
|
+
interface DataRendererRowGroup {
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
tickets: DataRendererRow[];
|
|
11
|
+
}
|
|
12
|
+
interface DataRendererColumnGroup {
|
|
13
|
+
key: string;
|
|
14
|
+
label: string;
|
|
15
|
+
tickets: DataRendererRow[];
|
|
16
|
+
rows: DataRendererRowGroup[];
|
|
17
|
+
}
|
|
18
|
+
export declare const orderRows: (tickets: DataRendererRow[], ordering: DataRendererOrdering, tagDefinitions?: DataRendererTagDefinition[]) => DataRendererRow[];
|
|
19
|
+
export declare const groupRows: (tickets: DataRendererRow[], options: GroupingOptions) => DataRendererColumnGroup[];
|
|
20
|
+
export declare const filterRows: (tickets: DataRendererRow[], filters: DataRendererFilterState) => DataRendererRow[];
|
|
21
|
+
export declare const countFilterValues: (tickets: DataRendererRow[], category: FilterCategory) => Record<string, number>;
|
|
22
|
+
export type { DataRendererColumnGroup, DataRendererRowGroup };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DataRendererCardBadge, DataRendererCardTagBadge } from './data-renderer-card';
|
|
2
|
+
import { DataRendererFilterCategory, DataRendererFilterState, DataRendererOption, DataRendererRow, DataRendererTagDefinition, DisplayProperty, FilterCategory, GroupingField, OrderingField } from './types';
|
|
3
|
+
export declare const toTitleCase: (value: string) => string;
|
|
4
|
+
export declare const buildDefaultFilterCategories: (tickets: DataRendererRow[], tagDefinitions: DataRendererTagDefinition[]) => DataRendererFilterCategory[];
|
|
5
|
+
export declare const toBadges: (ticket: DataRendererRow, displayProperties: DisplayProperty[]) => DataRendererCardBadge[];
|
|
6
|
+
export declare const toTagBadges: (ticket: DataRendererRow, displayProperties: DisplayProperty[], tagDefinitions: DataRendererTagDefinition[]) => DataRendererCardTagBadge[];
|
|
7
|
+
export declare const buildTagOptions: (tagDefinitions: DataRendererTagDefinition[]) => {
|
|
8
|
+
grouping: DataRendererOption<GroupingField>[];
|
|
9
|
+
ordering: DataRendererOption<OrderingField>[];
|
|
10
|
+
display: DataRendererOption<DisplayProperty>[];
|
|
11
|
+
};
|
|
12
|
+
export declare const orderGroupingOptions: <TValue extends string>(options: DataRendererOption<TValue>[]) => DataRendererOption<TValue>[];
|
|
13
|
+
export declare const resolveSubGroupingOptions: (options: DataRendererOption<GroupingField>[], columnGrouping: GroupingField) => DataRendererOption<GroupingField>[];
|
|
14
|
+
export declare const resolveListDropTargetColumnKey: (columnGrouping: GroupingField, placement?: {
|
|
15
|
+
columnKey?: string;
|
|
16
|
+
}) => string | undefined;
|
|
17
|
+
export declare const resolveKnownColumnKeys: (columnGrouping: GroupingField, knownColumnKeys: string[] | undefined, categories: DataRendererFilterCategory[], filters?: DataRendererFilterState) => string[] | undefined;
|
|
18
|
+
export declare const omitFilterCategory: (filters: DataRendererFilterState, category: FilterCategory) => DataRendererFilterState;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import { ResourceContextAction } from '../resource-context-menu';
|
|
3
|
-
import {
|
|
4
|
-
export interface
|
|
3
|
+
import { DataRendererCardBadge, DataRendererCardTagBadge } from './data-renderer-card';
|
|
4
|
+
export interface DataRendererListItem {
|
|
5
5
|
id: string;
|
|
6
6
|
ticketId: string;
|
|
7
7
|
title: string;
|
|
@@ -10,22 +10,22 @@ export interface TicketListItem {
|
|
|
10
10
|
size?: number | string;
|
|
11
11
|
}>;
|
|
12
12
|
statusColor?: string;
|
|
13
|
-
badges?:
|
|
14
|
-
tagBadges?:
|
|
13
|
+
badges?: DataRendererCardBadge[];
|
|
14
|
+
tagBadges?: DataRendererCardTagBadge[];
|
|
15
15
|
date?: string;
|
|
16
16
|
assigneeIcon?: ReactNode;
|
|
17
|
-
children?:
|
|
17
|
+
children?: DataRendererListItem[];
|
|
18
18
|
onClick?: () => void;
|
|
19
19
|
onTagChange?: (tagName: string, newValue: string) => void;
|
|
20
20
|
contextMenuActions?: ResourceContextAction[];
|
|
21
21
|
draggable?: boolean;
|
|
22
22
|
onDropTicket?: (ticketId: string) => void;
|
|
23
23
|
}
|
|
24
|
-
interface
|
|
25
|
-
items:
|
|
24
|
+
interface DataRendererListProps {
|
|
25
|
+
items: DataRendererListItem[];
|
|
26
26
|
selectedItemId?: string | null;
|
|
27
|
-
onItemClick?: (item:
|
|
27
|
+
onItemClick?: (item: DataRendererListItem) => void;
|
|
28
28
|
}
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
29
|
+
export declare const getDataRendererListIndentation: (depth: number) => string | undefined;
|
|
30
|
+
export declare const DataRendererList: (props: DataRendererListProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
export {};
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DataRendererBoardColumnAction } from './data-renderer-board';
|
|
3
|
+
import { DataRendererFilterCategory, DataRendererOption, DataRendererRow, DataRendererTagDefinition, DisplayProperty, GroupingField, OrderingField } from './types';
|
|
4
|
+
export interface BoardColumnConfig {
|
|
4
5
|
color?: string;
|
|
5
6
|
canDragIn?: boolean;
|
|
6
7
|
canDragOut?: boolean;
|
|
7
8
|
canCreate?: boolean;
|
|
8
|
-
actions?:
|
|
9
|
+
actions?: DataRendererBoardColumnAction[];
|
|
9
10
|
}
|
|
10
|
-
interface
|
|
11
|
+
interface DataRendererProps<TTicket extends DataRendererRow = DataRendererRow> {
|
|
11
12
|
tickets: TTicket[];
|
|
12
13
|
storageKey: string;
|
|
13
|
-
tagDefinitions?:
|
|
14
|
+
tagDefinitions?: DataRendererTagDefinition[];
|
|
14
15
|
selectedTicketId?: string | null;
|
|
15
|
-
groupingOptions?:
|
|
16
|
-
orderingOptions?:
|
|
17
|
-
displayPropertyOptions?:
|
|
18
|
-
filterCategories?:
|
|
16
|
+
groupingOptions?: DataRendererOption<GroupingField>[];
|
|
17
|
+
orderingOptions?: DataRendererOption<OrderingField>[];
|
|
18
|
+
displayPropertyOptions?: DataRendererOption<DisplayProperty>[];
|
|
19
|
+
filterCategories?: DataRendererFilterCategory[];
|
|
19
20
|
knownColumnKeys?: string[];
|
|
20
21
|
emptyTitle?: string;
|
|
21
22
|
emptyDescription?: string;
|
|
22
23
|
hideToolbar?: boolean;
|
|
24
|
+
toolbarLeading?: ReactNode;
|
|
23
25
|
onTicketClick?: (ticket: TTicket) => void;
|
|
24
26
|
onTagChange?: (ticketId: string, tagName: string, newValue: string) => void;
|
|
25
27
|
onMoveTicket?: (ticketId: string, targetColumnId: string, context?: {
|
|
@@ -34,5 +36,5 @@ interface TicketsWorkspaceProps<TTicket extends WorkspaceTicket = WorkspaceTicke
|
|
|
34
36
|
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
35
37
|
getBoardColumnConfig?: (groupKey: string) => BoardColumnConfig;
|
|
36
38
|
}
|
|
37
|
-
export declare const
|
|
38
|
-
export type {
|
|
39
|
+
export declare const DataRenderer: <TTicket extends DataRendererRow>(props: DataRendererProps<TTicket>) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export type { DataRendererProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataRendererOption, DataRendererSettings, DisplayProperty, GroupingField, OrderingField } from './types';
|
|
2
2
|
interface DisplayMenuProps {
|
|
3
|
-
settings:
|
|
4
|
-
groupingOptions:
|
|
5
|
-
orderingOptions:
|
|
6
|
-
displayPropertyOptions:
|
|
7
|
-
onViewModeChange: (value:
|
|
3
|
+
settings: DataRendererSettings;
|
|
4
|
+
groupingOptions: DataRendererOption<GroupingField>[];
|
|
5
|
+
orderingOptions: DataRendererOption<OrderingField>[];
|
|
6
|
+
displayPropertyOptions: DataRendererOption<DisplayProperty>[];
|
|
7
|
+
onViewModeChange: (value: DataRendererSettings["viewMode"]) => void;
|
|
8
8
|
onColumnGroupingChange: (value: GroupingField) => void;
|
|
9
9
|
onRowGroupingChange: (value: GroupingField) => void;
|
|
10
10
|
onOrderingFieldChange: (value: OrderingField) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DataRendererFilterCategory, DataRendererFilterState } from './types';
|
|
2
|
+
interface FilterMenuProps {
|
|
3
|
+
categories: DataRendererFilterCategory[];
|
|
4
|
+
filters: DataRendererFilterState;
|
|
5
|
+
countsByCategory: Record<string, Record<string, number>>;
|
|
6
|
+
onToggleFilterValue: (category: DataRendererFilterCategory["id"], value: string) => void;
|
|
7
|
+
onClearFilter: (category: DataRendererFilterCategory["id"]) => void;
|
|
8
|
+
onClearAll: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const FilterMenu: (props: FilterMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataRendererTagOption } from './types';
|
|
2
2
|
interface TagBadgeProps {
|
|
3
3
|
value: string | null;
|
|
4
4
|
label?: string;
|
|
5
5
|
color?: string;
|
|
6
|
-
options:
|
|
6
|
+
options: DataRendererTagOption[];
|
|
7
7
|
onValueChange?: (newValue: string) => void;
|
|
8
8
|
}
|
|
9
9
|
export declare const TagBadge: (props: TagBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,61 +4,61 @@ export type OrderingField = "manual" | "updated" | "title" | "ticketId" | `tag:$
|
|
|
4
4
|
export type SortDirection = "asc" | "desc";
|
|
5
5
|
export type DisplayProperty = "id" | "status" | "assignee" | "updated" | `tag:${string}`;
|
|
6
6
|
export type FilterCategory = "status" | "assignee" | `tag:${string}`;
|
|
7
|
-
export interface
|
|
7
|
+
export interface DataRendererOrdering {
|
|
8
8
|
field: OrderingField;
|
|
9
9
|
direction: SortDirection;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface DataRendererSettings {
|
|
12
12
|
viewMode: ViewMode;
|
|
13
13
|
columnGrouping: GroupingField;
|
|
14
14
|
rowGrouping: GroupingField;
|
|
15
|
-
ordering:
|
|
15
|
+
ordering: DataRendererOrdering;
|
|
16
16
|
displayProperties: DisplayProperty[];
|
|
17
17
|
}
|
|
18
|
-
export type
|
|
19
|
-
export interface
|
|
18
|
+
export type DataRendererFilterState = Partial<Record<FilterCategory, string[]>>;
|
|
19
|
+
export interface DataRendererOption<TValue extends string> {
|
|
20
20
|
value: TValue;
|
|
21
21
|
label: string;
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
23
|
+
export interface DataRendererFilterOption {
|
|
24
24
|
value: string;
|
|
25
25
|
label: string;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface DataRendererFilterCategory {
|
|
28
28
|
id: FilterCategory;
|
|
29
29
|
label: string;
|
|
30
|
-
options:
|
|
30
|
+
options: DataRendererFilterOption[];
|
|
31
31
|
}
|
|
32
|
-
export interface
|
|
32
|
+
export interface DataRendererTagOption {
|
|
33
33
|
value: string;
|
|
34
34
|
label: string;
|
|
35
35
|
color?: string;
|
|
36
36
|
icon?: string | null;
|
|
37
37
|
}
|
|
38
|
-
export interface
|
|
38
|
+
export interface DataRendererTagDefinition {
|
|
39
39
|
name: string;
|
|
40
40
|
label: string;
|
|
41
|
-
options:
|
|
41
|
+
options: DataRendererTagOption[];
|
|
42
42
|
}
|
|
43
|
-
export interface
|
|
43
|
+
export interface DataRendererTag {
|
|
44
44
|
name: string;
|
|
45
45
|
value: string;
|
|
46
46
|
}
|
|
47
|
-
export interface
|
|
47
|
+
export interface DataRendererRow {
|
|
48
48
|
id: string;
|
|
49
49
|
ticketId: string;
|
|
50
50
|
title: string;
|
|
51
51
|
status?: string | null;
|
|
52
52
|
statusColor?: string;
|
|
53
53
|
assignee?: string | null;
|
|
54
|
-
tags?:
|
|
54
|
+
tags?: DataRendererTag[];
|
|
55
55
|
updatedAt?: string | null;
|
|
56
56
|
parentPath?: string[];
|
|
57
57
|
isSubIssue?: boolean;
|
|
58
58
|
}
|
|
59
|
-
export declare const
|
|
60
|
-
export declare const DEFAULT_GROUPING_OPTIONS:
|
|
61
|
-
export declare const DEFAULT_ORDERING_OPTIONS:
|
|
62
|
-
export declare const DEFAULT_DISPLAY_PROPERTY_OPTIONS:
|
|
59
|
+
export declare const DEFAULT_DATA_RENDERER_SETTINGS: DataRendererSettings;
|
|
60
|
+
export declare const DEFAULT_GROUPING_OPTIONS: DataRendererOption<GroupingField>[];
|
|
61
|
+
export declare const DEFAULT_ORDERING_OPTIONS: DataRendererOption<OrderingField>[];
|
|
62
|
+
export declare const DEFAULT_DISPLAY_PROPERTY_OPTIONS: DataRendererOption<DisplayProperty>[];
|
|
63
63
|
export declare const isTagKey: (key: string) => key is `tag:${string}`;
|
|
64
64
|
export declare const toTagName: (key: `tag:${string}`) => string;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DataRendererFilterState, DataRendererSettings, DisplayProperty, FilterCategory } from './types';
|
|
2
|
+
interface DataRendererSnapshot {
|
|
3
|
+
settings: DataRendererSettings;
|
|
4
|
+
filters: DataRendererFilterState;
|
|
5
|
+
}
|
|
6
|
+
interface DataRendererState extends DataRendererSnapshot {
|
|
7
|
+
setViewMode: (viewMode: DataRendererSettings["viewMode"]) => void;
|
|
8
|
+
setColumnGrouping: (columnGrouping: DataRendererSettings["columnGrouping"]) => void;
|
|
9
|
+
setRowGrouping: (rowGrouping: DataRendererSettings["rowGrouping"]) => void;
|
|
10
|
+
setOrdering: (ordering: DataRendererSettings["ordering"]) => void;
|
|
11
|
+
setOrderingField: (field: DataRendererSettings["ordering"]["field"]) => void;
|
|
12
|
+
setDisplayProperties: (displayProperties: DisplayProperty[]) => void;
|
|
13
|
+
toggleSortDirection: () => void;
|
|
14
|
+
toggleDisplayProperty: (property: DataRendererSettings["displayProperties"][number]) => void;
|
|
15
|
+
setFilter: (category: FilterCategory, values: string[]) => void;
|
|
16
|
+
toggleFilterValue: (category: FilterCategory, value: string) => void;
|
|
17
|
+
clearFilter: (category: FilterCategory) => void;
|
|
18
|
+
clearAllFilters: () => void;
|
|
19
|
+
reset: () => void;
|
|
20
|
+
}
|
|
21
|
+
interface CreateDataRendererStoreOptions {
|
|
22
|
+
storageKey: string;
|
|
23
|
+
initialState?: Partial<DataRendererSnapshot>;
|
|
24
|
+
}
|
|
25
|
+
export declare const createDataRendererStore: (options: CreateDataRendererStoreOptions) => Omit<import('zustand').StoreApi<DataRendererState>, "setState" | "persist"> & {
|
|
26
|
+
setState(partial: DataRendererState | Partial<DataRendererState> | ((state: DataRendererState) => DataRendererState | Partial<DataRendererState>), replace?: false | undefined): unknown;
|
|
27
|
+
setState(state: DataRendererState | ((state: DataRendererState) => DataRendererState), replace: true): unknown;
|
|
28
|
+
persist: {
|
|
29
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<DataRendererState, unknown, unknown>>) => void;
|
|
30
|
+
clearStorage: () => void;
|
|
31
|
+
rehydrate: () => Promise<void> | void;
|
|
32
|
+
hasHydrated: () => boolean;
|
|
33
|
+
onHydrate: (fn: (state: DataRendererState) => void) => () => void;
|
|
34
|
+
onFinishHydration: (fn: (state: DataRendererState) => void) => () => void;
|
|
35
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<DataRendererState, unknown, unknown>>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export declare const getDataRendererStore: (storageKey: string) => Omit<import('zustand').StoreApi<DataRendererState>, "setState" | "persist"> & {
|
|
39
|
+
setState(partial: DataRendererState | Partial<DataRendererState> | ((state: DataRendererState) => DataRendererState | Partial<DataRendererState>), replace?: false | undefined): unknown;
|
|
40
|
+
setState(state: DataRendererState | ((state: DataRendererState) => DataRendererState), replace: true): unknown;
|
|
41
|
+
persist: {
|
|
42
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<DataRendererState, unknown, unknown>>) => void;
|
|
43
|
+
clearStorage: () => void;
|
|
44
|
+
rehydrate: () => Promise<void> | void;
|
|
45
|
+
hasHydrated: () => boolean;
|
|
46
|
+
onHydrate: (fn: (state: DataRendererState) => void) => () => void;
|
|
47
|
+
onFinishHydration: (fn: (state: DataRendererState) => void) => () => void;
|
|
48
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<DataRendererState, unknown, unknown>>;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export declare const useDataRendererStore: <T>(storageKey: string, selector: (state: DataRendererState) => T) => T;
|
|
52
|
+
export type { DataRendererState };
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,18 @@ export type { CheckboxProps } from './components/checkbox';
|
|
|
12
12
|
export { Checkbox } from './components/checkbox';
|
|
13
13
|
export { CodeDiffEditor, CodeEditor } from './components/code-editor';
|
|
14
14
|
export { ContentPlaceholder, Label as ContentPlaceholderLabel, } from './components/content-placeholder';
|
|
15
|
+
export type { BoardColumnConfig, DataRendererProps } from './components/data-renderer/data-renderer';
|
|
16
|
+
export { DataRenderer } from './components/data-renderer/data-renderer';
|
|
17
|
+
export type { DataRendererBoardColumn, DataRendererBoardColumnAction, DataRendererBoardItem, } from './components/data-renderer/data-renderer-board';
|
|
18
|
+
export { DataRendererBoard } from './components/data-renderer/data-renderer-board';
|
|
19
|
+
export type { DataRendererCardBadge, DataRendererCardTagBadge } from './components/data-renderer/data-renderer-card';
|
|
20
|
+
export { DataRendererCard } from './components/data-renderer/data-renderer-card';
|
|
21
|
+
export type { DataRendererListItem } from './components/data-renderer/data-renderer-list';
|
|
22
|
+
export { DataRendererList } from './components/data-renderer/data-renderer-list';
|
|
23
|
+
export { DisplayMenu } from './components/data-renderer/display-menu';
|
|
24
|
+
export { FilterMenu } from './components/data-renderer/filter-menu';
|
|
25
|
+
export type { DataRendererFilterCategory, DataRendererFilterOption, DataRendererFilterState, DataRendererOption, DataRendererOrdering, DataRendererRow, DataRendererSettings, DataRendererTag, DataRendererTagDefinition, DataRendererTagOption, DisplayProperty, FilterCategory, GroupingField, OrderingField, SortDirection, ViewMode, } from './components/data-renderer/types';
|
|
26
|
+
export { useDataRendererStore } from './components/data-renderer/use-data-renderer-store';
|
|
15
27
|
export { DeleteConfirmationModal } from './components/delete-confirmation-modal';
|
|
16
28
|
export type { ChangedFilesViewMode, Diff, DiffViewerProps, DiffViewMode, FileIconInfo } from './components/diff-viewer';
|
|
17
29
|
export { DiffDrawer, DiffViewer, useDiffViewerStore } from './components/diff-viewer';
|
|
@@ -57,17 +69,6 @@ export type { SimpleCardBodyProps, SimpleCardProps } from './components/simple-c
|
|
|
57
69
|
export { SimpleCard, SimpleCardBody } from './components/simple-card';
|
|
58
70
|
export type { SwitchProps } from './components/switch';
|
|
59
71
|
export { Switch } from './components/switch';
|
|
60
|
-
export { DisplayMenu } from './components/tickets/display-menu';
|
|
61
|
-
export { FilterMenu } from './components/tickets/filter-menu';
|
|
62
|
-
export type { TicketBoardColumn, TicketBoardColumnAction, TicketBoardItem, } from './components/tickets/ticket-board';
|
|
63
|
-
export { TicketBoard } from './components/tickets/ticket-board';
|
|
64
|
-
export type { TicketCardBadge, TicketCardTagBadge } from './components/tickets/ticket-card';
|
|
65
|
-
export { TicketCard } from './components/tickets/ticket-card';
|
|
66
|
-
export type { TicketListItem } from './components/tickets/ticket-list';
|
|
67
|
-
export { TicketList } from './components/tickets/ticket-list';
|
|
68
|
-
export { TicketsWorkspace } from './components/tickets/tickets-workspace';
|
|
69
|
-
export type { DisplayProperty, FilterCategory, FilterState, GroupingField, OrderingField, SortDirection, ViewMode, WorkspaceFilterCategory, WorkspaceFilterOption, WorkspaceOption, WorkspaceOrdering, WorkspaceSettings, WorkspaceTag, WorkspaceTagDefinition, WorkspaceTagOption, WorkspaceTicket, } from './components/tickets/types';
|
|
70
|
-
export { useTicketsWorkspaceStore } from './components/tickets/use-workspace-store';
|
|
71
72
|
export { Toaster, toaster } from './components/toaster';
|
|
72
73
|
export { Tooltip } from './components/tooltip';
|
|
73
74
|
export { TreeList } from './components/tree-list/tree-list';
|