@factorialco/f0-react 1.290.0 → 1.291.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/experimental.d.ts +124 -89
- package/dist/experimental.js +3028 -3026
- package/dist/f0.d.ts +123 -29
- package/dist/f0.js +39 -37
- package/dist/{hooks-B2MvGPG3.js → hooks-C7xcrcsI.js} +25928 -25816
- package/dist/i18n-provider-defaults.d.ts +35 -27
- package/dist/i18n-provider-defaults.js +9 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/experimental.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ import { DotTagCellValue } from './types/dotTag';
|
|
|
31
31
|
import { DotTagCellValue as DotTagCellValue_2 } from '../../value-display/types/dotTag';
|
|
32
32
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
33
33
|
import { Editor } from '@tiptap/react';
|
|
34
|
+
import { F0SelectProps as F0SelectProps_2 } from './types';
|
|
34
35
|
import { f1Colors } from '@factorialco/f0-core';
|
|
35
36
|
import { FC } from 'react';
|
|
36
37
|
import { FieldPath } from 'react-hook-form';
|
|
@@ -216,7 +217,9 @@ declare type ActionLinkProps = ActionBaseProps & {
|
|
|
216
217
|
className?: string;
|
|
217
218
|
};
|
|
218
219
|
|
|
219
|
-
declare type ActionProps =
|
|
220
|
+
declare type ActionProps = ActionLinkProps | ActionButtonProps;
|
|
221
|
+
|
|
222
|
+
declare type ActionProps_2 = {
|
|
220
223
|
buttonType: "gradient" | "internal";
|
|
221
224
|
label: string;
|
|
222
225
|
onClick: () => void;
|
|
@@ -225,8 +228,6 @@ declare type ActionProps = {
|
|
|
225
228
|
icon?: IconType;
|
|
226
229
|
};
|
|
227
230
|
|
|
228
|
-
declare type ActionProps_2 = ActionLinkProps | ActionButtonProps;
|
|
229
|
-
|
|
230
231
|
declare type ActionProps_3 = {
|
|
231
232
|
/**
|
|
232
233
|
* The label of the action
|
|
@@ -464,7 +465,7 @@ export declare type AiPromotionChatProviderProps = {
|
|
|
464
465
|
noBoldText: string;
|
|
465
466
|
boldText: string;
|
|
466
467
|
}[];
|
|
467
|
-
actions?:
|
|
468
|
+
actions?: ActionProps_2[];
|
|
468
469
|
onShow?: () => void;
|
|
469
470
|
onHide?: () => void;
|
|
470
471
|
children: React.ReactNode;
|
|
@@ -501,7 +502,7 @@ declare interface AiPromotionChatState {
|
|
|
501
502
|
noBoldText: string;
|
|
502
503
|
boldText: string;
|
|
503
504
|
}[];
|
|
504
|
-
actions?:
|
|
505
|
+
actions?: ActionProps_2[];
|
|
505
506
|
onShow?: () => void;
|
|
506
507
|
onHide?: () => void;
|
|
507
508
|
}
|
|
@@ -939,18 +940,20 @@ export declare type BreadcrumbSelectItemType = BreadcrumbBaseItemType & {
|
|
|
939
940
|
externalSearch?: boolean;
|
|
940
941
|
onChange: BreadcrumbSelectProps<string, RecordType>["onChange"];
|
|
941
942
|
value?: string;
|
|
942
|
-
defaultItem?:
|
|
943
|
+
defaultItem?: F0SelectItemObject<string, RecordType>;
|
|
943
944
|
} & ({
|
|
944
945
|
source: DataSourceDefinition<RecordType, FiltersDefinition, SortingsDefinition, GroupingDefinition<RecordType>>;
|
|
945
|
-
mapOptions: (item: RecordType) =>
|
|
946
|
+
mapOptions: (item: RecordType) => F0SelectItemProps<string>;
|
|
946
947
|
options?: never;
|
|
947
948
|
} | {
|
|
948
949
|
source?: never;
|
|
949
950
|
mapOptions?: never;
|
|
950
|
-
options:
|
|
951
|
+
options: F0SelectItemProps<string, RecordType>[];
|
|
951
952
|
});
|
|
952
953
|
|
|
953
|
-
export declare type BreadcrumbSelectProps<T extends string, R = unknown> =
|
|
954
|
+
export declare type BreadcrumbSelectProps<T extends string, R = unknown> = F0SelectProps<T, R> & {
|
|
955
|
+
multiple?: false;
|
|
956
|
+
};
|
|
954
957
|
|
|
955
958
|
export declare interface BreadcrumbsProps {
|
|
956
959
|
/** Array of breadcrumb items to display */
|
|
@@ -1039,7 +1042,7 @@ declare type ButtonDropdownItem<T = string> = {
|
|
|
1039
1042
|
description?: string;
|
|
1040
1043
|
};
|
|
1041
1044
|
|
|
1042
|
-
declare type ButtonInternalProps = Pick<
|
|
1045
|
+
declare type ButtonInternalProps = Pick<ActionProps, "size" | "disabled" | "className" | "pressed" | "compact" | "variant" | "tooltip"> & DataAttributes & {
|
|
1043
1046
|
/**
|
|
1044
1047
|
* The aria-label of the button if not provided title or label will be used.
|
|
1045
1048
|
*/
|
|
@@ -2193,6 +2196,7 @@ declare const defaultTranslations: {
|
|
|
2193
2196
|
readonly other: "Other actions";
|
|
2194
2197
|
readonly toggle: "Toggle";
|
|
2195
2198
|
readonly toggleDropdownMenu: "Toggle dropdown menu";
|
|
2199
|
+
readonly selectAll: "Select all";
|
|
2196
2200
|
};
|
|
2197
2201
|
readonly status: {
|
|
2198
2202
|
readonly selected: {
|
|
@@ -2201,6 +2205,13 @@ declare const defaultTranslations: {
|
|
|
2201
2205
|
};
|
|
2202
2206
|
};
|
|
2203
2207
|
readonly filters: {
|
|
2208
|
+
readonly searchPlaceholder: "Search filters...";
|
|
2209
|
+
readonly inFilter: {
|
|
2210
|
+
readonly searchPlaceholder: "Search options...";
|
|
2211
|
+
};
|
|
2212
|
+
readonly activeFilters: "Active filters: {{filters}}";
|
|
2213
|
+
readonly filteringBy: "Filtering by {{label}}";
|
|
2214
|
+
readonly availableFilters: "Available filters";
|
|
2204
2215
|
readonly label: "Filters";
|
|
2205
2216
|
readonly applyFilters: "Apply filters";
|
|
2206
2217
|
readonly applySelection: "Apply selection";
|
|
@@ -2844,6 +2855,78 @@ declare interface F0IconProps extends SVGProps<SVGSVGElement>, VariantProps<type
|
|
|
2844
2855
|
color?: "default" | "currentColor" | `#${string}` | Lowercase<NestedKeyOf<typeof f1Colors.icon>>;
|
|
2845
2856
|
}
|
|
2846
2857
|
|
|
2858
|
+
declare type F0SelectItemObject<T, R = unknown> = {
|
|
2859
|
+
type?: "item";
|
|
2860
|
+
value: T;
|
|
2861
|
+
label: string;
|
|
2862
|
+
description?: string;
|
|
2863
|
+
avatar?: AvatarVariant;
|
|
2864
|
+
tag?: string;
|
|
2865
|
+
icon?: IconType;
|
|
2866
|
+
item?: R;
|
|
2867
|
+
disabled?: boolean;
|
|
2868
|
+
};
|
|
2869
|
+
export { F0SelectItemObject }
|
|
2870
|
+
export { F0SelectItemObject as SelectItemObject }
|
|
2871
|
+
|
|
2872
|
+
declare type F0SelectItemProps<T, R = unknown> = F0SelectItemObject<T, R> | {
|
|
2873
|
+
type: "separator";
|
|
2874
|
+
};
|
|
2875
|
+
export { F0SelectItemProps }
|
|
2876
|
+
export { F0SelectItemProps as SelectItemProps }
|
|
2877
|
+
|
|
2878
|
+
/**
|
|
2879
|
+
* Select component for choosing from a list of options.
|
|
2880
|
+
*
|
|
2881
|
+
* @template T - The type of the emitted value
|
|
2882
|
+
* @template R - The type of the record/item data (used with data source)
|
|
2883
|
+
*
|
|
2884
|
+
*/
|
|
2885
|
+
declare type F0SelectProps<T extends string, R = unknown> = {
|
|
2886
|
+
onChangeSelectedOption?: (option: F0SelectItemObject<T, ResolvedRecordType<R>> | undefined, checked: boolean) => void;
|
|
2887
|
+
children?: React.ReactNode;
|
|
2888
|
+
open?: boolean;
|
|
2889
|
+
showSearchBox?: boolean;
|
|
2890
|
+
searchBoxPlaceholder?: string;
|
|
2891
|
+
onSearchChange?: (value: string) => void;
|
|
2892
|
+
searchValue?: string;
|
|
2893
|
+
onOpenChange?: (open: boolean) => void;
|
|
2894
|
+
searchEmptyMessage?: string;
|
|
2895
|
+
className?: string;
|
|
2896
|
+
selectContentClassName?: string;
|
|
2897
|
+
actions?: Action[];
|
|
2898
|
+
portalContainer?: HTMLElement | null;
|
|
2899
|
+
} & ({
|
|
2900
|
+
clearable?: false;
|
|
2901
|
+
multiple?: false;
|
|
2902
|
+
value?: T;
|
|
2903
|
+
defaultItem?: F0SelectItemObject<T, ResolvedRecordType<R>>;
|
|
2904
|
+
onChange?: (value: T, originalItem?: ResolvedRecordType<R> | undefined, option?: F0SelectItemObject<T, ResolvedRecordType<R>>) => void;
|
|
2905
|
+
} | {
|
|
2906
|
+
clearable: true;
|
|
2907
|
+
multiple?: false;
|
|
2908
|
+
value?: T;
|
|
2909
|
+
defaultItem?: F0SelectItemObject<T, ResolvedRecordType<R>>;
|
|
2910
|
+
onChange?: (value: T, originalItem?: ResolvedRecordType<R> | undefined, option?: F0SelectItemObject<T, ResolvedRecordType<R>>) => void;
|
|
2911
|
+
} | {
|
|
2912
|
+
multiple: true;
|
|
2913
|
+
clearable?: boolean;
|
|
2914
|
+
value?: T[];
|
|
2915
|
+
defaultItem?: F0SelectItemObject<T, ResolvedRecordType<R>>[];
|
|
2916
|
+
onChange?: (value: T[], originalItems: ResolvedRecordType<R>[], options: F0SelectItemObject<T, ResolvedRecordType<R>>[]) => void;
|
|
2917
|
+
}) & ({
|
|
2918
|
+
source: DataSourceDefinition<ResolvedRecordType<R>, FiltersDefinition, SortingsDefinition, GroupingDefinition<ResolvedRecordType<R>>>;
|
|
2919
|
+
mapOptions: (item: ResolvedRecordType<R>) => F0SelectItemProps<T, ResolvedRecordType<R>>;
|
|
2920
|
+
options?: never;
|
|
2921
|
+
} | {
|
|
2922
|
+
source?: never;
|
|
2923
|
+
mapOptions?: never;
|
|
2924
|
+
searchFn?: (option: F0SelectItemProps<T, unknown>, search?: string) => boolean | undefined;
|
|
2925
|
+
options: F0SelectItemProps<T, unknown>[];
|
|
2926
|
+
}) & Pick<InputFieldProps<T>, "required" | "loading" | "hideLabel" | "labelIcon" | "size" | "label" | "icon" | "placeholder" | "disabled" | "name" | "error" | "status" | "hint">;
|
|
2927
|
+
export { F0SelectProps }
|
|
2928
|
+
export { F0SelectProps as SelectProps }
|
|
2929
|
+
|
|
2847
2930
|
export declare function F0TableOfContent(props: TOCProps): JSX_2.Element;
|
|
2848
2931
|
|
|
2849
2932
|
declare const F0TagAlert: ForwardRefExoticComponent<Props_8 & RefAttributes<HTMLDivElement>>;
|
|
@@ -5093,7 +5176,10 @@ declare type SectionProps_2 = {
|
|
|
5093
5176
|
onItemVisible?: (id: string) => void;
|
|
5094
5177
|
};
|
|
5095
5178
|
|
|
5096
|
-
|
|
5179
|
+
/**
|
|
5180
|
+
* @experimental This is an experimental component use it at your own risk
|
|
5181
|
+
*/
|
|
5182
|
+
export declare const Select: <T extends string = string, R = unknown>(props: F0SelectProps_2<T, R> & {
|
|
5097
5183
|
ref?: React.Ref<HTMLButtonElement>;
|
|
5098
5184
|
}) => React.ReactElement;
|
|
5099
5185
|
|
|
@@ -5129,57 +5215,6 @@ export declare type SelectedItemsState = {
|
|
|
5129
5215
|
}>;
|
|
5130
5216
|
};
|
|
5131
5217
|
|
|
5132
|
-
export declare type SelectItemObject<T, R = unknown> = {
|
|
5133
|
-
type?: "item";
|
|
5134
|
-
value: T;
|
|
5135
|
-
label: string;
|
|
5136
|
-
description?: string;
|
|
5137
|
-
avatar?: AvatarVariant;
|
|
5138
|
-
tag?: string;
|
|
5139
|
-
icon?: IconType;
|
|
5140
|
-
item?: R;
|
|
5141
|
-
disabled?: boolean;
|
|
5142
|
-
};
|
|
5143
|
-
|
|
5144
|
-
export declare type SelectItemProps<T, R = unknown> = SelectItemObject<T, R> | {
|
|
5145
|
-
type: "separator";
|
|
5146
|
-
};
|
|
5147
|
-
|
|
5148
|
-
/**
|
|
5149
|
-
* Select component for choosing from a list of options.
|
|
5150
|
-
*
|
|
5151
|
-
* @template T - The type of the emitted value
|
|
5152
|
-
* @template R - The type of the record/item data (used with data source)
|
|
5153
|
-
*
|
|
5154
|
-
*/
|
|
5155
|
-
export declare type SelectProps<T extends string, R = unknown> = {
|
|
5156
|
-
onChange: (value: T, originalItem?: ResolvedRecordType<R>, option?: SelectItemObject<T, ResolvedRecordType<R>>) => void;
|
|
5157
|
-
onChangeSelectedOption?: (option: SelectItemObject<T, ResolvedRecordType<R>> | undefined) => void;
|
|
5158
|
-
value?: T;
|
|
5159
|
-
defaultItem?: SelectItemObject<T, ResolvedRecordType<R>>;
|
|
5160
|
-
children?: React.ReactNode;
|
|
5161
|
-
open?: boolean;
|
|
5162
|
-
showSearchBox?: boolean;
|
|
5163
|
-
searchBoxPlaceholder?: string;
|
|
5164
|
-
onSearchChange?: (value: string) => void;
|
|
5165
|
-
searchValue?: string;
|
|
5166
|
-
onOpenChange?: (open: boolean) => void;
|
|
5167
|
-
searchEmptyMessage?: string;
|
|
5168
|
-
className?: string;
|
|
5169
|
-
selectContentClassName?: string;
|
|
5170
|
-
actions?: Action[];
|
|
5171
|
-
portalContainer?: HTMLElement | null;
|
|
5172
|
-
} & ({
|
|
5173
|
-
source: DataSourceDefinition<ResolvedRecordType<R>, FiltersDefinition, SortingsDefinition, GroupingDefinition<ResolvedRecordType<R>>>;
|
|
5174
|
-
mapOptions: (item: ResolvedRecordType<R>) => SelectItemProps<T, ResolvedRecordType<R>>;
|
|
5175
|
-
options?: never;
|
|
5176
|
-
} | {
|
|
5177
|
-
source?: never;
|
|
5178
|
-
mapOptions?: never;
|
|
5179
|
-
searchFn?: (option: SelectItemProps<T, unknown>, search?: string) => boolean | undefined;
|
|
5180
|
-
options: SelectItemProps<T, unknown>[];
|
|
5181
|
-
}) & Pick<InputFieldProps<T>, "required" | "loading" | "hideLabel" | "clearable" | "labelIcon" | "size" | "label" | "icon" | "placeholder" | "disabled" | "name" | "error" | "status" | "hint">;
|
|
5182
|
-
|
|
5183
5218
|
export declare type SelectQuestionOption = {
|
|
5184
5219
|
id?: string;
|
|
5185
5220
|
value: string;
|
|
@@ -6232,6 +6267,31 @@ declare global {
|
|
|
6232
6267
|
}
|
|
6233
6268
|
|
|
6234
6269
|
|
|
6270
|
+
declare module "gridstack" {
|
|
6271
|
+
interface GridStackWidget {
|
|
6272
|
+
id?: string;
|
|
6273
|
+
allowedSizes?: Array<{
|
|
6274
|
+
w: number;
|
|
6275
|
+
h: number;
|
|
6276
|
+
}>;
|
|
6277
|
+
renderFn?: () => React.ReactElement | null;
|
|
6278
|
+
meta?: Record<string, unknown>;
|
|
6279
|
+
}
|
|
6280
|
+
interface GridStackNode {
|
|
6281
|
+
id?: string;
|
|
6282
|
+
w?: number;
|
|
6283
|
+
h?: number;
|
|
6284
|
+
x?: number;
|
|
6285
|
+
y?: number;
|
|
6286
|
+
allowedSizes?: Array<{
|
|
6287
|
+
w: number;
|
|
6288
|
+
h: number;
|
|
6289
|
+
}>;
|
|
6290
|
+
renderFn?: () => React.ReactElement | null;
|
|
6291
|
+
}
|
|
6292
|
+
}
|
|
6293
|
+
|
|
6294
|
+
|
|
6235
6295
|
declare module "@tiptap/core" {
|
|
6236
6296
|
interface Commands<ReturnType> {
|
|
6237
6297
|
aiBlock: {
|
|
@@ -6259,28 +6319,8 @@ declare module "@tiptap/core" {
|
|
|
6259
6319
|
}
|
|
6260
6320
|
|
|
6261
6321
|
|
|
6262
|
-
declare
|
|
6263
|
-
|
|
6264
|
-
id?: string;
|
|
6265
|
-
allowedSizes?: Array<{
|
|
6266
|
-
w: number;
|
|
6267
|
-
h: number;
|
|
6268
|
-
}>;
|
|
6269
|
-
renderFn?: () => React.ReactElement | null;
|
|
6270
|
-
meta?: Record<string, unknown>;
|
|
6271
|
-
}
|
|
6272
|
-
interface GridStackNode {
|
|
6273
|
-
id?: string;
|
|
6274
|
-
w?: number;
|
|
6275
|
-
h?: number;
|
|
6276
|
-
x?: number;
|
|
6277
|
-
y?: number;
|
|
6278
|
-
allowedSizes?: Array<{
|
|
6279
|
-
w: number;
|
|
6280
|
-
h: number;
|
|
6281
|
-
}>;
|
|
6282
|
-
renderFn?: () => React.ReactElement | null;
|
|
6283
|
-
}
|
|
6322
|
+
declare namespace Calendar {
|
|
6323
|
+
var displayName: string;
|
|
6284
6324
|
}
|
|
6285
6325
|
|
|
6286
6326
|
|
|
@@ -6291,8 +6331,3 @@ declare module "@tiptap/core" {
|
|
|
6291
6331
|
};
|
|
6292
6332
|
}
|
|
6293
6333
|
}
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
declare namespace Calendar {
|
|
6297
|
-
var displayName: string;
|
|
6298
|
-
}
|