@pstdio/ui 0.40.0 → 0.42.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/{MermaidComponent-81jr28u4.js → MermaidComponent-D7vhkpka.js} +3 -3
- package/dist/{MermaidComponent-81jr28u4.js.map → MermaidComponent-D7vhkpka.js.map} +1 -1
- package/dist/alert-MQ47wy7f.js +388 -0
- package/dist/alert-MQ47wy7f.js.map +1 -0
- package/dist/chat-ui.d.ts +129 -23
- package/dist/chat-ui.js +2596 -1591
- package/dist/chat-ui.js.map +1 -1
- package/dist/{types-DWA3enV6.d.ts → collection-view-fields-D3cysHNT.d.ts} +87 -37
- package/dist/collection-view-grouping-D4nZk8-3.js +90 -0
- package/dist/collection-view-grouping-D4nZk8-3.js.map +1 -0
- package/dist/collection-view-search-CpjJy76w.js +1973 -0
- package/dist/collection-view-search-CpjJy76w.js.map +1 -0
- package/dist/collection-view.d.ts +4 -0
- package/dist/collection-view.js +2 -0
- package/dist/{data-table-stats-row-CpRe_xK2.js → data-table-stats-row-64magT2g.js} +2 -2
- package/dist/{data-table-stats-row-CpRe_xK2.js.map → data-table-stats-row-64magT2g.js.map} +1 -1
- package/dist/data-table.d.ts +29 -7
- package/dist/data-table.js +1043 -878
- package/dist/data-table.js.map +1 -1
- package/dist/diff-bubble-DewUd_2w.js +61 -0
- package/dist/diff-bubble-DewUd_2w.js.map +1 -0
- package/dist/{diff-drawer-45rpk3aq.js → diff-drawer-IYpQ-QQK.js} +264 -242
- package/dist/diff-drawer-IYpQ-QQK.js.map +1 -0
- package/dist/diff-viewer-C-0VAt9P.js +574 -0
- package/dist/diff-viewer-C-0VAt9P.js.map +1 -0
- package/dist/diff.d.ts +11 -0
- package/dist/diff.js +107 -98
- package/dist/diff.js.map +1 -1
- package/dist/display-sort-control-f3rbILsV.js +588 -0
- package/dist/display-sort-control-f3rbILsV.js.map +1 -0
- package/dist/drop-indicator-HjlBSIeV.js +27 -0
- package/dist/drop-indicator-HjlBSIeV.js.map +1 -0
- package/dist/edit-mode-data-table-DnMB2jiy.js +1449 -0
- package/dist/edit-mode-data-table-DnMB2jiy.js.map +1 -0
- package/dist/host-storage-BIo5azql.js +31 -0
- package/dist/host-storage-BIo5azql.js.map +1 -0
- package/dist/host-storage-J0089Hyk.d.ts +17 -0
- package/dist/{slider-hwHYe98I.js → icon-options-Tt6Wzhtv.js} +86 -201
- package/dist/icon-options-Tt6Wzhtv.js.map +1 -0
- package/dist/{index-Bfddrlz8.d.ts → index-B79hwNcB.d.ts} +66 -14
- package/dist/index-CKsd23jv.d.ts +80 -0
- package/dist/{index-CbtbcvKm.d.ts → index-DlmvvQ6x.d.ts} +1 -1
- package/dist/index-ICoad2I_.d.ts +282 -0
- package/dist/index.d.ts +63 -22
- package/dist/index.js +1149 -1054
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer.d.ts +3 -326
- package/dist/kanban-renderer.js +980 -596
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/list-row-Z4SHkseA.js +1195 -0
- package/dist/list-row-Z4SHkseA.js.map +1 -0
- package/dist/markdown-editor-Dd4mor7l.js +3236 -0
- package/dist/markdown-editor-Dd4mor7l.js.map +1 -0
- package/dist/{mermaid-renderer-DImi0fDp.js → mermaid-renderer-0PmNkOXI.js} +29 -29
- package/dist/mermaid-renderer-0PmNkOXI.js.map +1 -0
- package/dist/mermaid.js +1 -1
- package/dist/number-input-7K66wnSC.js +63 -0
- package/dist/number-input-7K66wnSC.js.map +1 -0
- package/dist/{param-editor-BQd4AOUP.js → param-editor-Dnix-fJo.js} +2 -2
- package/dist/{param-editor-BQd4AOUP.js.map → param-editor-Dnix-fJo.js.map} +1 -1
- package/dist/{param-editor-field-BJ_rLUnV.js → param-editor-field-B3vLST-B.js} +1436 -1427
- package/dist/param-editor-field-B3vLST-B.js.map +1 -0
- package/dist/param-editor.js +4 -3
- package/dist/prism-OG4H7Hu4.js +334 -0
- package/dist/prism-OG4H7Hu4.js.map +1 -0
- package/dist/queued-follow-up-Bj_vtMgd.js +208 -0
- package/dist/queued-follow-up-Bj_vtMgd.js.map +1 -0
- package/dist/{resource-badge-95WPVlZf.d.ts → resource-badge-nOWPqxFU.d.ts} +1 -0
- package/dist/rich-text-BgEnAHr2.js +1160 -0
- package/dist/rich-text-BgEnAHr2.js.map +1 -0
- package/dist/rich-text.d.ts +2 -2
- package/dist/rich-text.js +4 -2
- package/dist/style.css +1 -1
- package/dist/terminal.d.ts +5 -63
- package/dist/terminal.js +102 -122
- package/dist/terminal.js.map +1 -1
- package/dist/{theme-CbmSEbRF.js → theme-CMJdH59Z.js} +589 -265
- package/dist/theme-CMJdH59Z.js.map +1 -0
- package/dist/theme-kKuLN2jb.js +80 -0
- package/dist/theme-kKuLN2jb.js.map +1 -0
- package/dist/theme-preference-BV4cbJNB.js +115 -0
- package/dist/theme-preference-BV4cbJNB.js.map +1 -0
- package/dist/theme.js +3 -2
- package/dist/tree-list-jarhD31R.js +1652 -0
- package/dist/tree-list-jarhD31R.js.map +1 -0
- package/dist/use-virtualizer-uj43XjBp.js +10 -0
- package/dist/use-virtualizer-uj43XjBp.js.map +1 -0
- package/dist/{workspace-badge-Brm3Xr3m.d.ts → workspace-badge-BKtB805G.d.ts} +5 -1
- package/package.json +8 -4
- package/dist/diff-bubble-DZsarmSG.js +0 -61
- package/dist/diff-bubble-DZsarmSG.js.map +0 -1
- package/dist/diff-drawer-45rpk3aq.js.map +0 -1
- package/dist/diff-viewer-BP_mI6Wx.js +0 -558
- package/dist/diff-viewer-BP_mI6Wx.js.map +0 -1
- package/dist/list-row-uqD-q4gv.js +0 -1018
- package/dist/list-row-uqD-q4gv.js.map +0 -1
- package/dist/mermaid-renderer-DImi0fDp.js.map +0 -1
- package/dist/param-editor-field-BJ_rLUnV.js.map +0 -1
- package/dist/prism-BStPsJSB.js +0 -658
- package/dist/prism-BStPsJSB.js.map +0 -1
- package/dist/rich-text-VYAmEigU.js +0 -6979
- package/dist/rich-text-VYAmEigU.js.map +0 -1
- package/dist/slider-hwHYe98I.js.map +0 -1
- package/dist/theme-CbmSEbRF.js.map +0 -1
- package/dist/theme-preference-pzfuK5cH.js +0 -101
- package/dist/theme-preference-pzfuK5cH.js.map +0 -1
- package/dist/tree-list-BNZwjQZA.js +0 -1616
- package/dist/tree-list-BNZwjQZA.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as ActivityActor } from "./index-
|
|
1
|
+
import { f as ActivityActor } from "./index-DlmvvQ6x.js";
|
|
2
2
|
import { StackProps } from "@chakra-ui/react";
|
|
3
3
|
import { ReactElement, ReactNode } from "react";
|
|
4
4
|
//#region src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.d.ts
|
|
@@ -47,21 +47,40 @@ declare function MarkdownEditor(props: MarkdownEditorProps): import("react/jsx-r
|
|
|
47
47
|
//#region src/components/rich-text/lazy-markdown-editor.d.ts
|
|
48
48
|
declare const LazyMarkdownEditor: (props: MarkdownEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
49
49
|
//#endregion
|
|
50
|
+
//#region src/components/rich-text/prompt-input/plugins/command-menu-plugin.d.ts
|
|
51
|
+
interface PromptCommand {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
argumentHelp?: string;
|
|
55
|
+
disabledReason?: string;
|
|
56
|
+
/** Select local draft intent without inserting native command text. */
|
|
57
|
+
onSelect?: () => void;
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
50
60
|
//#region src/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.d.ts
|
|
51
61
|
interface PromptEditorRef {
|
|
52
62
|
setEditorValue: (value: string) => void;
|
|
53
63
|
}
|
|
54
64
|
//#endregion
|
|
65
|
+
//#region src/components/rich-text/prompt-input/plugins/preserve-selection-plugin.d.ts
|
|
66
|
+
interface PromptSelectionSnapshot {
|
|
67
|
+
anchor: {
|
|
68
|
+
path: number[];
|
|
69
|
+
offset: number;
|
|
70
|
+
type: "text" | "element";
|
|
71
|
+
};
|
|
72
|
+
focus: {
|
|
73
|
+
path: number[];
|
|
74
|
+
offset: number;
|
|
75
|
+
type: "text" | "element";
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
55
79
|
//#region src/components/rich-text/prompt-input/prompt-input.d.ts
|
|
56
|
-
type ReferenceResourceType = "table" | "connector" | "file";
|
|
57
|
-
type ReferenceItem = {
|
|
58
|
-
resourceId: string;
|
|
59
|
-
resourceType: ReferenceResourceType;
|
|
60
|
-
name: string;
|
|
61
|
-
description?: string;
|
|
62
|
-
};
|
|
63
80
|
interface PromptEditorProps {
|
|
64
81
|
defaultState: string;
|
|
82
|
+
initialSelection?: PromptSelectionSnapshot;
|
|
83
|
+
onSelectionChange?: (selection: PromptSelectionSnapshot) => void;
|
|
65
84
|
debug?: boolean;
|
|
66
85
|
isEditable?: boolean;
|
|
67
86
|
placeholder?: ReactElement | ((isEditable: boolean) => ReactElement | null);
|
|
@@ -70,10 +89,8 @@ interface PromptEditorProps {
|
|
|
70
89
|
onSubmit?: () => void;
|
|
71
90
|
onRecallPrevious?: () => boolean;
|
|
72
91
|
onRecallNext?: () => boolean;
|
|
73
|
-
/**
|
|
74
|
-
|
|
75
|
-
/** Optional app callback when a reference is inserted */
|
|
76
|
-
onAddReference?: (resourceId: string, resourceType: ReferenceResourceType) => void;
|
|
92
|
+
/** Native command suggestions shown in the slash popover. Selection inserts plain text. */
|
|
93
|
+
commands?: PromptCommand[];
|
|
77
94
|
}
|
|
78
95
|
declare const PromptEditor: import("react").ForwardRefExoticComponent<PromptEditorProps & import("react").RefAttributes<PromptEditorRef>>;
|
|
79
96
|
//#endregion
|
|
@@ -137,8 +154,43 @@ interface ResourceActivityFeedProps extends Omit<StackProps, "children"> {
|
|
|
137
154
|
}
|
|
138
155
|
declare const ResourceActivityFeed: (props: ResourceActivityFeedProps) => import("react/jsx-runtime").JSX.Element;
|
|
139
156
|
//#endregion
|
|
157
|
+
//#region src/components/chat-ui/links/chat-link.d.ts
|
|
158
|
+
interface ChatLinkCandidate {
|
|
159
|
+
source: string;
|
|
160
|
+
origin: "markdown" | "inline-code" | "reference" | "tool";
|
|
161
|
+
}
|
|
162
|
+
interface ChatLinkHandler {
|
|
163
|
+
resolveHref(candidate: ChatLinkCandidate): string | null;
|
|
164
|
+
resolveImageSource?(source: string): Promise<string | null>;
|
|
165
|
+
describe?(candidate: ChatLinkCandidate): string;
|
|
166
|
+
open(candidate: ChatLinkCandidate): void | Promise<void>;
|
|
167
|
+
}
|
|
168
|
+
interface ChatLinkProps {
|
|
169
|
+
linkHandler?: ChatLinkHandler;
|
|
170
|
+
}
|
|
171
|
+
interface ChatSourcePosition {
|
|
172
|
+
line: number;
|
|
173
|
+
column?: number;
|
|
174
|
+
endLine?: number;
|
|
175
|
+
}
|
|
176
|
+
type ParsedChatLink = {
|
|
177
|
+
kind: "file";
|
|
178
|
+
path: string;
|
|
179
|
+
position?: ChatSourcePosition;
|
|
180
|
+
} | {
|
|
181
|
+
kind: "page";
|
|
182
|
+
href: string;
|
|
183
|
+
} | {
|
|
184
|
+
kind: "external";
|
|
185
|
+
href: string;
|
|
186
|
+
} | {
|
|
187
|
+
kind: "invalid";
|
|
188
|
+
reason: string;
|
|
189
|
+
};
|
|
190
|
+
declare const parseChatLink: (candidate: ChatLinkCandidate, dashboardOrigin?: string) => ParsedChatLink | undefined;
|
|
191
|
+
//#endregion
|
|
140
192
|
//#region src/components/rich-text/rich-message/rich-message.d.ts
|
|
141
|
-
interface RichMessageProps {
|
|
193
|
+
interface RichMessageProps extends ChatLinkProps {
|
|
142
194
|
debug?: boolean;
|
|
143
195
|
defaultState: string;
|
|
144
196
|
fullWidth?: boolean;
|
|
@@ -185,5 +237,5 @@ declare function inferResourceTypeFromMediaType(mediaType: string): "image" | "p
|
|
|
185
237
|
//#region src/components/rich-text/utils/mediaType.d.ts
|
|
186
238
|
declare function mediaTypeFromPath(path: string): string | null;
|
|
187
239
|
//#endregion
|
|
188
|
-
export {
|
|
240
|
+
export { PromptEditorRef as A, CollaborativeMarkdownEditorProps as B, ResourceActivityIconName as C, PromptEditor as D, getTextFromSerializedEditorState as E, MarkdownSectionAnchor as F, MarkdownSectionNavigation as I, MarkdownUrlKind as L, LazyMarkdownEditor as M, MarkdownEditor as N, PromptEditorProps as O, MarkdownEditorProps as P, MarkdownUrlResolver as R, ResourceActivityFeedSize as S, generateEditorStateFromString as T, ResourceActivityFeedAttention as _, DefaultRichTextCodeEditor as a, ResourceActivityFeedMessageItem as b, DataTableProps as c, ChatLinkCandidate as d, ChatLinkHandler as f, ResourceActivityFeedAction as g, ResourceActivityFeed as h, ResourceType as i, PromptCommand as j, PromptSelectionSnapshot as k, RichMessage as l, parseChatLink as m, inferResourceTypeFromMediaType as n, DefaultRichTextDataTable as o, ChatLinkProps as p, Resource as r, CodeEditorProps as s, mediaTypeFromPath as t, RichMessageProps as u, ResourceActivityFeedEventItem as v, ResourceActivityRelatedResource as w, ResourceActivityFeedProps as x, ResourceActivityFeedItem as y, CollaborativeMarkdownEditor as z };
|
|
189
241
|
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { A as CollectionSavedView, M as CollectionViewsSource, i as CollectionViewStoreInitialState, s as AttributeDescriptor, x as KanbanRendererRow } from "./collection-view-fields-D3cysHNT.js";
|
|
2
|
+
import { ReactNode, RefObject } from "react";
|
|
3
|
+
import { ViewFilterGroup, ViewFilterRule } from "@pstdio/sdk/extensions";
|
|
4
|
+
//#region src/components/collection-view/filter-rule-value.d.ts
|
|
5
|
+
interface RuleValueOption {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
count?: number;
|
|
9
|
+
icon?: string | null;
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/components/collection-view/collection-view-bar.d.ts
|
|
14
|
+
interface CollectionViewBarProps<TSettings> {
|
|
15
|
+
storageKey: string;
|
|
16
|
+
/** Singular resource label used as the subject of boolean predicates. */
|
|
17
|
+
itemLabel?: string;
|
|
18
|
+
initialState: CollectionViewStoreInitialState<TSettings>;
|
|
19
|
+
views: (CollectionSavedView<TSettings> & {
|
|
20
|
+
builtIn: boolean;
|
|
21
|
+
})[];
|
|
22
|
+
viewsSource?: CollectionViewsSource<TSettings>;
|
|
23
|
+
/** Every field of the view. Filter offers the filterable ones and Sort the sortable ones. */
|
|
24
|
+
fields: AttributeDescriptor[];
|
|
25
|
+
optionsFor: (field: AttributeDescriptor) => RuleValueOption[];
|
|
26
|
+
/** Search is screen state owned by the renderer. It is never saved. */
|
|
27
|
+
search: string;
|
|
28
|
+
onSearchChange: (value: string) => void;
|
|
29
|
+
searchResultLabel?: string;
|
|
30
|
+
leading?: ReactNode;
|
|
31
|
+
actions?: ReactNode;
|
|
32
|
+
displayControl: ReactNode;
|
|
33
|
+
align?: "split" | "end";
|
|
34
|
+
}
|
|
35
|
+
/** One view bar for data tables and both kanban displays: saved views, then Search, Filter, and Display. */
|
|
36
|
+
declare const CollectionViewBar: <TSettings>(props: CollectionViewBarProps<TSettings>) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/components/collection-view/collection-view-filter.d.ts
|
|
39
|
+
/** Rules that are incomplete or no longer fit a field are skipped, so they never hide rows. */
|
|
40
|
+
declare const filterRowsByView: <TRow extends KanbanRendererRow>(rows: TRow[], filter: ViewFilterGroup, fields: AttributeDescriptor[], today?: Date) => TRow[];
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/components/collection-view/collection-view-search.d.ts
|
|
43
|
+
/** Search only looks at the text a view shows, which the caller collects per row. */
|
|
44
|
+
declare const searchRows: <TRow>(rows: TRow[], query: string, textsOf: (row: TRow) => string[]) => TRow[];
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/components/collection-view/use-collection-views.d.ts
|
|
47
|
+
interface CollectionViewsInput<TSettings> {
|
|
48
|
+
storageKey: string;
|
|
49
|
+
fields?: AttributeDescriptor[];
|
|
50
|
+
initialState: CollectionViewStoreInitialState<TSettings>;
|
|
51
|
+
viewsSource?: CollectionViewsSource<TSettings>;
|
|
52
|
+
defaultViews?: CollectionSavedView<TSettings>[];
|
|
53
|
+
defaultActiveViewId?: string;
|
|
54
|
+
}
|
|
55
|
+
/** Picks the views a renderer offers and keeps the store on a view that still exists. */
|
|
56
|
+
declare const useCollectionViews: <TSettings>(input: CollectionViewsInput<TSettings>) => {
|
|
57
|
+
views: (CollectionSavedView<TSettings> & {
|
|
58
|
+
builtIn: boolean;
|
|
59
|
+
})[];
|
|
60
|
+
defaultId: string | undefined;
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/components/collection-view/view-bar-popover.d.ts
|
|
64
|
+
interface ViewBarPopoverProps {
|
|
65
|
+
open: boolean;
|
|
66
|
+
onOpenChange: (open: boolean) => void;
|
|
67
|
+
/** The button the menu opens from. Several buttons can open the same menu. */
|
|
68
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
69
|
+
width: string;
|
|
70
|
+
placement?: "bottom-start" | "bottom-end";
|
|
71
|
+
/** The quick picker draws its own panes edge to edge. */
|
|
72
|
+
padding?: "0" | "2xs";
|
|
73
|
+
testId?: string;
|
|
74
|
+
children: ReactNode;
|
|
75
|
+
}
|
|
76
|
+
/** The menu shell for Search, Filter, and Sort. Menus inside it render in place, so using them never closes it. */
|
|
77
|
+
declare const ViewBarPopover: (props: ViewBarPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
//#endregion
|
|
79
|
+
export { searchRows as a, CollectionViewBarProps as c, useCollectionViews as i, ViewBarPopoverProps as n, filterRowsByView as o, CollectionViewsInput as r, CollectionViewBar as s, ViewBarPopover as t };
|
|
80
|
+
export {};
|
|
@@ -40,7 +40,7 @@ interface ActivityEventProps extends Omit<TimelineItemProps, "title"> {
|
|
|
40
40
|
declare const ActivityEvent: (props: ActivityEventProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/theme/recipes/activity-comment.d.ts
|
|
43
|
-
declare const activityCommentSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"root" | "
|
|
43
|
+
declare const activityCommentSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"root" | "body" | "content", {
|
|
44
44
|
tone: {
|
|
45
45
|
default: {
|
|
46
46
|
root: {
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { C as KanbanRendererSettings, S as KanbanRendererSavedView, a as CollectionViewStoreState, b as KanbanRendererCreateSubmission, f as CollectionBadgeItem, m as EnumOption, s as AttributeDescriptor, u as AttributeType, w as KanbanRendererViewsSource, x as KanbanRendererRow, y as KanbanRendererCreateRowConfig } from "./collection-view-fields-D3cysHNT.js";
|
|
2
|
+
import { n as WorkspaceBadgeProps, u as ResourceContextAction } from "./workspace-badge-BKtB805G.js";
|
|
3
|
+
import { ComponentProps, ComponentType, DragEventHandler, ReactNode } from "react";
|
|
4
|
+
import { ViewFilterGroup, ViewSort } from "@pstdio/sdk/extensions";
|
|
5
|
+
//#region src/components/kanban-renderer/kanban-renderer-badge-helpers.d.ts
|
|
6
|
+
interface AttributeBadge {
|
|
7
|
+
attributeId: string;
|
|
8
|
+
attributeLabel?: string;
|
|
9
|
+
label: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
icon?: string | null;
|
|
12
|
+
value?: string | string[];
|
|
13
|
+
options?: EnumOption[];
|
|
14
|
+
isEditable?: boolean;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/components/kanban-renderer/kanban-renderer-enum-helpers.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Normalize an enum / enum-multi attribute's `options` to a plain option list.
|
|
20
|
+
* Sources resolve via `getSnapshot()` on every call, so callers naturally see
|
|
21
|
+
* the latest values.
|
|
22
|
+
*/
|
|
23
|
+
declare const getEnumOptions: (type: AttributeType) => EnumOption[];
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/components/kanban-renderer/kanban-renderer-helpers.d.ts
|
|
26
|
+
declare const renderBadgeListDisplay: (descriptor: AttributeDescriptor, value: unknown, row: KanbanRendererRow, openResource?: (resource: NonNullable<CollectionBadgeItem["resource"]>) => void) => ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Per-type default cell summary used by the card / list end-content. Returns
|
|
29
|
+
* null when the attribute has no displayable value.
|
|
30
|
+
*/
|
|
31
|
+
declare const renderAttributeBadge: (descriptor: AttributeDescriptor, row: KanbanRendererRow) => AttributeBadge | null;
|
|
32
|
+
declare const collectDisplayBadges: (row: KanbanRendererRow, attributes: AttributeDescriptor[], displayProperties: string[]) => AttributeBadge[];
|
|
33
|
+
interface FilterCategoryView {
|
|
34
|
+
id: string;
|
|
35
|
+
label: string;
|
|
36
|
+
selectionMode: "multiple";
|
|
37
|
+
options: {
|
|
38
|
+
value: string;
|
|
39
|
+
label: string;
|
|
40
|
+
color?: string;
|
|
41
|
+
icon?: string | null;
|
|
42
|
+
}[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Build the filter menu's category list from the declared attributes. Enum
|
|
46
|
+
* descriptors expose their declared options first; auto-derived values from
|
|
47
|
+
* the data fill in the gaps for string / date / number / user attributes (so
|
|
48
|
+
* filter chips for free-form fields don't require declaring every option).
|
|
49
|
+
*/
|
|
50
|
+
declare const buildFilterCategories: (attributes: AttributeDescriptor[], rows: KanbanRendererRow[]) => FilterCategoryView[];
|
|
51
|
+
interface MenuOption {
|
|
52
|
+
value: string;
|
|
53
|
+
label: string;
|
|
54
|
+
}
|
|
55
|
+
declare const buildGroupingOptions: (attributes: AttributeDescriptor[]) => MenuOption[];
|
|
56
|
+
declare const buildDisplayPropertyOptions: (attributes: AttributeDescriptor[]) => MenuOption[];
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/components/kanban-renderer/display-menu.d.ts
|
|
59
|
+
interface DisplayMenuProps {
|
|
60
|
+
settings: KanbanRendererSettings;
|
|
61
|
+
sortControl?: ReactNode;
|
|
62
|
+
groupingOptions: MenuOption[];
|
|
63
|
+
displayPropertyOptions: MenuOption[];
|
|
64
|
+
onViewModeChange: (value: KanbanRendererSettings["viewMode"]) => void;
|
|
65
|
+
onColumnGroupingChange: (value: string) => void;
|
|
66
|
+
onRowGroupingChange: (value: string) => void;
|
|
67
|
+
onDisplayPropertyToggle: (property: string) => void;
|
|
68
|
+
}
|
|
69
|
+
declare const DisplayMenu: (props: DisplayMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/components/kanban-renderer/kanban-renderer-action.d.ts
|
|
72
|
+
type KanbanActionErrorHandler = (error: unknown, action: string) => void;
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/components/kanban-renderer/kanban-renderer-card.d.ts
|
|
75
|
+
interface KanbanRendererCardProps$1 {
|
|
76
|
+
eyebrow?: string;
|
|
77
|
+
title: string;
|
|
78
|
+
/** Search text to mark in the title and eyebrow. */
|
|
79
|
+
highlight?: string;
|
|
80
|
+
badges?: AttributeBadge[];
|
|
81
|
+
customSlots?: ReactNode[];
|
|
82
|
+
workspaceBadge?: WorkspaceBadgeProps;
|
|
83
|
+
isSelected?: boolean;
|
|
84
|
+
draggable?: boolean;
|
|
85
|
+
onBadgeChange?: (attributeId: string, value: unknown) => void;
|
|
86
|
+
onDragStart?: DragEventHandler<HTMLDivElement>;
|
|
87
|
+
onDragEnd?: DragEventHandler<HTMLDivElement>;
|
|
88
|
+
onClick?: () => void;
|
|
89
|
+
}
|
|
90
|
+
declare const KanbanRendererCard: (props: KanbanRendererCardProps$1) => import("react/jsx-runtime").JSX.Element;
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/components/kanban-renderer/kanban-renderer-board.d.ts
|
|
93
|
+
type KanbanRendererCardProps = ComponentProps<typeof KanbanRendererCard>;
|
|
94
|
+
interface KanbanRendererBoardItem {
|
|
95
|
+
id: string;
|
|
96
|
+
cardProps: Omit<KanbanRendererCardProps, "draggable" | "onDragStart" | "onDragEnd" | "isSelected">;
|
|
97
|
+
contextMenuActions?: ResourceContextAction[];
|
|
98
|
+
}
|
|
99
|
+
interface KanbanRendererBoardColumnAction {
|
|
100
|
+
id: string;
|
|
101
|
+
label: string;
|
|
102
|
+
icon: ComponentType<{
|
|
103
|
+
size?: number | string;
|
|
104
|
+
}>;
|
|
105
|
+
}
|
|
106
|
+
interface KanbanRendererBoardGroup {
|
|
107
|
+
key: string;
|
|
108
|
+
label: string;
|
|
109
|
+
items: KanbanRendererBoardItem[];
|
|
110
|
+
}
|
|
111
|
+
interface KanbanRendererBoardColumn {
|
|
112
|
+
id: string;
|
|
113
|
+
label: string;
|
|
114
|
+
createLabel?: string;
|
|
115
|
+
color?: string;
|
|
116
|
+
icon?: string | null;
|
|
117
|
+
items: KanbanRendererBoardItem[];
|
|
118
|
+
groups?: KanbanRendererBoardGroup[];
|
|
119
|
+
/** Cards in the column before search narrowed it. Set only while a search is active. */
|
|
120
|
+
totalCount?: number;
|
|
121
|
+
canDragIn: boolean;
|
|
122
|
+
canDragOut: boolean;
|
|
123
|
+
canCreate: boolean;
|
|
124
|
+
actions: KanbanRendererBoardColumnAction[];
|
|
125
|
+
}
|
|
126
|
+
interface KanbanRendererBoardProps {
|
|
127
|
+
columns: KanbanRendererBoardColumn[];
|
|
128
|
+
selectedItemId?: string | null;
|
|
129
|
+
onMoveItem?: (itemId: string, targetColumnId: string, context?: {
|
|
130
|
+
beforeItemId?: string;
|
|
131
|
+
targetGroupKey?: string;
|
|
132
|
+
}) => Promise<void> | void;
|
|
133
|
+
onMoveToGroup?: (itemId: string, targetGroupKey: string, context?: {
|
|
134
|
+
beforeItemId?: string;
|
|
135
|
+
}) => Promise<void> | void;
|
|
136
|
+
onCreateStart?: (columnId: string) => void;
|
|
137
|
+
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
138
|
+
}
|
|
139
|
+
declare const KanbanRendererBoard: (props: KanbanRendererBoardProps) => import("react/jsx-runtime").JSX.Element;
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/components/kanban-renderer/kanban-renderer.d.ts
|
|
142
|
+
/** Board-column behavior and menu configuration for a resolved column group. */
|
|
143
|
+
interface BoardColumnConfig {
|
|
144
|
+
/** Chakra color palette used for the column header and group badges. */
|
|
145
|
+
color?: string;
|
|
146
|
+
canDragIn?: boolean;
|
|
147
|
+
canDragOut?: boolean;
|
|
148
|
+
canCreate?: boolean;
|
|
149
|
+
actions?: KanbanRendererBoardColumnAction[];
|
|
150
|
+
}
|
|
151
|
+
/** Switchable list/board renderer for rows with typed attributes, filtering, grouping, and ordering. */
|
|
152
|
+
interface KanbanRendererProps<TRow extends KanbanRendererRow = KanbanRendererRow> {
|
|
153
|
+
/** Stable rows to render. Each row must have an id, title, and attributes map. */
|
|
154
|
+
rows: TRow[];
|
|
155
|
+
/** Persistent key used by the renderer store for view, filter, grouping, ordering, and list expansion settings. */
|
|
156
|
+
storageKey: string;
|
|
157
|
+
itemLabel?: string;
|
|
158
|
+
/** Attribute descriptors that define display, filtering, grouping, ordering, and board columns. */
|
|
159
|
+
attributes: AttributeDescriptor[];
|
|
160
|
+
selectedRowId?: string | null;
|
|
161
|
+
emptyState?: ReactNode;
|
|
162
|
+
emptyTitle?: string;
|
|
163
|
+
emptyDescription?: string;
|
|
164
|
+
/** Replaces the data area while a query is unavailable, keeping its controls mounted. */
|
|
165
|
+
contentPlaceholder?: ReactNode;
|
|
166
|
+
defaultSettings?: Partial<KanbanRendererSettings>;
|
|
167
|
+
defaultFilter?: ViewFilterGroup;
|
|
168
|
+
defaultSorts?: ViewSort[];
|
|
169
|
+
viewsSource?: KanbanRendererViewsSource;
|
|
170
|
+
defaultViews?: KanbanRendererSavedView[];
|
|
171
|
+
defaultActiveViewId?: string;
|
|
172
|
+
hideToolbar?: boolean;
|
|
173
|
+
toolbarActions?: ReactNode;
|
|
174
|
+
toolbarLeading?: ReactNode;
|
|
175
|
+
onRowClick?: (row: TRow) => void;
|
|
176
|
+
/** Reports a failed badge edit or complete move once and consumes its rejection. */
|
|
177
|
+
onActionError?: KanbanActionErrorHandler;
|
|
178
|
+
/** Called when a row attribute changes through drag/drop, board movement, or inline controls. */
|
|
179
|
+
onAttributeChange?: (rowId: string, attributeId: string, value: unknown) => Promise<void> | void;
|
|
180
|
+
/** Called for manual row ordering when a dragged row is dropped before another row. Only used while the view has no sorts. */
|
|
181
|
+
onReorder?: (rowId: string, beforeRowId?: string) => Promise<void> | void;
|
|
182
|
+
createRow?: KanbanRendererCreateRowConfig;
|
|
183
|
+
onCreateRow?: (submission: KanbanRendererCreateSubmission) => Promise<void> | void;
|
|
184
|
+
onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
|
|
185
|
+
getBoardColumnConfig?: (groupKey: string) => BoardColumnConfig;
|
|
186
|
+
getRowContextMenuActions?: (row: TRow) => ResourceContextAction[];
|
|
187
|
+
}
|
|
188
|
+
declare const KanbanRenderer: <TRow extends KanbanRendererRow>(props: KanbanRendererProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/components/kanban-renderer/kanban-renderer-create-dialog.d.ts
|
|
191
|
+
interface KanbanRendererCreateDialogProps {
|
|
192
|
+
open: boolean;
|
|
193
|
+
columnId: string;
|
|
194
|
+
columnAttributeId?: string;
|
|
195
|
+
attributes: AttributeDescriptor[];
|
|
196
|
+
config: KanbanRendererCreateRowConfig;
|
|
197
|
+
onClose: () => void;
|
|
198
|
+
onSubmit: (submission: KanbanRendererCreateSubmission) => Promise<void> | void;
|
|
199
|
+
}
|
|
200
|
+
declare const KanbanRendererCreateDialog: (props: KanbanRendererCreateDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
201
|
+
//#endregion
|
|
202
|
+
//#region src/components/kanban-renderer/kanban-renderer-list.d.ts
|
|
203
|
+
interface KanbanRendererListItem {
|
|
204
|
+
id: string;
|
|
205
|
+
eyebrow?: string;
|
|
206
|
+
title: string;
|
|
207
|
+
/** Search text to mark in the title and eyebrow. */
|
|
208
|
+
highlight?: string;
|
|
209
|
+
isGroup?: boolean;
|
|
210
|
+
countBadge?: number;
|
|
211
|
+
countColorPalette?: string;
|
|
212
|
+
statusIcon?: ComponentType<{
|
|
213
|
+
size?: number | string;
|
|
214
|
+
}>;
|
|
215
|
+
statusColor?: string;
|
|
216
|
+
statusColorPalette?: string;
|
|
217
|
+
badges?: AttributeBadge[];
|
|
218
|
+
customSlots?: ReactNode[];
|
|
219
|
+
children?: KanbanRendererListItem[];
|
|
220
|
+
onClick?: () => void;
|
|
221
|
+
onBadgeChange?: (attributeId: string, value: unknown) => void;
|
|
222
|
+
contextMenuActions?: ResourceContextAction[];
|
|
223
|
+
draggable?: boolean;
|
|
224
|
+
onDropRow?: (rowId: string) => void;
|
|
225
|
+
}
|
|
226
|
+
type KanbanRendererListExpandedState = Record<string, boolean>;
|
|
227
|
+
interface KanbanRendererListProps {
|
|
228
|
+
items: KanbanRendererListItem[];
|
|
229
|
+
selectedItemId?: string | null;
|
|
230
|
+
expandedGroups?: KanbanRendererListExpandedState;
|
|
231
|
+
onItemClick?: (item: KanbanRendererListItem) => void;
|
|
232
|
+
onExpandedGroupChange?: (rowId: string, isExpanded: boolean) => void;
|
|
233
|
+
}
|
|
234
|
+
declare const KanbanRendererList: (props: KanbanRendererListProps) => import("react/jsx-runtime").JSX.Element;
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region src/components/kanban-renderer/kanban-renderer-toolbar.d.ts
|
|
237
|
+
interface KanbanRendererToolbarProps<TRow extends KanbanRendererRow = KanbanRendererRow> {
|
|
238
|
+
rows: TRow[];
|
|
239
|
+
storageKey: string;
|
|
240
|
+
itemLabel?: string;
|
|
241
|
+
attributes: AttributeDescriptor[];
|
|
242
|
+
defaultSettings?: Partial<KanbanRendererSettings>;
|
|
243
|
+
defaultFilter?: ViewFilterGroup;
|
|
244
|
+
defaultSorts?: ViewSort[];
|
|
245
|
+
viewsSource?: KanbanRendererViewsSource;
|
|
246
|
+
defaultViews?: KanbanRendererSavedView[];
|
|
247
|
+
defaultActiveViewId?: string;
|
|
248
|
+
search: string;
|
|
249
|
+
onSearchChange: (value: string) => void;
|
|
250
|
+
searchResultLabel?: string;
|
|
251
|
+
leading?: ReactNode;
|
|
252
|
+
actions?: ReactNode;
|
|
253
|
+
}
|
|
254
|
+
declare const KanbanRendererToolbar: <TRow extends KanbanRendererRow>(props: KanbanRendererToolbarProps<TRow>) => import("react/jsx-runtime").JSX.Element;
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region src/components/kanban-renderer/use-kanban-renderer-store.d.ts
|
|
257
|
+
type KanbanRendererState = CollectionViewStoreState<KanbanRendererSettings>;
|
|
258
|
+
interface KanbanRendererStoreInitialState {
|
|
259
|
+
settings?: Partial<KanbanRendererSettings>;
|
|
260
|
+
filter?: ViewFilterGroup;
|
|
261
|
+
sorts?: ViewSort[];
|
|
262
|
+
}
|
|
263
|
+
/** The unsaved view state of one board. Hosts read it to send the view to their query. */
|
|
264
|
+
declare const useKanbanRendererStore: <T>(storageKey: string, selector: (state: KanbanRendererState) => T, initialState?: KanbanRendererStoreInitialState) => T;
|
|
265
|
+
//#endregion
|
|
266
|
+
//#region src/components/kanban-renderer/use-resolved-attributes.d.ts
|
|
267
|
+
/**
|
|
268
|
+
* Returns the same descriptors with every source-backed enum's options
|
|
269
|
+
* replaced by a fresh `getSnapshot()` array. Pure — call from anywhere that
|
|
270
|
+
* needs a normalized view of the schema.
|
|
271
|
+
*/
|
|
272
|
+
declare const resolveAttributeOptions: (attributes: AttributeDescriptor[]) => AttributeDescriptor[];
|
|
273
|
+
/**
|
|
274
|
+
* Subscribes to every source-backed enum in `attributes` and returns the
|
|
275
|
+
* resolved descriptors (options materialized to plain arrays). When any
|
|
276
|
+
* source's listener fires the component rerenders, so downstream renders see
|
|
277
|
+
* the new snapshot automatically.
|
|
278
|
+
*/
|
|
279
|
+
declare const useResolvedAttributes: (attributes: AttributeDescriptor[]) => AttributeDescriptor[];
|
|
280
|
+
//#endregion
|
|
281
|
+
export { buildGroupingOptions as C, getEnumOptions as D, renderBadgeListDisplay as E, AttributeBadge as O, buildFilterCategories as S, renderAttributeBadge as T, KanbanRendererCardProps$1 as _, KanbanRendererToolbarProps as a, MenuOption as b, KanbanRendererCreateDialog as c, KanbanRendererProps as d, KanbanRendererBoard as f, KanbanRendererCard as g, KanbanRendererBoardItem as h, KanbanRendererToolbar as i, BoardColumnConfig as l, KanbanRendererBoardColumnAction as m, useResolvedAttributes as n, KanbanRendererList as o, KanbanRendererBoardColumn as p, useKanbanRendererStore as r, KanbanRendererListItem as s, resolveAttributeOptions as t, KanbanRenderer as u, DisplayMenu as v, collectDisplayBadges as w, buildDisplayPropertyOptions as x, FilterCategoryView as y };
|
|
282
|
+
export {};
|