@factorialco/f0-react 1.382.0 → 1.383.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DataCollectionStorageProvider-B8_-moME.js → DataCollectionStorageProvider-CILsBY3D.js} +10068 -10064
- package/dist/{F0AiChat-oTIR5NbZ.js → F0AiChat-A_15tua6.js} +15333 -15355
- package/dist/{F0HILActionConfirmation-C9Kwjohi.js → F0HILActionConfirmation-D_Flf3Fk.js} +1 -1
- package/dist/ai.d.ts +11 -5
- package/dist/ai.js +2 -2
- package/dist/experimental.d.ts +63 -62
- package/dist/experimental.js +3859 -3856
- package/dist/f0.d.ts +305 -82
- package/dist/f0.js +6256 -5400
- package/dist/i18n-provider-defaults.d.ts +11 -5
- package/dist/i18n-provider-defaults.js +6 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/f0.d.ts
CHANGED
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
import { AgentState } from '@livekit/components-react';
|
|
2
2
|
import { AIMessage } from '@copilotkit/shared';
|
|
3
3
|
import { AlertAvatarProps as AlertAvatarProps_2 } from './F0AvatarAlert';
|
|
4
|
-
import { AlertTagCellValue } from '
|
|
4
|
+
import { AlertTagCellValue } from './f0';
|
|
5
5
|
import { AlertTagCellValue as AlertTagCellValue_2 } from './types/alertTag';
|
|
6
|
-
import { AmountCellValue } from '
|
|
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
10
|
import { AssistantMessageProps } from '@copilotkit/react-ui';
|
|
11
11
|
import { AutoFill as AutoFill_2 } from 'react';
|
|
12
|
-
import {
|
|
13
|
-
import { AvatarFileSize as AvatarFileSize_2 } from './types';
|
|
14
|
-
import { AvatarListCellValue } from '../../../ui/value-display/types/avatarList';
|
|
12
|
+
import { AvatarListCellValue } from './f0';
|
|
15
13
|
import { AvatarListCellValue as AvatarListCellValue_2 } from './types/avatarList';
|
|
16
14
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
17
15
|
import { AvatarProps } from './F0Avatar';
|
|
18
16
|
import { AvatarProps as AvatarProps_2 } from '@radix-ui/react-avatar';
|
|
19
17
|
import { BarSeriesCellValue } from './types/barSeries';
|
|
20
|
-
import { BaseAvatarProps as BaseAvatarProps_2 } from '../internal/BaseAvatar';
|
|
21
18
|
import { baseColors } from '@factorialco/f0-core';
|
|
22
19
|
import { BigNumberProps as BigNumberProps_2 } from './types';
|
|
23
20
|
import { BlockContentExtraProps } from './blocks/BlockContent';
|
|
24
21
|
import { BlockProps } from './blocks/Block';
|
|
25
22
|
import { CategoryBarProps } from './CategoryBarChart';
|
|
26
|
-
import { ChartConfig } from '
|
|
23
|
+
import { ChartConfig } from './f0';
|
|
27
24
|
import { ChartConfig as ChartConfig_2 } from './utils/types';
|
|
28
25
|
import { ChartPropsBase } from './utils/types';
|
|
29
26
|
import { ClassValue } from 'cva';
|
|
30
|
-
import { CompanyCellValue } from '
|
|
27
|
+
import { CompanyCellValue } from './f0';
|
|
31
28
|
import { CompanyCellValue as CompanyCellValue_2 } from './types/company';
|
|
32
29
|
import { ComponentProps } from 'react';
|
|
33
30
|
import { ComponentType } from 'react';
|
|
@@ -35,11 +32,11 @@ import { Context } from 'react';
|
|
|
35
32
|
import { CopilotKitProps } from '@copilotkit/react-core';
|
|
36
33
|
import { CountryCellValue } from './types/country';
|
|
37
34
|
import { DashboardProps as DashboardProps_2 } from './Dashboard';
|
|
38
|
-
import { DateCellValue } from '
|
|
35
|
+
import { DateCellValue } from './f0';
|
|
39
36
|
import { DateCellValue as DateCellValue_2 } from './types/date';
|
|
40
37
|
import { DateFilterOptions } from './DateFilter/DateFilter';
|
|
41
38
|
import { default as default_2 } from 'react';
|
|
42
|
-
import { DotTagCellValue } from '
|
|
39
|
+
import { DotTagCellValue } from './f0';
|
|
43
40
|
import { DotTagCellValue as DotTagCellValue_2 } from './types/dotTag';
|
|
44
41
|
import { F0AvatarCompanyProps as F0AvatarCompanyProps_2 } from './types';
|
|
45
42
|
import { F0AvatarDateProps } from './F0AvatarDate';
|
|
@@ -49,7 +46,10 @@ import { F0AvatarListProps as F0AvatarListProps_2 } from './types';
|
|
|
49
46
|
import { F0AvatarPersonProps as F0AvatarPersonProps_2 } from './types';
|
|
50
47
|
import { F0AvatarTeamProps as F0AvatarTeamProps_2 } from './F0AvatarTeam';
|
|
51
48
|
import { F0DialogInternalProps } from './internal-types';
|
|
49
|
+
import { F0FormDefinitionPerSection as F0FormDefinitionPerSection_2 } from './f0';
|
|
50
|
+
import { F0FormDefinitionSingleSchema as F0FormDefinitionSingleSchema_2 } from './f0';
|
|
52
51
|
import { F0GridStackProps as F0GridStackProps_2 } from './F0GridStack';
|
|
52
|
+
import { F0SelectProps as F0SelectProps_2 } from './types';
|
|
53
53
|
import { F0TagBalanceProps } from './types';
|
|
54
54
|
import { F0TagCompanyProps } from './types';
|
|
55
55
|
import { F0TagListProps } from './types';
|
|
@@ -59,10 +59,9 @@ import { F0TagStatusProps } from './types';
|
|
|
59
59
|
import { F0TagTeamProps } from './types';
|
|
60
60
|
import { f1Colors } from '@factorialco/f0-core';
|
|
61
61
|
import { FC } from 'react';
|
|
62
|
-
import { FileCellValue } from '
|
|
62
|
+
import { FileCellValue } from './f0';
|
|
63
63
|
import { FileCellValue as FileCellValue_2 } from './types/file';
|
|
64
|
-
import {
|
|
65
|
-
import { FolderCellValue } from '../../../ui/value-display/types/folder';
|
|
64
|
+
import { FolderCellValue } from './f0';
|
|
66
65
|
import { FolderCellValue as FolderCellValue_2 } from './types/folder';
|
|
67
66
|
import { ForwardedRef } from 'react';
|
|
68
67
|
import { ForwardRefExoticComponent } from 'react';
|
|
@@ -78,29 +77,29 @@ import { HTMLAttributes } from 'react';
|
|
|
78
77
|
import { IconCellValue } from './types/icon';
|
|
79
78
|
import { ImgHTMLAttributes } from 'react';
|
|
80
79
|
import { InFilterOptions } from './InFilter/types';
|
|
81
|
-
import { internalAvatarColors as internalAvatarColors_2 } from '
|
|
82
|
-
import { internalAvatarSizes as internalAvatarSizes_2 } from '
|
|
83
|
-
import { internalAvatarTypes as internalAvatarTypes_2 } from '
|
|
80
|
+
import { internalAvatarColors as internalAvatarColors_2 } from './f0';
|
|
81
|
+
import { internalAvatarSizes as internalAvatarSizes_2 } from './f0';
|
|
82
|
+
import { internalAvatarTypes as internalAvatarTypes_2 } from './f0';
|
|
84
83
|
import { JSX as JSX_2 } from 'react';
|
|
85
|
-
import { LineChartConfig } from '
|
|
84
|
+
import { LineChartConfig } from './f0';
|
|
86
85
|
import { LineChartPropsBase } from './utils/types';
|
|
87
86
|
import { LocalAudioTrack } from 'livekit-client';
|
|
88
87
|
import { LongTextCellValue } from './types/longText';
|
|
89
88
|
import { Message } from '@copilotkit/shared';
|
|
90
89
|
import { MessagesProps } from '@copilotkit/react-ui';
|
|
91
|
-
import { NumberCellValue } from '
|
|
90
|
+
import { NumberCellValue } from './f0';
|
|
92
91
|
import { NumberCellValue as NumberCellValue_2 } from './types/number';
|
|
93
92
|
import { NumberFilterOptions } from './NumberFilter/NumberFilter';
|
|
94
93
|
import { Observable } from 'zen-observable-ts';
|
|
95
94
|
import { PageLayoutBlockComponent as PageLayoutBlockComponent_2 } from './types';
|
|
96
|
-
import { PageLayoutGroupComponent as PageLayoutGroupComponent_2 } from '
|
|
95
|
+
import { PageLayoutGroupComponent as PageLayoutGroupComponent_2 } from './f0';
|
|
97
96
|
import { PageProps } from './pages/Page';
|
|
98
97
|
import { PercentageCellValue } from './types/percentage';
|
|
99
|
-
import { PersonCellValue } from '
|
|
98
|
+
import { PersonCellValue } from './f0';
|
|
100
99
|
import { PersonCellValue as PersonCellValue_2 } from './types/person';
|
|
101
100
|
import { PieChartProps } from './PieChart';
|
|
102
101
|
import { PopoverContentProps } from '@radix-ui/react-popover';
|
|
103
|
-
import { ProgressBarCellValue } from '
|
|
102
|
+
import { ProgressBarCellValue } from './f0';
|
|
104
103
|
import { ProgressBarCellValue as ProgressBarCellValue_2 } from './types/progressBar';
|
|
105
104
|
import { Props as Props_2 } from './types';
|
|
106
105
|
import * as React_2 from 'react';
|
|
@@ -111,28 +110,28 @@ import { RefObject } from 'react';
|
|
|
111
110
|
import { RemoteAudioTrack } from 'livekit-client';
|
|
112
111
|
import { SearchFilterOptions } from './SearchFilter/SearchFilter';
|
|
113
112
|
import { SizeToken as SizeToken_2 } from './types';
|
|
114
|
-
import { StatusCellValue } from '
|
|
113
|
+
import { StatusCellValue } from './f0';
|
|
115
114
|
import { StatusCellValue as StatusCellValue_2 } from './types/status';
|
|
116
115
|
import { SVGProps } from 'react';
|
|
117
116
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
118
|
-
import { TagCellValue } from '
|
|
117
|
+
import { TagCellValue } from './f0';
|
|
119
118
|
import { TagCellValue as TagCellValue_2 } from './types/tag';
|
|
120
|
-
import { TagListCellValue } from '
|
|
119
|
+
import { TagListCellValue } from './f0';
|
|
121
120
|
import { TagListCellValue as TagListCellValue_2 } from './types/tagList';
|
|
122
121
|
import { TagType as TagType_2 } from './types';
|
|
123
122
|
import { TagVariant as TagVariant_2 } from './F0Tag';
|
|
124
|
-
import { TeamCellValue } from '
|
|
123
|
+
import { TeamCellValue } from './f0';
|
|
125
124
|
import { TeamCellValue as TeamCellValue_2 } from './types/team';
|
|
126
|
-
import { TextCellValue } from '
|
|
125
|
+
import { TextCellValue } from './f0';
|
|
127
126
|
import { TextCellValue as TextCellValue_2 } from './types/text';
|
|
128
127
|
import { TrackReferenceOrPlaceholder } from '@livekit/components-react';
|
|
129
|
-
import { ValueDisplayRendererContext } from '
|
|
128
|
+
import { ValueDisplayRendererContext } from './f0';
|
|
130
129
|
import { VariantProps } from 'cva';
|
|
131
|
-
import { WithDataTestIdReturnType as WithDataTestIdReturnType_2 } from '
|
|
132
|
-
import { WithDataTestIdReturnType as WithDataTestIdReturnType_3 } from '
|
|
133
|
-
import { WithDataTestIdReturnType as WithDataTestIdReturnType_4 } from '
|
|
134
|
-
import { WithDataTestIdReturnType as WithDataTestIdReturnType_5 } from '
|
|
135
|
-
import { WithDataTestIdReturnType as WithDataTestIdReturnType_6 } from '
|
|
130
|
+
import { WithDataTestIdReturnType as WithDataTestIdReturnType_2 } from './f0';
|
|
131
|
+
import { WithDataTestIdReturnType as WithDataTestIdReturnType_3 } from './f0';
|
|
132
|
+
import { WithDataTestIdReturnType as WithDataTestIdReturnType_4 } from './f0';
|
|
133
|
+
import { WithDataTestIdReturnType as WithDataTestIdReturnType_5 } from './f0';
|
|
134
|
+
import { WithDataTestIdReturnType as WithDataTestIdReturnType_6 } from './f0';
|
|
136
135
|
import { z } from 'zod';
|
|
137
136
|
import { ZodEffects } from 'zod';
|
|
138
137
|
import { ZodRawShape } from 'zod';
|
|
@@ -614,12 +613,9 @@ export declare type AvatarVariants = (typeof avatarVariants)[number];
|
|
|
614
613
|
|
|
615
614
|
export declare const avatarVariants: readonly ["person", "team", "company", "file", "flag"];
|
|
616
615
|
|
|
617
|
-
export declare const Await:
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
* Generic component type so <Await resolve={value}> correctly types children as (value: T) => ReactNode.
|
|
621
|
-
*/
|
|
622
|
-
declare type AwaitGeneric = <T>(props: AwaitProps<T> & WithDataTestIdProps) => ReactNode;
|
|
616
|
+
export declare const Await: <T>(props: AwaitProps<T> & {
|
|
617
|
+
dataTestId?: string;
|
|
618
|
+
}) => ReactNode;
|
|
623
619
|
|
|
624
620
|
export declare type AwaitProps<T> = {
|
|
625
621
|
resolve: Promise<T> | T;
|
|
@@ -1902,6 +1898,29 @@ export declare type DataSourceDefinition<R extends RecordType = RecordType, Filt
|
|
|
1902
1898
|
}) => number | undefined;
|
|
1903
1899
|
};
|
|
1904
1900
|
|
|
1901
|
+
/**
|
|
1902
|
+
* Wrapper component that conditionally renders a `data-testid` attribute.
|
|
1903
|
+
*
|
|
1904
|
+
* When `dataTestId` is provided and the platform context enables test id rendering,
|
|
1905
|
+
* wraps children in a `<div data-testid={dataTestId} style={{ display: "contents" }}>`.
|
|
1906
|
+
* Otherwise renders children as-is with no wrapper element.
|
|
1907
|
+
*
|
|
1908
|
+
* Use this directly inside components with complex generic types (e.g. F0Select,
|
|
1909
|
+
* OneFilterPicker) where the `withDataTestId` HOC would erase type parameters.
|
|
1910
|
+
*
|
|
1911
|
+
* @example
|
|
1912
|
+
* ```tsx
|
|
1913
|
+
* const MyComponent = <T,>({ dataTestId, ...props }: MyProps<T> & WithDataTestIdProps) => (
|
|
1914
|
+
* <DataTestIdWrapper dataTestId={dataTestId}>
|
|
1915
|
+
* <div>...</div>
|
|
1916
|
+
* </DataTestIdWrapper>
|
|
1917
|
+
* )
|
|
1918
|
+
* ```
|
|
1919
|
+
*/
|
|
1920
|
+
export declare const DataTestIdWrapper: ({ dataTestId, children, }: WithDataTestIdProps & {
|
|
1921
|
+
children: ReactNode;
|
|
1922
|
+
}) => ReactNode;
|
|
1923
|
+
|
|
1905
1924
|
/**
|
|
1906
1925
|
* All valid renderIf conditions for date fields
|
|
1907
1926
|
*/
|
|
@@ -2626,6 +2645,12 @@ export declare const defaultTranslations: {
|
|
|
2626
2645
|
};
|
|
2627
2646
|
};
|
|
2628
2647
|
};
|
|
2648
|
+
readonly wizard: {
|
|
2649
|
+
readonly previous: "Previous";
|
|
2650
|
+
readonly next: "Continue";
|
|
2651
|
+
readonly submit: "Submit";
|
|
2652
|
+
readonly stepOf: "Step {{current}} of {{total}}";
|
|
2653
|
+
};
|
|
2629
2654
|
};
|
|
2630
2655
|
|
|
2631
2656
|
export declare type DialogPosition = (typeof dialogPositions)[number];
|
|
@@ -2966,21 +2991,21 @@ export declare type F0AvatarEmojiProps = {
|
|
|
2966
2991
|
size?: (typeof avatarEmojiSizes)[number];
|
|
2967
2992
|
} & Partial<Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">>;
|
|
2968
2993
|
|
|
2969
|
-
export declare const F0AvatarFile:
|
|
2994
|
+
export declare const F0AvatarFile: ForwardRefExoticComponent<Omit<Omit<Omit<AvatarProps_2 & RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
2970
2995
|
size?: internalAvatarSizes_2[number];
|
|
2971
2996
|
type?: internalAvatarTypes_2[number];
|
|
2972
2997
|
color?: internalAvatarColors_2[number];
|
|
2973
2998
|
} & RefAttributes<HTMLSpanElement>, "ref">, "type" | "size"> & {
|
|
2974
|
-
file:
|
|
2975
|
-
size?:
|
|
2976
|
-
badge?:
|
|
2977
|
-
} & Pick<
|
|
2999
|
+
file: FileDef;
|
|
3000
|
+
size?: AvatarFileSize;
|
|
3001
|
+
badge?: AvatarBadge;
|
|
3002
|
+
} & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby"> & WithDataTestIdProps & RefAttributes<HTMLSpanElement>>;
|
|
2978
3003
|
|
|
2979
3004
|
export declare type F0AvatarFileProps = Omit<React.ComponentPropsWithoutRef<typeof Avatar>, "type" | "size"> & {
|
|
2980
3005
|
file: FileDef;
|
|
2981
3006
|
size?: AvatarFileSize;
|
|
2982
3007
|
badge?: AvatarBadge;
|
|
2983
|
-
} & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby"
|
|
3008
|
+
} & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby"> & WithDataTestIdProps;
|
|
2984
3009
|
|
|
2985
3010
|
declare type F0AvatarFlagProps = {
|
|
2986
3011
|
flag: CountryCode | (string & {});
|
|
@@ -3829,9 +3854,9 @@ export declare type F0FileField = F0BaseField & {
|
|
|
3829
3854
|
*/
|
|
3830
3855
|
export declare type F0FileFieldConfig = F0StringFileConfig | F0ArrayFileConfig;
|
|
3831
3856
|
|
|
3832
|
-
export declare const F0FilterPickerContent:
|
|
3833
|
-
|
|
3834
|
-
|
|
3857
|
+
export declare const F0FilterPickerContent: <Filters extends FiltersDefinition>(props: F0FilterPickerContentProps<Filters> & {
|
|
3858
|
+
dataTestId?: string;
|
|
3859
|
+
}) => ReactElement | null;
|
|
3835
3860
|
|
|
3836
3861
|
/**
|
|
3837
3862
|
* Props for the F0FilterPickerContent component.
|
|
@@ -3851,11 +3876,13 @@ export declare interface F0FilterPickerContentProps<Filters extends FiltersDefin
|
|
|
3851
3876
|
}
|
|
3852
3877
|
|
|
3853
3878
|
/**
|
|
3854
|
-
* Public props for F0FilterPickerContent (includes dataTestId
|
|
3879
|
+
* Public props for F0FilterPickerContent (includes dataTestId).
|
|
3855
3880
|
* Use this when typing props that include the optional dataTestId attribute.
|
|
3856
3881
|
* @template Filters - The type defining the structure of available filters
|
|
3857
3882
|
*/
|
|
3858
|
-
export declare type F0FilterPickerContentPublicProps<Filters extends FiltersDefinition> = F0FilterPickerContentProps<Filters> &
|
|
3883
|
+
export declare type F0FilterPickerContentPublicProps<Filters extends FiltersDefinition> = F0FilterPickerContentProps<Filters> & {
|
|
3884
|
+
dataTestId?: string;
|
|
3885
|
+
};
|
|
3859
3886
|
|
|
3860
3887
|
/**
|
|
3861
3888
|
* @experimental This is an experimental component, use it at your own risk
|
|
@@ -3863,6 +3890,8 @@ export declare type F0FilterPickerContentPublicProps<Filters extends FiltersDefi
|
|
|
3863
3890
|
export declare const F0Form: {
|
|
3864
3891
|
<TSchema extends F0FormSchema>(props: F0FormPropsWithSingleSchema<TSchema>): React.ReactElement;
|
|
3865
3892
|
<T extends F0PerSectionSchema>(props: F0FormPropsWithPerSectionSchema<T>): React.ReactElement;
|
|
3893
|
+
<TSchema extends F0FormSchema>(props: F0FormPropsWithSingleSchemaDefinition<TSchema>): React.ReactElement;
|
|
3894
|
+
<T extends F0PerSectionSchema>(props: F0FormPropsWithPerSectionDefinition<T>): React.ReactElement;
|
|
3866
3895
|
};
|
|
3867
3896
|
|
|
3868
3897
|
/**
|
|
@@ -3903,6 +3932,38 @@ declare interface F0FormDefaultSubmitConfig extends F0FormSubmitConfigBase {
|
|
|
3903
3932
|
* @default false
|
|
3904
3933
|
*/
|
|
3905
3934
|
hideSubmitButton?: boolean;
|
|
3935
|
+
/**
|
|
3936
|
+
* When true, hides the internal action bar (loading/success feedback).
|
|
3937
|
+
* Useful when the parent component provides its own action bar.
|
|
3938
|
+
* @default false
|
|
3939
|
+
*/
|
|
3940
|
+
hideActionBar?: boolean;
|
|
3941
|
+
}
|
|
3942
|
+
|
|
3943
|
+
export declare type F0FormDefinition<T extends F0FormSchema_2 | F0PerSectionSchema_2 = F0FormSchema_2 | F0PerSectionSchema_2> = T extends F0FormSchema_2 ? F0FormDefinitionSingleSchema<T> : T extends F0PerSectionSchema_2 ? F0FormDefinitionPerSection<T> : never;
|
|
3944
|
+
|
|
3945
|
+
export declare interface F0FormDefinitionPerSection<T extends F0PerSectionSchema_2> {
|
|
3946
|
+
/* Excluded from this release type: _brand */
|
|
3947
|
+
name: string;
|
|
3948
|
+
schema: T;
|
|
3949
|
+
sections?: Record<string, F0PerSectionSectionConfig>;
|
|
3950
|
+
defaultValues?: {
|
|
3951
|
+
[K in keyof T]?: Partial<z.infer<T[K]>>;
|
|
3952
|
+
};
|
|
3953
|
+
onSubmit: (arg: F0WizardFormPerSectionSubmitArg<T>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
3954
|
+
submitConfig?: F0PerSectionSubmitConfig;
|
|
3955
|
+
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
3956
|
+
}
|
|
3957
|
+
|
|
3958
|
+
export declare interface F0FormDefinitionSingleSchema<TSchema extends F0FormSchema_2> {
|
|
3959
|
+
/* Excluded from this release type: _brand */
|
|
3960
|
+
name: string;
|
|
3961
|
+
schema: TSchema;
|
|
3962
|
+
sections?: Record<string, F0SectionConfig>;
|
|
3963
|
+
defaultValues?: Partial<z.infer<TSchema>>;
|
|
3964
|
+
onSubmit: (arg: F0WizardFormSingleSubmitArg<TSchema>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
3965
|
+
submitConfig?: F0FormSubmitConfig;
|
|
3966
|
+
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
3906
3967
|
}
|
|
3907
3968
|
|
|
3908
3969
|
/**
|
|
@@ -4004,11 +4065,24 @@ export declare function f0FormField<T extends ZodTypeAny, TConfig = undefined>(s
|
|
|
4004
4065
|
export declare function f0FormField<T extends ZodTypeAny, V extends string | number = string | number, R extends Record<string, unknown> = Record<string, unknown>>(schema: T, config: F0FieldConfig<V, R>): T & F0ZodType<T>;
|
|
4005
4066
|
|
|
4006
4067
|
/**
|
|
4007
|
-
* Union of
|
|
4068
|
+
* Union of all F0Form prop variants.
|
|
4008
4069
|
* The component detects the mode based on whether `schema` is a single Zod schema
|
|
4009
|
-
* or a record of schemas keyed by section ID.
|
|
4070
|
+
* or a record of schemas keyed by section ID, or whether a `formDefinition` is provided.
|
|
4010
4071
|
*/
|
|
4011
|
-
export declare type F0FormProps<TSchema extends F0FormSchema | F0PerSectionSchema = F0FormSchema | F0PerSectionSchema> = TSchema extends F0FormSchema ? F0FormPropsWithSingleSchema<TSchema> : TSchema extends F0PerSectionSchema ? F0FormPropsWithPerSectionSchema<TSchema> : never;
|
|
4072
|
+
export declare type F0FormProps<TSchema extends F0FormSchema | F0PerSectionSchema = F0FormSchema | F0PerSectionSchema> = TSchema extends F0FormSchema ? F0FormPropsWithSingleSchema<TSchema> | F0FormPropsWithSingleSchemaDefinition<TSchema> : TSchema extends F0PerSectionSchema ? F0FormPropsWithPerSectionSchema<TSchema> | F0FormPropsWithPerSectionDefinition<TSchema> : never;
|
|
4073
|
+
|
|
4074
|
+
/**
|
|
4075
|
+
* Props for F0Form using a formDefinition (per-section schema mode).
|
|
4076
|
+
* Form-related props are extracted from the definition; only rendering/integration
|
|
4077
|
+
* props are passed directly.
|
|
4078
|
+
*/
|
|
4079
|
+
export declare interface F0FormPropsWithPerSectionDefinition<T extends F0PerSectionSchema> {
|
|
4080
|
+
formDefinition: F0FormDefinitionPerSection_2<T>;
|
|
4081
|
+
className?: string;
|
|
4082
|
+
styling?: F0FormStylingConfig;
|
|
4083
|
+
formRef?: React.MutableRefObject<F0FormRef | null>;
|
|
4084
|
+
initialFiles?: InitialFile[];
|
|
4085
|
+
}
|
|
4012
4086
|
|
|
4013
4087
|
/**
|
|
4014
4088
|
* Props for the F0Form component (per-section schema mode).
|
|
@@ -4097,6 +4171,19 @@ export declare interface F0FormPropsWithSingleSchema<TSchema extends F0FormSchem
|
|
|
4097
4171
|
initialFiles?: InitialFile[];
|
|
4098
4172
|
}
|
|
4099
4173
|
|
|
4174
|
+
/**
|
|
4175
|
+
* Props for F0Form using a formDefinition (single schema mode).
|
|
4176
|
+
* Form-related props are extracted from the definition; only rendering/integration
|
|
4177
|
+
* props are passed directly.
|
|
4178
|
+
*/
|
|
4179
|
+
export declare interface F0FormPropsWithSingleSchemaDefinition<TSchema extends F0FormSchema> {
|
|
4180
|
+
formDefinition: F0FormDefinitionSingleSchema_2<TSchema>;
|
|
4181
|
+
className?: string;
|
|
4182
|
+
styling?: F0FormStylingConfig;
|
|
4183
|
+
formRef?: React.MutableRefObject<F0FormRef | null>;
|
|
4184
|
+
initialFiles?: InitialFile[];
|
|
4185
|
+
}
|
|
4186
|
+
|
|
4100
4187
|
/**
|
|
4101
4188
|
* Interface for the F0Form ref methods
|
|
4102
4189
|
*/
|
|
@@ -4115,6 +4202,10 @@ export declare interface F0FormRef {
|
|
|
4115
4202
|
* Check if the form has unsaved changes
|
|
4116
4203
|
*/
|
|
4117
4204
|
isDirty: () => boolean;
|
|
4205
|
+
/**
|
|
4206
|
+
* Get the current form values (including unsaved changes)
|
|
4207
|
+
*/
|
|
4208
|
+
getValues: () => Record<string, unknown>;
|
|
4118
4209
|
/* Excluded from this release type: _setStateCallback */
|
|
4119
4210
|
}
|
|
4120
4211
|
|
|
@@ -4123,6 +4214,8 @@ export declare interface F0FormRef {
|
|
|
4123
4214
|
*/
|
|
4124
4215
|
export declare type F0FormSchema<T extends ZodRawShape = ZodRawShape> = z.ZodObject<T> | ZodEffects<z.ZodObject<T>>;
|
|
4125
4216
|
|
|
4217
|
+
declare type F0FormSchema_2<T extends ZodRawShape = ZodRawShape> = z.ZodObject<T> | ZodEffects<z.ZodObject<T>>;
|
|
4218
|
+
|
|
4126
4219
|
/**
|
|
4127
4220
|
* Callback to update form state in the hook
|
|
4128
4221
|
*/
|
|
@@ -4365,6 +4458,8 @@ export declare type F0OneSwitchProps = React.ComponentPropsWithoutRef<typeof Swi
|
|
|
4365
4458
|
*/
|
|
4366
4459
|
export declare type F0PerSectionSchema = Record<string, F0FormSchema>;
|
|
4367
4460
|
|
|
4461
|
+
declare type F0PerSectionSchema_2 = Record<string, F0FormSchema_2>;
|
|
4462
|
+
|
|
4368
4463
|
/**
|
|
4369
4464
|
* Section configuration for per-section schema mode.
|
|
4370
4465
|
* Extends F0SectionConfig with per-section submit and default values.
|
|
@@ -4393,6 +4488,12 @@ export declare interface F0PerSectionSubmitConfig {
|
|
|
4393
4488
|
* @default false
|
|
4394
4489
|
*/
|
|
4395
4490
|
showSubmitWhenDirty?: boolean;
|
|
4491
|
+
/**
|
|
4492
|
+
* When true, hides the submit button.
|
|
4493
|
+
* Useful when submission is controlled externally (e.g. inside F0WizardForm).
|
|
4494
|
+
* @default false
|
|
4495
|
+
*/
|
|
4496
|
+
hideSubmitButton?: boolean;
|
|
4396
4497
|
}
|
|
4397
4498
|
|
|
4398
4499
|
export declare const F0Provider: React.FC<{
|
|
@@ -4472,7 +4573,9 @@ export declare interface F0SectionConfig {
|
|
|
4472
4573
|
/**
|
|
4473
4574
|
* @experimental This is an experimental component use it at your own risk
|
|
4474
4575
|
*/
|
|
4475
|
-
export declare const F0Select:
|
|
4576
|
+
export declare const F0Select: <T extends string = string, R = unknown>(props: F0SelectProps_2<T, R> & {
|
|
4577
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
4578
|
+
}) => React.ReactElement;
|
|
4476
4579
|
|
|
4477
4580
|
/**
|
|
4478
4581
|
* Base props shared across all F0Select variants
|
|
@@ -4503,7 +4606,7 @@ declare type F0SelectBaseProps<T extends string, R = unknown> = {
|
|
|
4503
4606
|
* @default false
|
|
4504
4607
|
*/
|
|
4505
4608
|
showPreview?: boolean;
|
|
4506
|
-
};
|
|
4609
|
+
} & WithDataTestIdProps;
|
|
4507
4610
|
|
|
4508
4611
|
/**
|
|
4509
4612
|
* F0 config options specific to select fields
|
|
@@ -4568,12 +4671,6 @@ export declare type F0SelectField = F0BaseField & F0SelectConfig & {
|
|
|
4568
4671
|
renderIf?: SelectFieldRenderIf;
|
|
4569
4672
|
};
|
|
4570
4673
|
|
|
4571
|
-
/**
|
|
4572
|
-
* Generic component type so consumers can use <F0Select<T, R> />.
|
|
4573
|
-
* Preserves dataTestId and F0SelectProps<T, R>.
|
|
4574
|
-
*/
|
|
4575
|
-
declare type F0SelectGeneric = <T extends string, R = unknown>(props: F0SelectProps<T, R> & WithDataTestIdProps) => ReactElement | null;
|
|
4576
|
-
|
|
4577
4674
|
export declare type F0SelectItemObject<T, R = unknown> = {
|
|
4578
4675
|
type?: "item";
|
|
4579
4676
|
value: T;
|
|
@@ -4904,6 +5001,104 @@ declare type F0TimeFieldConfig = F0BaseConfig & F0TimeConfig & {
|
|
|
4904
5001
|
fieldType: "time";
|
|
4905
5002
|
};
|
|
4906
5003
|
|
|
5004
|
+
export declare const F0WizardForm: {
|
|
5005
|
+
<TSchema extends F0FormSchema_2>(props: F0WizardFormSingleSchemaProps<TSchema>): default_2.ReactElement;
|
|
5006
|
+
<T extends F0PerSectionSchema_2>(props: F0WizardFormPerSectionProps<T>): default_2.ReactElement;
|
|
5007
|
+
};
|
|
5008
|
+
|
|
5009
|
+
declare interface F0WizardFormBaseProps {
|
|
5010
|
+
isOpen: boolean;
|
|
5011
|
+
onClose?: () => void;
|
|
5012
|
+
title?: string;
|
|
5013
|
+
width?: DialogWidth;
|
|
5014
|
+
defaultStepIndex?: number;
|
|
5015
|
+
nextLabel?: string;
|
|
5016
|
+
previousLabel?: string;
|
|
5017
|
+
onStepChanged?: (stepIndex: number) => void;
|
|
5018
|
+
steps?: F0WizardFormStep[];
|
|
5019
|
+
/**
|
|
5020
|
+
* When true, users can click on any step that is not explicitly marked
|
|
5021
|
+
* as incomplete (i.e. its `isCompleted` callback does not return `false`)
|
|
5022
|
+
* to jump to it.
|
|
5023
|
+
* When false (default), users must navigate sequentially using Next/Previous.
|
|
5024
|
+
* @default false
|
|
5025
|
+
*/
|
|
5026
|
+
allowStepSkipping?: boolean;
|
|
5027
|
+
/**
|
|
5028
|
+
* When true, the wizard automatically closes after the last step's
|
|
5029
|
+
* onSubmit returns `{ success: true }`.
|
|
5030
|
+
* Also implied when `linkAfterLastStepSubmit` is provided.
|
|
5031
|
+
* @default false
|
|
5032
|
+
*/
|
|
5033
|
+
autoCloseOnLastStepSubmit?: boolean;
|
|
5034
|
+
/**
|
|
5035
|
+
* When true, the wizard automatically skips to the first non-completed step
|
|
5036
|
+
* on open. A step is completed when all required fields have values, or when
|
|
5037
|
+
* the step's custom `isCompleted` function returns true.
|
|
5038
|
+
* Only applies on initial render; users can still navigate back freely.
|
|
5039
|
+
* @default false
|
|
5040
|
+
*/
|
|
5041
|
+
autoSkipCompletedSteps?: boolean;
|
|
5042
|
+
}
|
|
5043
|
+
|
|
5044
|
+
export declare interface F0WizardFormPerSectionProps<T extends F0PerSectionSchema_2> extends F0WizardFormBaseProps {
|
|
5045
|
+
formDefinition: F0FormDefinitionPerSection<T>;
|
|
5046
|
+
/**
|
|
5047
|
+
* Function that receives the submitted data and returns a URL to navigate to
|
|
5048
|
+
* after the last step's onSubmit returns `{ success: true }`.
|
|
5049
|
+
* When provided, the wizard auto-closes and navigates to the returned URL.
|
|
5050
|
+
*/
|
|
5051
|
+
linkAfterLastStepSubmit?: (arg: {
|
|
5052
|
+
fullData: InferPerSectionValues_2<T>;
|
|
5053
|
+
}) => string;
|
|
5054
|
+
}
|
|
5055
|
+
|
|
5056
|
+
/**
|
|
5057
|
+
* Per-section submit argument: discriminated union where sectionId narrows data.
|
|
5058
|
+
* fullData always contains all sections' latest values.
|
|
5059
|
+
*/
|
|
5060
|
+
export declare type F0WizardFormPerSectionSubmitArg<T extends F0PerSectionSchema_2> = {
|
|
5061
|
+
[K in keyof T & string]: {
|
|
5062
|
+
sectionId: K;
|
|
5063
|
+
data: z.infer<T[K]>;
|
|
5064
|
+
fullData: InferPerSectionValues_2<T>;
|
|
5065
|
+
};
|
|
5066
|
+
}[keyof T & string];
|
|
5067
|
+
|
|
5068
|
+
export declare interface F0WizardFormSingleSchemaProps<TSchema extends F0FormSchema_2> extends F0WizardFormBaseProps {
|
|
5069
|
+
formDefinition: F0FormDefinitionSingleSchema<TSchema>;
|
|
5070
|
+
/**
|
|
5071
|
+
* Function that receives the submitted data and returns a URL to navigate to
|
|
5072
|
+
* after the last step's onSubmit returns `{ success: true }`.
|
|
5073
|
+
* When provided, the wizard auto-closes and navigates to the returned URL.
|
|
5074
|
+
*/
|
|
5075
|
+
linkAfterLastStepSubmit?: (arg: {
|
|
5076
|
+
fullData: z.infer<TSchema>;
|
|
5077
|
+
}) => string;
|
|
5078
|
+
}
|
|
5079
|
+
|
|
5080
|
+
/**
|
|
5081
|
+
* Single-schema submit argument: data is the full form.
|
|
5082
|
+
*/
|
|
5083
|
+
export declare interface F0WizardFormSingleSubmitArg<TSchema extends F0FormSchema_2> {
|
|
5084
|
+
data: z.infer<TSchema>;
|
|
5085
|
+
}
|
|
5086
|
+
|
|
5087
|
+
export declare interface F0WizardFormStep {
|
|
5088
|
+
title: string;
|
|
5089
|
+
sectionIds: string[];
|
|
5090
|
+
nextLabel?: string;
|
|
5091
|
+
previousLabel?: string;
|
|
5092
|
+
/**
|
|
5093
|
+
* Custom function to determine if this step is considered completed.
|
|
5094
|
+
* Receives the step's current data. When provided, takes precedence
|
|
5095
|
+
* over the default "all required fields filled" check.
|
|
5096
|
+
*/
|
|
5097
|
+
isCompleted?: (arg: {
|
|
5098
|
+
data: Record<string, unknown>;
|
|
5099
|
+
}) => boolean;
|
|
5100
|
+
}
|
|
5101
|
+
|
|
4907
5102
|
/**
|
|
4908
5103
|
* Extended Zod type with F0 metadata
|
|
4909
5104
|
*/
|
|
@@ -5446,6 +5641,10 @@ export declare type InferPerSectionValues<T extends F0PerSectionSchema> = {
|
|
|
5446
5641
|
[K in keyof T]: z.infer<T[K]>;
|
|
5447
5642
|
};
|
|
5448
5643
|
|
|
5644
|
+
declare type InferPerSectionValues_2<T extends F0PerSectionSchema_2> = {
|
|
5645
|
+
[K in keyof T]: z.infer<T[K]>;
|
|
5646
|
+
};
|
|
5647
|
+
|
|
5449
5648
|
export declare type InFilterDefinition<T = string | number, R extends RecordType = RecordType> = BaseFilterDefinition<"in"> & {
|
|
5450
5649
|
options: InFilterOptions_2<T, R>;
|
|
5451
5650
|
};
|
|
@@ -6152,13 +6351,9 @@ action: BulkAction,
|
|
|
6152
6351
|
...Parameters<OnSelectItemsCallback<Record, Filters>>
|
|
6153
6352
|
]) => void;
|
|
6154
6353
|
|
|
6155
|
-
export declare const OneFilterPicker:
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
* Generic component type so consumers can use <OneFilterPicker<Definition> />.
|
|
6159
|
-
* Preserves dataTestId and OneFilterPickerRootProps<Definition>.
|
|
6160
|
-
*/
|
|
6161
|
-
declare type OneFilterPickerGeneric = <Definition extends FiltersDefinition>(props: OneFilterPickerRootProps<Definition> & WithDataTestIdProps) => ReactElement | null;
|
|
6354
|
+
export declare const OneFilterPicker: <Definition extends FiltersDefinition>(props: OneFilterPickerRootProps<Definition> & {
|
|
6355
|
+
dataTestId?: string;
|
|
6356
|
+
}) => ReactElement | null;
|
|
6162
6357
|
|
|
6163
6358
|
/**
|
|
6164
6359
|
* Props for the Filters component.
|
|
@@ -6909,12 +7104,6 @@ export declare interface StandardLayoutProps extends VariantProps<typeof layoutV
|
|
|
6909
7104
|
children?: default_2.ReactNode;
|
|
6910
7105
|
}
|
|
6911
7106
|
|
|
6912
|
-
/**
|
|
6913
|
-
* Keys on T that are not part of Function, so we preserve static members (Skeleton, displayName, etc.)
|
|
6914
|
-
* without bringing in a second call signature that would confuse ComponentProps<> inference.
|
|
6915
|
-
*/
|
|
6916
|
-
declare type StaticMembersOf<T> = Pick<T, Exclude<keyof T, keyof Function>>;
|
|
6917
|
-
|
|
6918
7107
|
export declare type Status = (typeof statuses_2)[number];
|
|
6919
7108
|
|
|
6920
7109
|
declare const statuses: readonly ["neutral", "info", "positive", "warning", "critical"];
|
|
@@ -7724,6 +7913,32 @@ export declare const useF0Dialog: () => F0DialogContextType;
|
|
|
7724
7913
|
*/
|
|
7725
7914
|
export declare function useF0Form(): UseF0FormReturn;
|
|
7726
7915
|
|
|
7916
|
+
export declare function useF0FormDefinition<TSchema extends F0FormSchema_2>(input: UseF0FormDefinitionSingleSchemaInput<TSchema>): F0FormDefinitionSingleSchema<TSchema>;
|
|
7917
|
+
|
|
7918
|
+
export declare function useF0FormDefinition<T extends F0PerSectionSchema_2>(input: UseF0FormDefinitionPerSectionInput<T>): F0FormDefinitionPerSection<T>;
|
|
7919
|
+
|
|
7920
|
+
declare interface UseF0FormDefinitionPerSectionInput<T extends F0PerSectionSchema_2> {
|
|
7921
|
+
name: string;
|
|
7922
|
+
schema: T;
|
|
7923
|
+
sections?: Record<string, F0PerSectionSectionConfig>;
|
|
7924
|
+
defaultValues?: {
|
|
7925
|
+
[K in keyof T]?: Partial<z.infer<T[K]>>;
|
|
7926
|
+
};
|
|
7927
|
+
onSubmit: (arg: F0WizardFormPerSectionSubmitArg<T>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
7928
|
+
submitConfig?: F0PerSectionSubmitConfig;
|
|
7929
|
+
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
7930
|
+
}
|
|
7931
|
+
|
|
7932
|
+
declare interface UseF0FormDefinitionSingleSchemaInput<TSchema extends F0FormSchema_2> {
|
|
7933
|
+
name: string;
|
|
7934
|
+
schema: TSchema;
|
|
7935
|
+
sections?: Record<string, F0SectionConfig>;
|
|
7936
|
+
defaultValues?: Partial<z.infer<TSchema>>;
|
|
7937
|
+
onSubmit: (arg: F0WizardFormSingleSubmitArg<TSchema>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
7938
|
+
submitConfig?: F0FormSubmitConfig;
|
|
7939
|
+
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
7940
|
+
}
|
|
7941
|
+
|
|
7727
7942
|
/**
|
|
7728
7943
|
* Return type for the useF0Form hook
|
|
7729
7944
|
*/
|
|
@@ -7746,6 +7961,10 @@ export declare interface UseF0FormReturn {
|
|
|
7746
7961
|
* Check if the form has unsaved changes
|
|
7747
7962
|
*/
|
|
7748
7963
|
isDirty: () => boolean;
|
|
7964
|
+
/**
|
|
7965
|
+
* Get the current form values (including unsaved changes)
|
|
7966
|
+
*/
|
|
7967
|
+
getValues: () => Record<string, unknown>;
|
|
7749
7968
|
/**
|
|
7750
7969
|
* Whether the form is currently submitting
|
|
7751
7970
|
*/
|
|
@@ -8028,11 +8247,15 @@ export declare type WithDataTestIdProps = {
|
|
|
8028
8247
|
export declare type WithDataTestIdPropsOf<T extends default_2.ComponentType<unknown>> = default_2.ComponentProps<T> & WithDataTestIdProps;
|
|
8029
8248
|
|
|
8030
8249
|
/**
|
|
8031
|
-
*
|
|
8032
|
-
*
|
|
8033
|
-
*
|
|
8250
|
+
* Given a component type T, produce a new component type that:
|
|
8251
|
+
* 1. Accepts all of T's props plus dataTestId
|
|
8252
|
+
* 2. Preserves callback argument types (e.g., onCheckedChange: (checked: boolean) => void)
|
|
8253
|
+
* 3. Preserves static members (e.g., F0Card.Skeleton)
|
|
8254
|
+
*
|
|
8255
|
+
* We use a mapped type approach to avoid the pitfalls of React.ComponentType
|
|
8256
|
+
* which collapses callback inference.
|
|
8034
8257
|
*/
|
|
8035
|
-
export declare type WithDataTestIdReturnType<T extends default_2.ComponentType<
|
|
8258
|
+
export declare type WithDataTestIdReturnType<T extends default_2.ComponentType<any>> = default_2.ForwardRefExoticComponent<default_2.PropsWithoutRef<default_2.ComponentProps<T> & WithDataTestIdProps> & default_2.RefAttributes<T extends default_2.ForwardRefExoticComponent<infer P> ? P extends default_2.RefAttributes<infer R> ? R : unknown : unknown>> & Pick<T, Exclude<keyof T, keyof default_2.ForwardRefExoticComponent<unknown>>>;
|
|
8036
8259
|
|
|
8037
8260
|
export declare type WithGroupId<RecordType> = RecordType & {
|
|
8038
8261
|
[GROUP_ID_SYMBOL]: unknown | undefined;
|
|
@@ -8107,11 +8330,6 @@ declare module "gridstack" {
|
|
|
8107
8330
|
}
|
|
8108
8331
|
|
|
8109
8332
|
|
|
8110
|
-
declare namespace Calendar {
|
|
8111
|
-
var displayName: string;
|
|
8112
|
-
}
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
8333
|
declare module "@tiptap/core" {
|
|
8116
8334
|
interface Commands<ReturnType> {
|
|
8117
8335
|
aiBlock: {
|
|
@@ -8159,3 +8377,8 @@ declare module "@tiptap/core" {
|
|
|
8159
8377
|
};
|
|
8160
8378
|
}
|
|
8161
8379
|
}
|
|
8380
|
+
|
|
8381
|
+
|
|
8382
|
+
declare namespace Calendar {
|
|
8383
|
+
var displayName: string;
|
|
8384
|
+
}
|