@factorialco/f0-react 1.317.2 → 1.318.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.
package/dist/f0.d.ts CHANGED
@@ -2411,6 +2411,76 @@ export declare type F0DropdownButtonProps<T = string> = {
2411
2411
 
2412
2412
  export declare function F0EventCatcherProvider({ children, onEvent, enabled, catchEvents, }: EventCatcherProviderProps): JSX.Element;
2413
2413
 
2414
+ /**
2415
+ * A standalone dual-pane filter picker content component.
2416
+ *
2417
+ * This component renders the filter picker interface (left panel with filter list,
2418
+ * right panel with filter content) without any popover wrapper, allowing it to be
2419
+ * embedded directly in modals, sidebars, or other containers.
2420
+ *
2421
+ * Features:
2422
+ * - Left panel showing filter categories with search
2423
+ * - Right panel showing filter options for the selected filter
2424
+ * - Multi-select with checkboxes for "in" type filters
2425
+ * - Support for search, date, number, and custom filter types
2426
+ * - Select All and Clear actions
2427
+ *
2428
+ * @template Filters - The type defining the structure of available filters
2429
+ *
2430
+ * @example
2431
+ * ```tsx
2432
+ * // Embed directly in a modal or page
2433
+ * <F0FilterPickerContent
2434
+ * filters={{
2435
+ * department: {
2436
+ * type: "in",
2437
+ * label: "Department",
2438
+ * options: {
2439
+ * options: [
2440
+ * { value: "engineering", label: "Engineering" },
2441
+ * { value: "marketing", label: "Marketing" },
2442
+ * ]
2443
+ * }
2444
+ * },
2445
+ * location: {
2446
+ * type: "in",
2447
+ * label: "Location",
2448
+ * options: {
2449
+ * options: [
2450
+ * { value: "nyc", label: "New York" },
2451
+ * { value: "sf", label: "San Francisco" },
2452
+ * ]
2453
+ * }
2454
+ * }
2455
+ * }}
2456
+ * value={selectedFilters}
2457
+ * onChange={setSelectedFilters}
2458
+ * />
2459
+ * ```
2460
+ */
2461
+ export declare function F0FilterPickerContent<Filters extends FiltersDefinition>({ filters, value, onChange, height, width, className, showApplyButton, applyButtonLabel, }: F0FilterPickerContentProps<Filters>): JSX_2.Element | null;
2462
+
2463
+ export declare namespace F0FilterPickerContent {
2464
+ var displayName: string;
2465
+ }
2466
+
2467
+ /**
2468
+ * Props for the F0FilterPickerContent component.
2469
+ * @template Filters - The type defining the structure of available filters
2470
+ */
2471
+ export declare interface F0FilterPickerContentProps<Filters extends FiltersDefinition> extends FilterPickerBaseProps<Filters> {
2472
+ /** Current state of applied filters */
2473
+ value: FiltersState<Filters>;
2474
+ /**
2475
+ * Callback fired when filters change.
2476
+ * - With apply button (default): called when Apply button is clicked
2477
+ * - Without apply button: called immediately on every selection
2478
+ */
2479
+ onChange: (value: FiltersState<Filters>) => void;
2480
+ /** Width of the content panel */
2481
+ width?: number;
2482
+ }
2483
+
2414
2484
  export declare const F0GridStack: {
2415
2485
  ({ options, widgets, onChange, className, }: F0GridStackProps_2): JSX_2.Element;
2416
2486
  displayName: string;
@@ -2630,6 +2700,24 @@ declare type FilterDefinitionsByType<T = unknown, R extends RecordType = RecordT
2630
2700
  */
2631
2701
  export declare type FilterOptions<FilterKeys extends string> = Record<FilterKeys, FilterDefinition>;
2632
2702
 
2703
+ /**
2704
+ * Shared styling and behavior props used by both public and internal components.
2705
+ * Internal type - not exported to external consumers.
2706
+ * @template Filters - The type defining the structure of available filters
2707
+ */
2708
+ declare interface FilterPickerBaseProps<Filters extends FiltersDefinition> {
2709
+ /** The schema defining available filters and their configurations */
2710
+ filters: Filters;
2711
+ /** Height of the content panel */
2712
+ height?: number;
2713
+ /** Optional className for the container */
2714
+ className?: string;
2715
+ /** Whether to show the apply button (default: true) */
2716
+ showApplyButton?: boolean;
2717
+ /** Custom label for the apply button */
2718
+ applyButtonLabel?: string;
2719
+ }
2720
+
2633
2721
  /**
2634
2722
  * Record of filter definitions for a collection.
2635
2723
  * Maps filter keys to their respective definitions.
@@ -4955,11 +5043,28 @@ declare global {
4955
5043
  }
4956
5044
  }
4957
5045
 
5046
+ declare module "gridstack" {
5047
+ interface GridStackWidget {
5048
+ id?: string;
5049
+ allowedSizes?: Array<{
5050
+ w: number;
5051
+ h: number;
5052
+ }>;
5053
+ meta?: Record<string, unknown>;
5054
+ }
5055
+ interface GridStackNode {
5056
+ allowedSizes?: Array<{
5057
+ w: number;
5058
+ h: number;
5059
+ }>;
5060
+ }
5061
+ }
5062
+
4958
5063
 
4959
5064
  declare module "@tiptap/core" {
4960
5065
  interface Commands<ReturnType> {
4961
- liveCompanion: {
4962
- insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
5066
+ aiBlock: {
5067
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfigWithLabels) => ReturnType;
4963
5068
  };
4964
5069
  }
4965
5070
  }
@@ -4967,8 +5072,8 @@ declare module "@tiptap/core" {
4967
5072
 
4968
5073
  declare module "@tiptap/core" {
4969
5074
  interface Commands<ReturnType> {
4970
- aiBlock: {
4971
- insertAIBlock: (data: AIBlockData, config: AIBlockConfigWithLabels) => ReturnType;
5075
+ liveCompanion: {
5076
+ insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
4972
5077
  };
4973
5078
  }
4974
5079
  }
@@ -4982,21 +5087,9 @@ declare module "@tiptap/core" {
4982
5087
  }
4983
5088
  }
4984
5089
 
4985
- declare module "gridstack" {
4986
- interface GridStackWidget {
4987
- id?: string;
4988
- allowedSizes?: Array<{
4989
- w: number;
4990
- h: number;
4991
- }>;
4992
- meta?: Record<string, unknown>;
4993
- }
4994
- interface GridStackNode {
4995
- allowedSizes?: Array<{
4996
- w: number;
4997
- h: number;
4998
- }>;
4999
- }
5090
+
5091
+ declare namespace Calendar {
5092
+ var displayName: string;
5000
5093
  }
5001
5094
 
5002
5095
 
@@ -5007,8 +5100,3 @@ declare module "@tiptap/core" {
5007
5100
  };
5008
5101
  }
5009
5102
  }
5010
-
5011
-
5012
- declare namespace Calendar {
5013
- var displayName: string;
5014
- }