@factorialco/f0-react 1.190.0 → 1.192.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.
@@ -480,10 +480,10 @@ export declare const BaseCommunityPost: ({ id, author, group, createdAt, title,
480
480
 
481
481
  /**
482
482
  * Base data adapter configuration for non-paginated collections
483
- * @template Record - The type of records in the collection
483
+ * @template R - The type of records in the collection
484
484
  * @template Filters - The available filter configurations
485
485
  */
486
- 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>> = {
487
487
  /** Indicates this adapter doesn't use pagination */
488
488
  paginationType?: never | undefined;
489
489
  /**
@@ -491,19 +491,18 @@ export declare type BaseDataAdapter<Record extends RecordType, Filters extends F
491
491
  * @param options - The filter options to apply when fetching data
492
492
  * @returns Array of records, promise of records, or observable of records
493
493
  */
494
- fetchData: (options: BaseFetchOptions<Filters, NavigationFilters>) => BaseResponse<Record> | Promise<BaseResponse<Record>> | Observable<PromiseState<BaseResponse<Record>>>;
494
+ fetchData: (options: Options) => FetchReturn | Promise<FetchReturn> | Observable<PromiseState<FetchReturn>>;
495
495
  };
496
496
 
497
497
  /**
498
498
  * Base options for data fetching
499
499
  * @template Filters - The available filter configurations
500
500
  */
501
- export declare type BaseFetchOptions<Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = {
501
+ export declare type BaseFetchOptions<Filters extends FiltersDefinition> = {
502
502
  /** Currently applied filters */
503
503
  filters: FiltersState<Filters>;
504
504
  sortings: SortingsStateMultiple;
505
505
  search?: string;
506
- navigationFilters?: NavigationFiltersState<NavigationFilters>;
507
506
  };
508
507
 
509
508
  /**
@@ -551,31 +550,28 @@ declare interface BaseHeaderProps_2 {
551
550
  * Represents a base structure for paginated API responses, providing
552
551
  * details about the records on the current page and pagination metadata.
553
552
  *
554
- * @template TRecord The type of each record in the paginated response.
553
+ * @template R The type of each record in the paginated response.
555
554
  *
556
- * @property {TRecord[]} records The list of records for the current page.
557
555
  * @property {number} total The total number of records available.
558
556
  * @property {number} perPage The number of records displayed per page.
559
- * @property {TRecord} [summaries] Optional summaries data for the collection.
560
557
  */
561
- export declare type BasePaginatedResponse<TRecord> = {
562
- /** The records for the current page */
563
- records: TRecord[];
558
+ export declare type BasePaginatedResponse<R> = BaseResponse<R> & {
564
559
  /** Total number of records available */
565
560
  total: number;
566
561
  /** Number of records per page */
567
562
  perPage: number;
568
- /** Optional summaries data */
569
- summaries?: TRecord;
570
563
  };
571
564
 
572
565
  /**
573
566
  * Base response type for collection data
574
- * @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.
575
571
  */
576
- export declare type BaseResponse<Record> = {
577
- records: Record[];
578
- summaries?: Record;
572
+ export declare type BaseResponse<R> = {
573
+ records: R[];
574
+ summaries?: R;
579
575
  };
580
576
 
581
577
  export declare const BaseTabs: React.FC<TabsProps>;
@@ -628,23 +624,26 @@ declare type BreadcrumbNavItemType = BreadcrumbBaseItemType & {
628
624
  */
629
625
  export declare function Breadcrumbs({ breadcrumbs, append }: BreadcrumbsProps): JSX_2.Element;
630
626
 
631
- 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;
632
628
 
633
629
  declare type BreadcrumbSelectItemType = BreadcrumbBaseItemType & {
634
630
  type: "select";
635
631
  searchbox?: boolean;
636
632
  externalSearch?: boolean;
637
- options: BreadcrumbSelectProps["options"];
638
- onChange: BreadcrumbSelectProps["onChange"];
633
+ onChange: BreadcrumbSelectProps<string, RecordType>["onChange"];
639
634
  value?: string;
640
- defaultItem?: SelectItemObject<string>;
641
- };
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
+ });
642
645
 
643
- export declare type BreadcrumbSelectProps = Omit<SelectProps<string>, "options" | "value"> & {
644
- options: Options;
645
- value?: string;
646
- defaultItem?: SelectItemObject<string>;
647
- };
646
+ export declare type BreadcrumbSelectProps<T extends string, R = unknown> = SelectProps<T, R>;
648
647
 
649
648
  export declare interface BreadcrumbsProps {
650
649
  /** Array of breadcrumb items to display */
@@ -675,6 +674,13 @@ export declare type BulkActionDefinition = {
675
674
  keepSelection?: boolean;
676
675
  };
677
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
+
678
684
  declare const Button: React_2.ForwardRefExoticComponent<ButtonProps_2 & React_2.RefAttributes<HTMLButtonElement>>;
679
685
 
680
686
  export declare interface ButtonConfig {
@@ -1023,7 +1029,7 @@ declare type ClockInStatus = "clocked-in" | "break" | "clocked-out";
1023
1029
  */
1024
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> = {
1025
1031
  /** The data source configuration and state */
1026
- source: DataSource<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
1032
+ source: DataCollectionSource<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
1027
1033
  /** Function to handle item selection */
1028
1034
  onSelectItems: OnSelectItemsCallback<Record, Filters>;
1029
1035
  /** Function to handle data load */
@@ -1031,15 +1037,6 @@ export declare type CollectionProps<Record extends RecordType, Filters extends F
1031
1037
  onLoadError: OnLoadErrorCallback;
1032
1038
  } & VisualizationOptions;
1033
1039
 
1034
- export declare type CollectionSearchOptions = {
1035
- /** Whether search is enabled */
1036
- enabled: boolean;
1037
- /** Whether search is synchronous */
1038
- sync?: boolean;
1039
- /** Debounce time for search */
1040
- debounceTime?: number;
1041
- };
1042
-
1043
1040
  declare type ColumnNumber = 1 | 2 | 3 | 4 | 6;
1044
1041
 
1045
1042
  declare type ColumnWidth = keyof typeof columnWidths | number;
@@ -1204,10 +1201,74 @@ declare type DashboardProps_2 = {
1204
1201
 
1205
1202
  /**
1206
1203
  * Combined type for all possible data adapter configurations
1207
- * @template Record - The type of records in the collection
1204
+ * @template R - The type of records in the collection
1208
1205
  * @template Filters - The available filter configurations
1209
1206
  */
1210
- 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
+ };
1211
1272
 
1212
1273
  /**
1213
1274
  * Represents an error that occurred during data fetching
@@ -1238,7 +1299,7 @@ declare type DataListProps = {
1238
1299
  * @template Filters - The available filter configurations for the collection
1239
1300
  * @template ItemActions - The available actions that can be performed on records
1240
1301
  */
1241
- 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> & {
1242
1303
  /** Current state of applied filters */
1243
1304
  currentFilters: FiltersState<Filters>;
1244
1305
  /** Function to update the current filters state */
@@ -1252,25 +1313,17 @@ export declare type DataSource<R extends RecordType, Filters extends FiltersDefi
1252
1313
  setCurrentSearch: (search: string | undefined) => void;
1253
1314
  isLoading: boolean;
1254
1315
  setIsLoading: (loading: boolean) => void;
1255
- currentNavigationFilters: NavigationFiltersState<NavigationFilters>;
1256
- setCurrentNavigationFilters: React.Dispatch<React.SetStateAction<NavigationFiltersState<NavigationFilters>>>;
1257
1316
  /** Current state of applied grouping */
1258
1317
  currentGrouping?: Grouping["mandatory"] extends true ? Exclude<GroupingState<R, Grouping>, undefined> : GroupingState<R, Grouping>;
1259
1318
  /** Function to update the current grouping state */
1260
1319
  setCurrentGrouping: React.Dispatch<React.SetStateAction<GroupingState<R, Grouping>>>;
1261
- /** Current summaries data */
1262
- currentSummaries?: R;
1263
- /** Function to update the current summaries data */
1264
- setCurrentSummaries?: React.Dispatch<React.SetStateAction<R | undefined>>;
1265
1320
  /** Function to provide an id for a record, necessary for append mode */
1266
- idProvider?: (item: R, index?: number) => string | number | symbol;
1267
- /** Lanes data sources */
1268
- lanes?: ReadonlyArray<LaneDataSource<Filters>>;
1321
+ idProvider?: <Item extends R>(item: Item, index?: number) => string | number | symbol;
1269
1322
  };
1270
1323
 
1271
1324
  /**
1272
1325
  * Defines the structure and configuration of a data source for a collection.
1273
- * @template Record - The type of records in the collection
1326
+ * @template R - The type of records in the collection
1274
1327
  * @template Filters - The available filter configurations for the collection
1275
1328
  * @template ItemActions - The available actions that can be performed on records
1276
1329
  * @template NavigationFilters - The available navigation filters for the collection
@@ -1281,54 +1334,27 @@ export declare type DataSource<R extends RecordType, Filters extends FiltersDefi
1281
1334
  * @template OtherActions - The available actions that can be performed on the collection
1282
1335
  * @template Summaries - The available summaries for the collection
1283
1336
  */
1284
- 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>> = {
1285
1338
  /** Available filter configurations */
1286
1339
  filters?: Filters;
1287
- /** Navigation filters */
1288
- navigationFilters?: NavigationFilters;
1340
+ /** Current state of applied filters */
1341
+ currentFilters?: FiltersState<Filters>;
1289
1342
  /** Predefined filter configurations that can be applied */
1290
1343
  presets?: PresetsDefinition<Filters>;
1291
- /** URL for a single item in the collection */
1292
- itemUrl?: (item: Record) => string | undefined;
1293
- /** Click handler for a single item in the collection */
1294
- itemOnClick?: (item: Record) => () => void;
1295
- /** Available actions that can be performed on records */
1296
- itemActions?: ItemActions;
1297
- /** Available primary actions that can be performed on the collection */
1298
- primaryActions?: PrimaryActionsDefinition;
1299
- /** Available secondary actions that can be performed on the collection */
1300
- secondaryActions?: SecondaryActionsDefinition;
1301
1344
  /** Search configuration */
1302
- search?: CollectionSearchOptions;
1303
- /** Current state of applied filters */
1304
- currentFilters?: FiltersState<Filters>;
1305
- /** Current state of applied navigation filter */
1345
+ search?: SearchOptions;
1306
1346
  /** Available sorting fields. If not provided, sorting is not allowed. */
1307
1347
  sortings?: Sortings;
1308
1348
  defaultSorting?: SortingsState<Sortings>;
1309
- /** Available summaries fields. If not provided, summaries is not allowed. */
1310
- summaries?: Summaries & {
1311
- label?: string;
1312
- };
1313
1349
  /** Data adapter responsible for fetching and managing data */
1314
- dataAdapter: DataAdapter<Record, Filters, NavigationFilters>;
1350
+ dataAdapter: DataAdapter<R, Filters>;
1315
1351
  /** Selectable items value under the checkbox column (undefined if not selectable) */
1316
- selectable?: (item: Record) => string | number | undefined;
1352
+ selectable?: (item: R) => string | number | undefined;
1317
1353
  /** Default selected items */
1318
1354
  defaultSelectedItems?: SelectedItemsState;
1319
- /** Bulk actions that can be performed on the collection */
1320
- bulkActions?: (selectedItems: Parameters<OnBulkActionCallback<Record, Filters>>[1]) => {
1321
- primary?: BulkActionDefinition[];
1322
- secondary?: BulkActionDefinition[];
1323
- } | {
1324
- warningMessage: string;
1325
- };
1326
- totalItemSummary?: (totalItems: number) => string;
1327
1355
  /** Grouping configuration */
1328
1356
  grouping?: Grouping;
1329
- currentGrouping?: GroupingState<Record, Grouping>;
1330
- /** Lanes configuration */
1331
- lanes?: ReadonlyArray<LaneDataSource<Filters>>;
1357
+ currentGrouping?: GroupingState<R, Grouping>;
1332
1358
  };
1333
1359
 
1334
1360
  declare type DateFilterDefinition = BaseFilterDefinition<"date"> & {
@@ -1978,8 +2004,7 @@ value?: string;
1978
2004
  threshold?: number;
1979
2005
  debounceTime?: number;
1980
2006
  autoFocus?: boolean;
1981
- onChange?: (value: string) => void;
1982
- } & 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>>;
1983
2008
 
1984
2009
  declare type FavoriteMenuItem = ({
1985
2010
  type: "icon";
@@ -2502,8 +2527,6 @@ declare type ItemProps = {
2502
2527
 
2503
2528
  declare type Items = typeof Item_2 | typeof PersonItem | typeof CompanyItem | typeof TeamItem;
2504
2529
 
2505
- declare type Items_2 = SelectItemObject<string>[];
2506
-
2507
2530
  export declare function ItemSectionHeader({ item, children, isActive, collapsible, isExpanded, onToggleExpanded, sortable, }: TOCItemSectionHeaderProps): JSX_2.Element;
2508
2531
 
2509
2532
  declare type KanbanLaneDefinition = {
@@ -2528,23 +2551,11 @@ declare type KanbanVisualizationOptions<Record extends RecordType, _Filters exte
2528
2551
  * Represents a single lane configuration with its own filters
2529
2552
  * @template Filters - The available filter configurations for this lane
2530
2553
  */
2531
- export declare type LaneDataSource<Filters extends FiltersDefinition> = {
2532
- /** Unique identifier for the lane */
2554
+ export declare type Lane<Filters extends FiltersDefinition> = {
2533
2555
  id: string;
2534
- /** Current state of applied filters for this lane */
2535
2556
  filters: FiltersState<Filters>;
2536
2557
  };
2537
2558
 
2538
- /**
2539
- * Data adapter configuration that supports lanes (must use infinite-scroll)
2540
- * @template Record - The type of records in the collection
2541
- * @template Filters - The available filter configurations
2542
- */
2543
- export declare type LanesSupportedDataAdapter<Record extends RecordType, Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = PaginatedDataAdapter<Record, Filters, NavigationFilters> & {
2544
- /** Lanes require infinite-scroll pagination */
2545
- paginationType: Extract<PaginationType, "infinite-scroll">;
2546
- };
2547
-
2548
2559
  export declare type lastIntentType = {
2549
2560
  selectedIntent?: string;
2550
2561
  customIntent?: string;
@@ -3003,11 +3014,11 @@ export declare interface OneCalendarProps {
3003
3014
  /**
3004
3015
  * @experimental This is an experimental component use it at your own risk
3005
3016
  */
3006
- 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, }: {
3007
- source: DataSource<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
3008
- visualizations: ReadonlyArray<Visualization<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>>;
3009
- onSelectItems?: OnSelectItemsCallback<Record, Filters>;
3010
- 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>;
3011
3022
  emptyStates?: CustomEmptyStates;
3012
3023
  onTotalItemsChange?: (totalItems: number) => void;
3013
3024
  fullHeight?: boolean;
@@ -3263,15 +3274,8 @@ export declare type OnLoadDataCallback<Record extends RecordType, Filters extend
3263
3274
 
3264
3275
  export declare type OnLoadErrorCallback = (error: DataError) => void;
3265
3276
 
3266
- export declare type OnSelectItemsCallback<R extends RecordType, Filters extends FiltersDefinition> = (selectedItems: {
3267
- allSelected: boolean | "indeterminate";
3268
- itemsStatus: ReadonlyArray<{
3269
- item: R;
3270
- checked: boolean;
3271
- }>;
3272
- groupsStatus: Record<string, boolean>;
3273
- filters: FiltersState<Filters>;
3274
- selectedCount: number;
3277
+ export declare type OnSelectItemsCallback<R extends RecordType, Filters extends FiltersDefinition> = (selectedItems: SelectedItemsDetailedStatus<R, Filters> & {
3278
+ byLane?: Record<string, SelectedItemsDetailedStatus<R, Filters>>;
3275
3279
  }, clearSelectedItems: () => void) => void;
3276
3280
 
3277
3281
  declare type OnSubmitHandler<TFieldValues extends FieldValues, TTransformedValues extends FieldValues | undefined = undefined> = (data: ReturnType<UseFormHandleSubmit<TFieldValues, TTransformedValues>>) => Promise<Success | FormError<TFieldValues>> | Success | FormError<TFieldValues>;
@@ -3284,8 +3288,6 @@ declare interface Option_2 {
3284
3288
  onClick?: (event: any) => unknown;
3285
3289
  }
3286
3290
 
3287
- declare type Options = Items_2 | ((search?: string) => Promise<Items_2> | Items_2);
3288
-
3289
3291
  declare interface OverflowListProps<T> {
3290
3292
  items: T[];
3291
3293
  /**
@@ -3367,10 +3369,10 @@ declare interface PageProps {
3367
3369
 
3368
3370
  /**
3369
3371
  * Paginated data adapter configuration
3370
- * @template Record - The type of records in the collection
3372
+ * @template R - The type of records in the collection
3371
3373
  * @template Filters - The available filter configurations
3372
3374
  */
3373
- 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>> = {
3374
3376
  /** Indicates this adapter uses page-based pagination */
3375
3377
  paginationType: PaginationType;
3376
3378
  /** Default number of records per page */
@@ -3380,10 +3382,10 @@ export declare type PaginatedDataAdapter<Record extends RecordType, Filters exte
3380
3382
  * @param options - The filter and pagination options to apply when fetching data
3381
3383
  * @returns Paginated response with records and pagination info
3382
3384
  */
3383
- fetchData: (options: PaginatedFetchOptions<Filters, NavigationFilters>) => PaginatedResponse<Record> | Promise<PaginatedResponse<Record>> | Observable<PromiseState<PaginatedResponse<Record>>>;
3385
+ fetchData: (options: Options) => FetchReturn | Promise<FetchReturn> | Observable<PromiseState<FetchReturn>>;
3384
3386
  };
3385
3387
 
3386
- export declare type PaginatedFetchOptions<Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = BaseFetchOptions<Filters, NavigationFilters> & {
3388
+ export declare type PaginatedFetchOptions<Filters extends FiltersDefinition> = BaseFetchOptions<Filters> & {
3387
3389
  pagination: {
3388
3390
  perPage?: number;
3389
3391
  } & ({
@@ -3404,14 +3406,15 @@ export declare type PaginatedResponse<TRecord> = PageBasedPaginatedResponse<TRec
3404
3406
  /**
3405
3407
  * Pagination state and controls
3406
3408
  */
3407
- export declare type PaginationInfo = Omit<PageBasedPaginatedResponse<unknown> | InfiniteScrollPaginatedResponse<unknown>, "records">;
3409
+ export declare type PaginationInfo = Omit<PageBasedPaginatedResponse<unknown>, "records"> | Omit<InfiniteScrollPaginatedResponse<unknown>, "records">;
3408
3410
 
3409
3411
  /**
3410
3412
  * Defines the available pagination types used throughout the application.
3411
3413
  * - "pages": Represents traditional page-based navigation with numbered pages.
3412
3414
  * - "infinite-scroll": Represents continuous loading of content as the user scrolls.
3415
+ * - "no-pagination": Represents a collection that does not use pagination.
3413
3416
  */
3414
- export declare type PaginationType = "pages" | "infinite-scroll";
3417
+ export declare type PaginationType = "pages" | "infinite-scroll" | "no-pagination";
3415
3418
 
3416
3419
  declare type PersonAvatarVariant = Extract<AvatarVariant, {
3417
3420
  type: "person";
@@ -3720,6 +3723,8 @@ export declare type RecordType = Record<string, unknown>;
3720
3723
 
3721
3724
  declare type RendererDefinition = ValueDisplayRendererDefinition;
3722
3725
 
3726
+ export declare type ResolvedRecordType<R> = R extends RecordType ? R : RecordType;
3727
+
3723
3728
  export declare const ResourceHeader: ({ avatar, title, description, primaryAction, secondaryActions, otherActions, status, metadata, }: Props) => JSX_2.Element;
3724
3729
 
3725
3730
  export declare type resultType = {
@@ -3777,6 +3782,8 @@ declare type SchemaType = ZodType;
3777
3782
  export declare const ScrollArea: ForwardRefExoticComponent<Omit<Omit<ScrollAreaProps & RefAttributes<HTMLDivElement>, "ref"> & {
3778
3783
  showBar?: boolean;
3779
3784
  viewportRef?: React.RefObject<HTMLDivElement>;
3785
+ onScrollTop?: () => void;
3786
+ onScrollBottom?: () => void;
3780
3787
  } & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
3781
3788
 
3782
3789
  export declare function SearchBar({ onClick, placeholder, shortcut, ...props }: SearchBarProps): JSX_2.Element;
@@ -3788,6 +3795,15 @@ declare interface SearchBarProps extends ButtonHTMLAttributes<HTMLButtonElement>
3788
3795
 
3789
3796
  declare type SearchFilterDefinition = BaseFilterDefinition<"search">;
3790
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
+
3791
3807
  declare interface SecondaryAction extends PrimaryActionButton {
3792
3808
  variant?: "outline" | "critical" | "outlinePromote" | "promote";
3793
3809
  }
@@ -3831,6 +3847,17 @@ export declare const Select: <T extends string = string, R = unknown>(props: Sel
3831
3847
  */
3832
3848
  export declare type SelectedItems<T> = ReadonlyArray<T>;
3833
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
+
3834
3861
  /**
3835
3862
  * Represents the selected items by id
3836
3863
  */
@@ -3861,26 +3888,38 @@ export declare type SelectItemProps<T, R = unknown> = SelectItemObject<T, R> | {
3861
3888
  type: "separator";
3862
3889
  };
3863
3890
 
3864
- export declare type SelectProps<T, R = any> = {
3865
- 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;
3866
3901
  value?: T;
3867
- defaultItem?: SelectItemObject<T, R>;
3868
- options: SelectItemProps<T, R>[];
3902
+ defaultItem?: SelectItemObject<T, ResolvedRecordType<R>>;
3869
3903
  children?: React.ReactNode;
3870
- disabled?: boolean;
3871
3904
  open?: boolean;
3872
3905
  showSearchBox?: boolean;
3873
3906
  searchBoxPlaceholder?: string;
3874
3907
  onSearchChange?: (value: string) => void;
3875
- externalSearch?: boolean;
3876
3908
  searchValue?: string;
3877
3909
  onOpenChange?: (open: boolean) => void;
3878
3910
  searchEmptyMessage?: string;
3879
3911
  className?: string;
3880
3912
  selectContentClassName?: string;
3881
3913
  actions?: Action[];
3882
- name?: string;
3883
- } & 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">;
3884
3923
 
3885
3924
  export declare function Shortcut({ keys, variant }: ShortcutProps): JSX_2.Element | null;
3886
3925
 
@@ -4477,41 +4516,7 @@ declare type URL_2 = string;
4477
4516
 
4478
4517
  export declare function useAiChat(): AiChatProviderReturnValue;
4479
4518
 
4480
- /**
4481
- * A hook that manages data source state and filtering capabilities for a collection.
4482
- * It creates and returns a reusable data source that can be shared across different
4483
- * visualizations and components.
4484
- *
4485
- * This hook is intentionally separated from the rendering components to:
4486
- * 1. Enable sharing the same data source across multiple components
4487
- * 2. Allow for state management outside the rendering layer
4488
- * 3. Support more complex data filtering, querying, and pagination logic
4489
- * 4. Provide a clean separation between data management and visualization
4490
- *
4491
- * @template Record - The type of records in the collection
4492
- * @template Filters - The definition of available filters for the collection
4493
- * @template ItemActions - The definition of available item actions
4494
- * @template Actions - The definition of available actions for the collection
4495
- *
4496
- * @param options - Configuration object containing:
4497
- * - filters: Optional filter configurations for the collection
4498
- * - currentFilters: Initial state of the filters
4499
- * - dataAdapter: Adapter for data fetching and manipulation
4500
- * - itemActions: Optional item actions available
4501
- * - actions: Optional DataCollection actions
4502
- * - presets: Optional filter presets
4503
- * @param deps - Dependency array for memoization, similar to useEffect dependencies
4504
- *
4505
- * @returns A DataSource object containing:
4506
- * - filters: The available filter configurations
4507
- * - currentFilters: The current state of the filters
4508
- * - setCurrentFilters: Function to update the filter state
4509
- * - dataAdapter: The data adapter for fetching/manipulating data
4510
- * - itemActions: Available actions for records (items)
4511
- * - actions: Available actions for the collection
4512
- * - presets: Available filter presets
4513
- */
4514
- 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>;
4515
4520
 
4516
4521
  export { useForm }
4517
4522
 
@@ -4594,30 +4599,30 @@ declare const VerticalOverflowList: {
4594
4599
  * Represents a visualization configuration for displaying collection data.
4595
4600
  * Supports different visualization types (card, table, or custom) with their respective options.
4596
4601
  *
4597
- * @template Record - The type of records in the collection
4602
+ * @template R - The type of records in the collection
4598
4603
  * @template Filters - The filters type extending FiltersDefinition
4599
4604
  * @template ItemActions - The actions type extending Item ActionsDefinition
4600
4605
  */
4601
- 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>> = {
4602
4607
  /** Card-based visualization type */
4603
4608
  type: "card";
4604
4609
  /** Configuration options for card visualization */
4605
- options: CardVisualizationOptions<Record, Filters, Sortings>;
4610
+ options: CardVisualizationOptions<R, Filters, Sortings>;
4606
4611
  } | {
4607
4612
  /** Kanban-based visualization type */
4608
4613
  type: "kanban";
4609
4614
  /** Configuration options for kanban visualization */
4610
- options: KanbanVisualizationOptions<Record, Filters, Sortings>;
4615
+ options: KanbanVisualizationOptions<R, Filters, Sortings>;
4611
4616
  } | {
4612
4617
  /** Table-based visualization type */
4613
4618
  type: "table";
4614
4619
  /** Configuration options for table visualization */
4615
- options: TableVisualizationOptions<Record, Filters, Sortings, Summaries>;
4620
+ options: TableVisualizationOptions<R, Filters, Sortings, Summaries>;
4616
4621
  } | {
4617
4622
  /** List-based visualization type */
4618
4623
  type: "list";
4619
4624
  /** Configuration options for list visualization */
4620
- options: ListVisualizationOptions<Record, Filters, Sortings>;
4625
+ options: ListVisualizationOptions<R, Filters, Sortings>;
4621
4626
  } | {
4622
4627
  /** Human-readable label for the visualization */
4623
4628
  label: string;
@@ -4627,10 +4632,10 @@ declare type Visualization<Record extends RecordType, Filters extends FiltersDef
4627
4632
  type: "custom";
4628
4633
  /** Custom component to render the visualization */
4629
4634
  component: (props: {
4630
- onSelectItems: OnSelectItemsCallback<Record, Filters>;
4631
- onLoadData: OnLoadDataCallback<Record, Filters>;
4635
+ onSelectItems: OnSelectItemsCallback<R, Filters>;
4636
+ onLoadData: OnLoadDataCallback<R, Filters>;
4632
4637
  onLoadError: OnLoadErrorCallback;
4633
- source: DataSource<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
4638
+ source: DataCollectionSource<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
4634
4639
  }) => JSX.Element;
4635
4640
  };
4636
4641