@factorialco/f0-react 1.381.0 → 1.382.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-DBnav5cC.js → DataCollectionStorageProvider-B8_-moME.js} +1 -1
- package/dist/{F0AiChat-DvWln9wK.js → F0AiChat-oTIR5NbZ.js} +322 -321
- package/dist/{F0HILActionConfirmation-DRfQGPsn.js → F0HILActionConfirmation-C9Kwjohi.js} +1 -1
- package/dist/ai.d.ts +17 -5
- package/dist/ai.js +2 -2
- package/dist/experimental.d.ts +17 -5
- package/dist/experimental.js +4 -4
- package/dist/f0.d.ts +186 -12
- package/dist/f0.js +3912 -3580
- package/dist/i18n-provider-defaults.d.ts +17 -5
- package/dist/i18n-provider-defaults.js +12 -0
- package/package.json +1 -1
package/dist/ai.d.ts
CHANGED
|
@@ -756,6 +756,18 @@ export declare const defaultTranslations: {
|
|
|
756
756
|
readonly other: "{{count}} issues";
|
|
757
757
|
};
|
|
758
758
|
};
|
|
759
|
+
readonly file: {
|
|
760
|
+
readonly dropzone: "Drag and drop a file, or click to select";
|
|
761
|
+
readonly dropzoneActive: "Drop the file here";
|
|
762
|
+
readonly dropzoneMultiple: "Drag and drop files, or click to select";
|
|
763
|
+
readonly acceptedTypes: "Accepted formats: {{types}}";
|
|
764
|
+
readonly remove: "Remove";
|
|
765
|
+
readonly uploading: "Uploading…";
|
|
766
|
+
readonly processing: "Processing…";
|
|
767
|
+
readonly uploadFailed: "Upload failed";
|
|
768
|
+
readonly fileTooLarge: "File exceeds {{maxSize}} MB limit";
|
|
769
|
+
readonly invalidFileType: "File type not accepted. Accepted formats: {{types}}";
|
|
770
|
+
};
|
|
759
771
|
readonly validation: {
|
|
760
772
|
readonly required: "This field is required";
|
|
761
773
|
readonly invalidType: "Invalid value";
|
|
@@ -1205,6 +1217,11 @@ declare module "gridstack" {
|
|
|
1205
1217
|
}
|
|
1206
1218
|
|
|
1207
1219
|
|
|
1220
|
+
declare namespace Calendar {
|
|
1221
|
+
var displayName: string;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
|
|
1208
1225
|
declare module "@tiptap/core" {
|
|
1209
1226
|
interface Commands<ReturnType> {
|
|
1210
1227
|
aiBlock: {
|
|
@@ -1252,8 +1269,3 @@ declare module "@tiptap/core" {
|
|
|
1252
1269
|
};
|
|
1253
1270
|
}
|
|
1254
1271
|
}
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
declare namespace Calendar {
|
|
1258
|
-
var displayName: string;
|
|
1259
|
-
}
|
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-oTIR5NbZ.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-C9Kwjohi.js";
|
|
4
4
|
export {
|
|
5
5
|
e as A,
|
|
6
6
|
y as AiChatTranslationsProvider,
|
package/dist/experimental.d.ts
CHANGED
|
@@ -2685,6 +2685,18 @@ declare const defaultTranslations: {
|
|
|
2685
2685
|
readonly other: "{{count}} issues";
|
|
2686
2686
|
};
|
|
2687
2687
|
};
|
|
2688
|
+
readonly file: {
|
|
2689
|
+
readonly dropzone: "Drag and drop a file, or click to select";
|
|
2690
|
+
readonly dropzoneActive: "Drop the file here";
|
|
2691
|
+
readonly dropzoneMultiple: "Drag and drop files, or click to select";
|
|
2692
|
+
readonly acceptedTypes: "Accepted formats: {{types}}";
|
|
2693
|
+
readonly remove: "Remove";
|
|
2694
|
+
readonly uploading: "Uploading…";
|
|
2695
|
+
readonly processing: "Processing…";
|
|
2696
|
+
readonly uploadFailed: "Upload failed";
|
|
2697
|
+
readonly fileTooLarge: "File exceeds {{maxSize}} MB limit";
|
|
2698
|
+
readonly invalidFileType: "File type not accepted. Accepted formats: {{types}}";
|
|
2699
|
+
};
|
|
2688
2700
|
readonly validation: {
|
|
2689
2701
|
readonly required: "This field is required";
|
|
2690
2702
|
readonly invalidType: "Invalid value";
|
|
@@ -6734,6 +6746,11 @@ declare module "gridstack" {
|
|
|
6734
6746
|
}
|
|
6735
6747
|
|
|
6736
6748
|
|
|
6749
|
+
declare namespace Calendar {
|
|
6750
|
+
var displayName: string;
|
|
6751
|
+
}
|
|
6752
|
+
|
|
6753
|
+
|
|
6737
6754
|
declare module "@tiptap/core" {
|
|
6738
6755
|
interface Commands<ReturnType> {
|
|
6739
6756
|
aiBlock: {
|
|
@@ -6781,8 +6798,3 @@ declare module "@tiptap/core" {
|
|
|
6781
6798
|
};
|
|
6782
6799
|
}
|
|
6783
6800
|
}
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
declare namespace Calendar {
|
|
6787
|
-
var displayName: string;
|
|
6788
|
-
}
|
package/dist/experimental.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a5 as Kd,
|
|
2
|
-
import {
|
|
1
|
+
import { a5 as Kd, bI as Xp, bJ as Zp, bK as eg, bL as Ho, bM as tg, bN as eo, D as ng, bO as rg, ad as G, V as Jd, J as ig, bP as og, ap as Ei, bQ as Yd, bR as sg, bS as lg, am as ag, bT as Ea, bU as Qr, bV as cg, bW as gl, bX as Qd, bY as ys, a6 as k, a7 as At, u as Y, bZ as dg, b_ as ug, b$ as fg, c0 as hg, c1 as mg, av as Se, c2 as pg, al as Te, c3 as gg, c4 as Xd, aj as q, c5 as Zd, c6 as eu, ae as at, c7 as tu, c8 as xs, c9 as nu, a8 as $, ca as _r, ai as P, cb as vt, cc as bg, cd as vg, ce as dr, aJ as ru, cf as iu, aU as rn, cg as ou, ch as bl, ci as pt, aK as vl, aL as Jn, v as su, cj as lu, ck as yg, cl as Ta, cm as zn, cn as yl, co as Lr, cp as Ti, cq as xg, cr as au, cs as wg, ct as xl, cu as ur, cv as et, cw as Cg, cx as kg, cy as qt, cz as Vo, cA as Ng, cB as lr, cC as En, cD as Sg, aa as ve, cE as Ig, cF as Ag, cG as Eg, cH as Tg, cI as Dg, af as He, ah as Ee, cJ as un, aX as on, bF as Or, cK as cu, cL as wl, cM as _g, cN as Lg, cO as Og, cP as Rg, cQ as Fg, cR as Mg, cS as Pg, cT as zg, cU as $g, cV as Cl, cW as jg, cX as du, cY as Bg, cZ as Hg, c_ as Vg, c$ as Wg, d0 as Ug, d1 as Gg, d2 as qg, d3 as Kg, bg as St, d4 as uu, d5 as Jg, ao as se, a9 as fr, d6 as fu, d7 as hu, a_ as kl, t as Yg, d8 as Qg, d9 as Xg, an as hr, da as Zg, db as Wo, dc as eb, dd as Nl, de as Kt, aQ as mu, df as Da, dg as _a, dh as tb, di as La, dj as pu, dk as Sl, aP as $n, aN as gu, at as Il, au as Al, aw as El, aM as mr, ak as Rr, dl as nb, dm as rb, dn as bu, dp as ib, ax as It, dq as ob, dr as vu, ds as yu, dt as sb, du as Fr, dv as Tl, dw as to, bi as fn, dx as ws, dy as lb, dz as ab, dA as cb, dB as db, dC as ub, dD as fb, dE as xu, dF as hb, dG as wu, dH as mb, dI as pb, dJ as gb, aH as Oa, dK as Cu, dL as Cs, aC as ks, dM as ku, dN as Ns, bp as Dl, aZ as hn, bc as no, dO as ro, dP as bb, dQ as vb, dR as yb, bE as io, aY as Nu, bH as xb, bG as wb, dS as Su, dT as Cb, aE as _n, dU as Ra, dV as Di, dW as kb, dX as Nb, bh as Sb, bd as Iu, a as Ib, d as Ab, dY as _l, dZ as Eb, F as Tb, d_ as Au, d$ as Eu, e0 as Db, e1 as _b, e2 as Lb, e3 as Ob, e4 as Rb, e5 as Tu, e6 as Fb, be as Du, e7 as _u, e8 as Mb, e9 as Pb, ea as zb, eb as $b, ec as jb, ed as Bb, ee as Hb, ef as Vb, bs as Wb, bt as Ub, bA as oo, by as Ll, b2 as so, eg as lo, eh as ao, b3 as co, ei as Ol, bz as Lu, aD as Gb, bu as _i, ej as Ou, ek as qb, el as Ss, em as Kb, en as Fa, eo as Jb, ep as Yb, eq as Qb, er as Xb, es as Zb, et as ev, eu as tv, ac as Ru, bo as nv, bx as rv, ab as yt, a$ as iv, b0 as ov, b1 as sv, ev as Fu, ew as lv, ex as av, ey as cv, ez as dv, b4 as uv, eA as fv, eB as Ma, eC as Pa, eD as za, eE as hv, eF as mv, eG as pv, eH as gv, eI as Mu, eJ as bv } from "./F0AiChat-oTIR5NbZ.js";
|
|
2
|
+
import { eM as QL, eL as XL, eK as ZL, eR as eO, eS as tO, eO as nO, eN as rO, eQ as iO, bf as oO, eP as sO } from "./F0AiChat-oTIR5NbZ.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-B8_-moME.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-B8_-moME.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(() => {
|
package/dist/f0.d.ts
CHANGED
|
@@ -2584,6 +2584,18 @@ export declare const defaultTranslations: {
|
|
|
2584
2584
|
readonly other: "{{count}} issues";
|
|
2585
2585
|
};
|
|
2586
2586
|
};
|
|
2587
|
+
readonly file: {
|
|
2588
|
+
readonly dropzone: "Drag and drop a file, or click to select";
|
|
2589
|
+
readonly dropzoneActive: "Drop the file here";
|
|
2590
|
+
readonly dropzoneMultiple: "Drag and drop files, or click to select";
|
|
2591
|
+
readonly acceptedTypes: "Accepted formats: {{types}}";
|
|
2592
|
+
readonly remove: "Remove";
|
|
2593
|
+
readonly uploading: "Uploading…";
|
|
2594
|
+
readonly processing: "Processing…";
|
|
2595
|
+
readonly uploadFailed: "Upload failed";
|
|
2596
|
+
readonly fileTooLarge: "File exceeds {{maxSize}} MB limit";
|
|
2597
|
+
readonly invalidFileType: "File type not accepted. Accepted formats: {{types}}";
|
|
2598
|
+
};
|
|
2587
2599
|
readonly validation: {
|
|
2588
2600
|
readonly required: "This field is required";
|
|
2589
2601
|
readonly invalidType: "Invalid value";
|
|
@@ -2881,11 +2893,26 @@ export declare interface F0AlertProps {
|
|
|
2881
2893
|
}
|
|
2882
2894
|
|
|
2883
2895
|
/**
|
|
2884
|
-
* Config for array fields (multi-select)
|
|
2896
|
+
* Config for array fields (multi-select or multi-file)
|
|
2897
|
+
* @typeParam T - The value type (string or number)
|
|
2898
|
+
* @typeParam R - Record type for data source (when using source instead of options)
|
|
2899
|
+
*/
|
|
2900
|
+
export declare type F0ArrayConfig<T extends string | number = string, R extends Record<string, unknown> = Record<string, unknown>> = F0ArraySelectConfig<T, R> | F0ArrayFileConfig;
|
|
2901
|
+
|
|
2902
|
+
/**
|
|
2903
|
+
* Config for file fields (multiple file upload, form value is string[])
|
|
2904
|
+
*/
|
|
2905
|
+
declare type F0ArrayFileConfig = F0BaseConfig & F0FileConfig & {
|
|
2906
|
+
fieldType: "file";
|
|
2907
|
+
multiple: true;
|
|
2908
|
+
};
|
|
2909
|
+
|
|
2910
|
+
/**
|
|
2911
|
+
* Config for array fields with select (multi-select)
|
|
2885
2912
|
* @typeParam T - The value type (string or number)
|
|
2886
2913
|
* @typeParam R - Record type for data source (when using source instead of options)
|
|
2887
2914
|
*/
|
|
2888
|
-
|
|
2915
|
+
declare type F0ArraySelectConfig<T extends string | number = string, R extends Record<string, unknown> = Record<string, unknown>> = F0BaseConfig & F0SelectConfig<T, R> & {
|
|
2889
2916
|
fieldType?: "select";
|
|
2890
2917
|
};
|
|
2891
2918
|
|
|
@@ -3741,19 +3768,66 @@ export declare function F0EventCatcherProvider({ children, onEvent, enabled, cat
|
|
|
3741
3768
|
/**
|
|
3742
3769
|
* Union of all F0 field types used for rendering
|
|
3743
3770
|
*/
|
|
3744
|
-
export declare type F0Field = F0TextField | F0NumberField | F0TextareaField | F0SelectField | F0CheckboxField | F0SwitchField | F0DateField | F0TimeField | F0DateTimeField | F0DateRangeField | F0RichTextField | F0CustomField;
|
|
3771
|
+
export declare type F0Field = F0TextField | F0NumberField | F0TextareaField | F0SelectField | F0CheckboxField | F0SwitchField | F0DateField | F0TimeField | F0DateTimeField | F0DateRangeField | F0RichTextField | F0FileField | F0CustomField;
|
|
3745
3772
|
|
|
3746
3773
|
/**
|
|
3747
3774
|
* Complete F0 field configuration (union of all possible configs)
|
|
3748
3775
|
* @typeParam T - The value type for select fields (string or number)
|
|
3749
3776
|
* @typeParam R - Record type for data source (when using source instead of options)
|
|
3750
3777
|
*/
|
|
3751
|
-
export declare type F0FieldConfig<T extends string | number = string | number, R extends Record<string, unknown> = Record<string, unknown>> = F0StringConfig<string, undefined, R> | F0NumberFieldConfig<R> | F0BooleanConfig | F0DateFieldConfig | F0TimeFieldConfig | F0DateTimeFieldConfig | F0ArrayConfig<T, R> | F0ObjectConfig;
|
|
3778
|
+
export declare type F0FieldConfig<T extends string | number = string | number, R extends Record<string, unknown> = Record<string, unknown>> = F0StringConfig<string, undefined, R> | F0NumberFieldConfig<R> | F0BooleanConfig | F0DateFieldConfig | F0TimeFieldConfig | F0DateTimeFieldConfig | F0ArrayConfig<T, R> | F0FileFieldConfig | F0ObjectConfig;
|
|
3752
3779
|
|
|
3753
3780
|
/**
|
|
3754
3781
|
* Field types for rendering
|
|
3755
3782
|
*/
|
|
3756
|
-
export declare type F0FieldType = "text" | "number" | "textarea" | "select" | "checkbox" | "switch" | "date" | "time" | "datetime" | "daterange" | "richtext" | "custom";
|
|
3783
|
+
export declare type F0FieldType = "text" | "number" | "textarea" | "select" | "checkbox" | "switch" | "date" | "time" | "datetime" | "daterange" | "richtext" | "file" | "custom";
|
|
3784
|
+
|
|
3785
|
+
/**
|
|
3786
|
+
* F0 config options specific to file fields
|
|
3787
|
+
*/
|
|
3788
|
+
export declare interface F0FileConfig {
|
|
3789
|
+
/**
|
|
3790
|
+
* Accepted MIME types.
|
|
3791
|
+
*
|
|
3792
|
+
* @example
|
|
3793
|
+
* accept: ["image"] // all image types
|
|
3794
|
+
* accept: ["image/png", "image/jpeg"] // specific types
|
|
3795
|
+
* accept: ["image", "application/pdf"] // mix of category and specific
|
|
3796
|
+
*/
|
|
3797
|
+
accept?: MimeType_2[];
|
|
3798
|
+
/** Maximum file size in megabytes (per file) */
|
|
3799
|
+
maxSizeMB?: number;
|
|
3800
|
+
/** Allow multiple file uploads (form value becomes `string[]`) */
|
|
3801
|
+
multiple?: boolean;
|
|
3802
|
+
/** Helper text shown in the dropzone area */
|
|
3803
|
+
description?: string;
|
|
3804
|
+
/** Consumer-provided hook that returns upload capabilities */
|
|
3805
|
+
useUpload: UseFileUpload;
|
|
3806
|
+
}
|
|
3807
|
+
|
|
3808
|
+
/**
|
|
3809
|
+
* File field with all properties for rendering (runtime type)
|
|
3810
|
+
*/
|
|
3811
|
+
export declare type F0FileField = F0BaseField & {
|
|
3812
|
+
type: "file";
|
|
3813
|
+
/** Accepted MIME types */
|
|
3814
|
+
accept?: MimeType_2[];
|
|
3815
|
+
/** Maximum file size in megabytes */
|
|
3816
|
+
maxSizeMB?: number;
|
|
3817
|
+
/** Allow multiple files */
|
|
3818
|
+
multiple?: boolean;
|
|
3819
|
+
/** Dropzone description text */
|
|
3820
|
+
description?: string;
|
|
3821
|
+
/** Consumer-provided upload hook */
|
|
3822
|
+
useUpload: UseFileUpload;
|
|
3823
|
+
/** Conditional rendering */
|
|
3824
|
+
renderIf?: FileFieldRenderIf;
|
|
3825
|
+
};
|
|
3826
|
+
|
|
3827
|
+
/**
|
|
3828
|
+
* Union of all file field configs
|
|
3829
|
+
*/
|
|
3830
|
+
export declare type F0FileFieldConfig = F0StringFileConfig | F0ArrayFileConfig;
|
|
3757
3831
|
|
|
3758
3832
|
export declare const F0FilterPickerContent: F0FilterPickerContentGeneric;
|
|
3759
3833
|
|
|
@@ -3971,6 +4045,12 @@ export declare interface F0FormPropsWithPerSectionSchema<T extends F0PerSectionS
|
|
|
3971
4045
|
* Ref to control the form programmatically from outside.
|
|
3972
4046
|
*/
|
|
3973
4047
|
formRef?: React.MutableRefObject<F0FormRef | null>;
|
|
4048
|
+
/**
|
|
4049
|
+
* Pre-existing file metadata shared across all file fields.
|
|
4050
|
+
* Each file field automatically resolves its entries by matching
|
|
4051
|
+
* `defaultValues` against `InitialFile.value`.
|
|
4052
|
+
*/
|
|
4053
|
+
initialFiles?: InitialFile[];
|
|
3974
4054
|
}
|
|
3975
4055
|
|
|
3976
4056
|
/**
|
|
@@ -4009,6 +4089,12 @@ export declare interface F0FormPropsWithSingleSchema<TSchema extends F0FormSchem
|
|
|
4009
4089
|
* Use with the `useF0Form` hook to get a ref and submit/reset functions.
|
|
4010
4090
|
*/
|
|
4011
4091
|
formRef?: React.MutableRefObject<F0FormRef | null>;
|
|
4092
|
+
/**
|
|
4093
|
+
* Pre-existing file metadata shared across all file fields.
|
|
4094
|
+
* Each file field automatically resolves its entries by matching
|
|
4095
|
+
* `defaultValues` against `InitialFile.value`.
|
|
4096
|
+
*/
|
|
4097
|
+
initialFiles?: InitialFile[];
|
|
4012
4098
|
}
|
|
4013
4099
|
|
|
4014
4100
|
/**
|
|
@@ -4595,7 +4681,15 @@ export declare type F0Source = {
|
|
|
4595
4681
|
* @typeParam TConfig - Type of the fieldConfig object (for custom fields)
|
|
4596
4682
|
* @typeParam R - Record type for data source (when using source instead of options)
|
|
4597
4683
|
*/
|
|
4598
|
-
export declare type F0StringConfig<TValue = string, TConfig = undefined, R extends Record<string, unknown> = Record<string, unknown>> = F0StringTextConfig | F0StringTextareaConfig | F0StringSelectConfig<R> | F0CustomFieldConfig<TValue, TConfig>;
|
|
4684
|
+
export declare type F0StringConfig<TValue = string, TConfig = undefined, R extends Record<string, unknown> = Record<string, unknown>> = F0StringTextConfig | F0StringTextareaConfig | F0StringSelectConfig<R> | F0StringFileConfig | F0CustomFieldConfig<TValue, TConfig>;
|
|
4685
|
+
|
|
4686
|
+
/**
|
|
4687
|
+
* Config for file fields (single file upload, form value is a string identifier)
|
|
4688
|
+
*/
|
|
4689
|
+
declare type F0StringFileConfig = F0BaseConfig & F0FileConfig & {
|
|
4690
|
+
fieldType: "file";
|
|
4691
|
+
multiple?: false;
|
|
4692
|
+
};
|
|
4599
4693
|
|
|
4600
4694
|
/**
|
|
4601
4695
|
* Config for string fields with select options
|
|
@@ -4823,7 +4917,7 @@ export declare interface F0ZodType<T extends ZodTypeAny = ZodTypeAny> {
|
|
|
4823
4917
|
/**
|
|
4824
4918
|
* Field types for rendering
|
|
4825
4919
|
*/
|
|
4826
|
-
export declare type FieldType = "text" | "number" | "textarea" | "select" | "checkbox" | "switch" | "date" | "time" | "datetime" | "daterange" | "richtext" | "custom";
|
|
4920
|
+
export declare type FieldType = "text" | "number" | "textarea" | "select" | "checkbox" | "switch" | "date" | "time" | "datetime" | "daterange" | "richtext" | "file" | "custom";
|
|
4827
4921
|
|
|
4828
4922
|
export declare type FileAvatarVariant = Extract<AvatarVariant, {
|
|
4829
4923
|
type: "file";
|
|
@@ -4834,6 +4928,41 @@ declare type FileDef = {
|
|
|
4834
4928
|
type: string;
|
|
4835
4929
|
};
|
|
4836
4930
|
|
|
4931
|
+
/**
|
|
4932
|
+
* All valid renderIf conditions for file fields
|
|
4933
|
+
*/
|
|
4934
|
+
declare type FileFieldRenderIf = CommonRenderIfCondition | F0BaseFieldRenderIfFunction;
|
|
4935
|
+
|
|
4936
|
+
/**
|
|
4937
|
+
* Return type of the consumer-provided upload hook
|
|
4938
|
+
*/
|
|
4939
|
+
export declare interface FileUploadHookReturn {
|
|
4940
|
+
/** Uploads a file and returns the result */
|
|
4941
|
+
upload: (file: File) => Promise<FileUploadResult>;
|
|
4942
|
+
/** Cancels the in-flight upload */
|
|
4943
|
+
cancelUpload?: () => void;
|
|
4944
|
+
/** Upload progress from 0 to 1 */
|
|
4945
|
+
progress: number;
|
|
4946
|
+
/** Current upload status */
|
|
4947
|
+
status: FileUploadStatus;
|
|
4948
|
+
}
|
|
4949
|
+
|
|
4950
|
+
/**
|
|
4951
|
+
* Result of a file upload operation.
|
|
4952
|
+
* `value` is the identifier stored as the form value (e.g. a signedId, URL, or any string).
|
|
4953
|
+
*/
|
|
4954
|
+
export declare type FileUploadResult = {
|
|
4955
|
+
type: "success";
|
|
4956
|
+
value: string;
|
|
4957
|
+
} | {
|
|
4958
|
+
type: "aborted";
|
|
4959
|
+
};
|
|
4960
|
+
|
|
4961
|
+
/**
|
|
4962
|
+
* Upload status states
|
|
4963
|
+
*/
|
|
4964
|
+
export declare type FileUploadStatus = "idle" | "processing" | "uploading" | "success";
|
|
4965
|
+
|
|
4837
4966
|
/**
|
|
4838
4967
|
* Union of all available filter types.
|
|
4839
4968
|
* Used to define possible filter configurations in a collection.
|
|
@@ -5392,6 +5521,21 @@ export declare type InfiniteScrollPaginatedResponse<TRecord> = BasePaginatedResp
|
|
|
5392
5521
|
hasMore: boolean;
|
|
5393
5522
|
};
|
|
5394
5523
|
|
|
5524
|
+
/**
|
|
5525
|
+
* Metadata for a file that already exists (e.g. from a previous upload).
|
|
5526
|
+
* Passed via `initialFiles` so the field can display it without re-uploading.
|
|
5527
|
+
*/
|
|
5528
|
+
export declare interface InitialFile {
|
|
5529
|
+
/** The identifier that matches the form's default value (signedId, URL, etc.) */
|
|
5530
|
+
value: string;
|
|
5531
|
+
/** Display name (e.g. "report.pdf") */
|
|
5532
|
+
name: string;
|
|
5533
|
+
/** MIME type for icon display (e.g. "application/pdf") */
|
|
5534
|
+
type?: string;
|
|
5535
|
+
/** File size in bytes */
|
|
5536
|
+
size?: number;
|
|
5537
|
+
}
|
|
5538
|
+
|
|
5395
5539
|
declare const INPUTFIELD_SIZES: readonly ["sm", "md"];
|
|
5396
5540
|
|
|
5397
5541
|
declare type InputFieldInheritedProps = (typeof inputFieldInheritedProps)[number];
|
|
@@ -5656,6 +5800,20 @@ declare type MentionsConfig = {
|
|
|
5656
5800
|
users: MentionedUser[];
|
|
5657
5801
|
};
|
|
5658
5802
|
|
|
5803
|
+
/**
|
|
5804
|
+
* Known MIME types for the file field `accept` prop.
|
|
5805
|
+
*
|
|
5806
|
+
* Supports three formats:
|
|
5807
|
+
* - Specific types: `"image/png"`, `"application/pdf"`
|
|
5808
|
+
* - Wildcard categories: `"image/*"`, `"video/*"`
|
|
5809
|
+
* - Bare categories (shorthand for wildcard): `"image"`, `"video"`
|
|
5810
|
+
*
|
|
5811
|
+
* The `string & {}` escape hatch allows unlisted MIME types while
|
|
5812
|
+
* still providing autocomplete for known ones.
|
|
5813
|
+
*/
|
|
5814
|
+
declare type MimeType_2 = "image" | "video" | "audio" | "text" | "application" | "image/*" | "video/*" | "audio/*" | "text/*" | "application/*" | "image/jpeg" | "image/png" | "image/gif" | "image/webp" | "image/svg+xml" | "image/heic" | "image/bmp" | "image/tiff" | "image/avif" | "video/mp4" | "video/webm" | "video/quicktime" | "audio/mpeg" | "audio/ogg" | "audio/wav" | "application/pdf" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/zip" | "application/json" | "text/plain" | "text/csv" | "text/html" | "text/markdown";
|
|
5815
|
+
export { MimeType_2 as MimeType }
|
|
5816
|
+
|
|
5659
5817
|
declare const moduleAvatarVariants: (props?: ({
|
|
5660
5818
|
size?: "lg" | "md" | "sm" | "xs" | "xxs" | undefined;
|
|
5661
5819
|
} & ({
|
|
@@ -7598,6 +7756,22 @@ export declare interface UseF0FormReturn {
|
|
|
7598
7756
|
hasErrors: boolean;
|
|
7599
7757
|
}
|
|
7600
7758
|
|
|
7759
|
+
/**
|
|
7760
|
+
* A hook that returns upload capabilities for a single file.
|
|
7761
|
+
* Each call creates an independent upload instance with its own state.
|
|
7762
|
+
*
|
|
7763
|
+
* @example
|
|
7764
|
+
* ```tsx
|
|
7765
|
+
* const useMyUpload: UseFileUpload = () => {
|
|
7766
|
+
* const { upload, progress, status, cancelUpload } = useDirectUpload({
|
|
7767
|
+
* resourceType: "MyModule::Document",
|
|
7768
|
+
* })
|
|
7769
|
+
* return { upload, progress, status, cancelUpload }
|
|
7770
|
+
* }
|
|
7771
|
+
* ```
|
|
7772
|
+
*/
|
|
7773
|
+
export declare type UseFileUpload = () => FileUploadHookReturn;
|
|
7774
|
+
|
|
7601
7775
|
export declare const useGroups: <R extends RecordType>(groups: GroupRecord<R>[], defaultOpenGroups?: boolean | GroupRecord<R>["key"][]) => {
|
|
7602
7776
|
openGroups: Record<string, boolean>;
|
|
7603
7777
|
setGroupOpen: (key: string, open: boolean) => void;
|
|
@@ -7933,6 +8107,11 @@ declare module "gridstack" {
|
|
|
7933
8107
|
}
|
|
7934
8108
|
|
|
7935
8109
|
|
|
8110
|
+
declare namespace Calendar {
|
|
8111
|
+
var displayName: string;
|
|
8112
|
+
}
|
|
8113
|
+
|
|
8114
|
+
|
|
7936
8115
|
declare module "@tiptap/core" {
|
|
7937
8116
|
interface Commands<ReturnType> {
|
|
7938
8117
|
aiBlock: {
|
|
@@ -7980,8 +8159,3 @@ declare module "@tiptap/core" {
|
|
|
7980
8159
|
};
|
|
7981
8160
|
}
|
|
7982
8161
|
}
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
declare namespace Calendar {
|
|
7986
|
-
var displayName: string;
|
|
7987
|
-
}
|