@factorialco/f0-react 1.414.1 → 1.416.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/{F0HILActionConfirmation-BvAjbJKj.js → F0HILActionConfirmation-wHMAslzT.js} +398 -465
- package/dist/ai.d.ts +184 -413
- package/dist/ai.js +27 -56
- package/dist/experimental.d.ts +47 -2
- package/dist/experimental.js +1627 -1641
- package/dist/f0.d.ts +658 -420
- package/dist/f0.js +10322 -8765
- package/dist/i18n-provider-defaults.d.ts +15 -2
- package/dist/i18n-provider-defaults.js +17 -4
- package/dist/{index-c9MQbjVB.js → index-D0_xokao.js} +243 -245
- package/dist/{F0Input-C9w04Jpr.js → registry-BAlv1mKf.js} +161002 -66719
- package/dist/{F0AnalyticsDashboard.css → registry.css} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -1
- package/dist/F0AiChat-CBy7rZCW.js +0 -29274
- package/dist/F0AiChat.css +0 -1
- package/dist/F0AnalyticsDashboard-C74qJ7sF.js +0 -54136
- package/dist/F0ChatDashboard.d.ts +0 -364
- package/dist/F0ChatDashboard.js +0 -292
- package/dist/useDataCollectionSource-BzzlFsAB.js +0 -10118
- package/dist/useDataCollectionSource.css +0 -1
package/dist/f0.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { AmountCellValue } from './f0';
|
|
|
7
7
|
import { AmountCellValue as AmountCellValue_2 } from './types/amount';
|
|
8
8
|
import { AnchorHTMLAttributes } from 'react';
|
|
9
9
|
import { AriaAttributes } from 'react';
|
|
10
|
-
import { AssistantMessageProps } from '@copilotkit/react-ui';
|
|
11
10
|
import { AutoFill as AutoFill_2 } from 'react';
|
|
12
11
|
import { AvatarListCellValue } from './f0';
|
|
13
12
|
import { AvatarListCellValue as AvatarListCellValue_2 } from './types/avatarList';
|
|
@@ -81,6 +80,7 @@ import { HTMLAttributes } from 'react';
|
|
|
81
80
|
import { IconCellValue } from './types/icon';
|
|
82
81
|
import { ImgHTMLAttributes } from 'react';
|
|
83
82
|
import { InFilterOptions } from './InFilter/types';
|
|
83
|
+
import { InputProps } from '@copilotkit/react-ui';
|
|
84
84
|
import { internalAvatarColors as internalAvatarColors_2 } from './f0';
|
|
85
85
|
import { internalAvatarSizes as internalAvatarSizes_2 } from './f0';
|
|
86
86
|
import { internalAvatarTypes as internalAvatarTypes_2 } from './f0';
|
|
@@ -90,7 +90,6 @@ import { LineChartPropsBase } from './utils/types';
|
|
|
90
90
|
import { LocalAudioTrack } from 'livekit-client';
|
|
91
91
|
import { LongTextCellValue } from './types/longText';
|
|
92
92
|
import { Message } from '@copilotkit/shared';
|
|
93
|
-
import { MessagesProps } from '@copilotkit/react-ui';
|
|
94
93
|
import { NumberCellValue } from './f0';
|
|
95
94
|
import { NumberCellValue as NumberCellValue_2 } from './types/number';
|
|
96
95
|
import { NumberFilterOptions } from './NumberFilter/NumberFilter';
|
|
@@ -140,10 +139,9 @@ import { WithDataTestIdReturnType as WithDataTestIdReturnType_7 } from './f0';
|
|
|
140
139
|
import { z } from 'zod';
|
|
141
140
|
import { ZodEffects } from 'zod';
|
|
142
141
|
import { ZodRawShape } from 'zod';
|
|
142
|
+
import { ZodType } from 'zod';
|
|
143
143
|
import { ZodTypeAny } from 'zod';
|
|
144
144
|
|
|
145
|
-
export declare function A({ children, ...props }: React.AnchorHTMLAttributes<HTMLAnchorElement>): JSX_2.Element;
|
|
146
|
-
|
|
147
145
|
export declare type Action = UpsellAction | RegularAction;
|
|
148
146
|
|
|
149
147
|
declare type Action_2 = {
|
|
@@ -302,7 +300,26 @@ declare type AddRowActionsResult = PrimaryActionItemDefinition | PrimaryActionIt
|
|
|
302
300
|
|
|
303
301
|
/* Excluded from this release type: AgentState */
|
|
304
302
|
|
|
305
|
-
|
|
303
|
+
declare type AggregationType = "count" | "sum" | "avg" | "min" | "max" | "countDistinct";
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Credits configuration for the AI chat.
|
|
307
|
+
* Groups all credits-related props into a single object.
|
|
308
|
+
*
|
|
309
|
+
* When provided, a credits button is shown in the chat header.
|
|
310
|
+
*/
|
|
311
|
+
export declare type AiChatCredits = {
|
|
312
|
+
/** Async function to fetch credits usage. Called each time the popover opens. */
|
|
313
|
+
fetchUsage: () => Promise<CreditsUsage>;
|
|
314
|
+
/** URL to the plan upgrade page. When provided, a link is shown in the popover. */
|
|
315
|
+
upgradePlanUrl?: string;
|
|
316
|
+
/** Company name displayed in the popover header. */
|
|
317
|
+
companyName?: string;
|
|
318
|
+
/** Company logo URL displayed in the popover header. */
|
|
319
|
+
companyLogoUrl?: string;
|
|
320
|
+
/** Plan name displayed below the company name (e.g. "Free plan", "Enterprise"). */
|
|
321
|
+
planName?: string;
|
|
322
|
+
};
|
|
306
323
|
|
|
307
324
|
/**
|
|
308
325
|
* Disclaimer configuration for the chat input
|
|
@@ -371,6 +388,11 @@ export declare type AiChatProviderProps = {
|
|
|
371
388
|
* Only one tool hint can be active at a time.
|
|
372
389
|
*/
|
|
373
390
|
toolHints?: AiChatToolHint[];
|
|
391
|
+
/**
|
|
392
|
+
* Credits configuration. When provided, a credits button is shown in the chat header.
|
|
393
|
+
* Groups fetchUsage, upgradePlanUrl, and company/plan display info.
|
|
394
|
+
*/
|
|
395
|
+
credits?: AiChatCredits;
|
|
374
396
|
onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
|
|
375
397
|
threadId: string;
|
|
376
398
|
feedback: string;
|
|
@@ -476,7 +498,11 @@ declare type AiChatProviderReturnValue = {
|
|
|
476
498
|
* Set the footer content. Use this to update the footer from outside the provider (e.g. per page/route).
|
|
477
499
|
*/
|
|
478
500
|
setFooter: React.Dispatch<React.SetStateAction<React.ReactNode | undefined>>;
|
|
479
|
-
|
|
501
|
+
/** Whether the assistant is currently generating a response */
|
|
502
|
+
inProgress: boolean;
|
|
503
|
+
/** Set the in-progress state (synced from CopilotKit's isLoading) */
|
|
504
|
+
setInProgress: (value: boolean) => void;
|
|
505
|
+
} & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityResolvers" | "toolHints" | "credits"> & {
|
|
480
506
|
/** The current canvas content, or null when canvas is closed */
|
|
481
507
|
canvasContent: CanvasContent | null;
|
|
482
508
|
/** Open the canvas panel with the given content */
|
|
@@ -507,6 +533,7 @@ declare interface AiChatState {
|
|
|
507
533
|
VoiceMode?: React.ComponentType;
|
|
508
534
|
entityResolvers?: EntityResolvers;
|
|
509
535
|
toolHints?: AiChatToolHint[];
|
|
536
|
+
credits?: AiChatCredits;
|
|
510
537
|
placeholders?: string[];
|
|
511
538
|
setPlaceholders?: React.Dispatch<React.SetStateAction<string[]>>;
|
|
512
539
|
onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
|
|
@@ -569,73 +596,109 @@ export declare interface AiChatTranslationsProviderProps {
|
|
|
569
596
|
}
|
|
570
597
|
|
|
571
598
|
/**
|
|
572
|
-
* Default AI chat translations
|
|
599
|
+
* Default AI chat translations — derived from the global defaultTranslations
|
|
600
|
+
* to avoid manual duplication.
|
|
573
601
|
*/
|
|
574
602
|
export declare const aiTranslations: {
|
|
575
603
|
ai: {
|
|
576
|
-
openChat:
|
|
577
|
-
closeChat:
|
|
578
|
-
startNewChat:
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
604
|
+
readonly openChat: "Open Chat with One AI";
|
|
605
|
+
readonly closeChat: "Close Chat with One AI";
|
|
606
|
+
readonly startNewChat: "Start new chat";
|
|
607
|
+
readonly settings: "Settings";
|
|
608
|
+
readonly scrollToBottom: "Scroll to bottom";
|
|
609
|
+
readonly welcome: "Ask or create with One";
|
|
610
|
+
readonly defaultInitialMessage: "How can I help you today?";
|
|
611
|
+
readonly inputPlaceholder: "Ask about time, people, or company info and a lot of other things...";
|
|
612
|
+
readonly stopAnswerGeneration: "Stop generating";
|
|
613
|
+
readonly responseStopped: "You stopped this response";
|
|
614
|
+
readonly sendMessage: "Send message";
|
|
615
|
+
readonly thoughtsGroupTitle: "Reflection";
|
|
616
|
+
readonly resourcesGroupTitle: "Resources";
|
|
617
|
+
readonly thinking: "Thinking...";
|
|
618
|
+
readonly closeDashboard: "Close dashboard";
|
|
619
|
+
readonly unsavedChanges: "Unsaved changes";
|
|
620
|
+
readonly saveChanges: "Save changes";
|
|
621
|
+
readonly discardChanges: "Discard";
|
|
622
|
+
readonly exportTable: "Download table";
|
|
623
|
+
readonly generatedTableFilename: "OneGeneratedTable";
|
|
624
|
+
readonly feedbackModal: {
|
|
625
|
+
readonly positive: {
|
|
626
|
+
readonly title: "What did you like about this response?";
|
|
627
|
+
readonly label: "Your feedback helps us make Factorial AI better";
|
|
628
|
+
readonly placeholder: "Share what worked well";
|
|
597
629
|
};
|
|
598
|
-
negative: {
|
|
599
|
-
title:
|
|
600
|
-
label:
|
|
601
|
-
placeholder:
|
|
630
|
+
readonly negative: {
|
|
631
|
+
readonly title: "What could have been better?";
|
|
632
|
+
readonly label: "Your feedback helps us improve future answers";
|
|
633
|
+
readonly placeholder: "Share what didn’t work";
|
|
602
634
|
};
|
|
603
635
|
};
|
|
604
|
-
dataDownloadPreview:
|
|
605
|
-
expandChat:
|
|
606
|
-
collapseChat:
|
|
607
|
-
chatHistory:
|
|
608
|
-
noPreviousChats:
|
|
609
|
-
newConversation:
|
|
610
|
-
today:
|
|
611
|
-
yesterday:
|
|
612
|
-
thisMonth:
|
|
613
|
-
older:
|
|
614
|
-
searchChats:
|
|
615
|
-
pinnedChats:
|
|
616
|
-
threadOptions:
|
|
617
|
-
pinChat:
|
|
618
|
-
unpinChat:
|
|
619
|
-
deleteChat:
|
|
620
|
-
ask:
|
|
621
|
-
viewProfile:
|
|
622
|
-
tools:
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
636
|
+
readonly dataDownloadPreview: "Preview {{shown}} of {{total}} rows — download the Excel to see all data.";
|
|
637
|
+
readonly expandChat: "Expand chat";
|
|
638
|
+
readonly collapseChat: "Collapse chat";
|
|
639
|
+
readonly chatHistory: "Chat history";
|
|
640
|
+
readonly noPreviousChats: "No previous conversations";
|
|
641
|
+
readonly newConversation: "New conversation";
|
|
642
|
+
readonly today: "Today";
|
|
643
|
+
readonly yesterday: "Yesterday";
|
|
644
|
+
readonly thisMonth: "This month";
|
|
645
|
+
readonly older: "Older";
|
|
646
|
+
readonly searchChats: "Search conversations...";
|
|
647
|
+
readonly pinnedChats: "Pinned";
|
|
648
|
+
readonly threadOptions: "Thread options";
|
|
649
|
+
readonly pinChat: "Pin chat";
|
|
650
|
+
readonly unpinChat: "Unpin chat";
|
|
651
|
+
readonly deleteChat: "Delete chat";
|
|
652
|
+
readonly ask: "Ask One";
|
|
653
|
+
readonly viewProfile: "View profile";
|
|
654
|
+
readonly tools: "Tools";
|
|
655
|
+
readonly credits: {
|
|
656
|
+
readonly title: "Credits";
|
|
657
|
+
readonly creditsLeft: "{{total}} left";
|
|
658
|
+
readonly monthlyCredits: "Monthly credits";
|
|
659
|
+
readonly creditsError: "Could not load credits";
|
|
660
|
+
readonly upgradePlan: "Upgrade";
|
|
661
|
+
readonly needMoreCredits: "Need more credits?";
|
|
626
662
|
};
|
|
627
|
-
|
|
628
|
-
|
|
663
|
+
readonly reportCard: {
|
|
664
|
+
readonly reportLabel: "Report";
|
|
665
|
+
readonly openButton: "Open";
|
|
666
|
+
};
|
|
667
|
+
readonly dataDownload: {
|
|
668
|
+
readonly download: "Download {{format}}";
|
|
669
|
+
readonly exportDashboard: "Export dashboard as {{format}}";
|
|
670
|
+
readonly exporting: "Exporting...";
|
|
671
|
+
};
|
|
672
|
+
readonly pong: {
|
|
673
|
+
readonly title: "Pong";
|
|
674
|
+
readonly youWin: "You win!";
|
|
675
|
+
readonly youLose: "You lose!";
|
|
676
|
+
readonly goal: "Goal";
|
|
677
|
+
readonly controls: "← → to move";
|
|
678
|
+
readonly escToExit: "Esc to exit";
|
|
629
679
|
};
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
680
|
+
readonly growth: {
|
|
681
|
+
readonly demoCard: {
|
|
682
|
+
readonly title: "See {{moduleName}} in action";
|
|
683
|
+
readonly actionLabel: "Start demo";
|
|
684
|
+
};
|
|
685
|
+
readonly bookAMeetingCard: {
|
|
686
|
+
readonly title: "Talk with an expert";
|
|
687
|
+
readonly schedule: "Mon-Fri · 09:00-21:00 (CEST)";
|
|
688
|
+
readonly actionLabel: "Book a meeting";
|
|
689
|
+
};
|
|
690
|
+
readonly questionCard: {
|
|
691
|
+
readonly actionLabel: "Next";
|
|
692
|
+
readonly skipLabel: "Skip";
|
|
693
|
+
readonly sendLabel: "Send";
|
|
694
|
+
};
|
|
695
|
+
readonly moduleCard: {
|
|
696
|
+
readonly actionLabel: "Learn more";
|
|
697
|
+
};
|
|
698
|
+
readonly faqCard: {
|
|
699
|
+
readonly title: "Questions before getting started";
|
|
700
|
+
};
|
|
635
701
|
};
|
|
636
|
-
unsavedChanges: string;
|
|
637
|
-
saveChanges: string;
|
|
638
|
-
discardChanges: string;
|
|
639
702
|
};
|
|
640
703
|
};
|
|
641
704
|
|
|
@@ -694,6 +757,18 @@ blurArea?: "l" | "r" | "lr";
|
|
|
694
757
|
|
|
695
758
|
declare type AsAllowedList = (typeof allTags)[number];
|
|
696
759
|
|
|
760
|
+
/**
|
|
761
|
+
* Accepts either a synchronous value or an async function that resolves it.
|
|
762
|
+
* The async function receives an `AbortSignal` for cancellation support.
|
|
763
|
+
*/
|
|
764
|
+
export declare type AsyncOrSync<T> = T | ((signal: AbortSignal) => Promise<T>);
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Async function that receives typed params (from AI presentForm).
|
|
768
|
+
* Use this variant when `defaultValuesParamsSchema` is provided.
|
|
769
|
+
*/
|
|
770
|
+
declare type AsyncWithParams<T, TParams> = (params: TParams) => Promise<T>;
|
|
771
|
+
|
|
697
772
|
declare const Avatar: React_2.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
698
773
|
size?: (typeof internalAvatarSizes)[number];
|
|
699
774
|
type?: (typeof internalAvatarTypes)[number];
|
|
@@ -1039,8 +1114,6 @@ export declare type BigNumberProps = {
|
|
|
1039
1114
|
comparison: Numeric | NumberWithFormatter | number;
|
|
1040
1115
|
};
|
|
1041
1116
|
|
|
1042
|
-
export declare function Blockquote({ children, ...props }: React.HTMLAttributes<HTMLQuoteElement>): JSX_2.Element;
|
|
1043
|
-
|
|
1044
1117
|
/**
|
|
1045
1118
|
* Base for boolean-specific conditions
|
|
1046
1119
|
*/
|
|
@@ -1348,13 +1421,13 @@ export declare type CanvasContentBase = {
|
|
|
1348
1421
|
* Contract for a canvas entity type.
|
|
1349
1422
|
*
|
|
1350
1423
|
* Each entity (dashboard, survey, goal, job-posting…) implements this
|
|
1351
|
-
* interface and
|
|
1424
|
+
* interface and is added to the `canvasEntities` record in `registry.ts`.
|
|
1352
1425
|
*
|
|
1353
1426
|
* To add a new entity type:
|
|
1354
1427
|
* 1. Create a folder in `canvas/entities/<your-entity>/`
|
|
1355
1428
|
* 2. Define a type extending `CanvasContentBase` in `types.ts`
|
|
1356
|
-
* 3. Implement `CanvasEntityDefinition` in `index.
|
|
1357
|
-
* 4.
|
|
1429
|
+
* 3. Implement and export `CanvasEntityDefinition` in `index.tsx`
|
|
1430
|
+
* 4. Add the entity to the record in `canvas/registry.ts`
|
|
1358
1431
|
*/
|
|
1359
1432
|
export declare type CanvasEntityDefinition<T extends CanvasContentBase = CanvasContentBase> = {
|
|
1360
1433
|
/** Must match the `type` discriminant on the content object */
|
|
@@ -1364,13 +1437,14 @@ export declare type CanvasEntityDefinition<T extends CanvasContentBase = CanvasC
|
|
|
1364
1437
|
content: T;
|
|
1365
1438
|
refreshKey: number;
|
|
1366
1439
|
}) => ReactNode;
|
|
1367
|
-
/** Renders header
|
|
1368
|
-
|
|
1440
|
+
/** Renders the full header (title, actions, close button) */
|
|
1441
|
+
renderHeader: (props: {
|
|
1369
1442
|
content: T;
|
|
1443
|
+
onClose: () => void;
|
|
1370
1444
|
}) => ReactNode;
|
|
1371
1445
|
/**
|
|
1372
1446
|
* Optional wrapper providing entity-scoped context around
|
|
1373
|
-
* both header
|
|
1447
|
+
* both header and body (e.g. shared edit-mode state).
|
|
1374
1448
|
*/
|
|
1375
1449
|
wrapper?: (props: {
|
|
1376
1450
|
content: T;
|
|
@@ -1593,7 +1667,7 @@ declare type ChartColorToken = (typeof chartColorTokens)[number];
|
|
|
1593
1667
|
*/
|
|
1594
1668
|
declare const chartColorTokens: readonly ["lilac", "barbie", "smoke", "army", "flubber", "indigo", "camel", "radical", "viridian", "orange", "red", "grass", "malibu", "yellow", "purple"];
|
|
1595
1669
|
|
|
1596
|
-
|
|
1670
|
+
declare interface ChartComputation {
|
|
1597
1671
|
datasetId: string;
|
|
1598
1672
|
xAxis: string;
|
|
1599
1673
|
yAxis: string;
|
|
@@ -1617,13 +1691,13 @@ declare interface ChartConfigBase {
|
|
|
1617
1691
|
categoryFormatter?: (value: string) => string;
|
|
1618
1692
|
}
|
|
1619
1693
|
|
|
1620
|
-
|
|
1694
|
+
declare interface ChatDashboardBarChartConfig extends ChatDashboardChartConfigBase {
|
|
1621
1695
|
type: "bar";
|
|
1622
1696
|
orientation?: "vertical" | "horizontal";
|
|
1623
1697
|
stacked?: boolean;
|
|
1624
1698
|
}
|
|
1625
1699
|
|
|
1626
|
-
|
|
1700
|
+
declare type ChatDashboardChartConfig = ChatDashboardBarChartConfig | ChatDashboardLineChartConfig | ChatDashboardFunnelChartConfig | ChatDashboardRadarChartConfig | ChatDashboardPieChartConfig | ChatDashboardGaugeChartConfig | ChatDashboardHeatmapChartConfig;
|
|
1627
1701
|
|
|
1628
1702
|
declare interface ChatDashboardChartConfigBase {
|
|
1629
1703
|
showLegend?: boolean;
|
|
@@ -1632,19 +1706,19 @@ declare interface ChatDashboardChartConfigBase {
|
|
|
1632
1706
|
valueFormat?: FormatPreset;
|
|
1633
1707
|
}
|
|
1634
1708
|
|
|
1635
|
-
|
|
1709
|
+
declare interface ChatDashboardChartItem extends ChatDashboardItemBase {
|
|
1636
1710
|
type: "chart";
|
|
1637
1711
|
chart: ChatDashboardChartConfig;
|
|
1638
1712
|
computation: ChartComputation | RadarComputation | PieComputation | GaugeComputation | HeatmapComputation;
|
|
1639
1713
|
}
|
|
1640
1714
|
|
|
1641
|
-
|
|
1715
|
+
declare interface ChatDashboardCollectionItem extends ChatDashboardItemBase {
|
|
1642
1716
|
type: "collection";
|
|
1643
1717
|
columns: ChatDashboardColumn[];
|
|
1644
1718
|
computation: CollectionComputation;
|
|
1645
1719
|
}
|
|
1646
1720
|
|
|
1647
|
-
|
|
1721
|
+
declare interface ChatDashboardColumn {
|
|
1648
1722
|
/** Column key — must match a key in each row object */
|
|
1649
1723
|
id: string;
|
|
1650
1724
|
/** Display header label */
|
|
@@ -1658,7 +1732,7 @@ export declare interface ChatDashboardColumn {
|
|
|
1658
1732
|
* Contains fetchSpecs that describe how to obtain data server-side —
|
|
1659
1733
|
* no raw data is included. Fully JSON-serializable.
|
|
1660
1734
|
*/
|
|
1661
|
-
|
|
1735
|
+
declare interface ChatDashboardConfig {
|
|
1662
1736
|
/** Dashboard title displayed in the canvas header and chat report card */
|
|
1663
1737
|
title: string;
|
|
1664
1738
|
/** Filter definitions — keys become filter IDs */
|
|
@@ -1669,14 +1743,14 @@ export declare interface ChatDashboardConfig {
|
|
|
1669
1743
|
fetchSpecs: Record<string, DashboardFetchSpec>;
|
|
1670
1744
|
}
|
|
1671
1745
|
|
|
1672
|
-
|
|
1746
|
+
declare interface ChatDashboardFilterDefinition {
|
|
1673
1747
|
type: "in";
|
|
1674
1748
|
label: string;
|
|
1675
1749
|
column: string;
|
|
1676
1750
|
datasetId: string;
|
|
1677
1751
|
}
|
|
1678
1752
|
|
|
1679
|
-
|
|
1753
|
+
declare interface ChatDashboardFunnelChartConfig {
|
|
1680
1754
|
type: "funnel";
|
|
1681
1755
|
sort?: "descending" | "ascending" | "none";
|
|
1682
1756
|
orient?: "horizontal" | "vertical";
|
|
@@ -1704,7 +1778,7 @@ declare interface ChatDashboardHeatmapChartConfig {
|
|
|
1704
1778
|
valueFormat?: FormatPreset;
|
|
1705
1779
|
}
|
|
1706
1780
|
|
|
1707
|
-
|
|
1781
|
+
declare type ChatDashboardItem = ChatDashboardChartItem | ChatDashboardMetricItem | ChatDashboardCollectionItem;
|
|
1708
1782
|
|
|
1709
1783
|
declare interface ChatDashboardItemBase {
|
|
1710
1784
|
id: string;
|
|
@@ -1718,14 +1792,14 @@ declare interface ChatDashboardItemBase {
|
|
|
1718
1792
|
y?: number;
|
|
1719
1793
|
}
|
|
1720
1794
|
|
|
1721
|
-
|
|
1795
|
+
declare interface ChatDashboardLineChartConfig extends ChatDashboardChartConfigBase {
|
|
1722
1796
|
type: "line";
|
|
1723
1797
|
lineType?: "linear" | "smooth" | "step";
|
|
1724
1798
|
showArea?: boolean;
|
|
1725
1799
|
showDots?: boolean;
|
|
1726
1800
|
}
|
|
1727
1801
|
|
|
1728
|
-
|
|
1802
|
+
declare type ChatDashboardMetricFormat = {
|
|
1729
1803
|
type: "number";
|
|
1730
1804
|
} | {
|
|
1731
1805
|
type: "currency";
|
|
@@ -1738,7 +1812,7 @@ export declare type ChatDashboardMetricFormat = {
|
|
|
1738
1812
|
prefix?: string;
|
|
1739
1813
|
};
|
|
1740
1814
|
|
|
1741
|
-
|
|
1815
|
+
declare interface ChatDashboardMetricItem extends ChatDashboardItemBase {
|
|
1742
1816
|
type: "metric";
|
|
1743
1817
|
format?: ChatDashboardMetricFormat;
|
|
1744
1818
|
decimals?: number;
|
|
@@ -1761,6 +1835,10 @@ declare interface ChatDashboardRadarChartConfig extends ChatDashboardChartConfig
|
|
|
1761
1835
|
|
|
1762
1836
|
export declare const ChatSpinner: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
1763
1837
|
|
|
1838
|
+
declare type ChatTextareaProps = InputProps & {
|
|
1839
|
+
submitLabel?: string;
|
|
1840
|
+
};
|
|
1841
|
+
|
|
1764
1842
|
/**
|
|
1765
1843
|
* All valid renderIf conditions for checkbox fields
|
|
1766
1844
|
*/
|
|
@@ -1880,7 +1958,7 @@ declare const chipVariants: (props?: ({
|
|
|
1880
1958
|
|
|
1881
1959
|
declare type ColId = string;
|
|
1882
1960
|
|
|
1883
|
-
|
|
1961
|
+
declare interface CollectionComputation {
|
|
1884
1962
|
datasetId: string;
|
|
1885
1963
|
sortBy?: string;
|
|
1886
1964
|
sortOrder?: "asc" | "desc";
|
|
@@ -2018,6 +2096,14 @@ export declare const createPageLayoutBlock: <Props = unknown>(displayName: strin
|
|
|
2018
2096
|
|
|
2019
2097
|
export declare const createPageLayoutBlockGroup: <Props = unknown>(displayName: string, Component: React.ComponentType<Props>) => React.ComponentType<Props> & PageLayoutGroupComponent;
|
|
2020
2098
|
|
|
2099
|
+
/**
|
|
2100
|
+
* Credits usage data returned by the host app
|
|
2101
|
+
*/
|
|
2102
|
+
export declare type CreditsUsage = {
|
|
2103
|
+
used: number;
|
|
2104
|
+
total: number;
|
|
2105
|
+
};
|
|
2106
|
+
|
|
2021
2107
|
/**
|
|
2022
2108
|
* CSS RGB color string type
|
|
2023
2109
|
* @example 'rgb(255, 0, 0)' or 'rgb(255,0,0)'
|
|
@@ -2070,6 +2156,8 @@ export declare interface CustomFieldRenderProps<TValue = unknown, TConfig = unde
|
|
|
2070
2156
|
required?: boolean;
|
|
2071
2157
|
/** Custom configuration passed via fieldConfig */
|
|
2072
2158
|
config: TConfig;
|
|
2159
|
+
/** Name identifying this custom field type (used with renderCustomField) */
|
|
2160
|
+
customFieldName?: string;
|
|
2073
2161
|
}
|
|
2074
2162
|
|
|
2075
2163
|
/**
|
|
@@ -2096,6 +2184,8 @@ declare interface CustomFieldRenderPropsBase {
|
|
|
2096
2184
|
disabled?: boolean;
|
|
2097
2185
|
/** Whether the field is required (derived from Zod schema) */
|
|
2098
2186
|
required?: boolean;
|
|
2187
|
+
/** Name identifying this custom field type (used with renderCustomField) */
|
|
2188
|
+
customFieldName?: string;
|
|
2099
2189
|
}
|
|
2100
2190
|
|
|
2101
2191
|
export declare const Dashboard: WithDataTestIdReturnType_3<ComponentType<DashboardProps_2> & PageLayoutGroupComponent_2>;
|
|
@@ -2112,17 +2202,6 @@ export declare type DashboardCanvasContent = CanvasContentBase & {
|
|
|
2112
2202
|
};
|
|
2113
2203
|
};
|
|
2114
2204
|
|
|
2115
|
-
/**
|
|
2116
|
-
* Dashboard-specific card that wraps CanvasCard with config-store
|
|
2117
|
-
* subscription logic. Re-renders when the user edits and saves
|
|
2118
|
-
* the dashboard layout.
|
|
2119
|
-
*/
|
|
2120
|
-
declare function DashboardCard({ config: originalConfig, onView, toolCallId, }: F0ChatReportCardProps): JSX_2.Element;
|
|
2121
|
-
|
|
2122
|
-
declare namespace DashboardCard {
|
|
2123
|
-
var displayName: string;
|
|
2124
|
-
}
|
|
2125
|
-
|
|
2126
2205
|
/**
|
|
2127
2206
|
* Chart display configuration — discriminated on `type`.
|
|
2128
2207
|
* This object is JSON-serializable (no functions, except optional formatters).
|
|
@@ -2184,7 +2263,7 @@ export declare interface DashboardCollectionItem<Filters extends FiltersDefiniti
|
|
|
2184
2263
|
visualizations: ReadonlyArray<any>;
|
|
2185
2264
|
}
|
|
2186
2265
|
|
|
2187
|
-
|
|
2266
|
+
declare interface DashboardFetchSpec {
|
|
2188
2267
|
fetch: Array<{
|
|
2189
2268
|
toolId: string;
|
|
2190
2269
|
args: Record<string, unknown>;
|
|
@@ -3062,6 +3141,7 @@ export declare const defaultTranslations: {
|
|
|
3062
3141
|
readonly openChat: "Open Chat with One AI";
|
|
3063
3142
|
readonly closeChat: "Close Chat with One AI";
|
|
3064
3143
|
readonly startNewChat: "Start new chat";
|
|
3144
|
+
readonly settings: "Settings";
|
|
3065
3145
|
readonly scrollToBottom: "Scroll to bottom";
|
|
3066
3146
|
readonly welcome: "Ask or create with One";
|
|
3067
3147
|
readonly defaultInitialMessage: "How can I help you today?";
|
|
@@ -3109,18 +3189,30 @@ export declare const defaultTranslations: {
|
|
|
3109
3189
|
readonly ask: "Ask One";
|
|
3110
3190
|
readonly viewProfile: "View profile";
|
|
3111
3191
|
readonly tools: "Tools";
|
|
3192
|
+
readonly credits: {
|
|
3193
|
+
readonly title: "Credits";
|
|
3194
|
+
readonly creditsLeft: "{{total}} left";
|
|
3195
|
+
readonly monthlyCredits: "Monthly credits";
|
|
3196
|
+
readonly creditsError: "Could not load credits";
|
|
3197
|
+
readonly upgradePlan: "Upgrade";
|
|
3198
|
+
readonly needMoreCredits: "Need more credits?";
|
|
3199
|
+
};
|
|
3112
3200
|
readonly reportCard: {
|
|
3113
3201
|
readonly reportLabel: "Report";
|
|
3114
3202
|
readonly openButton: "Open";
|
|
3115
3203
|
};
|
|
3116
3204
|
readonly dataDownload: {
|
|
3117
3205
|
readonly download: "Download {{format}}";
|
|
3206
|
+
readonly exportDashboard: "Export dashboard as {{format}}";
|
|
3207
|
+
readonly exporting: "Exporting...";
|
|
3118
3208
|
};
|
|
3119
3209
|
readonly pong: {
|
|
3120
|
-
readonly
|
|
3121
|
-
readonly you: "YOU";
|
|
3210
|
+
readonly title: "Pong";
|
|
3122
3211
|
readonly youWin: "You win!";
|
|
3123
3212
|
readonly youLose: "You lose!";
|
|
3213
|
+
readonly goal: "Goal";
|
|
3214
|
+
readonly controls: "← → to move";
|
|
3215
|
+
readonly escToExit: "Esc to exit";
|
|
3124
3216
|
};
|
|
3125
3217
|
readonly growth: {
|
|
3126
3218
|
readonly demoCard: {
|
|
@@ -3347,6 +3439,38 @@ export declare const defaultTranslations: {
|
|
|
3347
3439
|
};
|
|
3348
3440
|
};
|
|
3349
3441
|
|
|
3442
|
+
/**
|
|
3443
|
+
* Helper to define an available form with proper params typing.
|
|
3444
|
+
* TypeScript infers `TParams` from `defaultValuesParamsSchema`, so the
|
|
3445
|
+
* `defaultValues` callback receives fully typed params.
|
|
3446
|
+
*
|
|
3447
|
+
* @example
|
|
3448
|
+
* ```tsx
|
|
3449
|
+
* const employeeForm = defineAvailableForm({
|
|
3450
|
+
* name: "edit-employee",
|
|
3451
|
+
* schema: employeeSchema,
|
|
3452
|
+
* defaultValuesParamsSchema: z.object({ employeeId: z.string() }),
|
|
3453
|
+
* defaultValues: (params) => ({
|
|
3454
|
+
* // params.employeeId is typed as string
|
|
3455
|
+
* name: `Employee ${params.employeeId}`,
|
|
3456
|
+
* }),
|
|
3457
|
+
* })
|
|
3458
|
+
* ```
|
|
3459
|
+
*/
|
|
3460
|
+
export declare function defineAvailableForm<TParams extends Record<string, unknown> = Record<string, unknown>>(definition: F0AiAvailableFormDefinition<TParams>): F0AiAvailableFormDefinition<TParams>;
|
|
3461
|
+
|
|
3462
|
+
/**
|
|
3463
|
+
* Introspect an F0Form schema and return a serializable array of field descriptions.
|
|
3464
|
+
* Pure function — usable outside React components.
|
|
3465
|
+
*
|
|
3466
|
+
* @example
|
|
3467
|
+
* ```ts
|
|
3468
|
+
* const fields = describeFormSchema(mySchema)
|
|
3469
|
+
* // [{ name: "email", type: "text", label: "Email", required: true, ... }, ...]
|
|
3470
|
+
* ```
|
|
3471
|
+
*/
|
|
3472
|
+
export declare function describeFormSchema(schema: F0FormSchema): FormFieldDescription[];
|
|
3473
|
+
|
|
3350
3474
|
export declare type DialogPosition = (typeof dialogPositions)[number];
|
|
3351
3475
|
|
|
3352
3476
|
declare const dialogPositions: readonly ["center", "left", "right", "fullscreen"];
|
|
@@ -3543,8 +3667,6 @@ declare type EditableTableVisualizationSettings = TableVisualizationSettings;
|
|
|
3543
3667
|
|
|
3544
3668
|
export declare type ElementType = QuestionType | "section";
|
|
3545
3669
|
|
|
3546
|
-
export declare function Em({ children, ...props }: React.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
|
|
3547
|
-
|
|
3548
3670
|
export declare function EmojiImage({ emoji, size, alt }: EmojiImageProps): JSX_2.Element;
|
|
3549
3671
|
|
|
3550
3672
|
export declare interface EmojiImageProps extends VariantProps<typeof emojiVariants> {
|
|
@@ -3562,22 +3684,6 @@ declare const emojiVariants: (props?: ({
|
|
|
3562
3684
|
className?: ClassValue;
|
|
3563
3685
|
})) | undefined) => string;
|
|
3564
3686
|
|
|
3565
|
-
/**
|
|
3566
|
-
* Generic entity reference renderer for custom `<entity-ref>` HTML tags
|
|
3567
|
-
* embedded in AI chat markdown output.
|
|
3568
|
-
*
|
|
3569
|
-
* Dispatches to type-specific renderers based on the `type` attribute.
|
|
3570
|
-
* Falls back to rendering children as plain text for unknown types.
|
|
3571
|
-
*
|
|
3572
|
-
* Usage in markdown (via rehype-raw):
|
|
3573
|
-
* <entity-ref type="person" id="123">Ana García</entity-ref>
|
|
3574
|
-
*/
|
|
3575
|
-
export declare function EntityRef({ type, id, children, }: {
|
|
3576
|
-
type?: string;
|
|
3577
|
-
id?: string;
|
|
3578
|
-
children?: ReactNode;
|
|
3579
|
-
}): JSX_2.Element;
|
|
3580
|
-
|
|
3581
3687
|
/**
|
|
3582
3688
|
* Map of async resolver functions keyed by entity type.
|
|
3583
3689
|
* Each resolver takes an entity ID and returns the profile data
|
|
@@ -3649,6 +3755,41 @@ export declare interface F0ActionItemProps {
|
|
|
3649
3755
|
inGroup?: boolean;
|
|
3650
3756
|
}
|
|
3651
3757
|
|
|
3758
|
+
/**
|
|
3759
|
+
* A form definition that the AI can interact with even though the form is not rendered.
|
|
3760
|
+
*
|
|
3761
|
+
* Use the generic parameter to type the params accepted by a functional `defaultValues`.
|
|
3762
|
+
* Prefer using {@link defineAvailableForm} for automatic inference from `defaultValuesParamsSchema`.
|
|
3763
|
+
*/
|
|
3764
|
+
export declare interface F0AiAvailableFormDefinition<TParams extends Record<string, unknown> = Record<string, unknown>> {
|
|
3765
|
+
/** Unique name to identify the form */
|
|
3766
|
+
name: string;
|
|
3767
|
+
/** Zod schema that defines the form's fields and validation */
|
|
3768
|
+
schema: F0FormSchema;
|
|
3769
|
+
/**
|
|
3770
|
+
* Default values for the form fields.
|
|
3771
|
+
* Can be a static object or a function that receives params (supplied by the AI via presentForm)
|
|
3772
|
+
* and returns the defaults.
|
|
3773
|
+
*/
|
|
3774
|
+
defaultValues?: Record<string, unknown> | ((params: TParams) => Record<string, unknown>);
|
|
3775
|
+
/**
|
|
3776
|
+
* Zod schema that describes the params accepted by a functional `defaultValues`.
|
|
3777
|
+
* When provided, the AI will see this schema and can supply params when calling presentForm.
|
|
3778
|
+
* Params are validated against this schema before being passed to `defaultValues`.
|
|
3779
|
+
*/
|
|
3780
|
+
defaultValuesParamsSchema?: ZodType<TParams>;
|
|
3781
|
+
/** Section configs (title, description) keyed by section ID */
|
|
3782
|
+
sections?: Record<string, F0SectionConfig>;
|
|
3783
|
+
/** Optional submit handler. Called when AI triggers formSubmit on this form. */
|
|
3784
|
+
onSubmit?: (values: Record<string, unknown>) => void | Promise<void>;
|
|
3785
|
+
/** Title shown in the dialog header or wizard header */
|
|
3786
|
+
title?: string;
|
|
3787
|
+
/** Description shown under the title in dialog mode */
|
|
3788
|
+
description?: string;
|
|
3789
|
+
/** Wizard steps (required for wizard mode to work with multiple steps) */
|
|
3790
|
+
steps?: F0WizardFormStep[];
|
|
3791
|
+
}
|
|
3792
|
+
|
|
3652
3793
|
/**
|
|
3653
3794
|
* @experimental This is an experimental component use it at your own risk
|
|
3654
3795
|
*/
|
|
@@ -3657,85 +3798,91 @@ export declare const F0AiChat: () => JSX_2.Element | null;
|
|
|
3657
3798
|
/**
|
|
3658
3799
|
* @experimental This is an experimental component use it at your own risk
|
|
3659
3800
|
*/
|
|
3660
|
-
export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityResolvers, toolHints, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
|
|
3801
|
+
export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityResolvers, toolHints, credits, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
|
|
3661
3802
|
|
|
3662
|
-
export declare const F0AiChatTextArea: ({ submitLabel, inProgress, onSend, onStop,
|
|
3803
|
+
export declare const F0AiChatTextArea: ({ submitLabel, inProgress, onSend, onStop, }: ChatTextareaProps) => JSX_2.Element;
|
|
3663
3804
|
|
|
3664
3805
|
/**
|
|
3665
|
-
*
|
|
3806
|
+
* Entry in the AI form registry
|
|
3666
3807
|
*/
|
|
3667
|
-
export declare interface
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
/**
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
/**
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
/**
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3808
|
+
export declare interface F0AiFormEntry {
|
|
3809
|
+
ref: React.MutableRefObject<F0FormRef | null>;
|
|
3810
|
+
schema: F0FormSchema;
|
|
3811
|
+
/** Whether this entry was registered from an availableFormDefinition (not a rendered form) */
|
|
3812
|
+
virtual?: boolean;
|
|
3813
|
+
/** Section configs (title, description) keyed by section ID */
|
|
3814
|
+
sections?: Record<string, F0SectionConfig>;
|
|
3815
|
+
/** Zod schema for params accepted by presentForm (virtual entries only) */
|
|
3816
|
+
defaultValuesParamsSchema?: ZodType;
|
|
3817
|
+
/** Raw defaultValues function that accepts params (from rendered forms with defaultValuesParamsSchema) */
|
|
3818
|
+
defaultValuesFn?: (params: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
3819
|
+
/** Field names explicitly set via setValue/setValues on a virtual ref */
|
|
3820
|
+
dirtyFields?: Set<string>;
|
|
3821
|
+
}
|
|
3822
|
+
|
|
3823
|
+
/**
|
|
3824
|
+
* Context value for the AI form registry
|
|
3825
|
+
*/
|
|
3826
|
+
declare interface F0AiFormRegistryContextValue {
|
|
3827
|
+
register: (name: string, ref: React.MutableRefObject<F0FormRef | null>, schema: F0FormSchema, sections?: Record<string, F0SectionConfig>, defaultValuesParamsSchema?: ZodType, defaultValuesFn?: (params: Record<string, unknown>) => Promise<Record<string, unknown>>) => void;
|
|
3828
|
+
unregister: (name: string) => void;
|
|
3829
|
+
get: (name: string) => F0AiFormEntry | undefined;
|
|
3830
|
+
getFormNames: () => string[];
|
|
3831
|
+
/** Rebuild the form descriptions snapshot (call after mutating form state) */
|
|
3832
|
+
rebuildDescriptions: () => void;
|
|
3833
|
+
/** Structured descriptions of all active forms, updated on register/unregister */
|
|
3834
|
+
formDescriptions: {
|
|
3835
|
+
formName: string;
|
|
3836
|
+
formSchema: Record<string, unknown>;
|
|
3837
|
+
fieldDescriptions: Record<string, {
|
|
3838
|
+
label: string;
|
|
3839
|
+
section?: string;
|
|
3840
|
+
placeholder?: string;
|
|
3841
|
+
helpText?: string;
|
|
3842
|
+
description?: string;
|
|
3843
|
+
}>;
|
|
3844
|
+
sectionDescriptions: Record<string, {
|
|
3845
|
+
title: string;
|
|
3846
|
+
description?: string;
|
|
3847
|
+
}>;
|
|
3848
|
+
formValues: Record<string, unknown>;
|
|
3849
|
+
formErrors: Record<string, unknown>;
|
|
3850
|
+
isDirty: boolean;
|
|
3851
|
+
/** JSON Schema of defaultValuesParams accepted by presentForm (only for forms with defaultValuesParamsSchema) */
|
|
3852
|
+
defaultValuesParamsSchema?: Record<string, unknown>;
|
|
3853
|
+
}[];
|
|
3854
|
+
/** Currently AI-presented form, or null */
|
|
3855
|
+
presentedForm: F0AiPresentedForm | null;
|
|
3856
|
+
/** Called by the AI tool to present a form */
|
|
3857
|
+
presentForm: (formName: string, mode: "dialog" | "wizard", defaultValuesParams?: Record<string, unknown>) => {
|
|
3858
|
+
success: boolean;
|
|
3859
|
+
error?: string;
|
|
3860
|
+
};
|
|
3861
|
+
/** Called when the presented form is closed (submit/cancel) */
|
|
3862
|
+
dismissForm: () => void;
|
|
3718
3863
|
}
|
|
3719
3864
|
|
|
3720
|
-
export declare const F0AiCollapsibleMessage: ({ icon, title, children, }: F0AiCollapsibleMessageProps) => JSX_2.Element;
|
|
3721
|
-
|
|
3722
3865
|
/**
|
|
3723
|
-
*
|
|
3866
|
+
* Provider that maintains a registry of active F0Forms,
|
|
3867
|
+
* enabling AI tools to look up forms by name.
|
|
3868
|
+
*
|
|
3869
|
+
* Place this inside both the CopilotKit provider and above the F0Form components.
|
|
3870
|
+
*
|
|
3871
|
+
* @example
|
|
3872
|
+
* ```tsx
|
|
3873
|
+
* <F0AiChatProvider>
|
|
3874
|
+
* <F0AiFormRegistryProvider>
|
|
3875
|
+
* <F0Form name="my-form" ... />
|
|
3876
|
+
* <F0AiChat />
|
|
3877
|
+
* </F0AiFormRegistryProvider>
|
|
3878
|
+
* </F0AiChatProvider>
|
|
3879
|
+
* ```
|
|
3724
3880
|
*/
|
|
3725
|
-
export declare
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
/**
|
|
3731
|
-
* Title text for the collapsible trigger
|
|
3732
|
-
*/
|
|
3733
|
-
title: string;
|
|
3734
|
-
/**
|
|
3735
|
-
* Content to show when expanded
|
|
3736
|
-
*/
|
|
3737
|
-
children: ReactNode;
|
|
3738
|
-
}
|
|
3881
|
+
export declare function F0AiFormRegistryProvider({ children, availableFormDefinitions, }: {
|
|
3882
|
+
children: React.ReactNode;
|
|
3883
|
+
/** Form definitions the AI can interact with even if the form is not rendered on the page */
|
|
3884
|
+
availableFormDefinitions?: F0AiAvailableFormDefinition[];
|
|
3885
|
+
}): JSX_2.Element;
|
|
3739
3886
|
|
|
3740
3887
|
/**
|
|
3741
3888
|
* @experimental This is an experimental component use it at your own risk
|
|
@@ -3771,6 +3918,20 @@ export declare class F0AiMask {
|
|
|
3771
3918
|
private render;
|
|
3772
3919
|
}
|
|
3773
3920
|
|
|
3921
|
+
/**
|
|
3922
|
+
* Tracks an AI-presented form (opened via the presentForm tool)
|
|
3923
|
+
*/
|
|
3924
|
+
export declare interface F0AiPresentedForm {
|
|
3925
|
+
/** Name of the form (matches an availableFormDefinition) */
|
|
3926
|
+
name: string;
|
|
3927
|
+
/** Render mode chosen by the LLM */
|
|
3928
|
+
mode: "dialog" | "wizard";
|
|
3929
|
+
/** Resolved definition from availableFormDefinitions */
|
|
3930
|
+
definition: F0AiAvailableFormDefinition;
|
|
3931
|
+
/** Snapshot of the virtual form's values at the time presentForm was called */
|
|
3932
|
+
initialValues: Record<string, unknown>;
|
|
3933
|
+
}
|
|
3934
|
+
|
|
3774
3935
|
export declare const F0Alert: WithDataTestIdReturnType_3<({ title, description, action, link, icon, variant, }: F0AlertProps) => JSX_2.Element>;
|
|
3775
3936
|
|
|
3776
3937
|
export declare interface F0AlertProps {
|
|
@@ -3793,7 +3954,7 @@ export declare interface F0AlertProps {
|
|
|
3793
3954
|
* @experimental This is an experimental component use it at your own risk
|
|
3794
3955
|
*/
|
|
3795
3956
|
export declare const F0AnalyticsDashboard: {
|
|
3796
|
-
<Filters extends FiltersDefinition_2 = FiltersDefinition_2>({ filters, presets, defaultFilters, items, editMode, onLayoutChange, }: F0AnalyticsDashboardProps_2<Filters>): JSX_2.Element;
|
|
3957
|
+
<Filters extends FiltersDefinition_2 = FiltersDefinition_2>({ filters, presets, defaultFilters, items, editMode, onLayoutChange, enableExport, exportFilename, onExportReady, }: F0AnalyticsDashboardProps_2<Filters>): JSX_2.Element;
|
|
3797
3958
|
displayName: string;
|
|
3798
3959
|
};
|
|
3799
3960
|
|
|
@@ -3836,6 +3997,22 @@ export declare interface F0AnalyticsDashboardProps<Filters extends FiltersDefini
|
|
|
3836
3997
|
* the consumer can reconcile against the original config items.
|
|
3837
3998
|
*/
|
|
3838
3999
|
onLayoutChange?: (layout: DashboardItemLayout[]) => void;
|
|
4000
|
+
/**
|
|
4001
|
+
* Show a dashboard-level export button (PDF/Excel).
|
|
4002
|
+
* @default false
|
|
4003
|
+
*/
|
|
4004
|
+
enableExport?: boolean;
|
|
4005
|
+
/**
|
|
4006
|
+
* Called when the export function becomes available (or undefined on unmount).
|
|
4007
|
+
* Allows a parent to trigger export imperatively without rendering the
|
|
4008
|
+
* built-in ExportDropdown.
|
|
4009
|
+
*/
|
|
4010
|
+
/**
|
|
4011
|
+
* Custom filename for the exported Excel file (without extension).
|
|
4012
|
+
* @default "dashboard"
|
|
4013
|
+
*/
|
|
4014
|
+
exportFilename?: string;
|
|
4015
|
+
onExportReady?: (exportFn: (() => Promise<void>) | undefined) => void;
|
|
3839
4016
|
}
|
|
3840
4017
|
|
|
3841
4018
|
/**
|
|
@@ -4110,6 +4287,12 @@ export declare interface F0BaseConfig {
|
|
|
4110
4287
|
* renderIf: ({ values }) => values.status === 'active'
|
|
4111
4288
|
*/
|
|
4112
4289
|
renderIf?: F0BaseFieldRenderIfProp;
|
|
4290
|
+
/**
|
|
4291
|
+
* Name identifying a reusable custom field type.
|
|
4292
|
+
* When set, the form-level `renderCustomField` callback is invoked to provide
|
|
4293
|
+
* field-specific configuration (e.g. data source, options) or a custom component.
|
|
4294
|
+
*/
|
|
4295
|
+
customFieldName?: string;
|
|
4113
4296
|
}
|
|
4114
4297
|
|
|
4115
4298
|
/**
|
|
@@ -4145,6 +4328,11 @@ export declare interface F0BaseField {
|
|
|
4145
4328
|
* @default false
|
|
4146
4329
|
*/
|
|
4147
4330
|
resetOnDisable?: boolean;
|
|
4331
|
+
/**
|
|
4332
|
+
* Name identifying a reusable custom field type.
|
|
4333
|
+
* Used with the form-level `renderCustomField` callback.
|
|
4334
|
+
*/
|
|
4335
|
+
customFieldName?: string;
|
|
4148
4336
|
}
|
|
4149
4337
|
|
|
4150
4338
|
/**
|
|
@@ -4353,21 +4541,6 @@ compact?: boolean;
|
|
|
4353
4541
|
|
|
4354
4542
|
export declare type F0CardProps = Omit<CardInternalProps, (typeof privateProps_3)[number]>;
|
|
4355
4543
|
|
|
4356
|
-
/**
|
|
4357
|
-
* @deprecated Use `DashboardCard` from `canvas/entities/dashboard` directly.
|
|
4358
|
-
* This re-export exists for backwards compatibility.
|
|
4359
|
-
*/
|
|
4360
|
-
export declare const F0ChatReportCard: typeof DashboardCard;
|
|
4361
|
-
|
|
4362
|
-
export declare type F0ChatReportCardProps = {
|
|
4363
|
-
/** The original dashboard config from the agent */
|
|
4364
|
-
config: ChatDashboardConfig;
|
|
4365
|
-
/** Callback when the user clicks the card to view the report */
|
|
4366
|
-
onView: (config: ChatDashboardConfig) => void;
|
|
4367
|
-
/** Tool call ID used to look up saved (edited) dashboard configs */
|
|
4368
|
-
toolCallId?: string;
|
|
4369
|
-
};
|
|
4370
|
-
|
|
4371
4544
|
/**
|
|
4372
4545
|
* @experimental This is an experimental component use it at your own risk
|
|
4373
4546
|
*/
|
|
@@ -4448,10 +4621,15 @@ export declare type F0CustomConfig<TValue = unknown, TConfig = undefined> = TCon
|
|
|
4448
4621
|
*
|
|
4449
4622
|
* @typeParam TValue - Type of the field value
|
|
4450
4623
|
*/
|
|
4451
|
-
declare
|
|
4624
|
+
declare type F0CustomConfigBase<TValue = unknown> = {
|
|
4452
4625
|
/** Render function for the custom component */
|
|
4453
4626
|
render: (props: CustomFieldRenderProps<TValue, undefined>) => ReactNode;
|
|
4454
|
-
}
|
|
4627
|
+
} | {
|
|
4628
|
+
/** Name identifying this custom field type (resolved by renderCustomField on the form) */
|
|
4629
|
+
customFieldName: string;
|
|
4630
|
+
/** Optional render function (overridden by form-level renderCustomField when customFieldName is set) */
|
|
4631
|
+
render?: (props: CustomFieldRenderProps<TValue, undefined>) => ReactNode;
|
|
4632
|
+
};
|
|
4455
4633
|
|
|
4456
4634
|
/**
|
|
4457
4635
|
* Custom config with fieldConfig (render receives typed config)
|
|
@@ -4459,12 +4637,19 @@ declare interface F0CustomConfigBase<TValue = unknown> {
|
|
|
4459
4637
|
* @typeParam TValue - Type of the field value
|
|
4460
4638
|
* @typeParam TConfig - Type of the fieldConfig object
|
|
4461
4639
|
*/
|
|
4462
|
-
declare
|
|
4640
|
+
declare type F0CustomConfigWithFieldConfig<TValue = unknown, TConfig = unknown> = {
|
|
4463
4641
|
/** Custom configuration to pass to the render function */
|
|
4464
4642
|
fieldConfig: TConfig;
|
|
4465
4643
|
/** Render function for the custom component */
|
|
4466
4644
|
render: (props: CustomFieldRenderProps<TValue, TConfig>) => ReactNode;
|
|
4467
|
-
}
|
|
4645
|
+
} | {
|
|
4646
|
+
/** Custom configuration to pass to the render function */
|
|
4647
|
+
fieldConfig: TConfig;
|
|
4648
|
+
/** Name identifying this custom field type (resolved by renderCustomField on the form) */
|
|
4649
|
+
customFieldName: string;
|
|
4650
|
+
/** Optional render function (overridden by form-level renderCustomField when customFieldName is set) */
|
|
4651
|
+
render?: (props: CustomFieldRenderProps<TValue, TConfig>) => ReactNode;
|
|
4652
|
+
};
|
|
4468
4653
|
|
|
4469
4654
|
/**
|
|
4470
4655
|
* Custom field with all properties for rendering (runtime type)
|
|
@@ -4472,11 +4657,13 @@ declare interface F0CustomConfigWithFieldConfig<TValue = unknown, TConfig = unkn
|
|
|
4472
4657
|
export declare type F0CustomField = F0BaseField & {
|
|
4473
4658
|
type: "custom";
|
|
4474
4659
|
/** Render function for the custom component */
|
|
4475
|
-
render
|
|
4660
|
+
render?: (props: CustomFieldRenderPropsBase & {
|
|
4476
4661
|
config: unknown;
|
|
4477
4662
|
}) => ReactNode;
|
|
4478
4663
|
/** Custom configuration (if provided) */
|
|
4479
4664
|
fieldConfig?: unknown;
|
|
4665
|
+
/** Name identifying this custom field type (resolved by renderCustomField on the form) */
|
|
4666
|
+
customFieldName?: string;
|
|
4480
4667
|
/** Conditional rendering based on another field's value */
|
|
4481
4668
|
renderIf?: CustomFieldRenderIf;
|
|
4482
4669
|
};
|
|
@@ -4632,68 +4819,6 @@ declare interface F0DataChartRadarSeries {
|
|
|
4632
4819
|
color?: ChartColorToken;
|
|
4633
4820
|
}
|
|
4634
4821
|
|
|
4635
|
-
/**
|
|
4636
|
-
* Component that renders an optional markdown preview followed by
|
|
4637
|
-
* a dropdown button with "Download Excel" as the primary action and
|
|
4638
|
-
* "Download CSV" as a secondary option. Files are generated client-side
|
|
4639
|
-
* from the raw dataset provided by the agent.
|
|
4640
|
-
*/
|
|
4641
|
-
export declare const F0DataDownload: ({ markdown, filename, dataset, }: F0DataDownloadProps) => JSX_2.Element;
|
|
4642
|
-
|
|
4643
|
-
/**
|
|
4644
|
-
* Inline dataset for client-side file generation (Excel / CSV).
|
|
4645
|
-
* Sent by the agent with the raw query results.
|
|
4646
|
-
*/
|
|
4647
|
-
export declare type F0DataDownloadDataset = {
|
|
4648
|
-
/**
|
|
4649
|
-
* Column headers in display order.
|
|
4650
|
-
*/
|
|
4651
|
-
columns: string[];
|
|
4652
|
-
/**
|
|
4653
|
-
* Array of row objects keyed by column name.
|
|
4654
|
-
*/
|
|
4655
|
-
rows: Record<string, unknown>[];
|
|
4656
|
-
/**
|
|
4657
|
-
* Total number of rows returned by the query (before truncation).
|
|
4658
|
-
* Used together with previewCount to render the preview note.
|
|
4659
|
-
*/
|
|
4660
|
-
totalCount?: number;
|
|
4661
|
-
/**
|
|
4662
|
-
* Number of rows shown in the markdown preview table.
|
|
4663
|
-
* Used together with totalCount to render the preview note.
|
|
4664
|
-
*/
|
|
4665
|
-
previewCount?: number;
|
|
4666
|
-
/**
|
|
4667
|
-
* Map of raw column names to human-readable labels in the user's language.
|
|
4668
|
-
* Used for Excel/CSV headers. Falls back to the raw column name when absent.
|
|
4669
|
-
*/
|
|
4670
|
-
columnLabels?: Record<string, string>;
|
|
4671
|
-
};
|
|
4672
|
-
|
|
4673
|
-
/**
|
|
4674
|
-
* Props for the F0DataDownload component.
|
|
4675
|
-
*
|
|
4676
|
-
* Renders an optional markdown preview/description followed by
|
|
4677
|
-
* "Download Excel" and "Download CSV" buttons. The component generates
|
|
4678
|
-
* the files client-side from the provided dataset.
|
|
4679
|
-
*/
|
|
4680
|
-
export declare type F0DataDownloadProps = {
|
|
4681
|
-
/**
|
|
4682
|
-
* Optional markdown content to display above the download buttons.
|
|
4683
|
-
* Typically a 5-row preview table generated by the agent.
|
|
4684
|
-
*/
|
|
4685
|
-
markdown?: string;
|
|
4686
|
-
/**
|
|
4687
|
-
* Descriptive filename (without extension) for the downloaded files.
|
|
4688
|
-
* Generated by the AI to reflect the query content in the user's language.
|
|
4689
|
-
*/
|
|
4690
|
-
filename?: string;
|
|
4691
|
-
/**
|
|
4692
|
-
* Raw dataset for client-side Excel and CSV generation.
|
|
4693
|
-
*/
|
|
4694
|
-
dataset: F0DataDownloadDataset;
|
|
4695
|
-
};
|
|
4696
|
-
|
|
4697
4822
|
/**
|
|
4698
4823
|
* F0 config options specific to date fields
|
|
4699
4824
|
*
|
|
@@ -5166,6 +5291,14 @@ export declare interface F0FormDefinitionPerSection<T extends F0PerSectionSchema
|
|
|
5166
5291
|
onSubmit: (arg: F0WizardFormPerSectionSubmitArg<T>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
5167
5292
|
submitConfig?: F0PerSectionSubmitConfig;
|
|
5168
5293
|
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
5294
|
+
/** Whether async defaultValues are still being resolved */
|
|
5295
|
+
isLoading?: boolean;
|
|
5296
|
+
/** Zod schema describing params the AI can supply when calling presentForm */
|
|
5297
|
+
defaultValuesParamsSchema?: ZodType;
|
|
5298
|
+
/** Raw defaultValues function for AI registry use when params are involved */
|
|
5299
|
+
defaultValuesFn?: (params: Record<string, unknown>) => Promise<{
|
|
5300
|
+
[K in keyof T]?: Partial<z.infer<T[K]>>;
|
|
5301
|
+
}>;
|
|
5169
5302
|
}
|
|
5170
5303
|
|
|
5171
5304
|
export declare interface F0FormDefinitionSingleSchema<TSchema extends F0FormSchema_2> {
|
|
@@ -5177,6 +5310,12 @@ export declare interface F0FormDefinitionSingleSchema<TSchema extends F0FormSche
|
|
|
5177
5310
|
onSubmit: (arg: F0WizardFormSingleSubmitArg<TSchema>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
5178
5311
|
submitConfig?: F0FormSubmitConfig;
|
|
5179
5312
|
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
5313
|
+
/** Whether async defaultValues are still being resolved */
|
|
5314
|
+
isLoading?: boolean;
|
|
5315
|
+
/** Zod schema describing params the AI can supply when calling presentForm */
|
|
5316
|
+
defaultValuesParamsSchema?: ZodType;
|
|
5317
|
+
/** Raw defaultValues function for AI registry use when params are involved */
|
|
5318
|
+
defaultValuesFn?: (params: Record<string, unknown>) => Promise<Partial<z.infer<TSchema>>>;
|
|
5180
5319
|
}
|
|
5181
5320
|
|
|
5182
5321
|
/**
|
|
@@ -5349,6 +5488,17 @@ export declare interface F0FormPropsWithPerSectionDefinition<T extends F0PerSect
|
|
|
5349
5488
|
styling?: F0FormStylingConfig;
|
|
5350
5489
|
formRef?: React.MutableRefObject<F0FormRef | null>;
|
|
5351
5490
|
initialFiles?: InitialFile[];
|
|
5491
|
+
/**
|
|
5492
|
+
* Callback that renders custom fields identified by `customFieldName`.
|
|
5493
|
+
* When a field has `customFieldName`, this function is called instead of the inline `render`.
|
|
5494
|
+
*/
|
|
5495
|
+
renderCustomField?: RenderCustomFieldFunction;
|
|
5496
|
+
/**
|
|
5497
|
+
* Whether async defaultValues are still being resolved.
|
|
5498
|
+
* When true, the form renders with loading indicators inside each field
|
|
5499
|
+
* instead of replacing the entire form with skeleton placeholders.
|
|
5500
|
+
*/
|
|
5501
|
+
isLoading?: boolean;
|
|
5352
5502
|
}
|
|
5353
5503
|
|
|
5354
5504
|
/**
|
|
@@ -5392,6 +5542,17 @@ export declare interface F0FormPropsWithPerSectionSchema<T extends F0PerSectionS
|
|
|
5392
5542
|
* `defaultValues` against `InitialFile.value`.
|
|
5393
5543
|
*/
|
|
5394
5544
|
initialFiles?: InitialFile[];
|
|
5545
|
+
/**
|
|
5546
|
+
* Callback that renders custom fields identified by `customFieldName`.
|
|
5547
|
+
* When a field has `customFieldName`, this function is called instead of the inline `render`.
|
|
5548
|
+
*/
|
|
5549
|
+
renderCustomField?: RenderCustomFieldFunction;
|
|
5550
|
+
/**
|
|
5551
|
+
* Whether async defaultValues are still being resolved.
|
|
5552
|
+
* When true, the form renders with loading indicators inside each field
|
|
5553
|
+
* instead of replacing the entire form with skeleton placeholders.
|
|
5554
|
+
*/
|
|
5555
|
+
isLoading?: boolean;
|
|
5395
5556
|
}
|
|
5396
5557
|
|
|
5397
5558
|
/**
|
|
@@ -5436,6 +5597,27 @@ export declare interface F0FormPropsWithSingleSchema<TSchema extends F0FormSchem
|
|
|
5436
5597
|
* `defaultValues` against `InitialFile.value`.
|
|
5437
5598
|
*/
|
|
5438
5599
|
initialFiles?: InitialFile[];
|
|
5600
|
+
/**
|
|
5601
|
+
* Callback that renders custom fields identified by `customFieldName`.
|
|
5602
|
+
* When a field has `customFieldName`, this function is called instead of the inline `render`.
|
|
5603
|
+
*/
|
|
5604
|
+
renderCustomField?: RenderCustomFieldFunction;
|
|
5605
|
+
/**
|
|
5606
|
+
* Whether async defaultValues are still being resolved.
|
|
5607
|
+
* When true, the form renders with loading indicators inside each field
|
|
5608
|
+
* instead of replacing the entire form with skeleton placeholders.
|
|
5609
|
+
*/
|
|
5610
|
+
isLoading?: boolean;
|
|
5611
|
+
/**
|
|
5612
|
+
* Zod schema describing params the AI can supply when calling presentForm.
|
|
5613
|
+
* Passed through to the AI form registry.
|
|
5614
|
+
*/
|
|
5615
|
+
defaultValuesParamsSchema?: ZodType;
|
|
5616
|
+
/**
|
|
5617
|
+
* Raw defaultValues function for the AI registry to call with params.
|
|
5618
|
+
* Set automatically when using `useF0FormDefinition` with a functional `defaultValues`.
|
|
5619
|
+
*/
|
|
5620
|
+
defaultValuesFn?: (params: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
5439
5621
|
}
|
|
5440
5622
|
|
|
5441
5623
|
/**
|
|
@@ -5449,6 +5631,11 @@ export declare interface F0FormPropsWithSingleSchemaDefinition<TSchema extends F
|
|
|
5449
5631
|
styling?: F0FormStylingConfig;
|
|
5450
5632
|
formRef?: React.MutableRefObject<F0FormRef | null>;
|
|
5451
5633
|
initialFiles?: InitialFile[];
|
|
5634
|
+
/**
|
|
5635
|
+
* Callback that renders custom fields identified by `customFieldName`.
|
|
5636
|
+
* When a field has `customFieldName`, this function is called instead of the inline `render`.
|
|
5637
|
+
*/
|
|
5638
|
+
renderCustomField?: RenderCustomFieldFunction;
|
|
5452
5639
|
}
|
|
5453
5640
|
|
|
5454
5641
|
/**
|
|
@@ -5473,6 +5660,27 @@ export declare interface F0FormRef {
|
|
|
5473
5660
|
* Get the current form values (including unsaved changes)
|
|
5474
5661
|
*/
|
|
5475
5662
|
getValues: () => Record<string, unknown>;
|
|
5663
|
+
/**
|
|
5664
|
+
* Set a single field value programmatically
|
|
5665
|
+
*/
|
|
5666
|
+
setValue: (fieldName: string, value: unknown, options?: F0FormSetValueOptions) => void;
|
|
5667
|
+
/**
|
|
5668
|
+
* Set multiple field values at once
|
|
5669
|
+
*/
|
|
5670
|
+
setValues: (values: Record<string, unknown>, options?: F0FormSetValueOptions) => void;
|
|
5671
|
+
/**
|
|
5672
|
+
* Manually trigger validation for a specific field or all fields
|
|
5673
|
+
* @returns true if validation passes
|
|
5674
|
+
*/
|
|
5675
|
+
trigger: (fieldName?: string) => Promise<boolean>;
|
|
5676
|
+
/**
|
|
5677
|
+
* Get current validation errors as a map of field name to error message
|
|
5678
|
+
*/
|
|
5679
|
+
getErrors: () => Record<string, string>;
|
|
5680
|
+
/**
|
|
5681
|
+
* Get the list of field names in the form
|
|
5682
|
+
*/
|
|
5683
|
+
getFieldNames: () => string[];
|
|
5476
5684
|
/* Excluded from this release type: _setStateCallback */
|
|
5477
5685
|
}
|
|
5478
5686
|
|
|
@@ -5483,6 +5691,14 @@ export declare type F0FormSchema<T extends ZodRawShape = ZodRawShape> = z.ZodObj
|
|
|
5483
5691
|
|
|
5484
5692
|
declare type F0FormSchema_2<T extends ZodRawShape = ZodRawShape> = z.ZodObject<T> | ZodEffects<z.ZodObject<T>>;
|
|
5485
5693
|
|
|
5694
|
+
/**
|
|
5695
|
+
* Options for setValue
|
|
5696
|
+
*/
|
|
5697
|
+
export declare interface F0FormSetValueOptions {
|
|
5698
|
+
shouldValidate?: boolean;
|
|
5699
|
+
shouldDirty?: boolean;
|
|
5700
|
+
}
|
|
5701
|
+
|
|
5486
5702
|
/**
|
|
5487
5703
|
* Callback to update form state in the hook
|
|
5488
5704
|
*/
|
|
@@ -5619,26 +5835,6 @@ export declare type F0LinkProps = Omit<ActionLinkProps, "variant" | "href"> & {
|
|
|
5619
5835
|
href?: string;
|
|
5620
5836
|
};
|
|
5621
5837
|
|
|
5622
|
-
export declare const f0MarkdownRenderers: NonNullable<AssistantMessageProps["markdownTagRenderers"]>;
|
|
5623
|
-
|
|
5624
|
-
/**
|
|
5625
|
-
* Markdown renderers without the table download button.
|
|
5626
|
-
* Use this when the parent component already provides its own download controls.
|
|
5627
|
-
*/
|
|
5628
|
-
export declare const f0MarkdownRenderersSimple: NonNullable<AssistantMessageProps["markdownTagRenderers"]>;
|
|
5629
|
-
|
|
5630
|
-
export declare const F0MessageSources: ({ sources }: F0MessageSourcesProps) => JSX_2.Element | null;
|
|
5631
|
-
|
|
5632
|
-
/**
|
|
5633
|
-
* Props for the F0MessageSources component
|
|
5634
|
-
*/
|
|
5635
|
-
export declare type F0MessageSourcesProps = {
|
|
5636
|
-
/**
|
|
5637
|
-
* Array of sources to display
|
|
5638
|
-
*/
|
|
5639
|
-
sources: F0Source[];
|
|
5640
|
-
};
|
|
5641
|
-
|
|
5642
5838
|
/**
|
|
5643
5839
|
* F0 config options specific to number fields
|
|
5644
5840
|
*
|
|
@@ -5904,6 +6100,7 @@ declare type F0SelectBaseProps<T extends string, R = unknown> = {
|
|
|
5904
6100
|
* Supports either:
|
|
5905
6101
|
* - Static `options` array
|
|
5906
6102
|
* - Dynamic `source` with `mapOptions` function
|
|
6103
|
+
* - Runtime-provided via `customFieldName` (no options/source needed at definition time)
|
|
5907
6104
|
*
|
|
5908
6105
|
* @typeParam T - The value type (string or number)
|
|
5909
6106
|
* @typeParam R - Record type from the data source
|
|
@@ -5911,7 +6108,7 @@ declare type F0SelectBaseProps<T extends string, R = unknown> = {
|
|
|
5911
6108
|
* Note: `clearable` is derived from the Zod schema:
|
|
5912
6109
|
* - `z.string().optional()` or `z.string().nullable()` → clearable
|
|
5913
6110
|
*/
|
|
5914
|
-
export declare type F0SelectConfig<T extends SelectValueType = string, R extends RecordType = RecordType> = F0SelectConfigWithOptions<T> | F0SelectConfigWithSource<T, R
|
|
6111
|
+
export declare type F0SelectConfig<T extends SelectValueType = string, R extends RecordType = RecordType> = F0SelectConfigWithOptions<T> | F0SelectConfigWithSource<T, R> | F0SelectConfigWithCustomFieldName;
|
|
5915
6112
|
|
|
5916
6113
|
/**
|
|
5917
6114
|
* Base config options shared by all select field variants
|
|
@@ -5925,6 +6122,18 @@ declare interface F0SelectConfigBase {
|
|
|
5925
6122
|
searchBoxPlaceholder?: string;
|
|
5926
6123
|
}
|
|
5927
6124
|
|
|
6125
|
+
/**
|
|
6126
|
+
* Config for select fields whose options/source are provided at runtime
|
|
6127
|
+
* via `customFieldName` and `renderCustomField`.
|
|
6128
|
+
*/
|
|
6129
|
+
declare interface F0SelectConfigWithCustomFieldName extends F0SelectConfigBase {
|
|
6130
|
+
options?: never;
|
|
6131
|
+
source?: never;
|
|
6132
|
+
mapOptions?: never;
|
|
6133
|
+
/** Required: identifies the custom field provider */
|
|
6134
|
+
customFieldName: string;
|
|
6135
|
+
}
|
|
6136
|
+
|
|
5928
6137
|
/**
|
|
5929
6138
|
* Config for select fields with static options
|
|
5930
6139
|
* @typeParam T - The value type (string or number)
|
|
@@ -6043,28 +6252,6 @@ export declare type F0SelectTagProp = string | {
|
|
|
6043
6252
|
src?: string;
|
|
6044
6253
|
};
|
|
6045
6254
|
|
|
6046
|
-
/**
|
|
6047
|
-
* Source object for message sources
|
|
6048
|
-
*/
|
|
6049
|
-
export declare type F0Source = {
|
|
6050
|
-
/**
|
|
6051
|
-
* Title of the source
|
|
6052
|
-
*/
|
|
6053
|
-
title: string;
|
|
6054
|
-
/**
|
|
6055
|
-
* Optional link URL
|
|
6056
|
-
*/
|
|
6057
|
-
link?: string;
|
|
6058
|
-
/**
|
|
6059
|
-
* Optional icon name (from @/icons/app)
|
|
6060
|
-
*/
|
|
6061
|
-
icon?: string;
|
|
6062
|
-
/**
|
|
6063
|
-
* Whether to open link in new tab
|
|
6064
|
-
*/
|
|
6065
|
-
targetBlank?: boolean;
|
|
6066
|
-
};
|
|
6067
|
-
|
|
6068
6255
|
/**
|
|
6069
6256
|
* Union of all string field configs
|
|
6070
6257
|
*
|
|
@@ -6227,38 +6414,6 @@ export declare type F0TextProps = Omit<TextProps, "className" | "variant" | "as"
|
|
|
6227
6414
|
markdown?: boolean;
|
|
6228
6415
|
};
|
|
6229
6416
|
|
|
6230
|
-
export declare const F0Thinking: ({ messages, title }: F0ThinkingProps) => JSX_2.Element;
|
|
6231
|
-
|
|
6232
|
-
/**
|
|
6233
|
-
* Props for the F0Thinking component
|
|
6234
|
-
*/
|
|
6235
|
-
export declare type F0ThinkingProps = {
|
|
6236
|
-
/**
|
|
6237
|
-
* Array of thinking/reflection messages to display
|
|
6238
|
-
*/
|
|
6239
|
-
messages: Message[];
|
|
6240
|
-
/**
|
|
6241
|
-
* Whether the thinking process is currently active
|
|
6242
|
-
*/
|
|
6243
|
-
isActive?: boolean;
|
|
6244
|
-
/**
|
|
6245
|
-
* Custom render function for messages
|
|
6246
|
-
*/
|
|
6247
|
-
RenderMessage?: MessagesProps["RenderMessage"];
|
|
6248
|
-
/**
|
|
6249
|
-
* Custom assistant message component
|
|
6250
|
-
*/
|
|
6251
|
-
AssistantMessage?: MessagesProps["AssistantMessage"];
|
|
6252
|
-
/**
|
|
6253
|
-
* Whether the chat is currently in progress
|
|
6254
|
-
*/
|
|
6255
|
-
inProgress?: boolean;
|
|
6256
|
-
/**
|
|
6257
|
-
* Custom title for the thinking section
|
|
6258
|
-
*/
|
|
6259
|
-
title?: string;
|
|
6260
|
-
};
|
|
6261
|
-
|
|
6262
6417
|
/**
|
|
6263
6418
|
* F0 config options specific to time fields
|
|
6264
6419
|
*
|
|
@@ -6335,6 +6490,11 @@ declare interface F0WizardFormBaseProps {
|
|
|
6335
6490
|
* @default false
|
|
6336
6491
|
*/
|
|
6337
6492
|
autoSkipCompletedSteps?: boolean;
|
|
6493
|
+
/**
|
|
6494
|
+
* Callback that renders custom fields identified by `customFieldName`.
|
|
6495
|
+
* When a field has `customFieldName`, this function is called instead of the inline `render`.
|
|
6496
|
+
*/
|
|
6497
|
+
renderCustomField?: RenderCustomFieldFunction;
|
|
6338
6498
|
}
|
|
6339
6499
|
|
|
6340
6500
|
export declare interface F0WizardFormPerSectionProps<T extends F0PerSectionSchema_2> extends F0WizardFormBaseProps {
|
|
@@ -6652,7 +6812,7 @@ declare const fontSizes: readonly ["sm", "md", "lg"];
|
|
|
6652
6812
|
* real formatter function. The wrapper component maps these to actual
|
|
6653
6813
|
* `(value: number) => string` functions at render time.
|
|
6654
6814
|
*/
|
|
6655
|
-
|
|
6815
|
+
declare type FormatPreset = {
|
|
6656
6816
|
type: "number";
|
|
6657
6817
|
} | {
|
|
6658
6818
|
type: "currency";
|
|
@@ -6665,6 +6825,26 @@ export declare type FormatPreset = {
|
|
|
6665
6825
|
|
|
6666
6826
|
/* Excluded from this release type: FormDefinitionItem */
|
|
6667
6827
|
|
|
6828
|
+
/**
|
|
6829
|
+
* Serializable description of a single form field,
|
|
6830
|
+
* intended for AI tools to understand form structure.
|
|
6831
|
+
*/
|
|
6832
|
+
export declare interface FormFieldDescription {
|
|
6833
|
+
name: string;
|
|
6834
|
+
type: F0FieldType;
|
|
6835
|
+
label: string;
|
|
6836
|
+
required: boolean;
|
|
6837
|
+
placeholder?: string;
|
|
6838
|
+
helpText?: string;
|
|
6839
|
+
options?: {
|
|
6840
|
+
label: string;
|
|
6841
|
+
value: string | number;
|
|
6842
|
+
}[];
|
|
6843
|
+
optionsSource?: "dynamic";
|
|
6844
|
+
section?: string;
|
|
6845
|
+
customFieldName?: string;
|
|
6846
|
+
}
|
|
6847
|
+
|
|
6668
6848
|
/**
|
|
6669
6849
|
* Standalone form field props — decoupled from react-hook-form.
|
|
6670
6850
|
* This is the minimal contract that field renderers need to operate.
|
|
@@ -6685,16 +6865,6 @@ export declare interface FormFieldProps {
|
|
|
6685
6865
|
/** Fraction tokens for proportional widths */
|
|
6686
6866
|
export declare type FractionToken = "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "5/6";
|
|
6687
6867
|
|
|
6688
|
-
export declare const FullscreenChatContext: Context<FullscreenChatContextType>;
|
|
6689
|
-
|
|
6690
|
-
/**
|
|
6691
|
-
* Context type for fullscreen chat state
|
|
6692
|
-
*/
|
|
6693
|
-
declare type FullscreenChatContextType = {
|
|
6694
|
-
inProgress: boolean;
|
|
6695
|
-
setInProgress: (value: boolean) => void;
|
|
6696
|
-
};
|
|
6697
|
-
|
|
6698
6868
|
export declare interface FunnelChartConfig {
|
|
6699
6869
|
type: "funnel";
|
|
6700
6870
|
/** Sort direction of funnel stages. @default "descending" */
|
|
@@ -6784,8 +6954,8 @@ export declare const getAnimationVariants: (options?: AnimationVariantsOptions)
|
|
|
6784
6954
|
};
|
|
6785
6955
|
|
|
6786
6956
|
/**
|
|
6787
|
-
* Look up a
|
|
6788
|
-
* Returns `undefined` if the type
|
|
6957
|
+
* Look up a canvas entity definition by content type.
|
|
6958
|
+
* Returns `undefined` if the type is not configured.
|
|
6789
6959
|
*/
|
|
6790
6960
|
export declare function getCanvasEntity(type: string): CanvasEntityDefinition<any> | undefined;
|
|
6791
6961
|
|
|
@@ -6957,12 +7127,6 @@ export declare type GroupRecord<RecordType> = {
|
|
|
6957
7127
|
records: RecordType[];
|
|
6958
7128
|
};
|
|
6959
7129
|
|
|
6960
|
-
export declare function H1({ children, ...props }: React.HTMLAttributes<HTMLHeadingElement>): JSX_2.Element;
|
|
6961
|
-
|
|
6962
|
-
export declare function H2({ children, ...props }: React.HTMLAttributes<HTMLHeadingElement>): JSX_2.Element;
|
|
6963
|
-
|
|
6964
|
-
export declare function H3({ children, ...props }: React.HTMLAttributes<HTMLHeadingElement>): JSX_2.Element;
|
|
6965
|
-
|
|
6966
7130
|
/**
|
|
6967
7131
|
* Check if a schema has F0 config
|
|
6968
7132
|
*/
|
|
@@ -7005,8 +7169,6 @@ widgets?: ReactNode[];
|
|
|
7005
7169
|
children?: ReactNode;
|
|
7006
7170
|
} & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>>;
|
|
7007
7171
|
|
|
7008
|
-
export declare function Hr({ ...props }: React.HTMLAttributes<HTMLHRElement>): JSX_2.Element;
|
|
7009
|
-
|
|
7010
7172
|
declare type I18nContextType = TranslationsType & {
|
|
7011
7173
|
t: (key: TranslationKey, args?: Record<string, string | number>) => string;
|
|
7012
7174
|
};
|
|
@@ -7046,9 +7208,6 @@ declare type IdStructure = {
|
|
|
7046
7208
|
children?: IdStructure[];
|
|
7047
7209
|
};
|
|
7048
7210
|
|
|
7049
|
-
declare function Image_2({ src, alt, ...props }: React.ImgHTMLAttributes<HTMLImageElement>): JSX_2.Element;
|
|
7050
|
-
export { Image_2 as Image }
|
|
7051
|
-
|
|
7052
7211
|
declare type ImageContextValue = {
|
|
7053
7212
|
src?: (props: ImageProps) => SrcProps;
|
|
7054
7213
|
};
|
|
@@ -7396,8 +7555,6 @@ export declare type Level = (typeof levels)[number];
|
|
|
7396
7555
|
|
|
7397
7556
|
declare const levels: readonly ["info", "warning", "critical", "positive"];
|
|
7398
7557
|
|
|
7399
|
-
export declare function Li({ children, ...props }: React.HTMLAttributes<HTMLLIElement>): JSX_2.Element;
|
|
7400
|
-
|
|
7401
7558
|
export declare const LineChart: WithDataTestIdReturnType_5<ForwardRefExoticComponent<Omit<LineChartPropsBase<LineChartConfig_2> & {
|
|
7402
7559
|
lineType?: "natural" | "linear";
|
|
7403
7560
|
} & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>>;
|
|
@@ -7601,7 +7758,7 @@ declare interface MetadataProps {
|
|
|
7601
7758
|
collapse?: boolean;
|
|
7602
7759
|
}
|
|
7603
7760
|
|
|
7604
|
-
|
|
7761
|
+
declare interface MetricComputation {
|
|
7605
7762
|
datasetId: string;
|
|
7606
7763
|
aggregation: AggregationType;
|
|
7607
7764
|
column?: string;
|
|
@@ -7973,8 +8130,6 @@ declare type NumericWithFormatter = {
|
|
|
7973
8130
|
formatterOptions?: NumericFormatterOptions;
|
|
7974
8131
|
};
|
|
7975
8132
|
|
|
7976
|
-
export declare function Ol({ children, ...props }: React.HTMLAttributes<HTMLOListElement>): JSX_2.Element;
|
|
7977
|
-
|
|
7978
8133
|
export declare type OnAddNewElementParams = {
|
|
7979
8134
|
type: ElementType;
|
|
7980
8135
|
afterId?: string;
|
|
@@ -8082,8 +8237,6 @@ declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
|
8082
8237
|
/** Overflow values */
|
|
8083
8238
|
export declare type OverflowToken = "visible" | "hidden" | "auto" | "scroll";
|
|
8084
8239
|
|
|
8085
|
-
export declare function P({ children, ...props }: React.HTMLAttributes<HTMLParagraphElement>): JSX_2.Element;
|
|
8086
|
-
|
|
8087
8240
|
/**
|
|
8088
8241
|
* Represents a paginated response with page-based navigation.
|
|
8089
8242
|
*
|
|
@@ -8237,8 +8390,6 @@ declare type PopupSize = "sm" | "md" | "lg";
|
|
|
8237
8390
|
/** CSS position */
|
|
8238
8391
|
export declare type PositionToken = "static" | "relative" | "absolute" | "fixed" | "sticky";
|
|
8239
8392
|
|
|
8240
|
-
export declare function Pre({ children, ...props }: React.HTMLAttributes<HTMLPreElement>): JSX_2.Element;
|
|
8241
|
-
|
|
8242
8393
|
export declare const predefinedPresets: Record<string, DatePreset>;
|
|
8243
8394
|
|
|
8244
8395
|
/**
|
|
@@ -8590,12 +8741,6 @@ export declare type RecordType = Record<string, unknown>;
|
|
|
8590
8741
|
|
|
8591
8742
|
declare type ReferenceType = "none" | "striped";
|
|
8592
8743
|
|
|
8593
|
-
/**
|
|
8594
|
-
* Register a canvas entity definition.
|
|
8595
|
-
* Called as a side-effect when each entity module is imported.
|
|
8596
|
-
*/
|
|
8597
|
-
export declare function registerCanvasEntity<T extends CanvasContentBase>(definition: CanvasEntityDefinition<T>): void;
|
|
8598
|
-
|
|
8599
8744
|
declare type RegularAction = BaseAction & {
|
|
8600
8745
|
type: "regular";
|
|
8601
8746
|
variant: ButtonVariant;
|
|
@@ -8609,6 +8754,59 @@ declare type RelaxedNumericWithFormatter = Omit<NumericWithFormatter, "numericVa
|
|
|
8609
8754
|
numericValue: Numeric;
|
|
8610
8755
|
};
|
|
8611
8756
|
|
|
8757
|
+
/**
|
|
8758
|
+
* Callback provided to F0Form / F0WizardForm that renders custom fields
|
|
8759
|
+
* identified by `customFieldName` instead of an inline `render` function.
|
|
8760
|
+
*
|
|
8761
|
+
* For `fieldType: "custom"` — return a ReactNode (component) as before.
|
|
8762
|
+
* For `fieldType: "select"` — return either a ReactNode or a `RenderCustomFieldSelectConfig`
|
|
8763
|
+
* with `{ _type: "select-config", source, mapOptions }` to configure the select dynamically.
|
|
8764
|
+
*/
|
|
8765
|
+
export declare type RenderCustomFieldFunction = (props: RenderCustomFieldProps) => RenderCustomFieldResult;
|
|
8766
|
+
|
|
8767
|
+
/**
|
|
8768
|
+
* Props passed to the form-level `renderCustomField` callback.
|
|
8769
|
+
* Extends the base custom field render props with a required `customFieldName`.
|
|
8770
|
+
*/
|
|
8771
|
+
export declare interface RenderCustomFieldProps extends CustomFieldRenderPropsBase {
|
|
8772
|
+
/** Name identifying this custom field type */
|
|
8773
|
+
customFieldName: string;
|
|
8774
|
+
/** Custom configuration (if provided via fieldConfig) */
|
|
8775
|
+
config: unknown;
|
|
8776
|
+
/** The field type this customFieldName is attached to (e.g. "select", "custom") */
|
|
8777
|
+
fieldType: string;
|
|
8778
|
+
}
|
|
8779
|
+
|
|
8780
|
+
/**
|
|
8781
|
+
* Return type for the `renderCustomField` callback.
|
|
8782
|
+
* Can return either:
|
|
8783
|
+
* - A React node (rendered directly as a custom component)
|
|
8784
|
+
* - A select config object (merged into the select field props)
|
|
8785
|
+
*/
|
|
8786
|
+
declare type RenderCustomFieldResult = React.ReactNode | RenderCustomFieldSelectConfig;
|
|
8787
|
+
|
|
8788
|
+
/**
|
|
8789
|
+
* Select field configuration that `renderCustomField` can return
|
|
8790
|
+
* for select fields with `customFieldName` (e.g. reusable entity selectors).
|
|
8791
|
+
*
|
|
8792
|
+
* Mirrors the select field config shape — either static `options` or dynamic `source`+`mapOptions`.
|
|
8793
|
+
*/
|
|
8794
|
+
export declare interface RenderCustomFieldSelectConfig {
|
|
8795
|
+
_type: "select-config";
|
|
8796
|
+
/** Data source for fetching options dynamically */
|
|
8797
|
+
source?: unknown;
|
|
8798
|
+
/** Function to map data source items to select options */
|
|
8799
|
+
mapOptions?: (item: never) => unknown;
|
|
8800
|
+
/** Static options array */
|
|
8801
|
+
options?: unknown[];
|
|
8802
|
+
/** Whether multiple selection is allowed */
|
|
8803
|
+
multiple?: boolean;
|
|
8804
|
+
/** Whether to show the search box */
|
|
8805
|
+
showSearchBox?: boolean;
|
|
8806
|
+
/** Placeholder for the search box */
|
|
8807
|
+
searchBoxPlaceholder?: string;
|
|
8808
|
+
}
|
|
8809
|
+
|
|
8612
8810
|
declare type RendererDefinition = ValueDisplayRendererDefinition;
|
|
8613
8811
|
|
|
8614
8812
|
/**
|
|
@@ -8984,8 +9182,6 @@ export declare interface StepItemProps {
|
|
|
8984
9182
|
isCompleted?: boolean;
|
|
8985
9183
|
}
|
|
8986
9184
|
|
|
8987
|
-
export declare function Strong({ children, ...props }: React.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
|
|
8988
|
-
|
|
8989
9185
|
export declare interface SuccessMessageProps {
|
|
8990
9186
|
title: string;
|
|
8991
9187
|
description: string;
|
|
@@ -9118,8 +9314,6 @@ export declare type SurveySubmitAnswers = Record<string, string | number | strin
|
|
|
9118
9314
|
*/
|
|
9119
9315
|
declare type SwitchFieldRenderIf = BooleanRenderIfCondition | CommonRenderIfCondition | F0BaseFieldRenderIfFunction;
|
|
9120
9316
|
|
|
9121
|
-
export declare function Table({ children, ...props }: React.HTMLAttributes<HTMLTableElement>): JSX_2.Element;
|
|
9122
|
-
|
|
9123
9317
|
declare type TableCollectionProps<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<R>> = CollectionProps<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping, TableVisualizationOptions<R, Filters, Sortings, Summaries>>;
|
|
9124
9318
|
|
|
9125
9319
|
declare type TableColumnDefinition<R extends RecordType, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition> = WithOptionalSorting<R, Sortings> & Pick<ComponentProps<typeof TableHead>, "hidden" | "info" | "infoIcon" | "sticky" | "width"> & {
|
|
@@ -9222,12 +9416,6 @@ declare interface TableHeadProps {
|
|
|
9222
9416
|
|
|
9223
9417
|
declare type TableOfContentPopoverVariant = "dark" | "light";
|
|
9224
9418
|
|
|
9225
|
-
/**
|
|
9226
|
-
* Table variant without the built-in download button.
|
|
9227
|
-
* Used inside components that already provide their own download controls.
|
|
9228
|
-
*/
|
|
9229
|
-
export declare function TableSimple({ children, ...props }: React.HTMLAttributes<HTMLTableElement>): JSX_2.Element;
|
|
9230
|
-
|
|
9231
9419
|
declare type TableVisualizationOptions<R extends RecordType, _Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition> = {
|
|
9232
9420
|
/**
|
|
9233
9421
|
* The columns to display
|
|
@@ -9433,8 +9621,6 @@ export declare type TagVariant = BaseTag<{
|
|
|
9433
9621
|
type: "raw";
|
|
9434
9622
|
} & TagRawProps>;
|
|
9435
9623
|
|
|
9436
|
-
export declare function Td({ children, ...props }: React.HTMLAttributes<HTMLTableCellElement>): JSX_2.Element;
|
|
9437
|
-
|
|
9438
9624
|
export declare type TeamAvatarVariant = Extract<AvatarVariant, {
|
|
9439
9625
|
type: "team";
|
|
9440
9626
|
}>;
|
|
@@ -9546,8 +9732,6 @@ declare const textVariants: (props?: ({
|
|
|
9546
9732
|
className?: ClassValue;
|
|
9547
9733
|
})) | undefined) => string;
|
|
9548
9734
|
|
|
9549
|
-
export declare function Th({ children, ...props }: React.HTMLAttributes<HTMLTableCellElement>): JSX_2.Element;
|
|
9550
|
-
|
|
9551
9735
|
declare type TOCItem<Depth extends 1 | 2 | 3 | 4 = 1> = BaseTOCItem & {
|
|
9552
9736
|
children?: NextDepth<Depth> extends never ? never : TOCItem<NextDepth<Depth>>[];
|
|
9553
9737
|
};
|
|
@@ -9624,8 +9808,6 @@ export declare interface TwoColumnLayoutProps {
|
|
|
9624
9808
|
sticky?: boolean;
|
|
9625
9809
|
}
|
|
9626
9810
|
|
|
9627
|
-
export declare function Ul({ children, ...props }: React.HTMLAttributes<HTMLUListElement>): JSX_2.Element;
|
|
9628
|
-
|
|
9629
9811
|
/**
|
|
9630
9812
|
* Unwrap optional, nullable, default wrappers to get the inner schema
|
|
9631
9813
|
* Uses _def.typeName for reliable type checking across module boundaries
|
|
@@ -9890,17 +10072,10 @@ export declare interface UseDataReturn<R extends RecordType> {
|
|
|
9890
10072
|
export declare function useDataSource<R extends RecordType = RecordType, FiltersSchema extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>>({ defaultFilters, currentFilters: externalCurrentFilters, defaultGrouping: externalDefaultGrouping, currentGrouping: externalCurrentGrouping, filters, search, defaultSortings, currentSortings: externalCurrentSortings, dataAdapter, grouping, ...rest }: DataSourceDefinition<R, FiltersSchema, Sortings, Grouping>, deps?: ReadonlyArray<unknown>): DataSource<R, FiltersSchema, Sortings, Grouping>;
|
|
9891
10073
|
|
|
9892
10074
|
/**
|
|
9893
|
-
* Hook
|
|
9894
|
-
*
|
|
9895
|
-
*
|
|
9896
|
-
* @example
|
|
9897
|
-
* // Enable all default actions in your component
|
|
9898
|
-
* const MyComponent = () => {
|
|
9899
|
-
* useDefaultCopilotActions()
|
|
9900
|
-
* return <div>...</div>
|
|
9901
|
-
* }
|
|
10075
|
+
* Hook that invokes every configured copilot action factory.
|
|
10076
|
+
* Actions are declared in the `copilotActions` array in `registry.ts`.
|
|
9902
10077
|
*/
|
|
9903
|
-
export declare
|
|
10078
|
+
export declare function useDefaultCopilotActions(): void;
|
|
9904
10079
|
|
|
9905
10080
|
export declare function useDndEvents(handler: (e: {
|
|
9906
10081
|
phase: "start" | "over" | "drop" | "cancel";
|
|
@@ -9924,6 +10099,12 @@ export declare const useEmojiConfetti: () => {
|
|
|
9924
10099
|
fireEmojiConfetti: (emoji: string, elementRef: RefObject<HTMLElement>) => void;
|
|
9925
10100
|
};
|
|
9926
10101
|
|
|
10102
|
+
/**
|
|
10103
|
+
* Hook to access the AI form registry.
|
|
10104
|
+
* Returns null if not inside a F0AiFormRegistryProvider.
|
|
10105
|
+
*/
|
|
10106
|
+
export declare function useF0AiFormRegistry(): F0AiFormRegistryContextValue | null;
|
|
10107
|
+
|
|
9927
10108
|
export declare const useF0Dialog: () => F0DialogContextType;
|
|
9928
10109
|
|
|
9929
10110
|
/**
|
|
@@ -9967,32 +10148,68 @@ export declare const useF0Dialog: () => F0DialogContextType;
|
|
|
9967
10148
|
*/
|
|
9968
10149
|
export declare function useF0Form(): UseF0FormReturn;
|
|
9969
10150
|
|
|
9970
|
-
|
|
10151
|
+
/** Single schema, no params */
|
|
10152
|
+
export declare function useF0FormDefinition<TSchema extends F0FormSchema_2>(input: UseF0FormDefinitionSingleSchemaInputWithoutParams<TSchema>): F0FormDefinitionSingleSchema<TSchema>;
|
|
10153
|
+
|
|
10154
|
+
/** Single schema, with params */
|
|
10155
|
+
export declare function useF0FormDefinition<TSchema extends F0FormSchema_2, TParams extends Record<string, unknown>>(input: UseF0FormDefinitionSingleSchemaInputWithParams<TSchema, TParams>): F0FormDefinitionSingleSchema<TSchema>;
|
|
9971
10156
|
|
|
9972
|
-
|
|
10157
|
+
/** Per-section, no params */
|
|
10158
|
+
export declare function useF0FormDefinition<T extends F0PerSectionSchema_2>(input: UseF0FormDefinitionPerSectionInputWithoutParams<T>): F0FormDefinitionPerSection<T>;
|
|
9973
10159
|
|
|
9974
|
-
|
|
10160
|
+
/** Per-section, with params */
|
|
10161
|
+
export declare function useF0FormDefinition<T extends F0PerSectionSchema_2, TParams extends Record<string, unknown>>(input: UseF0FormDefinitionPerSectionInputWithParams<T, TParams>): F0FormDefinitionPerSection<T>;
|
|
10162
|
+
|
|
10163
|
+
/** Base fields shared by all per-section input variants */
|
|
10164
|
+
declare interface UseF0FormDefinitionPerSectionInputBase<T extends F0PerSectionSchema_2> {
|
|
9975
10165
|
name: string;
|
|
9976
10166
|
schema: T;
|
|
9977
10167
|
sections?: Record<string, F0PerSectionSectionConfig>;
|
|
9978
|
-
defaultValues?: {
|
|
9979
|
-
[K in keyof T]?: Partial<z.infer<T[K]>>;
|
|
9980
|
-
};
|
|
9981
10168
|
onSubmit: (arg: F0WizardFormPerSectionSubmitArg<T>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
9982
10169
|
submitConfig?: F0PerSectionSubmitConfig;
|
|
9983
10170
|
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
9984
10171
|
}
|
|
9985
10172
|
|
|
9986
|
-
|
|
10173
|
+
/** Per-section input WITHOUT `defaultValuesParamsSchema` */
|
|
10174
|
+
declare interface UseF0FormDefinitionPerSectionInputWithoutParams<T extends F0PerSectionSchema_2> extends UseF0FormDefinitionPerSectionInputBase<T> {
|
|
10175
|
+
defaultValues?: AsyncOrSync<{
|
|
10176
|
+
[K in keyof T]?: Partial<z.infer<T[K]>>;
|
|
10177
|
+
}>;
|
|
10178
|
+
defaultValuesParamsSchema?: undefined;
|
|
10179
|
+
}
|
|
10180
|
+
|
|
10181
|
+
/** Per-section input WITH `defaultValuesParamsSchema` */
|
|
10182
|
+
declare interface UseF0FormDefinitionPerSectionInputWithParams<T extends F0PerSectionSchema_2, TParams extends Record<string, unknown>> extends UseF0FormDefinitionPerSectionInputBase<T> {
|
|
10183
|
+
defaultValues?: {
|
|
10184
|
+
[K in keyof T]?: Partial<z.infer<T[K]>>;
|
|
10185
|
+
} | AsyncWithParams<{
|
|
10186
|
+
[K in keyof T]?: Partial<z.infer<T[K]>>;
|
|
10187
|
+
}, TParams>;
|
|
10188
|
+
defaultValuesParamsSchema: ZodType<TParams>;
|
|
10189
|
+
}
|
|
10190
|
+
|
|
10191
|
+
/** Base fields shared by all single-schema input variants */
|
|
10192
|
+
declare interface UseF0FormDefinitionSingleSchemaInputBase<TSchema extends F0FormSchema_2> {
|
|
9987
10193
|
name: string;
|
|
9988
10194
|
schema: TSchema;
|
|
9989
10195
|
sections?: Record<string, F0SectionConfig>;
|
|
9990
|
-
defaultValues?: Partial<z.infer<TSchema>>;
|
|
9991
10196
|
onSubmit: (arg: F0WizardFormSingleSubmitArg<TSchema>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
9992
10197
|
submitConfig?: F0FormSubmitConfig;
|
|
9993
10198
|
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
9994
10199
|
}
|
|
9995
10200
|
|
|
10201
|
+
/** Single-schema input WITHOUT `defaultValuesParamsSchema` → `defaultValues` is sync or `(signal) => Promise<T>` */
|
|
10202
|
+
declare interface UseF0FormDefinitionSingleSchemaInputWithoutParams<TSchema extends F0FormSchema_2> extends UseF0FormDefinitionSingleSchemaInputBase<TSchema> {
|
|
10203
|
+
defaultValues?: AsyncOrSync<Partial<z.infer<TSchema>>>;
|
|
10204
|
+
defaultValuesParamsSchema?: undefined;
|
|
10205
|
+
}
|
|
10206
|
+
|
|
10207
|
+
/** Single-schema input WITH `defaultValuesParamsSchema` → `defaultValues` is sync or `(params) => Promise<T>` */
|
|
10208
|
+
declare interface UseF0FormDefinitionSingleSchemaInputWithParams<TSchema extends F0FormSchema_2, TParams extends Record<string, unknown>> extends UseF0FormDefinitionSingleSchemaInputBase<TSchema> {
|
|
10209
|
+
defaultValues?: Partial<z.infer<TSchema>> | AsyncWithParams<Partial<z.infer<TSchema>>, TParams>;
|
|
10210
|
+
defaultValuesParamsSchema: ZodType<TParams>;
|
|
10211
|
+
}
|
|
10212
|
+
|
|
9996
10213
|
/**
|
|
9997
10214
|
* Return type for the useF0Form hook
|
|
9998
10215
|
*/
|
|
@@ -10019,6 +10236,27 @@ export declare interface UseF0FormReturn {
|
|
|
10019
10236
|
* Get the current form values (including unsaved changes)
|
|
10020
10237
|
*/
|
|
10021
10238
|
getValues: () => Record<string, unknown>;
|
|
10239
|
+
/**
|
|
10240
|
+
* Set a single field value programmatically
|
|
10241
|
+
*/
|
|
10242
|
+
setValue: (fieldName: string, value: unknown, options?: F0FormSetValueOptions) => void;
|
|
10243
|
+
/**
|
|
10244
|
+
* Set multiple field values at once
|
|
10245
|
+
*/
|
|
10246
|
+
setValues: (values: Record<string, unknown>, options?: F0FormSetValueOptions) => void;
|
|
10247
|
+
/**
|
|
10248
|
+
* Manually trigger validation for a specific field or all fields
|
|
10249
|
+
* @returns true if validation passes
|
|
10250
|
+
*/
|
|
10251
|
+
trigger: (fieldName?: string) => Promise<boolean>;
|
|
10252
|
+
/**
|
|
10253
|
+
* Get current validation errors as a map of field name to error message
|
|
10254
|
+
*/
|
|
10255
|
+
getErrors: () => Record<string, string>;
|
|
10256
|
+
/**
|
|
10257
|
+
* Get the list of field names in the form
|
|
10258
|
+
*/
|
|
10259
|
+
getFieldNames: () => string[];
|
|
10022
10260
|
/**
|
|
10023
10261
|
* Whether the form is currently submitting
|
|
10024
10262
|
*/
|