@factorialco/f0-react 1.226.0 → 1.228.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.
@@ -1348,7 +1348,7 @@ export declare type DataCollectionSourceDefinition<R extends RecordType = Record
1348
1348
  /** Available actions that can be performed on records */
1349
1349
  itemActions?: ItemActions;
1350
1350
  /** Available primary actions that can be performed on the collection */
1351
- primaryActions?: PrimaryActionsDefinition;
1351
+ primaryActions?: PrimaryActionsDefinitionFn;
1352
1352
  /** Available secondary actions that can be performed on the collection */
1353
1353
  secondaryActions?: SecondaryActionsDefinition;
1354
1354
  /** Available summaries fields. If not provided, summaries is not allowed. */
@@ -1358,7 +1358,11 @@ export declare type DataCollectionSourceDefinition<R extends RecordType = Record
1358
1358
  dataAdapter: DataCollectionDataAdapter<R, Filters, NavigationFilters>;
1359
1359
  /** Bulk actions that can be performed on the collection */
1360
1360
  bulkActions?: BulkActionsDefinition<R, Filters>;
1361
- totalItemSummary?: (totalItems: number) => string;
1361
+ /** Total items summary that can be displayed on the collection
1362
+ * If true, the total items summary will be displayed on the collection
1363
+ * If a function is provided, the total items summary will be displayed on the collection
1364
+ */
1365
+ totalItemSummary?: boolean | ((totalItems: number) => string | null);
1362
1366
  /** Item filter that can be used to filter the items before they are displayed */
1363
1367
  itemPreFilter?: (item: R) => boolean;
1364
1368
  /** Lanes configuration */
@@ -2382,6 +2386,11 @@ export declare const getGranularityDefinition: (granularityKey: GranularityDefin
2382
2386
 
2383
2387
  export declare const getGranularitySimpleDefinition: (granularityKey: GranularityDefinitionKey) => GranularityDefinitionSimple;
2384
2388
 
2389
+ /**
2390
+ * Get the primaryActionsItems from the primaryActionsDefinition or the actions property
2391
+ */
2392
+ export declare const getPrimaryActions: (primaryActions: PrimaryActionsDefinitionFn | undefined) => PrimaryActionsDefinition[];
2393
+
2385
2394
  /**
2386
2395
  * Get the secondaryActionsItems from the secondaryActionsDefinition or the actions property
2387
2396
  */
@@ -3725,11 +3734,13 @@ declare interface PrimaryActionButton extends PrimaryAction {
3725
3734
  onClick: () => void;
3726
3735
  }
3727
3736
 
3737
+ export declare type PrimaryActionsDefinition = Pick<DropdownItemObject, "onClick" | "label" | "icon">;
3738
+
3728
3739
  /**
3729
3740
  * Defines the structure and configuration of the primary action that can be performed on a collection.
3730
3741
  * @returns An action
3731
3742
  */
3732
- export declare type PrimaryActionsDefinition = () => Pick<DropdownItemObject, "onClick" | "label" | "icon"> | undefined;
3743
+ export declare type PrimaryActionsDefinitionFn = () => PrimaryActionsDefinition | PrimaryActionsDefinition[] | undefined;
3733
3744
 
3734
3745
  export declare type primaryActionType = {
3735
3746
  action: actionType;
@@ -5124,8 +5135,8 @@ declare module "@tiptap/core" {
5124
5135
 
5125
5136
  declare module "@tiptap/core" {
5126
5137
  interface Commands<ReturnType> {
5127
- liveCompanion: {
5128
- insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
5138
+ transcript: {
5139
+ insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
5129
5140
  };
5130
5141
  }
5131
5142
  }
@@ -5133,13 +5144,18 @@ declare module "@tiptap/core" {
5133
5144
 
5134
5145
  declare module "@tiptap/core" {
5135
5146
  interface Commands<ReturnType> {
5136
- transcript: {
5137
- insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
5147
+ liveCompanion: {
5148
+ insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
5138
5149
  };
5139
5150
  }
5140
5151
  }
5141
5152
 
5142
5153
 
5154
+ declare namespace Calendar {
5155
+ var displayName: string;
5156
+ }
5157
+
5158
+
5143
5159
  declare module "@tiptap/core" {
5144
5160
  interface Commands<ReturnType> {
5145
5161
  moodTracker: {
@@ -5147,8 +5163,3 @@ declare module "@tiptap/core" {
5147
5163
  };
5148
5164
  }
5149
5165
  }
5150
-
5151
-
5152
- declare namespace Calendar {
5153
- var displayName: string;
5154
- }