@factorialco/f0-react 1.317.2 → 1.318.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 +4 -67
- package/dist/experimental.js +19580 -20695
- package/dist/f0.d.ts +166 -4
- package/dist/f0.js +1199 -1143
- package/dist/{hooks-CUFsqUWT.js → hooks-B4dLKVTc.js} +26940 -25804
- package/dist/i18n-provider-defaults.d.ts +4 -4
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/f0.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { CompanyCellValue } from '../../value-display/types/company';
|
|
|
22
22
|
import { CompanyCellValue as CompanyCellValue_2 } from './types/company';
|
|
23
23
|
import { ComponentProps } from 'react';
|
|
24
24
|
import { ComponentType } from 'react';
|
|
25
|
+
import { Context } from 'react';
|
|
25
26
|
import { CountryCellValue } from './types/country';
|
|
26
27
|
import { DashboardProps as DashboardProps_2 } from './Dashboard';
|
|
27
28
|
import { DateCellValue } from '../../value-display/types/date';
|
|
@@ -30,9 +31,11 @@ import { DateFilterOptions } from './DateFilter/DateFilter';
|
|
|
30
31
|
import { default as default_2 } from 'react';
|
|
31
32
|
import { DotTagCellValue } from '../../value-display/types/dotTag';
|
|
32
33
|
import { DotTagCellValue as DotTagCellValue_2 } from './types/dotTag';
|
|
34
|
+
import { F0DialogInternalProps } from './internal-types';
|
|
33
35
|
import { F0GridStackProps as F0GridStackProps_2 } from './F0GridStack';
|
|
34
36
|
import { F0SelectProps as F0SelectProps_2 } from './types';
|
|
35
37
|
import { f1Colors } from '@factorialco/f0-core';
|
|
38
|
+
import { FC } from 'react';
|
|
36
39
|
import { FileCellValue } from '../../value-display/types/file';
|
|
37
40
|
import { FileCellValue as FileCellValue_2 } from './types/file';
|
|
38
41
|
import { FolderCellValue } from '../../value-display/types/folder';
|
|
@@ -1949,6 +1952,14 @@ export declare const defaultTranslations: {
|
|
|
1949
1952
|
};
|
|
1950
1953
|
};
|
|
1951
1954
|
|
|
1955
|
+
export declare type DialogPosition = (typeof dialogPositions)[number];
|
|
1956
|
+
|
|
1957
|
+
declare const dialogPositions: readonly ["center", "left", "right", "fullscreen"];
|
|
1958
|
+
|
|
1959
|
+
export declare type DialogWidth = (typeof dialogWidths)[number];
|
|
1960
|
+
|
|
1961
|
+
declare const dialogWidths: readonly ["sm", "md", "lg"];
|
|
1962
|
+
|
|
1952
1963
|
/**
|
|
1953
1964
|
* Remove a property from a union of objects.
|
|
1954
1965
|
* @example
|
|
@@ -2399,6 +2410,67 @@ export declare type F0DatePickerProps = Pick<DatePickerPopupProps, "granularitie
|
|
|
2399
2410
|
value?: DatePickerValue;
|
|
2400
2411
|
} & Pick<InputFieldProps<string>, InputFieldInheritedProps>;
|
|
2401
2412
|
|
|
2413
|
+
/**
|
|
2414
|
+
* @experimental This is an experimental component use it at your own risk
|
|
2415
|
+
*/
|
|
2416
|
+
export declare const F0Dialog: FC<F0DialogInternalProps>;
|
|
2417
|
+
|
|
2418
|
+
export declare type F0DialogActionsProps = {
|
|
2419
|
+
primaryAction?: F0DialogPrimaryAction | F0DialogPrimaryActionItem[];
|
|
2420
|
+
secondaryAction?: F0DialogSecondaryAction;
|
|
2421
|
+
};
|
|
2422
|
+
|
|
2423
|
+
export declare const F0DialogContext: Context<F0DialogContextType>;
|
|
2424
|
+
|
|
2425
|
+
declare type F0DialogContextType = {
|
|
2426
|
+
open: boolean;
|
|
2427
|
+
onClose: () => void;
|
|
2428
|
+
shownBottomSheet: boolean;
|
|
2429
|
+
position: DialogPosition;
|
|
2430
|
+
/**
|
|
2431
|
+
* The dialog's content container element.
|
|
2432
|
+
* Use this as the `portalContainer` prop for components like F0Select
|
|
2433
|
+
* to ensure dropdowns render inside the dialog.
|
|
2434
|
+
*/
|
|
2435
|
+
portalContainer: HTMLDivElement | null;
|
|
2436
|
+
};
|
|
2437
|
+
|
|
2438
|
+
export declare type F0DialogPrimaryAction = {
|
|
2439
|
+
label: string;
|
|
2440
|
+
icon?: IconType;
|
|
2441
|
+
onClick: () => void;
|
|
2442
|
+
disabled?: boolean;
|
|
2443
|
+
loading?: boolean;
|
|
2444
|
+
};
|
|
2445
|
+
|
|
2446
|
+
export declare type F0DialogPrimaryActionItem = {
|
|
2447
|
+
value: string;
|
|
2448
|
+
label: string;
|
|
2449
|
+
icon?: IconType;
|
|
2450
|
+
onClick: () => void;
|
|
2451
|
+
disabled?: boolean;
|
|
2452
|
+
loading?: boolean;
|
|
2453
|
+
};
|
|
2454
|
+
|
|
2455
|
+
export declare const F0DialogProvider: ({ isOpen, onClose, shownBottomSheet, position, children, portalContainer, }: F0DialogProviderProps) => JSX_2.Element;
|
|
2456
|
+
|
|
2457
|
+
declare type F0DialogProviderProps = {
|
|
2458
|
+
isOpen: boolean;
|
|
2459
|
+
onClose: () => void;
|
|
2460
|
+
shownBottomSheet?: boolean;
|
|
2461
|
+
position: DialogPosition;
|
|
2462
|
+
children: ReactNode;
|
|
2463
|
+
portalContainer: HTMLDivElement | null;
|
|
2464
|
+
};
|
|
2465
|
+
|
|
2466
|
+
export declare type F0DialogSecondaryAction = {
|
|
2467
|
+
label: string;
|
|
2468
|
+
icon?: IconType;
|
|
2469
|
+
onClick: () => void;
|
|
2470
|
+
disabled?: boolean;
|
|
2471
|
+
loading?: boolean;
|
|
2472
|
+
};
|
|
2473
|
+
|
|
2402
2474
|
export declare type F0DropdownButtonProps<T = string> = {
|
|
2403
2475
|
size?: ButtonDropdownSize;
|
|
2404
2476
|
items: ButtonDropdownItem<T>[] | ButtonDropdownGroup<T>[] | ButtonDropdownGroup<T>;
|
|
@@ -2411,6 +2483,76 @@ export declare type F0DropdownButtonProps<T = string> = {
|
|
|
2411
2483
|
|
|
2412
2484
|
export declare function F0EventCatcherProvider({ children, onEvent, enabled, catchEvents, }: EventCatcherProviderProps): JSX.Element;
|
|
2413
2485
|
|
|
2486
|
+
/**
|
|
2487
|
+
* A standalone dual-pane filter picker content component.
|
|
2488
|
+
*
|
|
2489
|
+
* This component renders the filter picker interface (left panel with filter list,
|
|
2490
|
+
* right panel with filter content) without any popover wrapper, allowing it to be
|
|
2491
|
+
* embedded directly in modals, sidebars, or other containers.
|
|
2492
|
+
*
|
|
2493
|
+
* Features:
|
|
2494
|
+
* - Left panel showing filter categories with search
|
|
2495
|
+
* - Right panel showing filter options for the selected filter
|
|
2496
|
+
* - Multi-select with checkboxes for "in" type filters
|
|
2497
|
+
* - Support for search, date, number, and custom filter types
|
|
2498
|
+
* - Select All and Clear actions
|
|
2499
|
+
*
|
|
2500
|
+
* @template Filters - The type defining the structure of available filters
|
|
2501
|
+
*
|
|
2502
|
+
* @example
|
|
2503
|
+
* ```tsx
|
|
2504
|
+
* // Embed directly in a modal or page
|
|
2505
|
+
* <F0FilterPickerContent
|
|
2506
|
+
* filters={{
|
|
2507
|
+
* department: {
|
|
2508
|
+
* type: "in",
|
|
2509
|
+
* label: "Department",
|
|
2510
|
+
* options: {
|
|
2511
|
+
* options: [
|
|
2512
|
+
* { value: "engineering", label: "Engineering" },
|
|
2513
|
+
* { value: "marketing", label: "Marketing" },
|
|
2514
|
+
* ]
|
|
2515
|
+
* }
|
|
2516
|
+
* },
|
|
2517
|
+
* location: {
|
|
2518
|
+
* type: "in",
|
|
2519
|
+
* label: "Location",
|
|
2520
|
+
* options: {
|
|
2521
|
+
* options: [
|
|
2522
|
+
* { value: "nyc", label: "New York" },
|
|
2523
|
+
* { value: "sf", label: "San Francisco" },
|
|
2524
|
+
* ]
|
|
2525
|
+
* }
|
|
2526
|
+
* }
|
|
2527
|
+
* }}
|
|
2528
|
+
* value={selectedFilters}
|
|
2529
|
+
* onChange={setSelectedFilters}
|
|
2530
|
+
* />
|
|
2531
|
+
* ```
|
|
2532
|
+
*/
|
|
2533
|
+
export declare function F0FilterPickerContent<Filters extends FiltersDefinition>({ filters, value, onChange, height, width, className, showApplyButton, applyButtonLabel, }: F0FilterPickerContentProps<Filters>): JSX_2.Element | null;
|
|
2534
|
+
|
|
2535
|
+
export declare namespace F0FilterPickerContent {
|
|
2536
|
+
var displayName: string;
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
/**
|
|
2540
|
+
* Props for the F0FilterPickerContent component.
|
|
2541
|
+
* @template Filters - The type defining the structure of available filters
|
|
2542
|
+
*/
|
|
2543
|
+
export declare interface F0FilterPickerContentProps<Filters extends FiltersDefinition> extends FilterPickerBaseProps<Filters> {
|
|
2544
|
+
/** Current state of applied filters */
|
|
2545
|
+
value: FiltersState<Filters>;
|
|
2546
|
+
/**
|
|
2547
|
+
* Callback fired when filters change.
|
|
2548
|
+
* - With apply button (default): called when Apply button is clicked
|
|
2549
|
+
* - Without apply button: called immediately on every selection
|
|
2550
|
+
*/
|
|
2551
|
+
onChange: (value: FiltersState<Filters>) => void;
|
|
2552
|
+
/** Width of the content panel */
|
|
2553
|
+
width?: number;
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2414
2556
|
export declare const F0GridStack: {
|
|
2415
2557
|
({ options, widgets, onChange, className, }: F0GridStackProps_2): JSX_2.Element;
|
|
2416
2558
|
displayName: string;
|
|
@@ -2630,6 +2772,24 @@ declare type FilterDefinitionsByType<T = unknown, R extends RecordType = RecordT
|
|
|
2630
2772
|
*/
|
|
2631
2773
|
export declare type FilterOptions<FilterKeys extends string> = Record<FilterKeys, FilterDefinition>;
|
|
2632
2774
|
|
|
2775
|
+
/**
|
|
2776
|
+
* Shared styling and behavior props used by both public and internal components.
|
|
2777
|
+
* Internal type - not exported to external consumers.
|
|
2778
|
+
* @template Filters - The type defining the structure of available filters
|
|
2779
|
+
*/
|
|
2780
|
+
declare interface FilterPickerBaseProps<Filters extends FiltersDefinition> {
|
|
2781
|
+
/** The schema defining available filters and their configurations */
|
|
2782
|
+
filters: Filters;
|
|
2783
|
+
/** Height of the content panel */
|
|
2784
|
+
height?: number;
|
|
2785
|
+
/** Optional className for the container */
|
|
2786
|
+
className?: string;
|
|
2787
|
+
/** Whether to show the apply button (default: true) */
|
|
2788
|
+
showApplyButton?: boolean;
|
|
2789
|
+
/** Custom label for the apply button */
|
|
2790
|
+
applyButtonLabel?: string;
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2633
2793
|
/**
|
|
2634
2794
|
* Record of filter definitions for a collection.
|
|
2635
2795
|
* Maps filter keys to their respective definitions.
|
|
@@ -4766,6 +4926,8 @@ export declare const useEmojiConfetti: () => {
|
|
|
4766
4926
|
fireEmojiConfetti: (emoji: string, elementRef: RefObject<HTMLElement>) => void;
|
|
4767
4927
|
};
|
|
4768
4928
|
|
|
4929
|
+
export declare const useF0Dialog: () => F0DialogContextType;
|
|
4930
|
+
|
|
4769
4931
|
export declare const useGroups: <R extends RecordType>(groups: GroupRecord<R>[], defaultOpenGroups?: boolean | GroupRecord<R>["key"][]) => {
|
|
4770
4932
|
openGroups: Record<string, boolean>;
|
|
4771
4933
|
setGroupOpen: (key: string, open: boolean) => void;
|
|
@@ -4958,8 +5120,8 @@ declare global {
|
|
|
4958
5120
|
|
|
4959
5121
|
declare module "@tiptap/core" {
|
|
4960
5122
|
interface Commands<ReturnType> {
|
|
4961
|
-
|
|
4962
|
-
|
|
5123
|
+
aiBlock: {
|
|
5124
|
+
insertAIBlock: (data: AIBlockData, config: AIBlockConfigWithLabels) => ReturnType;
|
|
4963
5125
|
};
|
|
4964
5126
|
}
|
|
4965
5127
|
}
|
|
@@ -4967,8 +5129,8 @@ declare module "@tiptap/core" {
|
|
|
4967
5129
|
|
|
4968
5130
|
declare module "@tiptap/core" {
|
|
4969
5131
|
interface Commands<ReturnType> {
|
|
4970
|
-
|
|
4971
|
-
|
|
5132
|
+
liveCompanion: {
|
|
5133
|
+
insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
|
|
4972
5134
|
};
|
|
4973
5135
|
}
|
|
4974
5136
|
}
|