@factorialco/f0-react 1.278.0 → 1.279.2

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.
@@ -1316,6 +1316,14 @@ export declare const ChartWidgetEmptyState: ForwardRefExoticComponent<Props_5 &
1316
1316
 
1317
1317
  export declare type ChatWidgetEmptyStateProps = Props_5;
1318
1318
 
1319
+ declare type ChildrenResponse<R extends RecordType> = BaseResponse<R> | R[] | {
1320
+ records: R[] & {
1321
+ type?: ChildrenResponseType;
1322
+ };
1323
+ };
1324
+
1325
+ declare type ChildrenResponseType = "basic" | "detailed";
1326
+
1319
1327
  export declare function ClockInControls({ trackedMinutes, remainingMinutes, data, labels, locationId, locations, canShowLocation, locationSelectorDisabled, onClockIn, onClockOut, onBreak, breakTypes, onChangeBreakTypeId, canShowBreakButton, canSeeGraph, canSeeRemainingTime, onChangeLocationId, canShowProject, projectSelectorElement, breakTypeName, }: ClockInControlsProps): JSX_2.Element;
1320
1328
 
1321
1329
  export declare interface ClockInControlsProps {
@@ -1828,6 +1836,13 @@ export declare type DataSourceDefinition<R extends RecordType = RecordType, Filt
1828
1836
  defaultGrouping?: GroupingState<R, Grouping>;
1829
1837
  /** Current state of applied grouping */
1830
1838
  currentGrouping?: GroupingState<R, Grouping>;
1839
+ /*******************************************************/
1840
+ /***** NESTED RECORDS ***************************************************/
1841
+ fetchChildren?: (item: R, filters?: FiltersState<FiltersDefinition>) => Promise<ChildrenResponse<R>>;
1842
+ /** Function to determine if an item has children */
1843
+ itemsWithChildren?: (item: R) => boolean;
1844
+ /** Function to get the number of children for an item */
1845
+ childrenCount?: (item: R) => number | undefined;
1831
1846
  };
1832
1847
 
1833
1848
  export declare type DateFilterDefinition = BaseFilterDefinition<"date"> & {
@@ -2583,7 +2598,7 @@ declare type F0AvatarFileProps = Omit<React.ComponentPropsWithoutRef<typeof Avat
2583
2598
  } & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
2584
2599
 
2585
2600
  declare type F0AvatarFlagProps = {
2586
- flag: CountryCode;
2601
+ flag: CountryCode | (string & {});
2587
2602
  size?: BaseAvatarProps["size"];
2588
2603
  badge?: AvatarBadge;
2589
2604
  } & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
@@ -3186,6 +3201,15 @@ declare type InFilterOptionItem<T = unknown> = {
3186
3201
  */
3187
3202
  declare type InFilterOptions_2<T, _R extends RecordType = RecordType> = {
3188
3203
  cache?: boolean;
3204
+ /**
3205
+ * Optional function to resolve labels for specific values without fetching all options.
3206
+ * This is useful when you have a dynamic source and want to avoid fetching all options
3207
+ * just to display labels for selected values.
3208
+ * @param value - The value to get the label for
3209
+ * @returns The label for the value, or a promise that resolves to the label
3210
+ * @note The parameter type is `unknown` to allow compatibility when T is different types
3211
+ */
3212
+ getLabel?: (value: unknown) => string | Promise<string>;
3189
3213
  } & ({
3190
3214
  options: Array<InFilterOptionItem<T>> | (() => Array<InFilterOptionItem<T>> | Promise<Array<InFilterOptionItem<T>>>);
3191
3215
  } | {
@@ -5887,33 +5911,6 @@ declare global {
5887
5911
  }
5888
5912
 
5889
5913
 
5890
- declare module "@tiptap/core" {
5891
- interface Commands<ReturnType> {
5892
- aiBlock: {
5893
- insertAIBlock: (data: AIBlockData, config: AIBlockConfigWithLabels) => ReturnType;
5894
- };
5895
- }
5896
- }
5897
-
5898
-
5899
- declare module "@tiptap/core" {
5900
- interface Commands<ReturnType> {
5901
- liveCompanion: {
5902
- insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
5903
- };
5904
- }
5905
- }
5906
-
5907
-
5908
- declare module "@tiptap/core" {
5909
- interface Commands<ReturnType> {
5910
- transcript: {
5911
- insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
5912
- };
5913
- }
5914
- }
5915
-
5916
-
5917
5914
  declare module "gridstack" {
5918
5915
  interface GridStackWidget {
5919
5916
  id?: string;
@@ -5939,8 +5936,30 @@ declare module "gridstack" {
5939
5936
  }
5940
5937
 
5941
5938
 
5942
- declare namespace Calendar {
5943
- var displayName: string;
5939
+ declare module "@tiptap/core" {
5940
+ interface Commands<ReturnType> {
5941
+ aiBlock: {
5942
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfigWithLabels) => ReturnType;
5943
+ };
5944
+ }
5945
+ }
5946
+
5947
+
5948
+ declare module "@tiptap/core" {
5949
+ interface Commands<ReturnType> {
5950
+ liveCompanion: {
5951
+ insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
5952
+ };
5953
+ }
5954
+ }
5955
+
5956
+
5957
+ declare module "@tiptap/core" {
5958
+ interface Commands<ReturnType> {
5959
+ transcript: {
5960
+ insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
5961
+ };
5962
+ }
5944
5963
  }
5945
5964
 
5946
5965
 
@@ -5951,3 +5970,8 @@ declare module "@tiptap/core" {
5951
5970
  };
5952
5971
  }
5953
5972
  }
5973
+
5974
+
5975
+ declare namespace Calendar {
5976
+ var displayName: string;
5977
+ }