@factorialco/f0-react 1.372.0 → 1.373.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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as X, jsxs as le } from "react/jsx-runtime";
2
2
  import { useInsertionEffect as Xe, createContext as ke, useContext as $e, useRef as _, useEffect as ne, useState as _e, useCallback as ze, useMemo as Ye } from "react";
3
- import { y as qe, z as We, D as He, G as je, J as Ne, K as Ke, M as Qe, N as Je, Q as Ze, R as et, V as Ce, W as tt, X as rt, Y as nt, Z as it, _ as ot, $ as at, a0 as st, a1 as ie, a2 as ct, a3 as ut, a4 as lt, a5 as ft, a6 as mt, a7 as dt, a8 as fe, a9 as ht } from "./F0AiChat-DWvnnMvo.js";
3
+ import { y as qe, z as We, D as He, G as je, J as Ne, K as Ke, M as Qe, N as Je, Q as Ze, R as et, V as Ce, W as tt, X as rt, Y as nt, Z as it, _ as ot, $ as at, a0 as st, a1 as ie, a2 as ct, a3 as ut, a4 as lt, a5 as ft, a6 as mt, a7 as dt, a8 as fe, a9 as ht } from "./F0AiChat-BOxDZ--K.js";
4
4
  import { useTrackVolume as pt } from "@livekit/components-react";
5
5
  function vt(t, e, r) {
6
6
  Xe(() => t.on(e, r), [t, e, r]);
package/dist/ai.d.ts CHANGED
@@ -399,6 +399,7 @@ export declare const defaultTranslations: {
399
399
  readonly selectAllItems: "Select all {{total}} items";
400
400
  readonly allItemsSelected: "All {{total}} items selected";
401
401
  };
402
+ readonly noItemsSelected: "No items selected";
402
403
  };
403
404
  readonly filters: {
404
405
  readonly searchPlaceholder: "Search filters...";
@@ -746,6 +747,8 @@ export declare const defaultTranslations: {
746
747
  readonly forms: {
747
748
  readonly actionBar: {
748
749
  readonly unsavedChanges: "You have changes pending to be saved";
750
+ readonly saving: "Saving...";
751
+ readonly saved: "Your changes have been saved";
749
752
  readonly discard: "Discard";
750
753
  readonly issues: {
751
754
  readonly one: "{{count}} issue";
@@ -1193,6 +1196,11 @@ declare module "gridstack" {
1193
1196
  }
1194
1197
 
1195
1198
 
1199
+ declare namespace Calendar {
1200
+ var displayName: string;
1201
+ }
1202
+
1203
+
1196
1204
  declare module "@tiptap/core" {
1197
1205
  interface Commands<ReturnType> {
1198
1206
  aiBlock: {
@@ -1240,8 +1248,3 @@ declare module "@tiptap/core" {
1240
1248
  };
1241
1249
  }
1242
1250
  }
1243
-
1244
-
1245
- declare namespace Calendar {
1246
- var displayName: string;
1247
- }
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { A as e, B as o, C as t, E as n, h as i, F as r, a as l, x as c, i as A, b as u, s as F, t as h, v as C, w as T, c as d, n as m, o as I, p as f, H as g, I as S, k as p, L as x, O as H, q as P, P as b, S as k, T as O, l as v, m as w, U as M, r as E, j as L, d as q, e as B, u as U, g as j, f as z } from "./F0AiChat-DWvnnMvo.js";
1
+ import { A as e, B as o, C as t, E as n, h as i, F as r, a as l, x as c, i as A, b as u, s as F, t as h, v as C, w as T, c as d, n as m, o as I, p as f, H as g, I as S, k as p, L as x, O as H, q as P, P as b, S as k, T as O, l as v, m as w, U as M, r as E, j as L, d as q, e as B, u as U, g as j, f as z } from "./F0AiChat-BOxDZ--K.js";
2
2
  import { defaultTranslations as R } from "./i18n-provider-defaults.js";
3
- import { A as y, F as G, c as J, b as K, a as N, o as Q, u as W } from "./F0HILActionConfirmation-DVSBJ87p.js";
3
+ import { A as y, F as G, c as J, b as K, a as N, o as Q, u as W } from "./F0HILActionConfirmation-DFMiZgbK.js";
4
4
  export {
5
5
  e as A,
6
6
  y as AiChatTranslationsProvider,
@@ -18,8 +18,6 @@ import { ClassValue } from 'cva';
18
18
  import { CompanyCellValue } from './types/company';
19
19
  import { CompanyCellValue as CompanyCellValue_2 } from '../../../ui/value-display/types/company';
20
20
  import { ComponentProps } from 'react';
21
- import { ControllerProps } from 'react-hook-form';
22
- import { ControllerRenderProps } from 'react-hook-form';
23
21
  import { CopilotKitProps } from '@copilotkit/react-core';
24
22
  import { CountryCellValue } from './types/country';
25
23
  import { DateCellValue } from './types/date';
@@ -34,8 +32,6 @@ import { Editor } from '@tiptap/react';
34
32
  import { F0SelectProps as F0SelectProps_2 } from './types';
35
33
  import { f1Colors } from '@factorialco/f0-core';
36
34
  import { FC } from 'react';
37
- import { FieldPath } from 'react-hook-form';
38
- import { FieldValues } from 'react-hook-form';
39
35
  import { FileCellValue } from './types/file';
40
36
  import { FileCellValue as FileCellValue_2 } from '../../../ui/value-display/types/file';
41
37
  import { FolderCellValue } from './types/folder';
@@ -57,7 +53,6 @@ import { NumberCellValue } from './types/number';
57
53
  import { NumberCellValue as NumberCellValue_2 } from '../../../ui/value-display/types/number';
58
54
  import { NumberFilterOptions } from './NumberFilter/NumberFilter';
59
55
  import { Observable } from 'zen-observable-ts';
60
- import { Path } from 'react-hook-form';
61
56
  import { PercentageCellValue } from './types/percentage';
62
57
  import { PersonCellValue } from './types/person';
63
58
  import { PersonCellValue as PersonCellValue_2 } from '../../../ui/value-display/types/person';
@@ -86,16 +81,10 @@ import { TeamCellValue as TeamCellValue_2 } from '../../../ui/value-display/type
86
81
  import { TextCellValue } from './types/text';
87
82
  import { TextCellValue as TextCellValue_2 } from '../../../ui/value-display/types/text';
88
83
  import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
89
- import { useForm } from 'react-hook-form';
90
- import { UseFormHandleSubmit } from 'react-hook-form';
91
- import { UseFormProps } from 'react-hook-form';
92
- import { UseFormReturn } from 'react-hook-form';
93
84
  import { ValueDisplayRendererContext as ValueDisplayRendererContext_2 } from '../../../ui/value-display';
94
85
  import { VariantProps } from 'cva';
95
86
  import { VerticalBarChartProps } from '../../../components/Charts/VerticalBarChart';
96
87
  import { WidgetProps as WidgetProps_2 } from '../Widget';
97
- import { z } from 'zod';
98
- import { ZodType } from 'zod';
99
88
 
100
89
  declare type Action = {
101
90
  label: string;
@@ -119,6 +108,8 @@ export declare type ActionBarGroup = {
119
108
 
120
109
  export declare type ActionBarItem = ActionType_2;
121
110
 
111
+ export declare type ActionBarStatus = "idle" | "loading" | "success";
112
+
122
113
  declare type ActionBaseProps = ActionCommonProps & DataAttributes;
123
114
 
124
115
  declare type ActionButtonProps = ActionBaseProps & {
@@ -2338,6 +2329,7 @@ declare const defaultTranslations: {
2338
2329
  readonly selectAllItems: "Select all {{total}} items";
2339
2330
  readonly allItemsSelected: "All {{total}} items selected";
2340
2331
  };
2332
+ readonly noItemsSelected: "No items selected";
2341
2333
  };
2342
2334
  readonly filters: {
2343
2335
  readonly searchPlaceholder: "Search filters...";
@@ -2685,6 +2677,8 @@ declare const defaultTranslations: {
2685
2677
  readonly forms: {
2686
2678
  readonly actionBar: {
2687
2679
  readonly unsavedChanges: "You have changes pending to be saved";
2680
+ readonly saving: "Saving...";
2681
+ readonly saved: "Your changes have been saved";
2688
2682
  readonly discard: "Discard";
2689
2683
  readonly issues: {
2690
2684
  readonly one: "{{count}} issue";
@@ -2981,7 +2975,7 @@ declare type ExtractVisualizationSettings<T> = T extends {
2981
2975
  };
2982
2976
  } ? S : never;
2983
2977
 
2984
- export declare const F0ActionBar: ({ isOpen, secondaryActions, label, variant, leftContent, centerInFrameContent, ...props }: F0ActionBarProps) => JSX_2.Element;
2978
+ export declare const F0ActionBar: ({ isOpen, secondaryActions, label, variant, leftContent, centerInFrameContent, status, ...props }: F0ActionBarProps) => JSX_2.Element;
2985
2979
 
2986
2980
  declare interface F0ActionBarProps {
2987
2981
  /**
@@ -3017,6 +3011,14 @@ declare interface F0ActionBarProps {
3017
3011
  * @default false
3018
3012
  */
3019
3013
  centerInFrameContent?: boolean;
3014
+ /**
3015
+ * The current status of the action bar.
3016
+ * - "idle": Default state, shows an alert icon (pending changes)
3017
+ * - "loading": Shows a spinner and disables all actions
3018
+ * - "success": Shows a checkmark icon and disables all actions
3019
+ * @default "idle"
3020
+ */
3021
+ status?: ActionBarStatus;
3020
3022
  }
3021
3023
 
3022
3024
  export declare const F0AiBanner: ForwardRefExoticComponent<AiBannerInternalProps & RefAttributes<HTMLDivElement>> & {
@@ -3228,6 +3230,12 @@ declare type F0SelectBaseProps<T extends string, R = unknown> = {
3228
3230
  * Only displays the dropdown content with max height, border and scroll.
3229
3231
  */
3230
3232
  asList?: boolean;
3233
+ /**
3234
+ * When true, shows a selection preview panel on the right side of the dropdown
3235
+ * for multi-select mode. When false and filters are present, filters use compact mode.
3236
+ * @default false
3237
+ */
3238
+ showPreview?: boolean;
3231
3239
  };
3232
3240
 
3233
3241
  declare type F0SelectItemObject<T, R = unknown> = {
@@ -3471,7 +3479,7 @@ export declare type FilterOptions<FilterKeys extends string> = Record<FilterKeys
3471
3479
  */
3472
3480
  export declare type FiltersDefinition<Keys extends string = string> = Record<Keys, FilterDefinition>;
3473
3481
 
3474
- export declare type FiltersMode = "default" | "compact" | "simple";
3482
+ export declare type FiltersMode = "default" | "compact" | "simple" | "inline";
3475
3483
 
3476
3484
  /**
3477
3485
  * Current state of all filters in a collection.
@@ -3486,6 +3494,8 @@ export declare type FiltersState<Definition extends Record<string, FilterDefinit
3486
3494
  declare type FilterTypeContext<Options extends object = never> = {
3487
3495
  schema: FilterTypeSchema<Options>;
3488
3496
  i18n: I18nContextType;
3497
+ /** The key of this filter in the FiltersDefinition (passed to chipLabel for nested label lookups) */
3498
+ filterKey?: string;
3489
3499
  };
3490
3500
 
3491
3501
  declare type FilterTypeDefinition<Value = unknown, Options extends object = never, EmptyValue = Value, OptionalOptions extends boolean = false> = {
@@ -3498,6 +3508,8 @@ declare type FilterTypeDefinition<Value = unknown, Options extends object = neve
3498
3508
  value: Value;
3499
3509
  onChange: (value: Value) => void;
3500
3510
  isCompactMode?: boolean;
3511
+ onFilterChange?: (key: string, value: unknown) => void;
3512
+ allFiltersValue?: Record<string, unknown>;
3501
3513
  }) => React.ReactNode;
3502
3514
  /**
3503
3515
  * The value label to display in the filter chips
@@ -3586,34 +3598,6 @@ declare type FontSize = (typeof fontSizes)[number];
3586
3598
 
3587
3599
  declare const fontSizes: readonly ["sm", "md", "lg"];
3588
3600
 
3589
- export declare function Form<Schema extends SchemaType, FormData extends InferSchema<Schema>>({ onSubmit, children, ...form }: {
3590
- children: React.ReactNode;
3591
- } & FormType<Schema, FormData>): JSX_2.Element;
3592
-
3593
- export declare function FormActions<Schema extends SchemaType, FormData extends InferSchema<Schema>>({ submitLabel, form, }: {
3594
- submitLabel: string;
3595
- form: FormType<Schema, FormData>;
3596
- }): JSX_2.Element;
3597
-
3598
- declare type FormError<Fields extends FieldValues> = {
3599
- success: false;
3600
- rootMessage?: string;
3601
- errors: Partial<Record<Path<Fields>, string>>;
3602
- };
3603
-
3604
- export declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ label, description, children, ...props }: FormFieldProps<TFieldValues, TName> & {
3605
- children: (field: ControllerRenderProps<TFieldValues>) => JSX.Element;
3606
- }) => JSX_2.Element;
3607
-
3608
- export declare type FormFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = Pick<ControllerProps<TFieldValues, TName>, "name" | "control"> & {
3609
- label: string;
3610
- description?: string;
3611
- };
3612
-
3613
- declare type FormType<T extends SchemaType, FormType extends InferSchema<T>> = UseFormReturn<FormType, unknown, undefined> & {
3614
- onSubmit: ReturnType<UseFormHandleSubmit<FormType>>;
3615
- };
3616
-
3617
3601
  declare interface FrameContextType {
3618
3602
  isSmallScreen: boolean;
3619
3603
  isLastToggleInvokedByUser: boolean;
@@ -3846,8 +3830,6 @@ declare type InferRecord<S> = S extends {
3846
3830
  dataAdapter: DataCollectionDataAdapter<infer R, any, any>;
3847
3831
  } ? R : never;
3848
3832
 
3849
- declare type InferSchema<T extends SchemaType> = z.infer<T>;
3850
-
3851
3833
  export declare type InFilterDefinition<T = string | number, R extends RecordType = RecordType> = BaseFilterDefinition<"in"> & {
3852
3834
  options: InFilterOptions_2<T, R>;
3853
3835
  };
@@ -3862,6 +3844,16 @@ declare type InFilterOptionItem<T = unknown> = {
3862
3844
  value: T;
3863
3845
  /** Human-readable label for the option */
3864
3846
  label: string;
3847
+ /**
3848
+ * Nested children that belong to a different filter key.
3849
+ * Enables hierarchical filtering (e.g., office -> space -> desk).
3850
+ */
3851
+ children?: {
3852
+ /** The filter key where child selections are stored in FiltersState */
3853
+ filterKey: string;
3854
+ /** Child options, which can themselves have children for infinite nesting */
3855
+ options: Array<InFilterOptionItem<T>>;
3856
+ };
3865
3857
  };
3866
3858
 
3867
3859
  /**
@@ -4893,8 +4885,6 @@ export declare type OnSelectItemsCallback<R extends RecordType, Filters extends
4893
4885
  byLane?: Record<string, SelectedItemsDetailedStatus<R, Filters>>;
4894
4886
  }, clearSelectedItems: () => void, handleSelectAll?: (checked: boolean) => void) => void;
4895
4887
 
4896
- declare type OnSubmitHandler<TFieldValues extends FieldValues, TTransformedValues extends FieldValues | undefined = undefined> = (data: ReturnType<UseFormHandleSubmit<TFieldValues, TTransformedValues>>) => Promise<Success | FormError<TFieldValues>> | Success | FormError<TFieldValues>;
4897
-
4898
4888
  declare type OpenLinkActionType = {
4899
4889
  type: "open-link";
4900
4890
  href: string;
@@ -5476,8 +5466,6 @@ declare interface RichTextEditorSkeletonProps {
5476
5466
  rows?: number;
5477
5467
  }
5478
5468
 
5479
- declare type SchemaType = ZodType;
5480
-
5481
5469
  export declare const ScrollArea: ForwardRefExoticComponent<Omit<Omit<ScrollAreaProps & RefAttributes<HTMLDivElement>, "ref"> & {
5482
5470
  showBar?: boolean;
5483
5471
  viewportRef?: React.RefObject<HTMLDivElement>;
@@ -5826,12 +5814,6 @@ export declare type subActionType = {
5826
5814
  icon?: IconType;
5827
5815
  };
5828
5816
 
5829
- declare type Success = {
5830
- success: true;
5831
- rootMessage?: never;
5832
- errors?: never;
5833
- };
5834
-
5835
5817
  declare interface SuccessMessageProps {
5836
5818
  title: string;
5837
5819
  description: string;
@@ -6351,10 +6333,6 @@ declare interface UseDataReturn<R extends RecordType> {
6351
6333
  mergedFilters: FiltersState<FiltersDefinition>;
6352
6334
  }
6353
6335
 
6354
- export { useForm }
6355
-
6356
- export declare function useFormSchema<Schema extends SchemaType, FormData extends InferSchema<Schema>>(schema: Schema, options: UseFormProps<FormData>, onSubmit: OnSubmitHandler<FormData>): FormType<Schema, FormData>;
6357
-
6358
6336
  export declare const useInfiniteScrollPagination: (paginationInfo: PaginationInfo | null, isLoading: boolean, isLoadingMore: boolean, loadMore: () => void) => {
6359
6337
  loadingIndicatorRef: RefObject<HTMLTableCellElement>;
6360
6338
  };
@@ -6722,6 +6700,11 @@ declare module "gridstack" {
6722
6700
  }
6723
6701
 
6724
6702
 
6703
+ declare namespace Calendar {
6704
+ var displayName: string;
6705
+ }
6706
+
6707
+
6725
6708
  declare module "@tiptap/core" {
6726
6709
  interface Commands<ReturnType> {
6727
6710
  aiBlock: {
@@ -6769,8 +6752,3 @@ declare module "@tiptap/core" {
6769
6752
  };
6770
6753
  }
6771
6754
  }
6772
-
6773
-
6774
- declare namespace Calendar {
6775
- var displayName: string;
6776
- }