@factorialco/f0-react 1.455.0 → 1.456.1
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/{F0AiChat-T4phx1M_.js → F0AiChat-Bs1EdwL1.js} +42535 -42223
- package/dist/ai.d.ts +107 -9
- package/dist/ai.js +2 -2
- package/dist/experimental.d.ts +327 -7
- package/dist/experimental.js +4 -4
- package/dist/f0.d.ts +110 -12
- package/dist/f0.js +6 -6
- package/dist/i18n-provider-defaults.d.ts +18 -5
- package/dist/i18n-provider-defaults.js +13 -0
- package/dist/{index-DAbukEpK.js → index-DnduMiUo.js} +1 -1
- package/dist/{types-BKqlP3gz.js → types-Cqm52idV.js} +1 -1
- package/package.json +1 -1
package/dist/ai.d.ts
CHANGED
|
@@ -152,6 +152,11 @@ export declare type AiChatProviderProps = {
|
|
|
152
152
|
* URL builders (navigation links) for each entity type.
|
|
153
153
|
*/
|
|
154
154
|
entityRefs?: EntityRefs;
|
|
155
|
+
/**
|
|
156
|
+
* Canvas action callbacks grouped by entity type.
|
|
157
|
+
* Provides save/create functions for persisting canvas entities externally.
|
|
158
|
+
*/
|
|
159
|
+
canvasActions?: CanvasActions;
|
|
155
160
|
/**
|
|
156
161
|
* Available tool hints that the user can activate to provide intent context
|
|
157
162
|
* to the AI. Renders a selector button next to the send button.
|
|
@@ -239,8 +244,14 @@ declare type AiChatProviderReturnValue = {
|
|
|
239
244
|
* Append messages to the current conversation.
|
|
240
245
|
* Useful for injecting pre-built assistant responses (e.g. dashboards)
|
|
241
246
|
* from outside the chat. IDs are generated internally.
|
|
247
|
+
*
|
|
248
|
+
* @param options.persist - Whether to persist messages to the backend thread.
|
|
249
|
+
* Defaults to `true`. Pass `false` for client-only display messages that
|
|
250
|
+
* should not create or modify a backend thread (e.g. seed messages).
|
|
242
251
|
*/
|
|
243
|
-
appendMessages: (messages: AppendMessage[]
|
|
252
|
+
appendMessages: (messages: AppendMessage[], options?: {
|
|
253
|
+
persist?: boolean;
|
|
254
|
+
}) => void;
|
|
244
255
|
/* Excluded from this release type: setAppendMessagesFunction */
|
|
245
256
|
/**
|
|
246
257
|
* Atomically clear the conversation and inject new messages.
|
|
@@ -306,7 +317,14 @@ declare type AiChatProviderReturnValue = {
|
|
|
306
317
|
*/
|
|
307
318
|
fileDragOver: boolean;
|
|
308
319
|
/* Excluded from this release type: setFileDragOver */
|
|
309
|
-
|
|
320
|
+
/**
|
|
321
|
+
* Pre-loaded context shown as an empty state in the chat.
|
|
322
|
+
* Prepended to the first user message as `<pending-context>`.
|
|
323
|
+
*/
|
|
324
|
+
pendingContext: PendingContext | null;
|
|
325
|
+
/** Set pending context (pass null to clear) */
|
|
326
|
+
setPendingContext: React.Dispatch<React.SetStateAction<PendingContext | null>>;
|
|
327
|
+
} & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "canvasActions" | "toolHints" | "credits" | "creditWarning" | "fileAttachments"> & {
|
|
310
328
|
/** The current canvas content, or null when canvas is closed */
|
|
311
329
|
canvasContent: CanvasContent | null;
|
|
312
330
|
/** Open the canvas panel with the given content */
|
|
@@ -336,6 +354,7 @@ declare interface AiChatState {
|
|
|
336
354
|
footer?: React.ReactNode;
|
|
337
355
|
VoiceMode?: React.ComponentType;
|
|
338
356
|
entityRefs?: EntityRefs;
|
|
357
|
+
canvasActions?: CanvasActions;
|
|
339
358
|
toolHints?: AiChatToolHint[];
|
|
340
359
|
credits?: AiChatCredits;
|
|
341
360
|
creditWarning?: AiChatCreditWarning;
|
|
@@ -498,6 +517,19 @@ export declare const aiTranslations: {
|
|
|
498
517
|
readonly formCard: {
|
|
499
518
|
readonly moreFields: "Open to see all fields";
|
|
500
519
|
};
|
|
520
|
+
readonly dashboard: {
|
|
521
|
+
readonly save: "Save";
|
|
522
|
+
readonly saveToAnalytics: "Save the dashboard in Analytics";
|
|
523
|
+
readonly saveAs: "Save as";
|
|
524
|
+
readonly saveDialog: {
|
|
525
|
+
readonly title: "Save dashboard";
|
|
526
|
+
readonly titleLabel: "Title";
|
|
527
|
+
readonly descriptionLabel: "Description";
|
|
528
|
+
readonly descriptionPlaceholder: "Add a description (optional)";
|
|
529
|
+
readonly save: "Save";
|
|
530
|
+
readonly cancel: "Cancel";
|
|
531
|
+
};
|
|
532
|
+
};
|
|
501
533
|
readonly dataDownload: {
|
|
502
534
|
readonly title: "Download";
|
|
503
535
|
readonly download: "Download {{format}}";
|
|
@@ -578,13 +610,26 @@ export declare type AppendMessage = {
|
|
|
578
610
|
role: "user" | "assistant";
|
|
579
611
|
content: string;
|
|
580
612
|
toolCalls?: AppendToolCall[];
|
|
613
|
+
} | {
|
|
614
|
+
/** Tool result message — pairs with a toolCall from a previous assistant message */
|
|
615
|
+
role: "tool";
|
|
616
|
+
content: string;
|
|
617
|
+
/**
|
|
618
|
+
* ID of the paired tool call. Must equal the corresponding assistant
|
|
619
|
+
* message's `toolCalls[i].id` — supply `AppendToolCall.id` on that call
|
|
620
|
+
* and pass the same value here so the messages are correctly paired.
|
|
621
|
+
*/
|
|
622
|
+
toolCallId: string;
|
|
581
623
|
};
|
|
582
624
|
|
|
583
625
|
/**
|
|
584
626
|
* A tool call to inject via appendMessages.
|
|
585
|
-
* IDs are generated internally
|
|
627
|
+
* IDs are generated internally unless `id` is provided.
|
|
628
|
+
* When pairing with a tool-result message, provide the same `id`
|
|
629
|
+
* in both the tool call and the tool-result's `toolCallId`.
|
|
586
630
|
*/
|
|
587
631
|
export declare type AppendToolCall = {
|
|
632
|
+
id?: string;
|
|
588
633
|
function: {
|
|
589
634
|
name: string;
|
|
590
635
|
arguments: string;
|
|
@@ -727,6 +772,15 @@ declare type CandidateProfile = {
|
|
|
727
772
|
source?: string;
|
|
728
773
|
};
|
|
729
774
|
|
|
775
|
+
/**
|
|
776
|
+
* Canvas-level action callbacks grouped by entity type.
|
|
777
|
+
* Each entity defines its own actions type; this aggregates them.
|
|
778
|
+
* Passed by the host app to F0AiChatProvider via `canvasActions`.
|
|
779
|
+
*/
|
|
780
|
+
export declare type CanvasActions = {
|
|
781
|
+
dashboard?: DashboardCanvasActions;
|
|
782
|
+
};
|
|
783
|
+
|
|
730
784
|
/**
|
|
731
785
|
* Discriminated union for canvas panel content.
|
|
732
786
|
* Add new entity types to this union as they are implemented.
|
|
@@ -1106,6 +1160,16 @@ export declare type CreditsUsage = {
|
|
|
1106
1160
|
*/
|
|
1107
1161
|
export declare type CSSRgbString = `rgb(${number}, ${number}, ${number})` | `rgb(${number},${number},${number})`;
|
|
1108
1162
|
|
|
1163
|
+
/**
|
|
1164
|
+
* Callbacks for persisting dashboards externally (beyond chat history).
|
|
1165
|
+
*/
|
|
1166
|
+
declare type DashboardCanvasActions = {
|
|
1167
|
+
/** Update an existing saved dashboard */
|
|
1168
|
+
save: (id: string, category: string, config: ChatDashboardConfig) => Promise<void>;
|
|
1169
|
+
/** Create a new saved dashboard. Returns the new dashboard ID if available. */
|
|
1170
|
+
create: (title: string, description: string, config: ChatDashboardConfig, category?: string) => Promise<string | void>;
|
|
1171
|
+
};
|
|
1172
|
+
|
|
1109
1173
|
/**
|
|
1110
1174
|
* Dashboard canvas content — renders an analytics dashboard.
|
|
1111
1175
|
*/
|
|
@@ -1116,6 +1180,14 @@ export declare type DashboardCanvasContent = CanvasContentBase & {
|
|
|
1116
1180
|
baseUrl: string;
|
|
1117
1181
|
headers: Record<string, string>;
|
|
1118
1182
|
};
|
|
1183
|
+
/** Present when the dashboard is a pre-saved dashboard */
|
|
1184
|
+
savedDashboardId?: string;
|
|
1185
|
+
/** Category of the saved dashboard */
|
|
1186
|
+
savedDashboardCategory?: string;
|
|
1187
|
+
/** Description of the saved dashboard */
|
|
1188
|
+
savedDashboardDescription?: string;
|
|
1189
|
+
/** True when the agent has iterated on a saved dashboard but the user hasn't saved yet */
|
|
1190
|
+
savedDashboardUnsaved?: boolean;
|
|
1119
1191
|
};
|
|
1120
1192
|
|
|
1121
1193
|
declare interface DashboardFetchSpec {
|
|
@@ -1620,6 +1692,19 @@ export declare const defaultTranslations: {
|
|
|
1620
1692
|
readonly formCard: {
|
|
1621
1693
|
readonly moreFields: "Open to see all fields";
|
|
1622
1694
|
};
|
|
1695
|
+
readonly dashboard: {
|
|
1696
|
+
readonly save: "Save";
|
|
1697
|
+
readonly saveToAnalytics: "Save the dashboard in Analytics";
|
|
1698
|
+
readonly saveAs: "Save as";
|
|
1699
|
+
readonly saveDialog: {
|
|
1700
|
+
readonly title: "Save dashboard";
|
|
1701
|
+
readonly titleLabel: "Title";
|
|
1702
|
+
readonly descriptionLabel: "Description";
|
|
1703
|
+
readonly descriptionPlaceholder: "Add a description (optional)";
|
|
1704
|
+
readonly save: "Save";
|
|
1705
|
+
readonly cancel: "Cancel";
|
|
1706
|
+
};
|
|
1707
|
+
};
|
|
1623
1708
|
readonly dataDownload: {
|
|
1624
1709
|
readonly title: "Download";
|
|
1625
1710
|
readonly download: "Download {{format}}";
|
|
@@ -2031,7 +2116,7 @@ export declare const F0AiChat: () => JSX_2.Element | null;
|
|
|
2031
2116
|
/**
|
|
2032
2117
|
* @experimental This is an experimental component use it at your own risk
|
|
2033
2118
|
*/
|
|
2034
|
-
export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, toolHints, credits, creditWarning, fileAttachments, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
|
|
2119
|
+
export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, canvasActions, toolHints, credits, creditWarning, fileAttachments, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
|
|
2035
2120
|
|
|
2036
2121
|
export declare const F0AiChatTextArea: ({ submitLabel, inProgress, onSend, onStop, creditWarning, }: ChatTextareaProps) => JSX_2.Element;
|
|
2037
2122
|
|
|
@@ -2808,6 +2893,19 @@ declare type PathsToStringProps<T> = T extends string ? [] : {
|
|
|
2808
2893
|
[K in Extract<keyof T, string>]: [K, ...PathsToStringProps<T[K]>];
|
|
2809
2894
|
}[Extract<keyof T, string>];
|
|
2810
2895
|
|
|
2896
|
+
/**
|
|
2897
|
+
* Pre-loaded context shown as an empty state in the chat.
|
|
2898
|
+
* The `context` string is prepended to the user's first message
|
|
2899
|
+
* as `<pending-context>...</pending-context>` so the agent receives it.
|
|
2900
|
+
* The conversation is not created until the user actually sends a message.
|
|
2901
|
+
*/
|
|
2902
|
+
declare type PendingContext = {
|
|
2903
|
+
/** Human-readable label shown in the empty state (e.g. "Expenses dashboard") */
|
|
2904
|
+
label: string;
|
|
2905
|
+
/** Full context string prepended invisibly to the first user message */
|
|
2906
|
+
context: string;
|
|
2907
|
+
};
|
|
2908
|
+
|
|
2811
2909
|
declare type PersonAvatarVariant = Extract<AvatarVariant, {
|
|
2812
2910
|
type: "person";
|
|
2813
2911
|
}>;
|
|
@@ -3111,6 +3209,11 @@ declare module "gridstack" {
|
|
|
3111
3209
|
}
|
|
3112
3210
|
|
|
3113
3211
|
|
|
3212
|
+
declare namespace Calendar {
|
|
3213
|
+
var displayName: string;
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3216
|
+
|
|
3114
3217
|
declare module "@tiptap/core" {
|
|
3115
3218
|
interface Commands<ReturnType> {
|
|
3116
3219
|
aiBlock: {
|
|
@@ -3158,8 +3261,3 @@ declare module "@tiptap/core" {
|
|
|
3158
3261
|
};
|
|
3159
3262
|
}
|
|
3160
3263
|
}
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
declare namespace Calendar {
|
|
3164
|
-
var displayName: string;
|
|
3165
|
-
}
|
package/dist/ai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as t, k as e, F as r, a as o, C as i, b as n, m as F, n as u, d as A, I as c, g as C, c as m, h, e as l, u as d, j as I, i as f, f as T } from "./F0AiChat-
|
|
1
|
+
import { l as t, k as e, F as r, a as o, C as i, b as n, m as F, n as u, d as A, I as c, g as C, c as m, h, e as l, u as d, j as I, i as f, f as T } from "./F0AiChat-Bs1EdwL1.js";
|
|
2
2
|
import { defaultTranslations as S } from "./i18n-provider-defaults.js";
|
|
3
|
-
import { A as v, e as x, F as P, c as V, d as k, b as O, a as b, f as y, o as M, u as j } from "./types-
|
|
3
|
+
import { A as v, e as x, F as P, c as V, d as k, b as O, a as b, f as y, o as M, u as j } from "./types-Cqm52idV.js";
|
|
4
4
|
export {
|
|
5
5
|
v as AiChatTranslationsProvider,
|
|
6
6
|
t as ChatSpinner,
|
package/dist/experimental.d.ts
CHANGED
|
@@ -384,6 +384,8 @@ declare type ActivityItemProps = {
|
|
|
384
384
|
|
|
385
385
|
declare type AddRowActionsResult = PrimaryActionItemDefinition | PrimaryActionItemDefinition[] | undefined;
|
|
386
386
|
|
|
387
|
+
declare type AggregationType = "count" | "sum" | "avg" | "min" | "max" | "countDistinct";
|
|
388
|
+
|
|
387
389
|
declare type AiBannerAction = {
|
|
388
390
|
label: string;
|
|
389
391
|
onClick: () => void;
|
|
@@ -515,6 +517,11 @@ declare type AiChatProviderProps = {
|
|
|
515
517
|
* URL builders (navigation links) for each entity type.
|
|
516
518
|
*/
|
|
517
519
|
entityRefs?: EntityRefs;
|
|
520
|
+
/**
|
|
521
|
+
* Canvas action callbacks grouped by entity type.
|
|
522
|
+
* Provides save/create functions for persisting canvas entities externally.
|
|
523
|
+
*/
|
|
524
|
+
canvasActions?: CanvasActions;
|
|
518
525
|
/**
|
|
519
526
|
* Available tool hints that the user can activate to provide intent context
|
|
520
527
|
* to the AI. Renders a selector button next to the send button.
|
|
@@ -1357,6 +1364,15 @@ declare type CandidateProfile = {
|
|
|
1357
1364
|
source?: string;
|
|
1358
1365
|
};
|
|
1359
1366
|
|
|
1367
|
+
/**
|
|
1368
|
+
* Canvas-level action callbacks grouped by entity type.
|
|
1369
|
+
* Each entity defines its own actions type; this aggregates them.
|
|
1370
|
+
* Passed by the host app to F0AiChatProvider via `canvasActions`.
|
|
1371
|
+
*/
|
|
1372
|
+
declare type CanvasActions = {
|
|
1373
|
+
dashboard?: DashboardCanvasActions;
|
|
1374
|
+
};
|
|
1375
|
+
|
|
1360
1376
|
declare type CardAvatarVariant = AvatarVariant | {
|
|
1361
1377
|
type: "emoji";
|
|
1362
1378
|
emoji: string;
|
|
@@ -1589,6 +1605,17 @@ export declare type CelebrationProps = {
|
|
|
1589
1605
|
|
|
1590
1606
|
export declare const CelebrationSkeleton: () => JSX_2.Element;
|
|
1591
1607
|
|
|
1608
|
+
declare interface ChartComputation {
|
|
1609
|
+
datasetId: string;
|
|
1610
|
+
xAxis: string;
|
|
1611
|
+
yAxis: string;
|
|
1612
|
+
aggregation: AggregationType;
|
|
1613
|
+
series?: string;
|
|
1614
|
+
sortBy?: "value" | "category";
|
|
1615
|
+
sortOrder?: "asc" | "desc";
|
|
1616
|
+
limit?: number;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1592
1619
|
declare type ChartConfig_3 = Record<string, ChartConfig_4[keyof ChartConfig_4]>;
|
|
1593
1620
|
|
|
1594
1621
|
declare type ChartConfig_4 = {
|
|
@@ -1623,6 +1650,198 @@ declare type ChartItem<K extends ChartConfig_3> = {
|
|
|
1623
1650
|
*/
|
|
1624
1651
|
export declare const ChartWidgetEmptyState: WithDataTestIdReturnType_5<ForwardRefExoticComponent<Props_6 & RefAttributes<HTMLDivElement>>>;
|
|
1625
1652
|
|
|
1653
|
+
declare interface ChatDashboardBarChartConfig extends ChatDashboardChartConfigBase {
|
|
1654
|
+
type: "bar";
|
|
1655
|
+
orientation?: "vertical" | "horizontal";
|
|
1656
|
+
stacked?: boolean;
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
declare type ChatDashboardChartConfig = ChatDashboardBarChartConfig | ChatDashboardLineChartConfig | ChatDashboardFunnelChartConfig | ChatDashboardRadarChartConfig | ChatDashboardPieChartConfig | ChatDashboardGaugeChartConfig | ChatDashboardHeatmapChartConfig;
|
|
1660
|
+
|
|
1661
|
+
declare interface ChatDashboardChartConfigBase {
|
|
1662
|
+
showLegend?: boolean;
|
|
1663
|
+
showGrid?: boolean;
|
|
1664
|
+
showLabels?: boolean;
|
|
1665
|
+
valueFormat?: FormatPreset;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
declare interface ChatDashboardChartItem extends ChatDashboardItemBase {
|
|
1669
|
+
type: "chart";
|
|
1670
|
+
chart: ChatDashboardChartConfig;
|
|
1671
|
+
computation: ChartComputation | RadarComputation | PieComputation | GaugeComputation | HeatmapComputation;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
declare interface ChatDashboardCollectionItem extends ChatDashboardItemBase {
|
|
1675
|
+
type: "collection";
|
|
1676
|
+
columns: ChatDashboardColumn[];
|
|
1677
|
+
computation: CollectionComputation;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
declare interface ChatDashboardColumn {
|
|
1681
|
+
/** Column key — must match a key in each row object */
|
|
1682
|
+
id: string;
|
|
1683
|
+
/** Display header label */
|
|
1684
|
+
label: string;
|
|
1685
|
+
/** Optional fixed width in pixels */
|
|
1686
|
+
width?: number;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
/**
|
|
1690
|
+
* Complete dashboard configuration received via `displayDashboard`.
|
|
1691
|
+
* Contains fetchSpecs that describe how to obtain data server-side —
|
|
1692
|
+
* no raw data is included. Fully JSON-serializable.
|
|
1693
|
+
*/
|
|
1694
|
+
declare interface ChatDashboardConfig {
|
|
1695
|
+
/** Dashboard title displayed in the canvas header and chat report card */
|
|
1696
|
+
title: string;
|
|
1697
|
+
/** Filter definitions — keys become filter IDs */
|
|
1698
|
+
filters?: Record<string, ChatDashboardFilterDefinition>;
|
|
1699
|
+
/**
|
|
1700
|
+
* Dashboard-level navigation filters (e.g. date navigator). Keys become
|
|
1701
|
+
* filter IDs. Rendered above the grid by F0AnalyticsDashboard's
|
|
1702
|
+
* `navigationFilters` slot.
|
|
1703
|
+
*/
|
|
1704
|
+
navigationFilters?: Record<string, ChatDashboardNavigationFilterDefinition>;
|
|
1705
|
+
/** Ordered list of dashboard items with computation specs */
|
|
1706
|
+
items: ChatDashboardItem[];
|
|
1707
|
+
/** Fetch specs for server-side data retrieval, keyed by datasetId */
|
|
1708
|
+
fetchSpecs: Record<string, DashboardFetchSpec>;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
/** Granularity options exposed by F0's `OneDateNavigator`. */
|
|
1712
|
+
declare type ChatDashboardDateNavigationGranularity = "day" | "week" | "month" | "quarter" | "halfyear" | "year" | "range";
|
|
1713
|
+
|
|
1714
|
+
declare interface ChatDashboardFilterDefinition {
|
|
1715
|
+
type: "in";
|
|
1716
|
+
label: string;
|
|
1717
|
+
column: string;
|
|
1718
|
+
datasetId: string;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
declare interface ChatDashboardFunnelChartConfig {
|
|
1722
|
+
type: "funnel";
|
|
1723
|
+
sort?: "descending" | "ascending" | "none";
|
|
1724
|
+
orient?: "horizontal" | "vertical";
|
|
1725
|
+
labelPosition?: "inside" | "outside";
|
|
1726
|
+
showLegend?: boolean;
|
|
1727
|
+
showLabels?: boolean;
|
|
1728
|
+
showConversion?: boolean;
|
|
1729
|
+
valueFormat?: FormatPreset;
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
declare interface ChatDashboardGaugeChartConfig {
|
|
1733
|
+
type: "gauge";
|
|
1734
|
+
min?: number;
|
|
1735
|
+
max?: number;
|
|
1736
|
+
showValue?: boolean;
|
|
1737
|
+
valueFormat?: FormatPreset;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
declare interface ChatDashboardHeatmapChartConfig {
|
|
1741
|
+
type: "heatmap";
|
|
1742
|
+
min?: number;
|
|
1743
|
+
max?: number;
|
|
1744
|
+
showLabels?: boolean;
|
|
1745
|
+
showVisualMap?: boolean;
|
|
1746
|
+
valueFormat?: FormatPreset;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
declare type ChatDashboardItem = ChatDashboardChartItem | ChatDashboardMetricItem | ChatDashboardCollectionItem;
|
|
1750
|
+
|
|
1751
|
+
declare interface ChatDashboardItemBase {
|
|
1752
|
+
id: string;
|
|
1753
|
+
title: string;
|
|
1754
|
+
description?: string;
|
|
1755
|
+
/** Source attribution shown as a subtitle (e.g. "Based on 8 feedbacks from 3 evaluators") */
|
|
1756
|
+
sourceDescription?: string;
|
|
1757
|
+
/**
|
|
1758
|
+
* Optional markdown explanation of how this item's data was calculated.
|
|
1759
|
+
* Surfaced via the per-item dropdown's "Where does this data come from?"
|
|
1760
|
+
* entry, which opens a dialog rendering the markdown. Omit to hide the
|
|
1761
|
+
* entry — backwards compatible with persisted dashboards.
|
|
1762
|
+
*/
|
|
1763
|
+
explanation?: string;
|
|
1764
|
+
/**
|
|
1765
|
+
* @deprecated Ignored by the renderer — items auto-size to equal-width
|
|
1766
|
+
* slots based on the per-row slot budget. Kept for backwards compatibility
|
|
1767
|
+
* with persisted layouts; safe to leave unset.
|
|
1768
|
+
*/
|
|
1769
|
+
colSpan?: number;
|
|
1770
|
+
/**
|
|
1771
|
+
* @deprecated Use `itemHeight` (pixels) instead. Kept for backwards
|
|
1772
|
+
* compatibility with persisted layouts: when `itemHeight` is unset, the
|
|
1773
|
+
* grid still reads `rowSpan * 48` as a fallback.
|
|
1774
|
+
*/
|
|
1775
|
+
rowSpan?: number;
|
|
1776
|
+
/**
|
|
1777
|
+
* Item height in pixels. Takes precedence over `rowSpan` when set. The
|
|
1778
|
+
* row height in the grid is `max(itemHeight)` across all items in the row.
|
|
1779
|
+
* Persisted resizes write a pixel-accurate value here; agent-generated
|
|
1780
|
+
* dashboards should pick from a constrained set of values that match the
|
|
1781
|
+
* data shape (more rows / more categories → taller).
|
|
1782
|
+
*/
|
|
1783
|
+
itemHeight?: number;
|
|
1784
|
+
x?: number;
|
|
1785
|
+
y?: number;
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
declare interface ChatDashboardLineChartConfig extends ChatDashboardChartConfigBase {
|
|
1789
|
+
type: "line";
|
|
1790
|
+
lineType?: "linear" | "smooth" | "step";
|
|
1791
|
+
showArea?: boolean;
|
|
1792
|
+
showDots?: boolean;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
declare type ChatDashboardMetricFormat = {
|
|
1796
|
+
type: "number";
|
|
1797
|
+
} | {
|
|
1798
|
+
type: "currency";
|
|
1799
|
+
currency?: string;
|
|
1800
|
+
} | {
|
|
1801
|
+
type: "percent";
|
|
1802
|
+
} | {
|
|
1803
|
+
type: "custom";
|
|
1804
|
+
suffix?: string;
|
|
1805
|
+
prefix?: string;
|
|
1806
|
+
};
|
|
1807
|
+
|
|
1808
|
+
declare interface ChatDashboardMetricItem extends ChatDashboardItemBase {
|
|
1809
|
+
type: "metric";
|
|
1810
|
+
format?: ChatDashboardMetricFormat;
|
|
1811
|
+
decimals?: number;
|
|
1812
|
+
computation: MetricComputation;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
/**
|
|
1816
|
+
* Navigation filter definitions emitted by the LLM via `displayDashboard`.
|
|
1817
|
+
* Discriminated on `type`. Today the only supported variant is
|
|
1818
|
+
* `dateNavigation`, which renders F0's date navigator above the dashboard
|
|
1819
|
+
* grid. The `column` and `datasetId` are agent-side metadata used by the
|
|
1820
|
+
* compute SQL builder; they are stripped before reaching F0AnalyticsDashboard.
|
|
1821
|
+
*/
|
|
1822
|
+
declare type ChatDashboardNavigationFilterDefinition = {
|
|
1823
|
+
type: "dateNavigation";
|
|
1824
|
+
label: string;
|
|
1825
|
+
column: string;
|
|
1826
|
+
datasetId: string;
|
|
1827
|
+
granularities: ChatDashboardDateNavigationGranularity[];
|
|
1828
|
+
defaultGranularity?: ChatDashboardDateNavigationGranularity;
|
|
1829
|
+
};
|
|
1830
|
+
|
|
1831
|
+
declare interface ChatDashboardPieChartConfig {
|
|
1832
|
+
type: "pie";
|
|
1833
|
+
innerRadius?: number;
|
|
1834
|
+
showLegend?: boolean;
|
|
1835
|
+
showLabels?: boolean;
|
|
1836
|
+
showPercentage?: boolean;
|
|
1837
|
+
valueFormat?: FormatPreset;
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
declare interface ChatDashboardRadarChartConfig extends ChatDashboardChartConfigBase {
|
|
1841
|
+
type: "radar";
|
|
1842
|
+
showArea?: boolean;
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1626
1845
|
export declare type ChatWidgetEmptyStateProps = Props_6;
|
|
1627
1846
|
|
|
1628
1847
|
declare type ChildrenPaginationInfo = {
|
|
@@ -1748,6 +1967,13 @@ declare type ClockInStatus = "clocked-in" | "break" | "clocked-out";
|
|
|
1748
1967
|
|
|
1749
1968
|
declare type ColId = string;
|
|
1750
1969
|
|
|
1970
|
+
declare interface CollectionComputation {
|
|
1971
|
+
datasetId: string;
|
|
1972
|
+
sortBy?: string;
|
|
1973
|
+
sortOrder?: "asc" | "desc";
|
|
1974
|
+
limit?: number;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1751
1977
|
/**
|
|
1752
1978
|
* Props for the Collection component.
|
|
1753
1979
|
* @template Record - The type of records in the collection
|
|
@@ -1988,6 +2214,25 @@ export declare const Dashboard: ForwardRefExoticComponent<DashboardProps & RefAt
|
|
|
1988
2214
|
Skeleton: () => JSX_2.Element;
|
|
1989
2215
|
};
|
|
1990
2216
|
|
|
2217
|
+
/**
|
|
2218
|
+
* Callbacks for persisting dashboards externally (beyond chat history).
|
|
2219
|
+
*/
|
|
2220
|
+
declare type DashboardCanvasActions = {
|
|
2221
|
+
/** Update an existing saved dashboard */
|
|
2222
|
+
save: (id: string, category: string, config: ChatDashboardConfig) => Promise<void>;
|
|
2223
|
+
/** Create a new saved dashboard. Returns the new dashboard ID if available. */
|
|
2224
|
+
create: (title: string, description: string, config: ChatDashboardConfig, category?: string) => Promise<string | void>;
|
|
2225
|
+
};
|
|
2226
|
+
|
|
2227
|
+
declare interface DashboardFetchSpec {
|
|
2228
|
+
fetch: Array<{
|
|
2229
|
+
toolId: string;
|
|
2230
|
+
args: Record<string, unknown>;
|
|
2231
|
+
}>;
|
|
2232
|
+
query: string | null;
|
|
2233
|
+
columnLabels?: Record<string, string>;
|
|
2234
|
+
}
|
|
2235
|
+
|
|
1991
2236
|
declare type DashboardProps = {
|
|
1992
2237
|
widgetWidth?: WidgetWidth;
|
|
1993
2238
|
children?: ReactNode[];
|
|
@@ -2829,6 +3074,19 @@ declare const defaultTranslations: {
|
|
|
2829
3074
|
readonly formCard: {
|
|
2830
3075
|
readonly moreFields: "Open to see all fields";
|
|
2831
3076
|
};
|
|
3077
|
+
readonly dashboard: {
|
|
3078
|
+
readonly save: "Save";
|
|
3079
|
+
readonly saveToAnalytics: "Save the dashboard in Analytics";
|
|
3080
|
+
readonly saveAs: "Save as";
|
|
3081
|
+
readonly saveDialog: {
|
|
3082
|
+
readonly title: "Save dashboard";
|
|
3083
|
+
readonly titleLabel: "Title";
|
|
3084
|
+
readonly descriptionLabel: "Description";
|
|
3085
|
+
readonly descriptionPlaceholder: "Add a description (optional)";
|
|
3086
|
+
readonly save: "Save";
|
|
3087
|
+
readonly cancel: "Cancel";
|
|
3088
|
+
};
|
|
3089
|
+
};
|
|
2832
3090
|
readonly dataDownload: {
|
|
2833
3091
|
readonly title: "Download";
|
|
2834
3092
|
readonly download: "Download {{format}}";
|
|
@@ -4230,6 +4488,22 @@ declare type FontSize = (typeof fontSizes)[number];
|
|
|
4230
4488
|
|
|
4231
4489
|
declare const fontSizes: readonly ["sm", "md", "lg"];
|
|
4232
4490
|
|
|
4491
|
+
/**
|
|
4492
|
+
* A preset formatting instruction the LLM can specify instead of a
|
|
4493
|
+
* real formatter function. The wrapper component maps these to actual
|
|
4494
|
+
* `(value: number) => string` functions at render time.
|
|
4495
|
+
*/
|
|
4496
|
+
declare type FormatPreset = {
|
|
4497
|
+
type: "number";
|
|
4498
|
+
} | {
|
|
4499
|
+
type: "currency";
|
|
4500
|
+
currency?: string;
|
|
4501
|
+
} | {
|
|
4502
|
+
type: "percent";
|
|
4503
|
+
} | {
|
|
4504
|
+
type: "compact";
|
|
4505
|
+
};
|
|
4506
|
+
|
|
4233
4507
|
declare interface FrameContextType {
|
|
4234
4508
|
isSmallScreen: boolean;
|
|
4235
4509
|
isLastToggleInvokedByUser: boolean;
|
|
@@ -4241,6 +4515,15 @@ declare interface FrameContextType {
|
|
|
4241
4515
|
setForceFloat: (force: boolean) => void;
|
|
4242
4516
|
}
|
|
4243
4517
|
|
|
4518
|
+
declare interface GaugeComputation {
|
|
4519
|
+
datasetId: string;
|
|
4520
|
+
aggregation: AggregationType;
|
|
4521
|
+
column?: string;
|
|
4522
|
+
min?: number;
|
|
4523
|
+
max?: number;
|
|
4524
|
+
name?: string;
|
|
4525
|
+
}
|
|
4526
|
+
|
|
4244
4527
|
export declare function generateCSVContent<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<R>>(data: R[], visualization: Visualization<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping> | undefined, options?: CSVExportOptions): string;
|
|
4245
4528
|
|
|
4246
4529
|
export declare const getGranularityDefinition: (granularityKey: GranularityDefinitionKey) => GranularityDefinition;
|
|
@@ -4384,6 +4667,14 @@ declare type HeaderSecondaryAction = SecondaryAction & {
|
|
|
4384
4667
|
hideLabel?: boolean;
|
|
4385
4668
|
};
|
|
4386
4669
|
|
|
4670
|
+
declare interface HeatmapComputation {
|
|
4671
|
+
datasetId: string;
|
|
4672
|
+
xAxis: string;
|
|
4673
|
+
yAxis: string;
|
|
4674
|
+
valueColumn: string;
|
|
4675
|
+
aggregation: AggregationType;
|
|
4676
|
+
}
|
|
4677
|
+
|
|
4387
4678
|
export declare type heightType = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | "auto";
|
|
4388
4679
|
|
|
4389
4680
|
export declare const HighlightBanner: ({ title, subtitle, buttonLabel, onClick, }: HighlightBannerProps) => JSX_2.Element;
|
|
@@ -4773,7 +5064,7 @@ declare interface LoadingStateProps {
|
|
|
4773
5064
|
export declare const MAX_EXPANDED_ACTIONS = 2;
|
|
4774
5065
|
|
|
4775
5066
|
export declare type MentionedUser = {
|
|
4776
|
-
id: number;
|
|
5067
|
+
id: string | number;
|
|
4777
5068
|
label: string;
|
|
4778
5069
|
image_url?: string;
|
|
4779
5070
|
href?: string;
|
|
@@ -4923,6 +5214,12 @@ declare interface MetadataProps {
|
|
|
4923
5214
|
collapse?: boolean;
|
|
4924
5215
|
}
|
|
4925
5216
|
|
|
5217
|
+
declare interface MetricComputation {
|
|
5218
|
+
datasetId: string;
|
|
5219
|
+
aggregation: AggregationType;
|
|
5220
|
+
column?: string;
|
|
5221
|
+
}
|
|
5222
|
+
|
|
4926
5223
|
/**
|
|
4927
5224
|
* @experimental This is an experimental component use it at your own risk
|
|
4928
5225
|
*/
|
|
@@ -5820,6 +6117,16 @@ export declare const PieChartWidget: ForwardRefExoticComponent<Omit<WidgetProps_
|
|
|
5820
6117
|
chart: PieChartProps_2;
|
|
5821
6118
|
} & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
|
|
5822
6119
|
|
|
6120
|
+
declare interface PieComputation {
|
|
6121
|
+
datasetId: string;
|
|
6122
|
+
nameColumn: string;
|
|
6123
|
+
valueColumn: string;
|
|
6124
|
+
aggregation: AggregationType;
|
|
6125
|
+
sortBy?: "value" | "name";
|
|
6126
|
+
sortOrder?: "asc" | "desc";
|
|
6127
|
+
limit?: number;
|
|
6128
|
+
}
|
|
6129
|
+
|
|
5823
6130
|
declare type PostDescriptionProps = {
|
|
5824
6131
|
content: HTMLString;
|
|
5825
6132
|
collapsed?: boolean;
|
|
@@ -6119,6 +6426,19 @@ export declare type RadarChartProps<K extends ChartConfig_3> = {
|
|
|
6119
6426
|
aspect?: ComponentProps<typeof ChartContainer>["aspect"];
|
|
6120
6427
|
};
|
|
6121
6428
|
|
|
6429
|
+
declare interface RadarComputation {
|
|
6430
|
+
datasetId: string;
|
|
6431
|
+
seriesColumn: string;
|
|
6432
|
+
indicators: Array<{
|
|
6433
|
+
column: string;
|
|
6434
|
+
label: string;
|
|
6435
|
+
max?: number;
|
|
6436
|
+
}>;
|
|
6437
|
+
limit?: number;
|
|
6438
|
+
sortBy?: string;
|
|
6439
|
+
sortOrder?: "asc" | "desc";
|
|
6440
|
+
}
|
|
6441
|
+
|
|
6122
6442
|
export declare const rangeSeparator = "\u2192";
|
|
6123
6443
|
|
|
6124
6444
|
declare interface ReactionProps {
|
|
@@ -6221,7 +6541,7 @@ declare type RestrictComponentProps = {
|
|
|
6221
6541
|
|
|
6222
6542
|
export declare type resultType = {
|
|
6223
6543
|
value: string | null;
|
|
6224
|
-
mentionIds?:
|
|
6544
|
+
mentionIds?: string[];
|
|
6225
6545
|
};
|
|
6226
6546
|
|
|
6227
6547
|
export declare const RichTextDisplay: WithDataTestIdReturnType_5<ForwardRefExoticComponent<RichTextDisplayProps & RefAttributes<HTMLDivElement>>>;
|
|
@@ -7693,6 +8013,11 @@ declare module "gridstack" {
|
|
|
7693
8013
|
}
|
|
7694
8014
|
|
|
7695
8015
|
|
|
8016
|
+
declare namespace Calendar {
|
|
8017
|
+
var displayName: string;
|
|
8018
|
+
}
|
|
8019
|
+
|
|
8020
|
+
|
|
7696
8021
|
declare module "@tiptap/core" {
|
|
7697
8022
|
interface Commands<ReturnType> {
|
|
7698
8023
|
aiBlock: {
|
|
@@ -7740,8 +8065,3 @@ declare module "@tiptap/core" {
|
|
|
7740
8065
|
};
|
|
7741
8066
|
}
|
|
7742
8067
|
}
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
declare namespace Calendar {
|
|
7746
|
-
var displayName: string;
|
|
7747
|
-
}
|