@factorialco/f0-react 1.241.2 → 1.242.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.
@@ -274,8 +274,14 @@ export declare type AiChatProviderProps = {
274
274
  greeting?: string;
275
275
  initialMessage?: string | string[];
276
276
  welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
277
- onThumbsUp?: (message: AIMessage, threadId: string) => void;
278
- onThumbsDown?: (message: AIMessage, threadId: string) => void;
277
+ onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
278
+ threadId: string;
279
+ feedback: string;
280
+ }) => void;
281
+ onThumbsDown?: (message: AIMessage, { threadId, feedback }: {
282
+ threadId: string;
283
+ feedback: string;
284
+ }) => void;
279
285
  } & Pick<CopilotKitProps, "agent" | "credentials" | "children" | "runtimeUrl" | "showDevConsole" | "threadId" | "headers">;
280
286
 
281
287
  declare type AiChatProviderReturnValue = {
@@ -301,8 +307,14 @@ declare type AiChatProviderReturnValue = {
301
307
  setInitialMessage: React.Dispatch<React.SetStateAction<string | string[] | undefined>>;
302
308
  welcomeScreenSuggestions: WelcomeScreenSuggestion[];
303
309
  setWelcomeScreenSuggestions: React.Dispatch<React.SetStateAction<WelcomeScreenSuggestion[]>>;
304
- onThumbsUp?: (message: AIMessage, threadId: string) => void;
305
- onThumbsDown?: (message: AIMessage, threadId: string) => void;
310
+ onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
311
+ threadId: string;
312
+ feedback: string;
313
+ }) => void;
314
+ onThumbsDown?: (message: AIMessage, { threadId, feedback }: {
315
+ threadId: string;
316
+ feedback: string;
317
+ }) => void;
306
318
  /**
307
319
  * Clear/reset the chat conversation
308
320
  */
@@ -316,8 +328,14 @@ declare interface AiChatState {
316
328
  agent?: string;
317
329
  initialMessage?: string | string[];
318
330
  welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
319
- onThumbsUp?: (message: AIMessage, threadId: string) => void;
320
- onThumbsDown?: (message: AIMessage, threadId: string) => void;
331
+ onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
332
+ threadId: string;
333
+ feedback: string;
334
+ }) => void;
335
+ onThumbsDown?: (message: AIMessage, { threadId, feedback }: {
336
+ threadId: string;
337
+ feedback: string;
338
+ }) => void;
321
339
  }
322
340
 
323
341
  /**
@@ -1329,6 +1347,8 @@ declare type Content = (ComponentProps<typeof DataList.Item> & {
1329
1347
  type: "dot-tag";
1330
1348
  });
1331
1349
 
1350
+ declare type ContentPadding = "sm" | "md";
1351
+
1332
1352
  declare type CopyActionType = {
1333
1353
  type: "copy";
1334
1354
  text?: string;
@@ -1720,6 +1740,7 @@ declare const defaultTranslations: {
1720
1740
  readonly add: "Add";
1721
1741
  readonly edit: "Edit";
1722
1742
  readonly save: "Save";
1743
+ readonly send: "Send";
1723
1744
  readonly cancel: "Cancel";
1724
1745
  readonly copy: "Copy";
1725
1746
  readonly close: "Close";
@@ -1889,10 +1910,22 @@ declare const defaultTranslations: {
1889
1910
  readonly scrollToBottom: "Scroll to bottom";
1890
1911
  readonly welcome: "Ask or create with One";
1891
1912
  readonly defaultInitialMessage: "How can I help you today?";
1892
- readonly inputPlaceholder: "Write something here...";
1913
+ readonly inputPlaceholder: "Ask about time, people, or company info…";
1893
1914
  readonly stopAnswerGeneration: "Stop generating";
1894
1915
  readonly sendMessage: "Send message";
1895
1916
  readonly thoughtsGroupTitle: "Reflection";
1917
+ readonly feedbackModal: {
1918
+ readonly positive: {
1919
+ readonly title: "What did you like about this response?";
1920
+ readonly placeholder: "What did you like about this response? How could it be even better?";
1921
+ readonly description: "Your feedback helps Factorial Al improve. The messages from your chat, the search results, and your feedback will be sent to Factorial to help improve Factorial Al.";
1922
+ };
1923
+ readonly negative: {
1924
+ readonly title: "What could have been better in this response?";
1925
+ readonly placeholder: "What could have been better in this response? How could it be even better?";
1926
+ readonly description: "Your feedback helps Factorial Al improve. The messages from your chat, the search results, and your feedback will be sent to Factorial to help improve Factorial Al.";
1927
+ };
1928
+ };
1896
1929
  };
1897
1930
  readonly select: {
1898
1931
  readonly noResults: "No results found";
@@ -2775,6 +2808,7 @@ declare const Input_2: React_2.ForwardRefExoticComponent<Omit<React_2.InputHTMLA
2775
2808
  declare const INPUTFIELD_SIZES: readonly ["sm", "md"];
2776
2809
 
2777
2810
  declare type InputFieldProps<T> = {
2811
+ autoFocus?: boolean;
2778
2812
  label: string;
2779
2813
  placeholder?: string;
2780
2814
  labelIcon?: IconType;
@@ -2847,7 +2881,7 @@ declare const inputFieldStatus: readonly ["default", "warning", "info", "error"]
2847
2881
 
2848
2882
  declare type InputFieldStatusType = (typeof inputFieldStatus)[number];
2849
2883
 
2850
- export declare type InputProps<T extends string> = Pick<ComponentProps<typeof Input_2>, "ref"> & Pick<InputFieldProps<T>, "required" | "disabled" | "size" | "onChange" | "value" | "placeholder" | "clearable" | "maxLength" | "label" | "labelIcon" | "icon" | "hideLabel" | "name" | "error" | "status" | "hint"> & {
2884
+ export declare type InputProps<T extends string> = Pick<ComponentProps<typeof Input_2>, "ref"> & Pick<InputFieldProps<T>, "autoFocus" | "required" | "disabled" | "size" | "onChange" | "value" | "placeholder" | "clearable" | "maxLength" | "label" | "labelIcon" | "icon" | "hideLabel" | "name" | "error" | "status" | "hint"> & {
2851
2885
  type?: Exclude<HTMLInputTypeAttribute, "number">;
2852
2886
  };
2853
2887
 
@@ -3634,6 +3668,8 @@ declare type OneModalProps = {
3634
3668
  onClose: () => void;
3635
3669
  /** Whether to render the modal as a bottom sheet on mobile */
3636
3670
  asBottomSheetInMobile?: boolean;
3671
+ /** the padding of internal content areas (header, content, footer) */
3672
+ contentPadding?: ContentPadding;
3637
3673
  position?: ModalPosition;
3638
3674
  /** Custom content to render in the modal. Only accepts OneModal.Header and OneModal.Content components */
3639
3675
  children: default_2.ReactElement<ComponentProps<typeof OneModalHeader> | ComponentProps<typeof OneModalContent>> | default_2.ReactElement<ComponentProps<typeof OneModalHeader> | ComponentProps<typeof OneModalContent>>[];
@@ -5417,11 +5453,6 @@ declare module "@tiptap/core" {
5417
5453
  }
5418
5454
 
5419
5455
 
5420
- declare namespace Calendar {
5421
- var displayName: string;
5422
- }
5423
-
5424
-
5425
5456
  declare module "@tiptap/core" {
5426
5457
  interface Commands<ReturnType> {
5427
5458
  moodTracker: {
@@ -5429,3 +5460,8 @@ declare module "@tiptap/core" {
5429
5460
  };
5430
5461
  }
5431
5462
  }
5463
+
5464
+
5465
+ declare namespace Calendar {
5466
+ var displayName: string;
5467
+ }