@factorialco/f0-react 1.382.0 → 1.383.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/{DataCollectionStorageProvider-B8_-moME.js → DataCollectionStorageProvider-BBLgXK15.js} +1 -1
- package/dist/{F0AiChat-oTIR5NbZ.js → F0AiChat-CXEcOhNF.js} +318 -317
- package/dist/{F0HILActionConfirmation-C9Kwjohi.js → F0HILActionConfirmation-D_4woM1M.js} +1 -1
- package/dist/ai.d.ts +11 -5
- package/dist/ai.js +2 -2
- package/dist/experimental.d.ts +11 -5
- package/dist/experimental.js +5 -5
- package/dist/f0.d.ts +222 -8
- package/dist/f0.js +6247 -5391
- package/dist/i18n-provider-defaults.d.ts +11 -5
- package/dist/i18n-provider-defaults.js +6 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as X, jsxs as le } from "react/jsx-runtime";
|
|
2
2
|
import { useInsertionEffect as Xe, createContext as ke, useContext as $e, useRef as _, useEffect as ne, useState as _e, useCallback as ze, useMemo as Ye } from "react";
|
|
3
|
-
import { y as qe, z as We, D as He, G as je, J as Ne, K as Ke, M as Qe, N as Je, Q as Ze, R as et, V as Ce, W as tt, X as rt, Y as nt, Z as it, _ as ot, $ as at, a0 as st, a1 as ie, a2 as ct, a3 as ut, a4 as lt, a5 as ft, a6 as mt, a7 as dt, a8 as fe, a9 as ht } from "./F0AiChat-
|
|
3
|
+
import { y as qe, z as We, D as He, G as je, J as Ne, K as Ke, M as Qe, N as Je, Q as Ze, R as et, V as Ce, W as tt, X as rt, Y as nt, Z as it, _ as ot, $ as at, a0 as st, a1 as ie, a2 as ct, a3 as ut, a4 as lt, a5 as ft, a6 as mt, a7 as dt, a8 as fe, a9 as ht } from "./F0AiChat-CXEcOhNF.js";
|
|
4
4
|
import { useTrackVolume as pt } from "@livekit/components-react";
|
|
5
5
|
function vt(t, e, r) {
|
|
6
6
|
Xe(() => t.on(e, r), [t, e, r]);
|
package/dist/ai.d.ts
CHANGED
|
@@ -798,6 +798,12 @@ export declare const defaultTranslations: {
|
|
|
798
798
|
};
|
|
799
799
|
};
|
|
800
800
|
};
|
|
801
|
+
readonly wizard: {
|
|
802
|
+
readonly previous: "Previous";
|
|
803
|
+
readonly next: "Continue";
|
|
804
|
+
readonly submit: "Submit";
|
|
805
|
+
readonly stepOf: "Step {{current}} of {{total}}";
|
|
806
|
+
};
|
|
801
807
|
};
|
|
802
808
|
|
|
803
809
|
export declare function downloadTableAsExcel(table: HTMLTableElement, filename?: string): void;
|
|
@@ -1217,11 +1223,6 @@ declare module "gridstack" {
|
|
|
1217
1223
|
}
|
|
1218
1224
|
|
|
1219
1225
|
|
|
1220
|
-
declare namespace Calendar {
|
|
1221
|
-
var displayName: string;
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
1226
|
declare module "@tiptap/core" {
|
|
1226
1227
|
interface Commands<ReturnType> {
|
|
1227
1228
|
aiBlock: {
|
|
@@ -1269,3 +1270,8 @@ declare module "@tiptap/core" {
|
|
|
1269
1270
|
};
|
|
1270
1271
|
}
|
|
1271
1272
|
}
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
declare namespace Calendar {
|
|
1276
|
+
var displayName: string;
|
|
1277
|
+
}
|
package/dist/ai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as e, B as o, C as t, E as n, h as i, F as r, a as l, x as c, i as A, b as u, s as F, t as h, v as C, w as T, c as d, n as m, o as I, p as f, H as g, I as S, k as p, L as x, O as H, q as P, P as b, S as k, T as O, l as v, m as w, U as M, r as E, j as L, d as q, e as B, u as U, g as j, f as z } from "./F0AiChat-
|
|
1
|
+
import { A as e, B as o, C as t, E as n, h as i, F as r, a as l, x as c, i as A, b as u, s as F, t as h, v as C, w as T, c as d, n as m, o as I, p as f, H as g, I as S, k as p, L as x, O as H, q as P, P as b, S as k, T as O, l as v, m as w, U as M, r as E, j as L, d as q, e as B, u as U, g as j, f as z } from "./F0AiChat-CXEcOhNF.js";
|
|
2
2
|
import { defaultTranslations as R } from "./i18n-provider-defaults.js";
|
|
3
|
-
import { A as y, F as G, c as J, b as K, a as N, o as Q, u as W } from "./F0HILActionConfirmation-
|
|
3
|
+
import { A as y, F as G, c as J, b as K, a as N, o as Q, u as W } from "./F0HILActionConfirmation-D_4woM1M.js";
|
|
4
4
|
export {
|
|
5
5
|
e as A,
|
|
6
6
|
y as AiChatTranslationsProvider,
|
package/dist/experimental.d.ts
CHANGED
|
@@ -2727,6 +2727,12 @@ declare const defaultTranslations: {
|
|
|
2727
2727
|
};
|
|
2728
2728
|
};
|
|
2729
2729
|
};
|
|
2730
|
+
readonly wizard: {
|
|
2731
|
+
readonly previous: "Previous";
|
|
2732
|
+
readonly next: "Continue";
|
|
2733
|
+
readonly submit: "Submit";
|
|
2734
|
+
readonly stepOf: "Step {{current}} of {{total}}";
|
|
2735
|
+
};
|
|
2730
2736
|
};
|
|
2731
2737
|
|
|
2732
2738
|
/**
|
|
@@ -6746,11 +6752,6 @@ declare module "gridstack" {
|
|
|
6746
6752
|
}
|
|
6747
6753
|
|
|
6748
6754
|
|
|
6749
|
-
declare namespace Calendar {
|
|
6750
|
-
var displayName: string;
|
|
6751
|
-
}
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
6755
|
declare module "@tiptap/core" {
|
|
6755
6756
|
interface Commands<ReturnType> {
|
|
6756
6757
|
aiBlock: {
|
|
@@ -6798,3 +6799,8 @@ declare module "@tiptap/core" {
|
|
|
6798
6799
|
};
|
|
6799
6800
|
}
|
|
6800
6801
|
}
|
|
6802
|
+
|
|
6803
|
+
|
|
6804
|
+
declare namespace Calendar {
|
|
6805
|
+
var displayName: string;
|
|
6806
|
+
}
|
package/dist/experimental.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a5 as Kd,
|
|
2
|
-
import {
|
|
1
|
+
import { a5 as Kd, bM as Xp, bN as Zp, bO as eg, bP as Ho, bQ as tg, bR as eo, D as ng, bS as rg, ad as G, V as Jd, J as ig, bT as og, ap as Ei, bU as Yd, bV as sg, bW as lg, am as ag, bX as Ea, bY as Qr, bZ as cg, b_ as gl, b$ as Qd, c0 as ys, a6 as k, a7 as At, u as Y, c1 as dg, c2 as ug, c3 as fg, c4 as hg, c5 as mg, av as Se, c6 as pg, al as Te, c7 as gg, c8 as Xd, aj as q, c9 as Zd, ca as eu, ae as at, cb as tu, cc as xs, cd as nu, a8 as $, ce as _r, ai as P, cf as vt, cg as bg, ch as vg, ci as dr, aJ as ru, cj as iu, aU as rn, ck as ou, cl as bl, cm as pt, aK as vl, aL as Jn, v as su, cn as lu, co as yg, cp as Ta, cq as zn, cr as yl, cs as Lr, ct as Ti, cu as xg, cv as au, cw as wg, cx as xl, cy as ur, cz as et, cA as Cg, cB as kg, cC as qt, cD as Vo, cE as Ng, cF as lr, cG as En, cH as Sg, aa as ve, cI as Ig, cJ as Ag, cK as Eg, cL as Tg, cM as Dg, af as He, ah as Ee, cN as un, aX as on, bJ as Or, cO as cu, cP as wl, cQ as _g, cR as Lg, cS as Og, cT as Rg, cU as Fg, cV as Mg, cW as Pg, cX as zg, cY as $g, cZ as Cl, c_ as jg, c$ as du, d0 as Bg, d1 as Hg, d2 as Vg, d3 as Wg, d4 as Ug, d5 as Gg, d6 as qg, d7 as Kg, bk as St, d8 as uu, d9 as Jg, ao as se, a9 as fr, da as fu, db as hu, b2 as kl, t as Yg, dc as Qg, dd as Xg, an as hr, de as Zg, df as Wo, dg as eb, dh as Nl, di as Kt, aQ as mu, dj as Da, dk as _a, dl as tb, dm as La, dn as pu, dp as Sl, aP as $n, aN as gu, at as Il, au as Al, aw as El, aM as mr, ak as Rr, dq as nb, dr as rb, ds as bu, dt as ib, ax as It, du as ob, dv as vu, dw as yu, dx as sb, aY as Fr, dy as Tl, dz as to, bm as fn, dA as ws, dB as lb, dC as ab, dD as cb, dE as db, dF as ub, dG as fb, dH as xu, dI as hb, dJ as wu, dK as mb, dL as pb, dM as gb, aH as Oa, dN as Cu, dO as Cs, aC as ks, dP as ku, dQ as Ns, bt as Dl, b1 as hn, bg as no, dR as ro, dS as bb, dT as vb, dU as yb, bI as io, b0 as Nu, bL as xb, bK as wb, dV as Su, dW as Cb, aE as _n, dX as Ra, dY as Di, dZ as kb, d_ as Nb, bl as Sb, bh as Iu, a as Ib, d as Ab, d$ as _l, e0 as Eb, F as Tb, e1 as Au, e2 as Eu, e3 as Db, e4 as _b, e5 as Lb, e6 as Ob, e7 as Rb, e8 as Tu, e9 as Fb, bi as Du, ea as _u, eb as Mb, ec as Pb, ed as zb, ee as $b, ef as jb, eg as Bb, eh as Hb, ei as Vb, bw as Wb, bx as Ub, bE as oo, bC as Ll, b6 as so, ej as lo, ek as ao, b7 as co, el as Ol, bD as Lu, aD as Gb, by as _i, em as Ou, en as qb, eo as Ss, ep as Kb, eq as Fa, er as Jb, es as Yb, et as Qb, eu as Xb, ev as Zb, ew as ev, ex as tv, ac as Ru, bs as nv, bB as rv, ab as yt, b3 as iv, b4 as ov, b5 as sv, ey as Fu, ez as lv, eA as av, eB as cv, eC as dv, b8 as uv, eD as fv, eE as Ma, eF as Pa, eG as za, eH as hv, eI as mv, eJ as pv, eK as gv, eL as Mu, eM as bv } from "./F0AiChat-CXEcOhNF.js";
|
|
2
|
+
import { eP as QL, eO as XL, eN as ZL, eU as eO, eV as tO, eR as nO, eQ as rO, eT as iO, bj as oO, eS as sO } from "./F0AiChat-CXEcOhNF.js";
|
|
3
3
|
import { jsx as l, jsxs as g, Fragment as Z } from "react/jsx-runtime";
|
|
4
4
|
import * as Pe from "react";
|
|
5
5
|
import X, { createContext as Ht, forwardRef as J, useRef as j, useEffect as H, useContext as Vt, PureComponent as vv, useTransition as yv, useState as R, useLayoutEffect as Xt, useCallback as ee, useMemo as M, useId as Rl, useImperativeHandle as Pu, memo as uo, Fragment as jn, isValidElement as zu, cloneElement as Fl, createElement as $a, Children as $u } from "react";
|
|
6
|
-
import { f as Ln, aG as pr, j as Xr, aH as xv, b as Uo, aI as wv, A as Cv, d as Zr, i as kv, m as Nv, G as Sv, g as ja, aJ as Iv, l as Ba, aK as Av, p as Ev, aL as ju, aM as Bu, aN as Tv, C as Dv, az as _v, af as Bn, D as ze, aO as ct, aP as Et, aQ as Je, aR as Lv, aS as mi, aT as ut, aU as Hu, aV as nt, aW as Ml, aX as st, aY as Ha, aZ as Ov, a_ as Vu, a$ as Ge, b0 as it, b1 as gr, b2 as Li, b3 as Wu, b4 as Rv, b5 as yn, b6 as Fv, b7 as Mv, b8 as Pv, b9 as Mr, ba as Pr, bb as Pl, bc as zv, bd as Uu, be as Gu, bf as qu, bg as $v, bh as Ku, bi as Ju, bj as Yu, bk as Qu, bl as Xu, bm as Zu, bn as Is, bo as jv, bp as Va, bq as Bv, br as Hv, bs as Vv, x as Wv, y as Uv, F as Gv, M as Wa, N as Ua, O as qv, P as Kv, t as Jv, a4 as Yv, a5 as Qv, bt as Xv, bu as Zv, a7 as e0, bv as ef, bw as t0, bx as n0, by as r0, an as fo, bz as zl, bA as tf, am as As, bB as i0, al as nf, a2 as zr, ah as o0, bC as s0, bD as l0, bE as a0, aq as $l, bF as c0, aD as d0, bG as Es, bH as u0, bI as Oi, bJ as f0, aE as h0, bK as m0, aC as rf, aB as p0, aA as g0, bL as b0, bM as v0, bN as y0, bO as x0, bP as w0, bQ as C0, bR as k0, bS as N0, bT as S0, bU as I0, bV as A0, bW as E0, bX as T0, bY as D0, bZ as _0, aF as of, at as sf, b_ as L0, R as O0, T as R0, V as F0, W as M0, Z as P0, U as z0, b$ as Ga, c0 as $0, c1 as j0, n as B0 } from "./DataCollectionStorageProvider-
|
|
7
|
-
import { ai as aO, a8 as cO, a3 as dO, aa as uO, c5 as fO, c4 as hO, c2 as mO, c3 as pO, a6 as gO, a9 as bO, ar as vO, as as yO } from "./DataCollectionStorageProvider-
|
|
6
|
+
import { f as Ln, aG as pr, j as Xr, aH as xv, b as Uo, aI as wv, A as Cv, d as Zr, i as kv, m as Nv, G as Sv, g as ja, aJ as Iv, l as Ba, aK as Av, p as Ev, aL as ju, aM as Bu, aN as Tv, C as Dv, az as _v, af as Bn, D as ze, aO as ct, aP as Et, aQ as Je, aR as Lv, aS as mi, aT as ut, aU as Hu, aV as nt, aW as Ml, aX as st, aY as Ha, aZ as Ov, a_ as Vu, a$ as Ge, b0 as it, b1 as gr, b2 as Li, b3 as Wu, b4 as Rv, b5 as yn, b6 as Fv, b7 as Mv, b8 as Pv, b9 as Mr, ba as Pr, bb as Pl, bc as zv, bd as Uu, be as Gu, bf as qu, bg as $v, bh as Ku, bi as Ju, bj as Yu, bk as Qu, bl as Xu, bm as Zu, bn as Is, bo as jv, bp as Va, bq as Bv, br as Hv, bs as Vv, x as Wv, y as Uv, F as Gv, M as Wa, N as Ua, O as qv, P as Kv, t as Jv, a4 as Yv, a5 as Qv, bt as Xv, bu as Zv, a7 as e0, bv as ef, bw as t0, bx as n0, by as r0, an as fo, bz as zl, bA as tf, am as As, bB as i0, al as nf, a2 as zr, ah as o0, bC as s0, bD as l0, bE as a0, aq as $l, bF as c0, aD as d0, bG as Es, bH as u0, bI as Oi, bJ as f0, aE as h0, bK as m0, aC as rf, aB as p0, aA as g0, bL as b0, bM as v0, bN as y0, bO as x0, bP as w0, bQ as C0, bR as k0, bS as N0, bT as S0, bU as I0, bV as A0, bW as E0, bX as T0, bY as D0, bZ as _0, aF as of, at as sf, b_ as L0, R as O0, T as R0, V as F0, W as M0, Z as P0, U as z0, b$ as Ga, c0 as $0, c1 as j0, n as B0 } from "./DataCollectionStorageProvider-BBLgXK15.js";
|
|
7
|
+
import { ai as aO, a8 as cO, a3 as dO, aa as uO, c5 as fO, c4 as hO, c2 as mO, c3 as pO, a6 as gO, a9 as bO, ar as vO, as as yO } from "./DataCollectionStorageProvider-BBLgXK15.js";
|
|
8
8
|
import './experimental.css';function lf(t, e) {
|
|
9
9
|
const n = Kd(e()), r = () => n.set(e());
|
|
10
10
|
return r(), Xp(() => {
|
|
@@ -18042,7 +18042,7 @@ const LI = ({
|
|
|
18042
18042
|
"span",
|
|
18043
18043
|
{
|
|
18044
18044
|
className: k(
|
|
18045
|
-
"flex-1",
|
|
18045
|
+
"flex-1 min-w-0",
|
|
18046
18046
|
t.sortable ? "text-f1-foreground" : "text-f1-foreground-secondary"
|
|
18047
18047
|
),
|
|
18048
18048
|
children: /* @__PURE__ */ l(He, { children: t.label })
|
package/dist/f0.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ import { F0AvatarListProps as F0AvatarListProps_2 } from './types';
|
|
|
49
49
|
import { F0AvatarPersonProps as F0AvatarPersonProps_2 } from './types';
|
|
50
50
|
import { F0AvatarTeamProps as F0AvatarTeamProps_2 } from './F0AvatarTeam';
|
|
51
51
|
import { F0DialogInternalProps } from './internal-types';
|
|
52
|
+
import { F0FormDefinitionPerSection as F0FormDefinitionPerSection_2 } from '../F0WizardForm/types';
|
|
53
|
+
import { F0FormDefinitionSingleSchema as F0FormDefinitionSingleSchema_2 } from '../F0WizardForm/types';
|
|
52
54
|
import { F0GridStackProps as F0GridStackProps_2 } from './F0GridStack';
|
|
53
55
|
import { F0TagBalanceProps } from './types';
|
|
54
56
|
import { F0TagCompanyProps } from './types';
|
|
@@ -2626,6 +2628,12 @@ export declare const defaultTranslations: {
|
|
|
2626
2628
|
};
|
|
2627
2629
|
};
|
|
2628
2630
|
};
|
|
2631
|
+
readonly wizard: {
|
|
2632
|
+
readonly previous: "Previous";
|
|
2633
|
+
readonly next: "Continue";
|
|
2634
|
+
readonly submit: "Submit";
|
|
2635
|
+
readonly stepOf: "Step {{current}} of {{total}}";
|
|
2636
|
+
};
|
|
2629
2637
|
};
|
|
2630
2638
|
|
|
2631
2639
|
export declare type DialogPosition = (typeof dialogPositions)[number];
|
|
@@ -3863,6 +3871,8 @@ export declare type F0FilterPickerContentPublicProps<Filters extends FiltersDefi
|
|
|
3863
3871
|
export declare const F0Form: {
|
|
3864
3872
|
<TSchema extends F0FormSchema>(props: F0FormPropsWithSingleSchema<TSchema>): React.ReactElement;
|
|
3865
3873
|
<T extends F0PerSectionSchema>(props: F0FormPropsWithPerSectionSchema<T>): React.ReactElement;
|
|
3874
|
+
<TSchema extends F0FormSchema>(props: F0FormPropsWithSingleSchemaDefinition<TSchema>): React.ReactElement;
|
|
3875
|
+
<T extends F0PerSectionSchema>(props: F0FormPropsWithPerSectionDefinition<T>): React.ReactElement;
|
|
3866
3876
|
};
|
|
3867
3877
|
|
|
3868
3878
|
/**
|
|
@@ -3903,6 +3913,38 @@ declare interface F0FormDefaultSubmitConfig extends F0FormSubmitConfigBase {
|
|
|
3903
3913
|
* @default false
|
|
3904
3914
|
*/
|
|
3905
3915
|
hideSubmitButton?: boolean;
|
|
3916
|
+
/**
|
|
3917
|
+
* When true, hides the internal action bar (loading/success feedback).
|
|
3918
|
+
* Useful when the parent component provides its own action bar.
|
|
3919
|
+
* @default false
|
|
3920
|
+
*/
|
|
3921
|
+
hideActionBar?: boolean;
|
|
3922
|
+
}
|
|
3923
|
+
|
|
3924
|
+
export declare type F0FormDefinition<T extends F0FormSchema_2 | F0PerSectionSchema_2 = F0FormSchema_2 | F0PerSectionSchema_2> = T extends F0FormSchema_2 ? F0FormDefinitionSingleSchema<T> : T extends F0PerSectionSchema_2 ? F0FormDefinitionPerSection<T> : never;
|
|
3925
|
+
|
|
3926
|
+
export declare interface F0FormDefinitionPerSection<T extends F0PerSectionSchema_2> {
|
|
3927
|
+
/* Excluded from this release type: _brand */
|
|
3928
|
+
name: string;
|
|
3929
|
+
schema: T;
|
|
3930
|
+
sections?: Record<string, F0PerSectionSectionConfig>;
|
|
3931
|
+
defaultValues?: {
|
|
3932
|
+
[K in keyof T]?: Partial<z.infer<T[K]>>;
|
|
3933
|
+
};
|
|
3934
|
+
onSubmit: (arg: F0WizardFormPerSectionSubmitArg<T>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
3935
|
+
submitConfig?: F0PerSectionSubmitConfig;
|
|
3936
|
+
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
3937
|
+
}
|
|
3938
|
+
|
|
3939
|
+
export declare interface F0FormDefinitionSingleSchema<TSchema extends F0FormSchema_2> {
|
|
3940
|
+
/* Excluded from this release type: _brand */
|
|
3941
|
+
name: string;
|
|
3942
|
+
schema: TSchema;
|
|
3943
|
+
sections?: Record<string, F0SectionConfig>;
|
|
3944
|
+
defaultValues?: Partial<z.infer<TSchema>>;
|
|
3945
|
+
onSubmit: (arg: F0WizardFormSingleSubmitArg<TSchema>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
3946
|
+
submitConfig?: F0FormSubmitConfig;
|
|
3947
|
+
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
3906
3948
|
}
|
|
3907
3949
|
|
|
3908
3950
|
/**
|
|
@@ -4004,11 +4046,24 @@ export declare function f0FormField<T extends ZodTypeAny, TConfig = undefined>(s
|
|
|
4004
4046
|
export declare function f0FormField<T extends ZodTypeAny, V extends string | number = string | number, R extends Record<string, unknown> = Record<string, unknown>>(schema: T, config: F0FieldConfig<V, R>): T & F0ZodType<T>;
|
|
4005
4047
|
|
|
4006
4048
|
/**
|
|
4007
|
-
* Union of
|
|
4049
|
+
* Union of all F0Form prop variants.
|
|
4008
4050
|
* The component detects the mode based on whether `schema` is a single Zod schema
|
|
4009
|
-
* or a record of schemas keyed by section ID.
|
|
4051
|
+
* or a record of schemas keyed by section ID, or whether a `formDefinition` is provided.
|
|
4010
4052
|
*/
|
|
4011
|
-
export declare type F0FormProps<TSchema extends F0FormSchema | F0PerSectionSchema = F0FormSchema | F0PerSectionSchema> = TSchema extends F0FormSchema ? F0FormPropsWithSingleSchema<TSchema> : TSchema extends F0PerSectionSchema ? F0FormPropsWithPerSectionSchema<TSchema> : never;
|
|
4053
|
+
export declare type F0FormProps<TSchema extends F0FormSchema | F0PerSectionSchema = F0FormSchema | F0PerSectionSchema> = TSchema extends F0FormSchema ? F0FormPropsWithSingleSchema<TSchema> | F0FormPropsWithSingleSchemaDefinition<TSchema> : TSchema extends F0PerSectionSchema ? F0FormPropsWithPerSectionSchema<TSchema> | F0FormPropsWithPerSectionDefinition<TSchema> : never;
|
|
4054
|
+
|
|
4055
|
+
/**
|
|
4056
|
+
* Props for F0Form using a formDefinition (per-section schema mode).
|
|
4057
|
+
* Form-related props are extracted from the definition; only rendering/integration
|
|
4058
|
+
* props are passed directly.
|
|
4059
|
+
*/
|
|
4060
|
+
export declare interface F0FormPropsWithPerSectionDefinition<T extends F0PerSectionSchema> {
|
|
4061
|
+
formDefinition: F0FormDefinitionPerSection_2<T>;
|
|
4062
|
+
className?: string;
|
|
4063
|
+
styling?: F0FormStylingConfig;
|
|
4064
|
+
formRef?: React.MutableRefObject<F0FormRef | null>;
|
|
4065
|
+
initialFiles?: InitialFile[];
|
|
4066
|
+
}
|
|
4012
4067
|
|
|
4013
4068
|
/**
|
|
4014
4069
|
* Props for the F0Form component (per-section schema mode).
|
|
@@ -4097,6 +4152,19 @@ export declare interface F0FormPropsWithSingleSchema<TSchema extends F0FormSchem
|
|
|
4097
4152
|
initialFiles?: InitialFile[];
|
|
4098
4153
|
}
|
|
4099
4154
|
|
|
4155
|
+
/**
|
|
4156
|
+
* Props for F0Form using a formDefinition (single schema mode).
|
|
4157
|
+
* Form-related props are extracted from the definition; only rendering/integration
|
|
4158
|
+
* props are passed directly.
|
|
4159
|
+
*/
|
|
4160
|
+
export declare interface F0FormPropsWithSingleSchemaDefinition<TSchema extends F0FormSchema> {
|
|
4161
|
+
formDefinition: F0FormDefinitionSingleSchema_2<TSchema>;
|
|
4162
|
+
className?: string;
|
|
4163
|
+
styling?: F0FormStylingConfig;
|
|
4164
|
+
formRef?: React.MutableRefObject<F0FormRef | null>;
|
|
4165
|
+
initialFiles?: InitialFile[];
|
|
4166
|
+
}
|
|
4167
|
+
|
|
4100
4168
|
/**
|
|
4101
4169
|
* Interface for the F0Form ref methods
|
|
4102
4170
|
*/
|
|
@@ -4115,6 +4183,10 @@ export declare interface F0FormRef {
|
|
|
4115
4183
|
* Check if the form has unsaved changes
|
|
4116
4184
|
*/
|
|
4117
4185
|
isDirty: () => boolean;
|
|
4186
|
+
/**
|
|
4187
|
+
* Get the current form values (including unsaved changes)
|
|
4188
|
+
*/
|
|
4189
|
+
getValues: () => Record<string, unknown>;
|
|
4118
4190
|
/* Excluded from this release type: _setStateCallback */
|
|
4119
4191
|
}
|
|
4120
4192
|
|
|
@@ -4123,6 +4195,8 @@ export declare interface F0FormRef {
|
|
|
4123
4195
|
*/
|
|
4124
4196
|
export declare type F0FormSchema<T extends ZodRawShape = ZodRawShape> = z.ZodObject<T> | ZodEffects<z.ZodObject<T>>;
|
|
4125
4197
|
|
|
4198
|
+
declare type F0FormSchema_2<T extends ZodRawShape = ZodRawShape> = z.ZodObject<T> | ZodEffects<z.ZodObject<T>>;
|
|
4199
|
+
|
|
4126
4200
|
/**
|
|
4127
4201
|
* Callback to update form state in the hook
|
|
4128
4202
|
*/
|
|
@@ -4365,6 +4439,8 @@ export declare type F0OneSwitchProps = React.ComponentPropsWithoutRef<typeof Swi
|
|
|
4365
4439
|
*/
|
|
4366
4440
|
export declare type F0PerSectionSchema = Record<string, F0FormSchema>;
|
|
4367
4441
|
|
|
4442
|
+
declare type F0PerSectionSchema_2 = Record<string, F0FormSchema_2>;
|
|
4443
|
+
|
|
4368
4444
|
/**
|
|
4369
4445
|
* Section configuration for per-section schema mode.
|
|
4370
4446
|
* Extends F0SectionConfig with per-section submit and default values.
|
|
@@ -4393,6 +4469,12 @@ export declare interface F0PerSectionSubmitConfig {
|
|
|
4393
4469
|
* @default false
|
|
4394
4470
|
*/
|
|
4395
4471
|
showSubmitWhenDirty?: boolean;
|
|
4472
|
+
/**
|
|
4473
|
+
* When true, hides the submit button.
|
|
4474
|
+
* Useful when submission is controlled externally (e.g. inside F0WizardForm).
|
|
4475
|
+
* @default false
|
|
4476
|
+
*/
|
|
4477
|
+
hideSubmitButton?: boolean;
|
|
4396
4478
|
}
|
|
4397
4479
|
|
|
4398
4480
|
export declare const F0Provider: React.FC<{
|
|
@@ -4904,6 +4986,104 @@ declare type F0TimeFieldConfig = F0BaseConfig & F0TimeConfig & {
|
|
|
4904
4986
|
fieldType: "time";
|
|
4905
4987
|
};
|
|
4906
4988
|
|
|
4989
|
+
export declare const F0WizardForm: {
|
|
4990
|
+
<TSchema extends F0FormSchema_2>(props: F0WizardFormSingleSchemaProps<TSchema>): default_2.ReactElement;
|
|
4991
|
+
<T extends F0PerSectionSchema_2>(props: F0WizardFormPerSectionProps<T>): default_2.ReactElement;
|
|
4992
|
+
};
|
|
4993
|
+
|
|
4994
|
+
declare interface F0WizardFormBaseProps {
|
|
4995
|
+
isOpen: boolean;
|
|
4996
|
+
onClose?: () => void;
|
|
4997
|
+
title?: string;
|
|
4998
|
+
width?: DialogWidth;
|
|
4999
|
+
defaultStepIndex?: number;
|
|
5000
|
+
nextLabel?: string;
|
|
5001
|
+
previousLabel?: string;
|
|
5002
|
+
onStepChanged?: (stepIndex: number) => void;
|
|
5003
|
+
steps?: F0WizardFormStep[];
|
|
5004
|
+
/**
|
|
5005
|
+
* When true, users can click on any step that is not explicitly marked
|
|
5006
|
+
* as incomplete (i.e. its `isCompleted` callback does not return `false`)
|
|
5007
|
+
* to jump to it.
|
|
5008
|
+
* When false (default), users must navigate sequentially using Next/Previous.
|
|
5009
|
+
* @default false
|
|
5010
|
+
*/
|
|
5011
|
+
allowStepSkipping?: boolean;
|
|
5012
|
+
/**
|
|
5013
|
+
* When true, the wizard automatically closes after the last step's
|
|
5014
|
+
* onSubmit returns `{ success: true }`.
|
|
5015
|
+
* Also implied when `linkAfterLastStepSubmit` is provided.
|
|
5016
|
+
* @default false
|
|
5017
|
+
*/
|
|
5018
|
+
autoCloseOnLastStepSubmit?: boolean;
|
|
5019
|
+
/**
|
|
5020
|
+
* When true, the wizard automatically skips to the first non-completed step
|
|
5021
|
+
* on open. A step is completed when all required fields have values, or when
|
|
5022
|
+
* the step's custom `isCompleted` function returns true.
|
|
5023
|
+
* Only applies on initial render; users can still navigate back freely.
|
|
5024
|
+
* @default false
|
|
5025
|
+
*/
|
|
5026
|
+
autoSkipCompletedSteps?: boolean;
|
|
5027
|
+
}
|
|
5028
|
+
|
|
5029
|
+
export declare interface F0WizardFormPerSectionProps<T extends F0PerSectionSchema_2> extends F0WizardFormBaseProps {
|
|
5030
|
+
formDefinition: F0FormDefinitionPerSection<T>;
|
|
5031
|
+
/**
|
|
5032
|
+
* Function that receives the submitted data and returns a URL to navigate to
|
|
5033
|
+
* after the last step's onSubmit returns `{ success: true }`.
|
|
5034
|
+
* When provided, the wizard auto-closes and navigates to the returned URL.
|
|
5035
|
+
*/
|
|
5036
|
+
linkAfterLastStepSubmit?: (arg: {
|
|
5037
|
+
fullData: InferPerSectionValues_2<T>;
|
|
5038
|
+
}) => string;
|
|
5039
|
+
}
|
|
5040
|
+
|
|
5041
|
+
/**
|
|
5042
|
+
* Per-section submit argument: discriminated union where sectionId narrows data.
|
|
5043
|
+
* fullData always contains all sections' latest values.
|
|
5044
|
+
*/
|
|
5045
|
+
export declare type F0WizardFormPerSectionSubmitArg<T extends F0PerSectionSchema_2> = {
|
|
5046
|
+
[K in keyof T & string]: {
|
|
5047
|
+
sectionId: K;
|
|
5048
|
+
data: z.infer<T[K]>;
|
|
5049
|
+
fullData: InferPerSectionValues_2<T>;
|
|
5050
|
+
};
|
|
5051
|
+
}[keyof T & string];
|
|
5052
|
+
|
|
5053
|
+
export declare interface F0WizardFormSingleSchemaProps<TSchema extends F0FormSchema_2> extends F0WizardFormBaseProps {
|
|
5054
|
+
formDefinition: F0FormDefinitionSingleSchema<TSchema>;
|
|
5055
|
+
/**
|
|
5056
|
+
* Function that receives the submitted data and returns a URL to navigate to
|
|
5057
|
+
* after the last step's onSubmit returns `{ success: true }`.
|
|
5058
|
+
* When provided, the wizard auto-closes and navigates to the returned URL.
|
|
5059
|
+
*/
|
|
5060
|
+
linkAfterLastStepSubmit?: (arg: {
|
|
5061
|
+
fullData: z.infer<TSchema>;
|
|
5062
|
+
}) => string;
|
|
5063
|
+
}
|
|
5064
|
+
|
|
5065
|
+
/**
|
|
5066
|
+
* Single-schema submit argument: data is the full form.
|
|
5067
|
+
*/
|
|
5068
|
+
export declare interface F0WizardFormSingleSubmitArg<TSchema extends F0FormSchema_2> {
|
|
5069
|
+
data: z.infer<TSchema>;
|
|
5070
|
+
}
|
|
5071
|
+
|
|
5072
|
+
export declare interface F0WizardFormStep {
|
|
5073
|
+
title: string;
|
|
5074
|
+
sectionIds: string[];
|
|
5075
|
+
nextLabel?: string;
|
|
5076
|
+
previousLabel?: string;
|
|
5077
|
+
/**
|
|
5078
|
+
* Custom function to determine if this step is considered completed.
|
|
5079
|
+
* Receives the step's current data. When provided, takes precedence
|
|
5080
|
+
* over the default "all required fields filled" check.
|
|
5081
|
+
*/
|
|
5082
|
+
isCompleted?: (arg: {
|
|
5083
|
+
data: Record<string, unknown>;
|
|
5084
|
+
}) => boolean;
|
|
5085
|
+
}
|
|
5086
|
+
|
|
4907
5087
|
/**
|
|
4908
5088
|
* Extended Zod type with F0 metadata
|
|
4909
5089
|
*/
|
|
@@ -5446,6 +5626,10 @@ export declare type InferPerSectionValues<T extends F0PerSectionSchema> = {
|
|
|
5446
5626
|
[K in keyof T]: z.infer<T[K]>;
|
|
5447
5627
|
};
|
|
5448
5628
|
|
|
5629
|
+
declare type InferPerSectionValues_2<T extends F0PerSectionSchema_2> = {
|
|
5630
|
+
[K in keyof T]: z.infer<T[K]>;
|
|
5631
|
+
};
|
|
5632
|
+
|
|
5449
5633
|
export declare type InFilterDefinition<T = string | number, R extends RecordType = RecordType> = BaseFilterDefinition<"in"> & {
|
|
5450
5634
|
options: InFilterOptions_2<T, R>;
|
|
5451
5635
|
};
|
|
@@ -7724,6 +7908,32 @@ export declare const useF0Dialog: () => F0DialogContextType;
|
|
|
7724
7908
|
*/
|
|
7725
7909
|
export declare function useF0Form(): UseF0FormReturn;
|
|
7726
7910
|
|
|
7911
|
+
export declare function useF0FormDefinition<TSchema extends F0FormSchema_2>(input: UseF0FormDefinitionSingleSchemaInput<TSchema>): F0FormDefinitionSingleSchema<TSchema>;
|
|
7912
|
+
|
|
7913
|
+
export declare function useF0FormDefinition<T extends F0PerSectionSchema_2>(input: UseF0FormDefinitionPerSectionInput<T>): F0FormDefinitionPerSection<T>;
|
|
7914
|
+
|
|
7915
|
+
declare interface UseF0FormDefinitionPerSectionInput<T extends F0PerSectionSchema_2> {
|
|
7916
|
+
name: string;
|
|
7917
|
+
schema: T;
|
|
7918
|
+
sections?: Record<string, F0PerSectionSectionConfig>;
|
|
7919
|
+
defaultValues?: {
|
|
7920
|
+
[K in keyof T]?: Partial<z.infer<T[K]>>;
|
|
7921
|
+
};
|
|
7922
|
+
onSubmit: (arg: F0WizardFormPerSectionSubmitArg<T>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
7923
|
+
submitConfig?: F0PerSectionSubmitConfig;
|
|
7924
|
+
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
7925
|
+
}
|
|
7926
|
+
|
|
7927
|
+
declare interface UseF0FormDefinitionSingleSchemaInput<TSchema extends F0FormSchema_2> {
|
|
7928
|
+
name: string;
|
|
7929
|
+
schema: TSchema;
|
|
7930
|
+
sections?: Record<string, F0SectionConfig>;
|
|
7931
|
+
defaultValues?: Partial<z.infer<TSchema>>;
|
|
7932
|
+
onSubmit: (arg: F0WizardFormSingleSubmitArg<TSchema>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
7933
|
+
submitConfig?: F0FormSubmitConfig;
|
|
7934
|
+
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
7935
|
+
}
|
|
7936
|
+
|
|
7727
7937
|
/**
|
|
7728
7938
|
* Return type for the useF0Form hook
|
|
7729
7939
|
*/
|
|
@@ -7746,6 +7956,10 @@ export declare interface UseF0FormReturn {
|
|
|
7746
7956
|
* Check if the form has unsaved changes
|
|
7747
7957
|
*/
|
|
7748
7958
|
isDirty: () => boolean;
|
|
7959
|
+
/**
|
|
7960
|
+
* Get the current form values (including unsaved changes)
|
|
7961
|
+
*/
|
|
7962
|
+
getValues: () => Record<string, unknown>;
|
|
7749
7963
|
/**
|
|
7750
7964
|
* Whether the form is currently submitting
|
|
7751
7965
|
*/
|
|
@@ -8107,11 +8321,6 @@ declare module "gridstack" {
|
|
|
8107
8321
|
}
|
|
8108
8322
|
|
|
8109
8323
|
|
|
8110
|
-
declare namespace Calendar {
|
|
8111
|
-
var displayName: string;
|
|
8112
|
-
}
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
8324
|
declare module "@tiptap/core" {
|
|
8116
8325
|
interface Commands<ReturnType> {
|
|
8117
8326
|
aiBlock: {
|
|
@@ -8159,3 +8368,8 @@ declare module "@tiptap/core" {
|
|
|
8159
8368
|
};
|
|
8160
8369
|
}
|
|
8161
8370
|
}
|
|
8371
|
+
|
|
8372
|
+
|
|
8373
|
+
declare namespace Calendar {
|
|
8374
|
+
var displayName: string;
|
|
8375
|
+
}
|