@factorialco/f0-react 1.189.3 → 1.191.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.
@@ -235,19 +235,14 @@ declare type AIButton = {
235
235
  */
236
236
  export declare const AiChat: () => JSX_2.Element | null;
237
237
 
238
- declare type AiChatMode = "popup" | "sidebar";
239
-
240
- export declare const AiChatProvider: ({ enabled, mode, greeting, children, agent, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
238
+ export declare const AiChatProvider: ({ enabled, greeting, children, agent, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
241
239
 
242
240
  export declare type AiChatProviderProps = {
243
241
  enabled?: boolean;
244
- mode?: AiChatMode;
245
242
  greeting?: string;
246
243
  } & Pick<CopilotKitProps, "agent" | "credentials" | "children" | "runtimeUrl" | "showDevConsole" | "threadId" | "headers">;
247
244
 
248
245
  declare type AiChatProviderReturnValue = {
249
- mode: AiChatMode;
250
- setMode: React.Dispatch<React.SetStateAction<AiChatMode>>;
251
246
  enabled: boolean;
252
247
  setEnabled: React.Dispatch<React.SetStateAction<boolean>>;
253
248
  open: boolean;
@@ -259,7 +254,6 @@ declare type AiChatProviderReturnValue = {
259
254
 
260
255
  declare interface AiChatState {
261
256
  greeting?: string;
262
- initialMode: AiChatMode;
263
257
  enabled: boolean;
264
258
  agent?: string;
265
259
  }
@@ -486,10 +480,10 @@ export declare const BaseCommunityPost: ({ id, author, group, createdAt, title,
486
480
 
487
481
  /**
488
482
  * Base data adapter configuration for non-paginated collections
489
- * @template Record - The type of records in the collection
483
+ * @template R - The type of records in the collection
490
484
  * @template Filters - The available filter configurations
491
485
  */
492
- export declare type BaseDataAdapter<Record extends RecordType, Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = {
486
+ export declare type BaseDataAdapter<R extends RecordType, Filters extends FiltersDefinition, Options extends BaseFetchOptions<Filters>, FetchReturn = BaseResponse<R>> = {
493
487
  /** Indicates this adapter doesn't use pagination */
494
488
  paginationType?: never | undefined;
495
489
  /**
@@ -497,19 +491,18 @@ export declare type BaseDataAdapter<Record extends RecordType, Filters extends F
497
491
  * @param options - The filter options to apply when fetching data
498
492
  * @returns Array of records, promise of records, or observable of records
499
493
  */
500
- fetchData: (options: BaseFetchOptions<Filters, NavigationFilters>) => BaseResponse<Record> | Promise<BaseResponse<Record>> | Observable<PromiseState<BaseResponse<Record>>>;
494
+ fetchData: (options: Options) => FetchReturn | Promise<FetchReturn> | Observable<PromiseState<FetchReturn>>;
501
495
  };
502
496
 
503
497
  /**
504
498
  * Base options for data fetching
505
499
  * @template Filters - The available filter configurations
506
500
  */
507
- export declare type BaseFetchOptions<Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = {
501
+ export declare type BaseFetchOptions<Filters extends FiltersDefinition> = {
508
502
  /** Currently applied filters */
509
503
  filters: FiltersState<Filters>;
510
504
  sortings: SortingsStateMultiple;
511
505
  search?: string;
512
- navigationFilters?: NavigationFiltersState<NavigationFilters>;
513
506
  };
514
507
 
515
508
  /**
@@ -557,31 +550,28 @@ declare interface BaseHeaderProps_2 {
557
550
  * Represents a base structure for paginated API responses, providing
558
551
  * details about the records on the current page and pagination metadata.
559
552
  *
560
- * @template TRecord The type of each record in the paginated response.
553
+ * @template R The type of each record in the paginated response.
561
554
  *
562
- * @property {TRecord[]} records The list of records for the current page.
563
555
  * @property {number} total The total number of records available.
564
556
  * @property {number} perPage The number of records displayed per page.
565
- * @property {TRecord} [summaries] Optional summaries data for the collection.
566
557
  */
567
- export declare type BasePaginatedResponse<TRecord> = {
568
- /** The records for the current page */
569
- records: TRecord[];
558
+ export declare type BasePaginatedResponse<R> = BaseResponse<R> & {
570
559
  /** Total number of records available */
571
560
  total: number;
572
561
  /** Number of records per page */
573
562
  perPage: number;
574
- /** Optional summaries data */
575
- summaries?: TRecord;
576
563
  };
577
564
 
578
565
  /**
579
566
  * Base response type for collection data
580
- * @template Record - The type of records in the collection
567
+ * @template R - The type of records in the collection
568
+ *
569
+ * @property {R[]} records The list of records for the current page.
570
+ * @property {TRecord} [summaries] Optional summaries data for the collection.
581
571
  */
582
- export declare type BaseResponse<Record> = {
583
- records: Record[];
584
- summaries?: Record;
572
+ export declare type BaseResponse<R> = {
573
+ records: R[];
574
+ summaries?: R;
585
575
  };
586
576
 
587
577
  export declare const BaseTabs: React.FC<TabsProps>;
@@ -634,23 +624,26 @@ declare type BreadcrumbNavItemType = BreadcrumbBaseItemType & {
634
624
  */
635
625
  export declare function Breadcrumbs({ breadcrumbs, append }: BreadcrumbsProps): JSX_2.Element;
636
626
 
637
- export declare function BreadcrumbSelect({ options, defaultItem, ...props }: BreadcrumbSelectProps): JSX_2.Element;
627
+ export declare function BreadcrumbSelect<T extends string, R = unknown>({ ...props }: BreadcrumbSelectProps<T, R>): JSX_2.Element;
638
628
 
639
629
  declare type BreadcrumbSelectItemType = BreadcrumbBaseItemType & {
640
630
  type: "select";
641
631
  searchbox?: boolean;
642
632
  externalSearch?: boolean;
643
- options: BreadcrumbSelectProps["options"];
644
- onChange: BreadcrumbSelectProps["onChange"];
633
+ onChange: BreadcrumbSelectProps<string, RecordType>["onChange"];
645
634
  value?: string;
646
- defaultItem?: SelectItemObject<string>;
647
- };
635
+ defaultItem?: SelectItemObject<string, RecordType>;
636
+ } & ({
637
+ source: DataSourceDefinition<RecordType, FiltersDefinition, SortingsDefinition, GroupingDefinition<RecordType>>;
638
+ mapOptions: (item: RecordType) => SelectItemProps<string>;
639
+ options?: never;
640
+ } | {
641
+ source?: never;
642
+ mapOptions?: never;
643
+ options: SelectItemProps<string, RecordType>[];
644
+ });
648
645
 
649
- export declare type BreadcrumbSelectProps = Omit<SelectProps<string>, "options" | "value"> & {
650
- options: Options;
651
- value?: string;
652
- defaultItem?: SelectItemObject<string>;
653
- };
646
+ export declare type BreadcrumbSelectProps<T extends string, R = unknown> = SelectProps<T, R>;
654
647
 
655
648
  export declare interface BreadcrumbsProps {
656
649
  /** Array of breadcrumb items to display */
@@ -681,6 +674,13 @@ export declare type BulkActionDefinition = {
681
674
  keepSelection?: boolean;
682
675
  };
683
676
 
677
+ export declare type BulkActionsDefinition<R extends RecordType, Filters extends FiltersDefinition> = (selectedItems: Parameters<OnBulkActionCallback<R, Filters>>[1]) => {
678
+ primary: BulkActionDefinition[];
679
+ secondary?: BulkActionDefinition[];
680
+ } | {
681
+ warningMessage: string;
682
+ };
683
+
684
684
  declare const Button: React_2.ForwardRefExoticComponent<ButtonProps_2 & React_2.RefAttributes<HTMLButtonElement>>;
685
685
 
686
686
  export declare interface ButtonConfig {
@@ -1029,7 +1029,7 @@ declare type ClockInStatus = "clocked-in" | "break" | "clocked-out";
1029
1029
  */
1030
1030
  export declare type CollectionProps<Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>, VisualizationOptions extends object> = {
1031
1031
  /** The data source configuration and state */
1032
- source: DataSource<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
1032
+ source: DataCollectionSource<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
1033
1033
  /** Function to handle item selection */
1034
1034
  onSelectItems: OnSelectItemsCallback<Record, Filters>;
1035
1035
  /** Function to handle data load */
@@ -1037,15 +1037,6 @@ export declare type CollectionProps<Record extends RecordType, Filters extends F
1037
1037
  onLoadError: OnLoadErrorCallback;
1038
1038
  } & VisualizationOptions;
1039
1039
 
1040
- export declare type CollectionSearchOptions = {
1041
- /** Whether search is enabled */
1042
- enabled: boolean;
1043
- /** Whether search is synchronous */
1044
- sync?: boolean;
1045
- /** Debounce time for search */
1046
- debounceTime?: number;
1047
- };
1048
-
1049
1040
  declare type ColumnNumber = 1 | 2 | 3 | 4 | 6;
1050
1041
 
1051
1042
  declare type ColumnWidth = keyof typeof columnWidths | number;
@@ -1210,10 +1201,74 @@ declare type DashboardProps_2 = {
1210
1201
 
1211
1202
  /**
1212
1203
  * Combined type for all possible data adapter configurations
1213
- * @template Record - The type of records in the collection
1204
+ * @template R - The type of records in the collection
1214
1205
  * @template Filters - The available filter configurations
1215
1206
  */
1216
- export declare type DataAdapter<Record extends RecordType, Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = BaseDataAdapter<Record, Filters, NavigationFilters> | PaginatedDataAdapter<Record, Filters, NavigationFilters>;
1207
+ export declare type DataAdapter<R extends RecordType, Filters extends FiltersDefinition> = BaseDataAdapter<R, Filters, BaseFetchOptions<Filters>, BaseResponse<R>> | PaginatedDataAdapter<R, Filters, PaginatedFetchOptions<Filters>, PaginatedResponse<R>>;
1208
+
1209
+ export declare type DataCollectionBaseFetchOptions<Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = BaseFetchOptions<Filters> & DataCollectionExtendFetchOptions<NavigationFilters>;
1210
+
1211
+ /**
1212
+ * Data collection data adapter
1213
+ */
1214
+ export declare type DataCollectionDataAdapter<R extends RecordType = RecordType, Filters extends FiltersDefinition = FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition = NavigationFiltersDefinition> = BaseDataAdapter<R, Filters, DataCollectionBaseFetchOptions<Filters, NavigationFilters>, BaseResponse<R>> | PaginatedDataAdapter<R, Filters, DataCollectionPaginatedFetchOptions<Filters, NavigationFilters>, PaginatedResponse<R>>;
1215
+
1216
+ /**
1217
+ * Extended base fetch options for data collection
1218
+ */
1219
+ declare type DataCollectionExtendFetchOptions<NavigationFilters extends NavigationFiltersDefinition> = {
1220
+ navigationFilters: NavigationFiltersState<NavigationFilters>;
1221
+ };
1222
+
1223
+ /**
1224
+ * Extended base fetch options for data collection
1225
+ */
1226
+ export declare type DataCollectionPaginatedFetchOptions<Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = PaginatedFetchOptions<Filters> & DataCollectionExtendFetchOptions<NavigationFilters>;
1227
+
1228
+ /**
1229
+ * Data collection source
1230
+ * Extends the base data source with data collection specific elements / features
1231
+ */
1232
+ export declare type DataCollectionSource<R extends RecordType = RecordType, Filters extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Summaries extends SummariesDefinition = SummariesDefinition, ItemActions extends ItemActionsDefinition<R> = ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition = NavigationFiltersDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>> = DataSource<R, Filters, Sortings, Grouping> & DataCollectionSourceDefinition<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping> & {
1233
+ currentNavigationFilters: NavigationFiltersState<NavigationFilters>;
1234
+ setCurrentNavigationFilters: React.Dispatch<React.SetStateAction<NavigationFiltersState<NavigationFilters>>>;
1235
+ /** Current summaries data */
1236
+ currentSummaries?: R;
1237
+ /** Function to update the current summaries data */
1238
+ setCurrentSummaries?: React.Dispatch<React.SetStateAction<R | undefined>>;
1239
+ };
1240
+
1241
+ /**
1242
+ * Data collection source definition
1243
+ * Extends the base data source definition with data collection specific elements / features
1244
+ */
1245
+ export declare type DataCollectionSourceDefinition<R extends RecordType = RecordType, Filters extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Summaries extends SummariesDefinition = SummariesDefinition, ItemActions extends ItemActionsDefinition<R> = ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition = NavigationFiltersDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>> = Omit<DataSourceDefinition<R, Filters, Sortings, Grouping>, "dataAdapter"> & {
1246
+ /**
1247
+ * Data Collection specific datasource elements / features
1248
+ */
1249
+ /** Navigation filters */
1250
+ navigationFilters?: NavigationFilters;
1251
+ /** URL for a single item in the collection */
1252
+ itemUrl?: (item: R) => string | undefined;
1253
+ /** Click handler for a single item in the collection */
1254
+ itemOnClick?: (item: R) => () => void;
1255
+ /** Available actions that can be performed on records */
1256
+ itemActions?: ItemActions;
1257
+ /** Available primary actions that can be performed on the collection */
1258
+ primaryActions?: PrimaryActionsDefinition;
1259
+ /** Available secondary actions that can be performed on the collection */
1260
+ secondaryActions?: SecondaryActionsDefinition;
1261
+ /** Available summaries fields. If not provided, summaries is not allowed. */
1262
+ summaries?: Summaries & {
1263
+ label?: string;
1264
+ };
1265
+ dataAdapter: DataCollectionDataAdapter<R, Filters, NavigationFilters>;
1266
+ /** Bulk actions that can be performed on the collection */
1267
+ bulkActions?: BulkActionsDefinition<R, Filters>;
1268
+ totalItemSummary?: (totalItems: number) => string;
1269
+ /** Lanes configuration */
1270
+ lanes?: ReadonlyArray<Lane<Filters>>;
1271
+ };
1217
1272
 
1218
1273
  /**
1219
1274
  * Represents an error that occurred during data fetching
@@ -1244,7 +1299,7 @@ declare type DataListProps = {
1244
1299
  * @template Filters - The available filter configurations for the collection
1245
1300
  * @template ItemActions - The available actions that can be performed on records
1246
1301
  */
1247
- export declare type DataSource<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<R>> = DataSourceDefinition<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping> & {
1302
+ export declare type DataSource<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Grouping extends GroupingDefinition<R>> = DataSourceDefinition<R, Filters, Sortings, Grouping> & {
1248
1303
  /** Current state of applied filters */
1249
1304
  currentFilters: FiltersState<Filters>;
1250
1305
  /** Function to update the current filters state */
@@ -1258,25 +1313,17 @@ export declare type DataSource<R extends RecordType, Filters extends FiltersDefi
1258
1313
  setCurrentSearch: (search: string | undefined) => void;
1259
1314
  isLoading: boolean;
1260
1315
  setIsLoading: (loading: boolean) => void;
1261
- currentNavigationFilters: NavigationFiltersState<NavigationFilters>;
1262
- setCurrentNavigationFilters: React.Dispatch<React.SetStateAction<NavigationFiltersState<NavigationFilters>>>;
1263
1316
  /** Current state of applied grouping */
1264
1317
  currentGrouping?: Grouping["mandatory"] extends true ? Exclude<GroupingState<R, Grouping>, undefined> : GroupingState<R, Grouping>;
1265
1318
  /** Function to update the current grouping state */
1266
1319
  setCurrentGrouping: React.Dispatch<React.SetStateAction<GroupingState<R, Grouping>>>;
1267
- /** Current summaries data */
1268
- currentSummaries?: R;
1269
- /** Function to update the current summaries data */
1270
- setCurrentSummaries?: React.Dispatch<React.SetStateAction<R | undefined>>;
1271
1320
  /** Function to provide an id for a record, necessary for append mode */
1272
- idProvider?: (item: R, index?: number) => string | number | symbol;
1273
- /** Lanes data sources */
1274
- lanes?: ReadonlyArray<LaneDataSource<Filters>>;
1321
+ idProvider?: <Item extends R>(item: Item, index?: number) => string | number | symbol;
1275
1322
  };
1276
1323
 
1277
1324
  /**
1278
1325
  * Defines the structure and configuration of a data source for a collection.
1279
- * @template Record - The type of records in the collection
1326
+ * @template R - The type of records in the collection
1280
1327
  * @template Filters - The available filter configurations for the collection
1281
1328
  * @template ItemActions - The available actions that can be performed on records
1282
1329
  * @template NavigationFilters - The available navigation filters for the collection
@@ -1287,54 +1334,27 @@ export declare type DataSource<R extends RecordType, Filters extends FiltersDefi
1287
1334
  * @template OtherActions - The available actions that can be performed on the collection
1288
1335
  * @template Summaries - The available summaries for the collection
1289
1336
  */
1290
- export declare type DataSourceDefinition<Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>> = {
1337
+ export declare type DataSourceDefinition<R extends RecordType = RecordType, Filters extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>> = {
1291
1338
  /** Available filter configurations */
1292
1339
  filters?: Filters;
1293
- /** Navigation filters */
1294
- navigationFilters?: NavigationFilters;
1340
+ /** Current state of applied filters */
1341
+ currentFilters?: FiltersState<Filters>;
1295
1342
  /** Predefined filter configurations that can be applied */
1296
1343
  presets?: PresetsDefinition<Filters>;
1297
- /** URL for a single item in the collection */
1298
- itemUrl?: (item: Record) => string | undefined;
1299
- /** Click handler for a single item in the collection */
1300
- itemOnClick?: (item: Record) => () => void;
1301
- /** Available actions that can be performed on records */
1302
- itemActions?: ItemActions;
1303
- /** Available primary actions that can be performed on the collection */
1304
- primaryActions?: PrimaryActionsDefinition;
1305
- /** Available secondary actions that can be performed on the collection */
1306
- secondaryActions?: SecondaryActionsDefinition;
1307
1344
  /** Search configuration */
1308
- search?: CollectionSearchOptions;
1309
- /** Current state of applied filters */
1310
- currentFilters?: FiltersState<Filters>;
1311
- /** Current state of applied navigation filter */
1345
+ search?: SearchOptions;
1312
1346
  /** Available sorting fields. If not provided, sorting is not allowed. */
1313
1347
  sortings?: Sortings;
1314
1348
  defaultSorting?: SortingsState<Sortings>;
1315
- /** Available summaries fields. If not provided, summaries is not allowed. */
1316
- summaries?: Summaries & {
1317
- label?: string;
1318
- };
1319
1349
  /** Data adapter responsible for fetching and managing data */
1320
- dataAdapter: DataAdapter<Record, Filters, NavigationFilters>;
1350
+ dataAdapter: DataAdapter<R, Filters>;
1321
1351
  /** Selectable items value under the checkbox column (undefined if not selectable) */
1322
- selectable?: (item: Record) => string | number | undefined;
1352
+ selectable?: (item: R) => string | number | undefined;
1323
1353
  /** Default selected items */
1324
1354
  defaultSelectedItems?: SelectedItemsState;
1325
- /** Bulk actions that can be performed on the collection */
1326
- bulkActions?: (selectedItems: Parameters<OnBulkActionCallback<Record, Filters>>[1]) => {
1327
- primary?: BulkActionDefinition[];
1328
- secondary?: BulkActionDefinition[];
1329
- } | {
1330
- warningMessage: string;
1331
- };
1332
- totalItemSummary?: (totalItems: number) => string;
1333
1355
  /** Grouping configuration */
1334
1356
  grouping?: Grouping;
1335
- currentGrouping?: GroupingState<Record, Grouping>;
1336
- /** Lanes configuration */
1337
- lanes?: ReadonlyArray<LaneDataSource<Filters>>;
1357
+ currentGrouping?: GroupingState<R, Grouping>;
1338
1358
  };
1339
1359
 
1340
1360
  declare type DateFilterDefinition = BaseFilterDefinition<"date"> & {
@@ -1614,10 +1634,8 @@ declare const defaultTranslations: {
1614
1634
  };
1615
1635
  readonly notifications: "Notifications";
1616
1636
  readonly ai: {
1617
- readonly description: "Chat with AI";
1618
- readonly expandChat: "Expand chat";
1619
- readonly minimizeChat: "Minimize chat window";
1620
- readonly openChat: "Open Chat";
1637
+ readonly openChat: "Open Chat with One AI";
1638
+ readonly closeChat: "Close Chat with One AI";
1621
1639
  readonly scrollToBottom: "Scroll to bottom";
1622
1640
  readonly welcome: "I'm One. Ask or make anything.";
1623
1641
  readonly initialMessage: "How can I help you today?";
@@ -1986,8 +2004,7 @@ value?: string;
1986
2004
  threshold?: number;
1987
2005
  debounceTime?: number;
1988
2006
  autoFocus?: boolean;
1989
- onChange?: (value: string) => void;
1990
- } & Pick<InputFieldProps<string>, "name" | "disabled" | "size" | "loading" | "placeholder" | "clearable"> & RefAttributes<HTMLInputElement>>;
2007
+ } & Pick<InputFieldProps<string>, "onChange" | "name" | "onFocus" | "onBlur" | "disabled" | "size" | "loading" | "placeholder" | "clearable"> & RefAttributes<HTMLInputElement>>;
1991
2008
 
1992
2009
  declare type FavoriteMenuItem = ({
1993
2010
  type: "icon";
@@ -2510,8 +2527,6 @@ declare type ItemProps = {
2510
2527
 
2511
2528
  declare type Items = typeof Item_2 | typeof PersonItem | typeof CompanyItem | typeof TeamItem;
2512
2529
 
2513
- declare type Items_2 = SelectItemObject<string>[];
2514
-
2515
2530
  export declare function ItemSectionHeader({ item, children, isActive, collapsible, isExpanded, onToggleExpanded, sortable, }: TOCItemSectionHeaderProps): JSX_2.Element;
2516
2531
 
2517
2532
  declare type KanbanLaneDefinition = {
@@ -2536,23 +2551,11 @@ declare type KanbanVisualizationOptions<Record extends RecordType, _Filters exte
2536
2551
  * Represents a single lane configuration with its own filters
2537
2552
  * @template Filters - The available filter configurations for this lane
2538
2553
  */
2539
- export declare type LaneDataSource<Filters extends FiltersDefinition> = {
2540
- /** Unique identifier for the lane */
2554
+ export declare type Lane<Filters extends FiltersDefinition> = {
2541
2555
  id: string;
2542
- /** Current state of applied filters for this lane */
2543
2556
  filters: FiltersState<Filters>;
2544
2557
  };
2545
2558
 
2546
- /**
2547
- * Data adapter configuration that supports lanes (must use infinite-scroll)
2548
- * @template Record - The type of records in the collection
2549
- * @template Filters - The available filter configurations
2550
- */
2551
- export declare type LanesSupportedDataAdapter<Record extends RecordType, Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = PaginatedDataAdapter<Record, Filters, NavigationFilters> & {
2552
- /** Lanes require infinite-scroll pagination */
2553
- paginationType: Extract<PaginationType, "infinite-scroll">;
2554
- };
2555
-
2556
2559
  export declare type lastIntentType = {
2557
2560
  selectedIntent?: string;
2558
2561
  customIntent?: string;
@@ -3011,11 +3014,11 @@ export declare interface OneCalendarProps {
3011
3014
  /**
3012
3015
  * @experimental This is an experimental component use it at your own risk
3013
3016
  */
3014
- export declare const OneDataCollection: <Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>>({ source, visualizations, onSelectItems, onBulkAction, emptyStates, fullHeight, }: {
3015
- source: DataSource<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
3016
- visualizations: ReadonlyArray<Visualization<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>>;
3017
- onSelectItems?: OnSelectItemsCallback<Record, Filters>;
3018
- onBulkAction?: OnBulkActionCallback<Record, Filters>;
3017
+ export declare const OneDataCollection: <R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<R>>({ source, visualizations, onSelectItems, onBulkAction, emptyStates, fullHeight, }: {
3018
+ source: DataCollectionSource<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
3019
+ visualizations: ReadonlyArray<Visualization<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>>;
3020
+ onSelectItems?: OnSelectItemsCallback<R, Filters>;
3021
+ onBulkAction?: OnBulkActionCallback<R, Filters>;
3019
3022
  emptyStates?: CustomEmptyStates;
3020
3023
  onTotalItemsChange?: (totalItems: number) => void;
3021
3024
  fullHeight?: boolean;
@@ -3271,15 +3274,8 @@ export declare type OnLoadDataCallback<Record extends RecordType, Filters extend
3271
3274
 
3272
3275
  export declare type OnLoadErrorCallback = (error: DataError) => void;
3273
3276
 
3274
- export declare type OnSelectItemsCallback<R extends RecordType, Filters extends FiltersDefinition> = (selectedItems: {
3275
- allSelected: boolean | "indeterminate";
3276
- itemsStatus: ReadonlyArray<{
3277
- item: R;
3278
- checked: boolean;
3279
- }>;
3280
- groupsStatus: Record<string, boolean>;
3281
- filters: FiltersState<Filters>;
3282
- selectedCount: number;
3277
+ export declare type OnSelectItemsCallback<R extends RecordType, Filters extends FiltersDefinition> = (selectedItems: SelectedItemsDetailedStatus<R, Filters> & {
3278
+ byLane?: Record<string, SelectedItemsDetailedStatus<R, Filters>>;
3283
3279
  }, clearSelectedItems: () => void) => void;
3284
3280
 
3285
3281
  declare type OnSubmitHandler<TFieldValues extends FieldValues, TTransformedValues extends FieldValues | undefined = undefined> = (data: ReturnType<UseFormHandleSubmit<TFieldValues, TTransformedValues>>) => Promise<Success | FormError<TFieldValues>> | Success | FormError<TFieldValues>;
@@ -3292,8 +3288,6 @@ declare interface Option_2 {
3292
3288
  onClick?: (event: any) => unknown;
3293
3289
  }
3294
3290
 
3295
- declare type Options = Items_2 | ((search?: string) => Promise<Items_2> | Items_2);
3296
-
3297
3291
  declare interface OverflowListProps<T> {
3298
3292
  items: T[];
3299
3293
  /**
@@ -3375,10 +3369,10 @@ declare interface PageProps {
3375
3369
 
3376
3370
  /**
3377
3371
  * Paginated data adapter configuration
3378
- * @template Record - The type of records in the collection
3372
+ * @template R - The type of records in the collection
3379
3373
  * @template Filters - The available filter configurations
3380
3374
  */
3381
- export declare type PaginatedDataAdapter<Record extends RecordType, Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = {
3375
+ export declare type PaginatedDataAdapter<R extends RecordType, Filters extends FiltersDefinition, Options extends PaginatedFetchOptions<Filters> = PaginatedFetchOptions<Filters>, FetchReturn = PaginatedResponse<R>> = {
3382
3376
  /** Indicates this adapter uses page-based pagination */
3383
3377
  paginationType: PaginationType;
3384
3378
  /** Default number of records per page */
@@ -3388,10 +3382,10 @@ export declare type PaginatedDataAdapter<Record extends RecordType, Filters exte
3388
3382
  * @param options - The filter and pagination options to apply when fetching data
3389
3383
  * @returns Paginated response with records and pagination info
3390
3384
  */
3391
- fetchData: (options: PaginatedFetchOptions<Filters, NavigationFilters>) => PaginatedResponse<Record> | Promise<PaginatedResponse<Record>> | Observable<PromiseState<PaginatedResponse<Record>>>;
3385
+ fetchData: (options: Options) => FetchReturn | Promise<FetchReturn> | Observable<PromiseState<FetchReturn>>;
3392
3386
  };
3393
3387
 
3394
- export declare type PaginatedFetchOptions<Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = BaseFetchOptions<Filters, NavigationFilters> & {
3388
+ export declare type PaginatedFetchOptions<Filters extends FiltersDefinition> = BaseFetchOptions<Filters> & {
3395
3389
  pagination: {
3396
3390
  perPage?: number;
3397
3391
  } & ({
@@ -3412,14 +3406,15 @@ export declare type PaginatedResponse<TRecord> = PageBasedPaginatedResponse<TRec
3412
3406
  /**
3413
3407
  * Pagination state and controls
3414
3408
  */
3415
- export declare type PaginationInfo = Omit<PageBasedPaginatedResponse<unknown> | InfiniteScrollPaginatedResponse<unknown>, "records">;
3409
+ export declare type PaginationInfo = Omit<PageBasedPaginatedResponse<unknown>, "records"> | Omit<InfiniteScrollPaginatedResponse<unknown>, "records">;
3416
3410
 
3417
3411
  /**
3418
3412
  * Defines the available pagination types used throughout the application.
3419
3413
  * - "pages": Represents traditional page-based navigation with numbered pages.
3420
3414
  * - "infinite-scroll": Represents continuous loading of content as the user scrolls.
3415
+ * - "no-pagination": Represents a collection that does not use pagination.
3421
3416
  */
3422
- export declare type PaginationType = "pages" | "infinite-scroll";
3417
+ export declare type PaginationType = "pages" | "infinite-scroll" | "no-pagination";
3423
3418
 
3424
3419
  declare type PersonAvatarVariant = Extract<AvatarVariant, {
3425
3420
  type: "person";
@@ -3728,6 +3723,8 @@ export declare type RecordType = Record<string, unknown>;
3728
3723
 
3729
3724
  declare type RendererDefinition = ValueDisplayRendererDefinition;
3730
3725
 
3726
+ export declare type ResolvedRecordType<R> = R extends RecordType ? R : RecordType;
3727
+
3731
3728
  export declare const ResourceHeader: ({ avatar, title, description, primaryAction, secondaryActions, otherActions, status, metadata, }: Props) => JSX_2.Element;
3732
3729
 
3733
3730
  export declare type resultType = {
@@ -3785,6 +3782,8 @@ declare type SchemaType = ZodType;
3785
3782
  export declare const ScrollArea: ForwardRefExoticComponent<Omit<Omit<ScrollAreaProps & RefAttributes<HTMLDivElement>, "ref"> & {
3786
3783
  showBar?: boolean;
3787
3784
  viewportRef?: React.RefObject<HTMLDivElement>;
3785
+ onScrollTop?: () => void;
3786
+ onScrollBottom?: () => void;
3788
3787
  } & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
3789
3788
 
3790
3789
  export declare function SearchBar({ onClick, placeholder, shortcut, ...props }: SearchBarProps): JSX_2.Element;
@@ -3796,6 +3795,15 @@ declare interface SearchBarProps extends ButtonHTMLAttributes<HTMLButtonElement>
3796
3795
 
3797
3796
  declare type SearchFilterDefinition = BaseFilterDefinition<"search">;
3798
3797
 
3798
+ declare type SearchOptions = {
3799
+ /** Whether search is enabled */
3800
+ enabled: boolean;
3801
+ /** Whether search is synchronous */
3802
+ sync?: boolean;
3803
+ /** Debounce time for search */
3804
+ debounceTime?: number;
3805
+ };
3806
+
3799
3807
  declare interface SecondaryAction extends PrimaryActionButton {
3800
3808
  variant?: "outline" | "critical" | "outlinePromote" | "promote";
3801
3809
  }
@@ -3839,6 +3847,17 @@ export declare const Select: <T extends string = string, R = unknown>(props: Sel
3839
3847
  */
3840
3848
  export declare type SelectedItems<T> = ReadonlyArray<T>;
3841
3849
 
3850
+ export declare type SelectedItemsDetailedStatus<R extends RecordType, Filters extends FiltersDefinition> = {
3851
+ allSelected: boolean | "indeterminate";
3852
+ itemsStatus: ReadonlyArray<{
3853
+ item: R;
3854
+ checked: boolean;
3855
+ }>;
3856
+ groupsStatus: Record<string, boolean>;
3857
+ filters: FiltersState<Filters>;
3858
+ selectedCount: number;
3859
+ };
3860
+
3842
3861
  /**
3843
3862
  * Represents the selected items by id
3844
3863
  */
@@ -3869,26 +3888,38 @@ export declare type SelectItemProps<T, R = unknown> = SelectItemObject<T, R> | {
3869
3888
  type: "separator";
3870
3889
  };
3871
3890
 
3872
- export declare type SelectProps<T, R = any> = {
3873
- onChange: (value: T, item?: R) => void;
3891
+ /**
3892
+ * Select component for choosing from a list of options.
3893
+ *
3894
+ * @template T - The type of the emitted value
3895
+ * @template R - The type of the record/item data (used with data source)
3896
+ *
3897
+ */
3898
+ export declare type SelectProps<T extends string, R = unknown> = {
3899
+ onChange: (value: T, originalItem?: ResolvedRecordType<R>, option?: SelectItemObject<T, ResolvedRecordType<R>>) => void;
3900
+ onChangeSelectedOption?: (option: SelectItemObject<T, ResolvedRecordType<R>>) => void;
3874
3901
  value?: T;
3875
- defaultItem?: SelectItemObject<T, R>;
3876
- options: SelectItemProps<T, R>[];
3902
+ defaultItem?: SelectItemObject<T, ResolvedRecordType<R>>;
3877
3903
  children?: React.ReactNode;
3878
- disabled?: boolean;
3879
3904
  open?: boolean;
3880
3905
  showSearchBox?: boolean;
3881
3906
  searchBoxPlaceholder?: string;
3882
3907
  onSearchChange?: (value: string) => void;
3883
- externalSearch?: boolean;
3884
3908
  searchValue?: string;
3885
3909
  onOpenChange?: (open: boolean) => void;
3886
3910
  searchEmptyMessage?: string;
3887
3911
  className?: string;
3888
3912
  selectContentClassName?: string;
3889
3913
  actions?: Action[];
3890
- name?: string;
3891
- } & Pick<InputFieldProps<T>, "loading" | "hideLabel" | "clearable" | "labelIcon" | "size" | "label" | "icon" | "placeholder" | "error" | "status" | "hint">;
3914
+ } & ({
3915
+ source: DataSourceDefinition<ResolvedRecordType<R>, FiltersDefinition, SortingsDefinition, GroupingDefinition<ResolvedRecordType<R>>>;
3916
+ mapOptions: (item: ResolvedRecordType<R>) => SelectItemProps<T, ResolvedRecordType<R>>;
3917
+ options?: never;
3918
+ } | {
3919
+ source?: never;
3920
+ mapOptions?: never;
3921
+ options: SelectItemProps<T, unknown>[];
3922
+ }) & Pick<InputFieldProps<T>, "loading" | "hideLabel" | "clearable" | "labelIcon" | "size" | "label" | "icon" | "placeholder" | "disabled" | "name" | "error" | "status" | "hint">;
3892
3923
 
3893
3924
  export declare function Shortcut({ keys, variant }: ShortcutProps): JSX_2.Element | null;
3894
3925
 
@@ -4485,41 +4516,7 @@ declare type URL_2 = string;
4485
4516
 
4486
4517
  export declare function useAiChat(): AiChatProviderReturnValue;
4487
4518
 
4488
- /**
4489
- * A hook that manages data source state and filtering capabilities for a collection.
4490
- * It creates and returns a reusable data source that can be shared across different
4491
- * visualizations and components.
4492
- *
4493
- * This hook is intentionally separated from the rendering components to:
4494
- * 1. Enable sharing the same data source across multiple components
4495
- * 2. Allow for state management outside the rendering layer
4496
- * 3. Support more complex data filtering, querying, and pagination logic
4497
- * 4. Provide a clean separation between data management and visualization
4498
- *
4499
- * @template Record - The type of records in the collection
4500
- * @template Filters - The definition of available filters for the collection
4501
- * @template ItemActions - The definition of available item actions
4502
- * @template Actions - The definition of available actions for the collection
4503
- *
4504
- * @param options - Configuration object containing:
4505
- * - filters: Optional filter configurations for the collection
4506
- * - currentFilters: Initial state of the filters
4507
- * - dataAdapter: Adapter for data fetching and manipulation
4508
- * - itemActions: Optional item actions available
4509
- * - actions: Optional DataCollection actions
4510
- * - presets: Optional filter presets
4511
- * @param deps - Dependency array for memoization, similar to useEffect dependencies
4512
- *
4513
- * @returns A DataSource object containing:
4514
- * - filters: The available filter configurations
4515
- * - currentFilters: The current state of the filters
4516
- * - setCurrentFilters: Function to update the filter state
4517
- * - dataAdapter: The data adapter for fetching/manipulating data
4518
- * - itemActions: Available actions for records (items)
4519
- * - actions: Available actions for the collection
4520
- * - presets: Available filter presets
4521
- */
4522
- export declare const useDataSource: <Record extends RecordType, FiltersSchema extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>>({ currentFilters: initialCurrentFilters, currentGrouping: initialCurrentGrouping, filters, navigationFilters, search, defaultSorting, summaries, dataAdapter, grouping, ...rest }: DataSourceDefinition<Record, FiltersSchema, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>, deps?: ReadonlyArray<unknown>) => DataSource<Record, FiltersSchema, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
4519
+ export declare const useDataCollectionSource: <R extends RecordType = RecordType, FiltersSchema extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Summaries extends SummariesDefinition = SummariesDefinition, ItemActions extends ItemActionsDefinition<R> = ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition = NavigationFiltersDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>>(source: DataCollectionSourceDefinition<R, FiltersSchema, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>, deps?: ReadonlyArray<unknown>) => DataCollectionSource<R, FiltersSchema, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
4523
4520
 
4524
4521
  export { useForm }
4525
4522
 
@@ -4602,30 +4599,30 @@ declare const VerticalOverflowList: {
4602
4599
  * Represents a visualization configuration for displaying collection data.
4603
4600
  * Supports different visualization types (card, table, or custom) with their respective options.
4604
4601
  *
4605
- * @template Record - The type of records in the collection
4602
+ * @template R - The type of records in the collection
4606
4603
  * @template Filters - The filters type extending FiltersDefinition
4607
4604
  * @template ItemActions - The actions type extending Item ActionsDefinition
4608
4605
  */
4609
- declare type Visualization<Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>> = {
4606
+ declare type Visualization<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<R>> = {
4610
4607
  /** Card-based visualization type */
4611
4608
  type: "card";
4612
4609
  /** Configuration options for card visualization */
4613
- options: CardVisualizationOptions<Record, Filters, Sortings>;
4610
+ options: CardVisualizationOptions<R, Filters, Sortings>;
4614
4611
  } | {
4615
4612
  /** Kanban-based visualization type */
4616
4613
  type: "kanban";
4617
4614
  /** Configuration options for kanban visualization */
4618
- options: KanbanVisualizationOptions<Record, Filters, Sortings>;
4615
+ options: KanbanVisualizationOptions<R, Filters, Sortings>;
4619
4616
  } | {
4620
4617
  /** Table-based visualization type */
4621
4618
  type: "table";
4622
4619
  /** Configuration options for table visualization */
4623
- options: TableVisualizationOptions<Record, Filters, Sortings, Summaries>;
4620
+ options: TableVisualizationOptions<R, Filters, Sortings, Summaries>;
4624
4621
  } | {
4625
4622
  /** List-based visualization type */
4626
4623
  type: "list";
4627
4624
  /** Configuration options for list visualization */
4628
- options: ListVisualizationOptions<Record, Filters, Sortings>;
4625
+ options: ListVisualizationOptions<R, Filters, Sortings>;
4629
4626
  } | {
4630
4627
  /** Human-readable label for the visualization */
4631
4628
  label: string;
@@ -4635,10 +4632,10 @@ declare type Visualization<Record extends RecordType, Filters extends FiltersDef
4635
4632
  type: "custom";
4636
4633
  /** Custom component to render the visualization */
4637
4634
  component: (props: {
4638
- onSelectItems: OnSelectItemsCallback<Record, Filters>;
4639
- onLoadData: OnLoadDataCallback<Record, Filters>;
4635
+ onSelectItems: OnSelectItemsCallback<R, Filters>;
4636
+ onLoadData: OnLoadDataCallback<R, Filters>;
4640
4637
  onLoadError: OnLoadErrorCallback;
4641
- source: DataSource<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
4638
+ source: DataCollectionSource<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
4642
4639
  }) => JSX.Element;
4643
4640
  };
4644
4641
 
@@ -4816,6 +4813,11 @@ declare module "@tiptap/core" {
4816
4813
  }
4817
4814
 
4818
4815
 
4816
+ declare namespace Calendar {
4817
+ var displayName: string;
4818
+ }
4819
+
4820
+
4819
4821
  declare module "@tiptap/core" {
4820
4822
  interface Commands<ReturnType> {
4821
4823
  moodTracker: {
@@ -4823,8 +4825,3 @@ declare module "@tiptap/core" {
4823
4825
  };
4824
4826
  }
4825
4827
  }
4826
-
4827
-
4828
- declare namespace Calendar {
4829
- var displayName: string;
4830
- }