@factorialco/f0-react 1.253.0 → 1.255.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/experimental.css +1 -1
- package/dist/experimental.d.ts +37 -12
- package/dist/experimental.js +26250 -20980
- package/dist/f0.d.ts +38 -13
- package/dist/f0.js +3 -2
- package/dist/{hooks-C2_SrMVQ.js → hooks-BdJAFEQs.js} +25316 -24427
- package/dist/styles.css +1 -1
- package/package.json +4 -2
package/dist/f0.d.ts
CHANGED
|
@@ -1115,6 +1115,7 @@ declare type DataCollectionSourceDefinition<R extends RecordType = RecordType, F
|
|
|
1115
1115
|
*/
|
|
1116
1116
|
/** Navigation filters */
|
|
1117
1117
|
navigationFilters?: NavigationFilters;
|
|
1118
|
+
currentNavigationFilters?: NavigationFiltersState<NavigationFilters>;
|
|
1118
1119
|
/** URL for a single item in the collection */
|
|
1119
1120
|
itemUrl?: (item: R) => string | undefined;
|
|
1120
1121
|
/** Click handler for a single item in the collection */
|
|
@@ -1186,19 +1187,27 @@ export declare type DataSource<R extends RecordType, Filters extends FiltersDefi
|
|
|
1186
1187
|
setCurrentFilters: React.Dispatch<React.SetStateAction<FiltersState<Filters>>>;
|
|
1187
1188
|
/** Whether presets are currently loading */
|
|
1188
1189
|
presetsLoading?: boolean;
|
|
1190
|
+
/***** SORTINGS ***************************************************/
|
|
1189
1191
|
/** Current state of applied sortings */
|
|
1190
1192
|
currentSortings: SortingsState<Sortings>;
|
|
1191
1193
|
/** Function to update the current sortings state */
|
|
1192
1194
|
setCurrentSortings: React.Dispatch<React.SetStateAction<SortingsState<Sortings>>>;
|
|
1195
|
+
/*******************************************************/
|
|
1196
|
+
/***** SEARCH ***************************************************/
|
|
1193
1197
|
currentSearch: undefined | string;
|
|
1194
1198
|
debouncedCurrentSearch: undefined | string;
|
|
1195
1199
|
setCurrentSearch: (search: string | undefined) => void;
|
|
1200
|
+
/*******************************************************/
|
|
1201
|
+
/***** LOADING ***************************************************/
|
|
1196
1202
|
isLoading: boolean;
|
|
1197
1203
|
setIsLoading: (loading: boolean) => void;
|
|
1204
|
+
/*******************************************************/
|
|
1205
|
+
/***** GROUPING ***************************************************/
|
|
1198
1206
|
/** Current state of applied grouping */
|
|
1199
1207
|
currentGrouping?: Grouping["mandatory"] extends true ? Exclude<GroupingState<R, Grouping>, undefined> : GroupingState<R, Grouping>;
|
|
1200
1208
|
/** Function to update the current grouping state */
|
|
1201
1209
|
setCurrentGrouping: React.Dispatch<React.SetStateAction<GroupingState<R, Grouping>>>;
|
|
1210
|
+
/*******************************************************/
|
|
1202
1211
|
/** Function to provide an id for a record, necessary for append mode */
|
|
1203
1212
|
idProvider?: <Item extends R>(item: Item, index?: number) => string | number | symbol;
|
|
1204
1213
|
/** Item filter that can be used to filter the items before they are displayed */
|
|
@@ -1219,27 +1228,42 @@ export declare type DataSource<R extends RecordType, Filters extends FiltersDefi
|
|
|
1219
1228
|
* @template Summaries - The available summaries for the collection
|
|
1220
1229
|
*/
|
|
1221
1230
|
export declare type DataSourceDefinition<R extends RecordType = RecordType, Filters extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>> = {
|
|
1231
|
+
/***** FILTERS ***************************************************/
|
|
1222
1232
|
/** Available filter configurations */
|
|
1223
1233
|
filters?: Filters;
|
|
1234
|
+
/** Default filters state (this is the state that the source will back on reset)*/
|
|
1235
|
+
defaultFilters?: FiltersState<Filters>;
|
|
1224
1236
|
/** Current state of applied filters */
|
|
1225
1237
|
currentFilters?: FiltersState<Filters>;
|
|
1226
1238
|
/** Predefined filter configurations that can be applied */
|
|
1227
1239
|
presets?: PresetsDefinition<Filters>;
|
|
1228
1240
|
/** Whether presets are currently loading */
|
|
1229
1241
|
presetsLoading?: boolean;
|
|
1242
|
+
/*******************************************************/
|
|
1243
|
+
/***** SEARCH ***************************************************/
|
|
1230
1244
|
/** Search configuration */
|
|
1231
1245
|
search?: SearchOptions;
|
|
1246
|
+
/*******************************************************/
|
|
1247
|
+
/***** SORTINGS ***************************************************/
|
|
1232
1248
|
/** Available sorting fields. If not provided, sorting is not allowed. */
|
|
1233
1249
|
sortings?: Sortings;
|
|
1234
|
-
|
|
1250
|
+
/** Default sorting state (this is the state that the source will back on reset)*/
|
|
1251
|
+
defaultSortings?: SortingsState<Sortings>;
|
|
1252
|
+
/** Current state of applied sortings */
|
|
1253
|
+
currentSortings?: SortingsState<Sortings>;
|
|
1254
|
+
/*******************************************************/
|
|
1235
1255
|
/** Data adapter responsible for fetching and managing data */
|
|
1236
1256
|
dataAdapter: DataAdapter<R, Filters>;
|
|
1237
1257
|
/** Selectable items value under the checkbox column (undefined if not selectable) */
|
|
1238
1258
|
selectable?: (item: R) => string | number | undefined;
|
|
1239
1259
|
/** Default selected items */
|
|
1240
1260
|
defaultSelectedItems?: SelectedItemsState;
|
|
1261
|
+
/***** GROUPING ***************************************************/
|
|
1241
1262
|
/** Grouping configuration */
|
|
1242
1263
|
grouping?: Grouping;
|
|
1264
|
+
/** Default grouping state (this is the state that the source will back on reset)*/
|
|
1265
|
+
defaultGrouping?: GroupingState<R, Grouping>;
|
|
1266
|
+
/** Current state of applied grouping */
|
|
1243
1267
|
currentGrouping?: GroupingState<R, Grouping>;
|
|
1244
1268
|
};
|
|
1245
1269
|
|
|
@@ -1535,6 +1559,7 @@ export declare const defaultTranslations: {
|
|
|
1535
1559
|
readonly stopAnswerGeneration: "Stop generating";
|
|
1536
1560
|
readonly sendMessage: "Send message";
|
|
1537
1561
|
readonly thoughtsGroupTitle: "Reflection";
|
|
1562
|
+
readonly resourcesGroupTitle: "Resources";
|
|
1538
1563
|
readonly feedbackModal: {
|
|
1539
1564
|
readonly positive: {
|
|
1540
1565
|
readonly title: "What did you like about this response?";
|
|
@@ -3734,7 +3759,7 @@ export declare interface UseDataReturn<R extends RecordType> {
|
|
|
3734
3759
|
* - actions: Available actions for the collection
|
|
3735
3760
|
* - presets: Available filter presets
|
|
3736
3761
|
*/
|
|
3737
|
-
export declare function useDataSource<R extends RecordType = RecordType, FiltersSchema extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>>({ currentFilters:
|
|
3762
|
+
export declare function useDataSource<R extends RecordType = RecordType, FiltersSchema extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>>({ defaultFilters, currentFilters: externalCurrentFilters, defaultGrouping: externalDefaultGrouping, currentGrouping: externalCurrentGrouping, filters, search, defaultSortings, currentSortings: externalCurrentSortings, dataAdapter, grouping, ...rest }: DataSourceDefinition<R, FiltersSchema, Sortings, Grouping>, deps?: ReadonlyArray<unknown>): DataSource<R, FiltersSchema, Sortings, Grouping>;
|
|
3738
3763
|
|
|
3739
3764
|
export declare function useDndEvents(handler: (e: {
|
|
3740
3765
|
phase: "start" | "over" | "drop" | "cancel";
|
|
@@ -3898,15 +3923,6 @@ declare global {
|
|
|
3898
3923
|
}
|
|
3899
3924
|
|
|
3900
3925
|
|
|
3901
|
-
declare module "@tiptap/core" {
|
|
3902
|
-
interface Commands<ReturnType> {
|
|
3903
|
-
transcript: {
|
|
3904
|
-
insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
|
|
3905
|
-
};
|
|
3906
|
-
}
|
|
3907
|
-
}
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
3926
|
declare module "@tiptap/core" {
|
|
3911
3927
|
interface Commands<ReturnType> {
|
|
3912
3928
|
aiBlock: {
|
|
@@ -3927,8 +3943,8 @@ declare module "@tiptap/core" {
|
|
|
3927
3943
|
|
|
3928
3944
|
declare module "@tiptap/core" {
|
|
3929
3945
|
interface Commands<ReturnType> {
|
|
3930
|
-
|
|
3931
|
-
|
|
3946
|
+
transcript: {
|
|
3947
|
+
insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
|
|
3932
3948
|
};
|
|
3933
3949
|
}
|
|
3934
3950
|
}
|
|
@@ -3937,3 +3953,12 @@ declare module "@tiptap/core" {
|
|
|
3937
3953
|
declare namespace Calendar {
|
|
3938
3954
|
var displayName: string;
|
|
3939
3955
|
}
|
|
3956
|
+
|
|
3957
|
+
|
|
3958
|
+
declare module "@tiptap/core" {
|
|
3959
|
+
interface Commands<ReturnType> {
|
|
3960
|
+
moodTracker: {
|
|
3961
|
+
insertMoodTracker: (data: MoodTrackerData, config?: MoodTrackerConfig) => ReturnType;
|
|
3962
|
+
};
|
|
3963
|
+
}
|
|
3964
|
+
}
|
package/dist/f0.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as xe, a as mt, f as ne, L as K, b as ht, A as vt, i as J, c as yt, d as Te, E as bt, g as X, e as gt, h as xt, C as wt, j as Pt, k as $, l as Fe, u as St, G as Ct, m as Nt, n as we, o as At, p as Ie, q as Ot, B as _e, X as Ee, Y as le, r as kt, s as je, t as Lt, v as Dt, w as Tt, x as Ft, y as It, z as _t, D as Et, F as jt, H as Pe, I as $t, J as W, K as oe, M as Bt, N as Mt, O as Rt, P as $e, Q as E, R as I, T as zt, U as Kt, V as Wt, W as qt, Z as Gt, _ as Vt, $ as Yt, a0 as Be, a1 as Ut, a2 as Z, a3 as Me, a4 as Re, a5 as Ht, a6 as ze, a7 as Ke, a8 as We, a9 as qe, aa as Jt, ab as Ge, ac as Xt, ad as Zt, ae as Qt, af as Se, ag as ie, ah as ea, ai as ta, aj as Ve, ak as aa, al as ra, am as Ye, an as na, ao as oa, ap as ia, aq as sa, ar as la, as as ca, at as ua, au as da, av as Ue, aw as M, ax as He, ay as fa, az as pa, aA as Ce, aB as ma, aC as Je, aD as ha, aE as va, aF as ya, aG as ba, aH as ga, aI as xa, aJ as wa, aK as Pa, aL as Sa, aM as Ca, aN as Na, aO as Aa } from "./hooks-
|
|
2
|
-
import { bp as tn, br as an, bA as rn, aP as nn, aQ as on, aR as sn, aS as ln, aT as cn, aU as un, aV as dn, aW as fn, aY as pn, aZ as mn, a_ as hn, a$ as vn, b0 as yn, b1 as bn, bw as gn, b3 as xn, b5 as wn, b6 as Pn, b7 as Sn, b8 as Cn, bb as Nn, bc as An, bd as On, bf as kn, b4 as Ln, be as Dn, ba as Tn, bx as Fn, bq as In, bk as _n, bn as En, bj as jn, bB as $n, bi as Bn, bh as Mn, aX as Rn, b2 as zn, b9 as Kn, bg as Wn, bl as qn, bs as Gn, bt as Vn, bu as Yn, bC as Un, bm as Hn, bv as Jn, bz as Xn, bo as Zn, by as Qn } from "./hooks-
|
|
1
|
+
import { S as xe, a as mt, f as ne, L as K, b as ht, A as vt, i as J, c as yt, d as Te, E as bt, g as X, e as gt, h as xt, C as wt, j as Pt, k as $, l as Fe, u as St, G as Ct, m as Nt, n as we, o as At, p as Ie, q as Ot, B as _e, X as Ee, Y as le, r as kt, s as je, t as Lt, v as Dt, w as Tt, x as Ft, y as It, z as _t, D as Et, F as jt, H as Pe, I as $t, J as W, K as oe, M as Bt, N as Mt, O as Rt, P as $e, Q as E, R as I, T as zt, U as Kt, V as Wt, W as qt, Z as Gt, _ as Vt, $ as Yt, a0 as Be, a1 as Ut, a2 as Z, a3 as Me, a4 as Re, a5 as Ht, a6 as ze, a7 as Ke, a8 as We, a9 as qe, aa as Jt, ab as Ge, ac as Xt, ad as Zt, ae as Qt, af as Se, ag as ie, ah as ea, ai as ta, aj as Ve, ak as aa, al as ra, am as Ye, an as na, ao as oa, ap as ia, aq as sa, ar as la, as as ca, at as ua, au as da, av as Ue, aw as M, ax as He, ay as fa, az as pa, aA as Ce, aB as ma, aC as Je, aD as ha, aE as va, aF as ya, aG as ba, aH as ga, aI as xa, aJ as wa, aK as Pa, aL as Sa, aM as Ca, aN as Na, aO as Aa } from "./hooks-BdJAFEQs.js";
|
|
2
|
+
import { bp as tn, br as an, bA as rn, aP as nn, aQ as on, aR as sn, aS as ln, aT as cn, aU as un, aV as dn, aW as fn, aY as pn, aZ as mn, a_ as hn, a$ as vn, b0 as yn, b1 as bn, bw as gn, b3 as xn, b5 as wn, b6 as Pn, b7 as Sn, b8 as Cn, bb as Nn, bc as An, bd as On, bf as kn, b4 as Ln, be as Dn, ba as Tn, bx as Fn, bq as In, bk as _n, bn as En, bj as jn, bB as $n, bi as Bn, bh as Mn, aX as Rn, b2 as zn, b9 as Kn, bg as Wn, bl as qn, bs as Gn, bt as Vn, bu as Yn, bC as Un, bm as Hn, bv as Jn, bz as Xn, bo as Zn, by as Qn } from "./hooks-BdJAFEQs.js";
|
|
3
3
|
import { jsx as n, jsxs as C, Fragment as ae } from "react/jsx-runtime";
|
|
4
4
|
import * as fe from "react";
|
|
5
5
|
import k, { PureComponent as Oa, useState as D, forwardRef as V, useEffect as B, useMemo as se, useCallback as Ne, useRef as pe, useImperativeHandle as ka, Children as La, createContext as Da } from "react";
|
|
@@ -206,6 +206,7 @@ const Ar = {
|
|
|
206
206
|
stopAnswerGeneration: "Stop generating",
|
|
207
207
|
sendMessage: "Send message",
|
|
208
208
|
thoughtsGroupTitle: "Reflection",
|
|
209
|
+
resourcesGroupTitle: "Resources",
|
|
209
210
|
feedbackModal: {
|
|
210
211
|
positive: {
|
|
211
212
|
title: "What did you like about this response?",
|