@factorialco/f0-react 1.277.1 → 1.279.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
@@ -912,6 +912,14 @@ declare interface CheckboxProps extends DataAttributes_2 {
912
912
  name?: string;
913
913
  }
914
914
 
915
+ declare type ChildrenResponse<R extends RecordType> = BaseResponse<R> | R[] | {
916
+ records: R[] & {
917
+ type?: ChildrenResponseType;
918
+ };
919
+ };
920
+
921
+ declare type ChildrenResponseType = "basic" | "detailed";
922
+
915
923
  declare type ChipProps = BaseChipProps & ChipVariants & {
916
924
  variant?: "default" | "selected";
917
925
  };
@@ -1283,6 +1291,13 @@ export declare type DataSourceDefinition<R extends RecordType = RecordType, Filt
1283
1291
  defaultGrouping?: GroupingState<R, Grouping>;
1284
1292
  /** Current state of applied grouping */
1285
1293
  currentGrouping?: GroupingState<R, Grouping>;
1294
+ /*******************************************************/
1295
+ /***** NESTED RECORDS ***************************************************/
1296
+ fetchChildren?: (item: R, filters?: FiltersState<FiltersDefinition>) => Promise<ChildrenResponse<R>>;
1297
+ /** Function to determine if an item has children */
1298
+ itemsWithChildren?: (item: R) => boolean;
1299
+ /** Function to get the number of children for an item */
1300
+ childrenCount?: (item: R) => number | undefined;
1286
1301
  };
1287
1302
 
1288
1303
  export declare type DateFilterDefinition = BaseFilterDefinition<"date"> & {