@factorialco/f0-react 1.422.2 → 1.423.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.
@@ -1,7 +1,7 @@
1
1
  import { defaultTranslations as ke } from "./i18n-provider-defaults.js";
2
2
  import { jsx as q, jsxs as le } from "react/jsx-runtime";
3
3
  import { useInsertionEffect as Xe, createContext as Ye, useContext as $e, useRef as B, useEffect as ie, useState as Ue, useCallback as qe, useMemo as He } from "react";
4
- import { r as Ke, l as je, m as Qe, n as Je, o as Me, p as Ze, q as et, s as tt, t as rt, v as nt, w as Ne, x as ot, V as it, y as st, z as at, A as ct, S as ut, H as lt, B as se, D as ft, E as dt, G as ht, J as mt, K as pt, L as vt, M as fe, N as gt } from "./registry-DaCnOJvo.js";
4
+ import { r as Ke, l as je, m as Qe, n as Je, o as Me, p as Ze, q as et, s as tt, t as rt, v as nt, w as Ne, x as ot, V as it, y as st, z as at, A as ct, S as ut, H as lt, B as se, D as ft, E as dt, G as ht, J as mt, K as pt, L as vt, M as fe, N as gt } from "./registry-Cfsd-zAT.js";
5
5
  import { useTrackVolume as wt } from "@livekit/components-react";
6
6
  function Tt(t, e, r) {
7
7
  Xe(() => t.on(e, r), [t, e, r]);
package/dist/ai.d.ts CHANGED
@@ -1198,6 +1198,7 @@ export declare const defaultTranslations: {
1198
1198
  readonly link: "Link";
1199
1199
  readonly date: "Date";
1200
1200
  readonly dropdownSingle: "Dropdown";
1201
+ readonly file: "File upload";
1201
1202
  };
1202
1203
  readonly selectQuestion: {
1203
1204
  readonly addOption: "Add option";
@@ -1207,6 +1208,9 @@ export declare const defaultTranslations: {
1207
1208
  readonly correct: "Correct";
1208
1209
  readonly optionPlaceholder: "Type anything you want here...";
1209
1210
  };
1211
+ readonly fileQuestion: {
1212
+ readonly uploadButton: "Upload file";
1213
+ };
1210
1214
  readonly answer: {
1211
1215
  readonly label: "Answer";
1212
1216
  readonly dropdownPlaceholder: "Pick an option";
@@ -1785,11 +1789,6 @@ declare module "gridstack" {
1785
1789
  }
1786
1790
 
1787
1791
 
1788
- declare namespace Calendar {
1789
- var displayName: string;
1790
- }
1791
-
1792
-
1793
1792
  declare module "@tiptap/core" {
1794
1793
  interface Commands<ReturnType> {
1795
1794
  aiBlock: {
@@ -1837,3 +1836,8 @@ declare module "@tiptap/core" {
1837
1836
  };
1838
1837
  }
1839
1838
  }
1839
+
1840
+
1841
+ declare namespace Calendar {
1842
+ var displayName: string;
1843
+ }
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { i as t, h as i, F as e, a as n, C as o, b as r, j as A, k as c, I as u, g as F, c as h, d as C, u as l, f as I, e as f } from "./registry-DaCnOJvo.js";
1
+ import { i as t, h as i, F as e, a as n, C as o, b as r, j as A, k as c, I as u, g as F, c as h, d as C, u as l, f as I, e as f } from "./registry-Cfsd-zAT.js";
2
2
  import { defaultTranslations as d } from "./i18n-provider-defaults.js";
3
- import { A as p, F as S, c as g, d as v, b as x, a as k, o as O, u as P } from "./F0HILActionConfirmation-DaU9NaIl.js";
3
+ import { A as p, F as S, c as g, d as v, b as x, a as k, o as O, u as P } from "./F0HILActionConfirmation-CcDsCCLa.js";
4
4
  export {
5
5
  p as AiChatTranslationsProvider,
6
6
  t as ChatSpinner,
@@ -2754,6 +2754,7 @@ declare const defaultTranslations: {
2754
2754
  readonly link: "Link";
2755
2755
  readonly date: "Date";
2756
2756
  readonly dropdownSingle: "Dropdown";
2757
+ readonly file: "File upload";
2757
2758
  };
2758
2759
  readonly selectQuestion: {
2759
2760
  readonly addOption: "Add option";
@@ -2763,6 +2764,9 @@ declare const defaultTranslations: {
2763
2764
  readonly correct: "Correct";
2764
2765
  readonly optionPlaceholder: "Type anything you want here...";
2765
2766
  };
2767
+ readonly fileQuestion: {
2768
+ readonly uploadButton: "Upload file";
2769
+ };
2766
2770
  readonly answer: {
2767
2771
  readonly label: "Answer";
2768
2772
  readonly dropdownPlaceholder: "Pick an option";
@@ -7207,11 +7211,6 @@ declare module "gridstack" {
7207
7211
  }
7208
7212
 
7209
7213
 
7210
- declare namespace Calendar {
7211
- var displayName: string;
7212
- }
7213
-
7214
-
7215
7214
  declare module "@tiptap/core" {
7216
7215
  interface Commands<ReturnType> {
7217
7216
  aiBlock: {
@@ -7259,3 +7258,8 @@ declare module "@tiptap/core" {
7259
7258
  };
7260
7259
  }
7261
7260
  }
7261
+
7262
+
7263
+ declare namespace Calendar {
7264
+ var displayName: string;
7265
+ }
@@ -1,10 +1,10 @@
1
- import { cH as mf, a7 as _r, b6 as gf, a6 as bf, cI as wf, cJ as xf, a1 as yf, cK as Co, cL as er, cM as vf, cN as _s, cO as ji, cP as Er, K as k, R as q, L as rt, u as me, cQ as kf, cR as Cf, cS as Sf, cT as Nf, cU as If, ak as Le, cV as Af, a0 as Et, cW as _f, b7 as Ef, _ as H, bf as Tf, bg as Df, U as jt, cX as ba, bs as Rf, bh as Lf, M as B, cY as Es, Z as E, cZ as it, c_ as Of, c$ as Mf, bn as Pf, ay as Ff, bl as zf, aH as Ht, d0 as wa, d1 as $f, d2 as Tt, aZ as kn, aA as Ts, aB as cn, k as xa, a4 as mt, d3 as ya, d4 as Bf, d5 as So, d6 as tn, d7 as Ds, d8 as jn, d9 as Tr, da as jf, db as va, dc as Hf, dd as Rs, de as Cn, df as Re, dg as Vf, dh as Wf, di as kt, dj as bi, dk as Uf, dl as yn, dm as Kt, dn as Gf, P as de, dp as Kf, dq as qf, dr as Jf, ds as Yf, dt as Xf, W as Je, Y as ue, du as Ls, aV as Hn, cE as Zr, dv as ka, dw as Os, dx as Zf, dy as Qf, dz as eh, dA as th, dB as nh, dC as rh, dD as ih, dE as sh, dF as oh, ba as lh, dG as ah, b8 as ch, dH as dh, dI as uh, dJ as fh, dK as hh, dL as ph, dM as mh, dN as gh, dO as bh, c2 as nt, dP as Ca, dQ as wh, a3 as V, N as Sa, dR as Na, dS as xh, b1 as Ms, a8 as No, a9 as Io, as as yh, dT as vh, dU as kh, am as dn, dV as Ch, dW as Sh, dX as Nh, dY as Ih, aQ as Qr, dZ as Ia, d_ as Aa, c4 as _a, d$ as Ah, aJ as Dr, e0 as _h, e1 as Eh, e2 as Th, e3 as Dh, e4 as Rh, ai as Lh, aj as Oh, al as Mh, e5 as Ph, e6 as Ea, e7 as Fh, e8 as Ta, e9 as zh, ea as $h, eb as Bh, ax as Ao, ec as Da, ed as Hi, b$ as Vi, ee as Ra, ef as jh, eg as Hh, cD as Vn, bD as La, cG as Vh, cF as Wh, eh as Uh, bE as nn, ei as Gh, aN as tr, ej as _o, ek as Wi, el as Kh, bm as qh, em as Jh, bZ as Oa, c3 as Yh, cf as Ma, cd as Ps, ae as Xh, cg as Zh, c0 as Fs, av as Pa, c as Fa, g as Qh, a as ep, bV as tp, en as za, eo as np, F as rp, ep as $a, eq as Ba, er as ip, bw as Eo, es as sp, et as op, bX as lp, bu as ja, bx as ap, eu as cp, ev as dp, ew as up, ex as fp, bY as Ha, $ as hp, Q as st, bJ as zs, ey as $s, ez as Bs, eA as Va, bK as js, eB as Wa, eC as pp, eD as mp, eE as gp, eF as bp, eG as wp, bL as xp, eH as yp, b_ as vp, eI as kp, eJ as To, eK as Do, eL as Ro, a$ as Cp, eM as Sp, eN as Np, bc as Ip, eO as Ua, bC as Ap, eP as _p, eQ as Ep } from "./registry-DaCnOJvo.js";
2
- import { eU as WI, eT as UI, eR as GI, aE as KI, eS as qI, f0 as JI, f1 as YI, f3 as XI, f7 as ZI, f8 as QI, aK as eA, eW as tA, eV as nA, f2 as rA, e$ as iA, eY as sA, e_ as oA, eX as lA, c1 as aA, eZ as cA, f4 as dA, f5 as uA, f6 as fA } from "./registry-DaCnOJvo.js";
1
+ import { cH as mf, a7 as _r, b6 as gf, a6 as bf, cI as wf, cJ as xf, a1 as yf, cK as Co, cL as er, cM as vf, cN as _s, cO as ji, cP as Er, K as k, R as q, L as rt, u as me, cQ as kf, cR as Cf, cS as Sf, cT as Nf, cU as If, ak as Le, cV as Af, a0 as Et, cW as _f, b7 as Ef, _ as H, bf as Tf, bg as Df, U as jt, cX as ba, bs as Rf, bh as Lf, M as B, cY as Es, Z as E, cZ as it, c_ as Of, c$ as Mf, bn as Pf, ay as Ff, bl as zf, aH as Ht, d0 as wa, d1 as $f, d2 as Tt, aZ as kn, aA as Ts, aB as cn, k as xa, a4 as mt, d3 as ya, d4 as Bf, d5 as So, d6 as tn, d7 as Ds, d8 as jn, d9 as Tr, da as jf, db as va, dc as Hf, dd as Rs, de as Cn, df as Re, dg as Vf, dh as Wf, di as kt, dj as bi, dk as Uf, dl as yn, dm as Kt, dn as Gf, P as de, dp as Kf, dq as qf, dr as Jf, ds as Yf, dt as Xf, W as Je, Y as ue, du as Ls, aV as Hn, cE as Zr, dv as ka, dw as Os, dx as Zf, dy as Qf, dz as eh, dA as th, dB as nh, dC as rh, dD as ih, dE as sh, dF as oh, ba as lh, dG as ah, b8 as ch, dH as dh, dI as uh, dJ as fh, dK as hh, dL as ph, dM as mh, dN as gh, dO as bh, c2 as nt, dP as Ca, dQ as wh, a3 as V, N as Sa, dR as Na, dS as xh, b1 as Ms, a8 as No, a9 as Io, as as yh, dT as vh, dU as kh, am as dn, dV as Ch, dW as Sh, dX as Nh, dY as Ih, aQ as Qr, dZ as Ia, d_ as Aa, c4 as _a, d$ as Ah, aJ as Dr, e0 as _h, e1 as Eh, e2 as Th, e3 as Dh, e4 as Rh, ai as Lh, aj as Oh, al as Mh, e5 as Ph, e6 as Ea, e7 as Fh, e8 as Ta, e9 as zh, ea as $h, eb as Bh, ax as Ao, ec as Da, ed as Hi, b$ as Vi, ee as Ra, ef as jh, eg as Hh, cD as Vn, bD as La, cG as Vh, cF as Wh, eh as Uh, bE as nn, ei as Gh, aN as tr, ej as _o, ek as Wi, el as Kh, bm as qh, em as Jh, bZ as Oa, c3 as Yh, cf as Ma, cd as Ps, ae as Xh, cg as Zh, c0 as Fs, av as Pa, c as Fa, g as Qh, a as ep, bV as tp, en as za, eo as np, F as rp, ep as $a, eq as Ba, er as ip, bw as Eo, es as sp, et as op, bX as lp, bu as ja, bx as ap, eu as cp, ev as dp, ew as up, ex as fp, bY as Ha, $ as hp, Q as st, bJ as zs, ey as $s, ez as Bs, eA as Va, bK as js, eB as Wa, eC as pp, eD as mp, eE as gp, eF as bp, eG as wp, bL as xp, eH as yp, b_ as vp, eI as kp, eJ as To, eK as Do, eL as Ro, a$ as Cp, eM as Sp, eN as Np, bc as Ip, eO as Ua, bC as Ap, eP as _p, eQ as Ep } from "./registry-Cfsd-zAT.js";
2
+ import { eU as WI, eT as UI, eR as GI, aE as KI, eS as qI, f0 as JI, f1 as YI, f3 as XI, f7 as ZI, f8 as QI, aK as eA, eW as tA, eV as nA, f2 as rA, e$ as iA, eY as sA, e_ as oA, eX as lA, c1 as aA, eZ as cA, f4 as dA, f5 as uA, f6 as fA } from "./registry-Cfsd-zAT.js";
3
3
  import { jsx as c, jsxs as g, Fragment as ne } from "react/jsx-runtime";
4
4
  import * as Sn from "react";
5
5
  import z, { PureComponent as Tp, forwardRef as P, useRef as K, useTransition as Dp, useState as L, useLayoutEffect as Ga, useContext as Hs, createContext as Vs, useCallback as X, useMemo as ee, useEffect as W, useId as Ka, useImperativeHandle as qa, memo as Ja, Fragment as Rp, isValidElement as Lp, cloneElement as Ya, Children as Xa } from "react";
6
- import { f as Jt, ad as Nn, e as nr, ae as Op, L as wi, af as Mp, A as Pp, i as rr, k as Fp, G as zp, g as Lo, ag as $p, j as Oo, n as Bp, ah as Za, ai as Qa, aj as jp, C as Hp, ab as Vp, ak as je, al as ot, am as Ee, an as Wp, ao as gr, ap as Ue, aq as ec, ar as Me, as as Ws, at as $e, au as Mo, av as Up, aw as tc, ax as Ie, ay as Fe, az as In, aA as Rr, aB as nc, aC as Gp, aD as Vt, aE as Kp, aF as qp, aG as Jp, aH as Wn, aI as Un, aJ as Us, aK as Yp, aL as rc, aM as ic, aN as sc, aO as Xp, aP as oc, aQ as lc, aR as ac, aS as cc, aT as dc, aU as uc, a4 as Po, aV as Zp, aW as Fo, aX as Qp, aY as em, aZ as tm, w as nm, x as rm, z as im, J as sm, K as om, s as lm, a_ as fc, a$ as am, b0 as cm, b1 as dm, b2 as hc, a8 as Ui, b3 as um, b4 as fm, b5 as hm, b6 as pm, b7 as mm, b8 as gm, b9 as bm, a0 as wm, ba as xm, bb as ym, bc as vm, bd as km, ac as pc, M as Cm, N as Sm, P as Nm, Q as Im, V as Am, O as _m, be as zo, bf as Em, bg as Tm, l as Dm } from "./index-BZwDDrii.js";
7
- import { a6 as pA, Z as mA, a1 as gA, R as bA, $ as wA, bk as xA, bj as yA, bh as vA, bi as kA, T as CA, a5 as SA, U as NA, _ as IA, W as AA, a9 as _A, aa as EA } from "./index-BZwDDrii.js";
6
+ import { f as Jt, ad as Nn, e as nr, ae as Op, L as wi, af as Mp, A as Pp, i as rr, k as Fp, G as zp, g as Lo, ag as $p, j as Oo, n as Bp, ah as Za, ai as Qa, aj as jp, C as Hp, ab as Vp, ak as je, al as ot, am as Ee, an as Wp, ao as gr, ap as Ue, aq as ec, ar as Me, as as Ws, at as $e, au as Mo, av as Up, aw as tc, ax as Ie, ay as Fe, az as In, aA as Rr, aB as nc, aC as Gp, aD as Vt, aE as Kp, aF as qp, aG as Jp, aH as Wn, aI as Un, aJ as Us, aK as Yp, aL as rc, aM as ic, aN as sc, aO as Xp, aP as oc, aQ as lc, aR as ac, aS as cc, aT as dc, aU as uc, a4 as Po, aV as Zp, aW as Fo, aX as Qp, aY as em, aZ as tm, w as nm, x as rm, z as im, J as sm, K as om, s as lm, a_ as fc, a$ as am, b0 as cm, b1 as dm, b2 as hc, a8 as Ui, b3 as um, b4 as fm, b5 as hm, b6 as pm, b7 as mm, b8 as gm, b9 as bm, a0 as wm, ba as xm, bb as ym, bc as vm, bd as km, ac as pc, M as Cm, N as Sm, P as Nm, Q as Im, V as Am, O as _m, be as zo, bf as Em, bg as Tm, l as Dm } from "./index-DtTD2awb.js";
7
+ import { a6 as pA, Z as mA, a1 as gA, R as bA, $ as wA, bk as xA, bj as yA, bh as vA, bi as kA, T as CA, a5 as SA, U as NA, _ as IA, W as AA, a9 as _A, aa as EA } from "./index-DtTD2awb.js";
8
8
  import './experimental.css';const Rm = mf("Search", [
9
9
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
10
10
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
package/dist/f0.d.ts CHANGED
@@ -3304,6 +3304,7 @@ export declare const defaultTranslations: {
3304
3304
  readonly link: "Link";
3305
3305
  readonly date: "Date";
3306
3306
  readonly dropdownSingle: "Dropdown";
3307
+ readonly file: "File upload";
3307
3308
  };
3308
3309
  readonly selectQuestion: {
3309
3310
  readonly addOption: "Add option";
@@ -3313,6 +3314,9 @@ export declare const defaultTranslations: {
3313
3314
  readonly correct: "Correct";
3314
3315
  readonly optionPlaceholder: "Type anything you want here...";
3315
3316
  };
3317
+ readonly fileQuestion: {
3318
+ readonly uploadButton: "Upload file";
3319
+ };
3316
3320
  readonly answer: {
3317
3321
  readonly label: "Answer";
3318
3322
  readonly dropdownPlaceholder: "Pick an option";
@@ -6739,6 +6743,14 @@ declare type FileDef = {
6739
6743
  */
6740
6744
  declare type FileFieldRenderIf = CommonRenderIfCondition | F0BaseFieldRenderIfFunction;
6741
6745
 
6746
+ declare type FileQuestionProps = BaseQuestionPropsForOtherQuestionComponents & {
6747
+ type: "file";
6748
+ value?: string[] | null;
6749
+ useUpload?: UseFileUpload;
6750
+ accept?: MimeType_2[];
6751
+ maxSizeMB?: number;
6752
+ };
6753
+
6742
6754
  /**
6743
6755
  * Return type of the consumer-provided upload hook
6744
6756
  */
@@ -8330,6 +8342,9 @@ declare type OnChangeQuestionParams = BaseQuestionOnChangeParams & ({
8330
8342
  } | {
8331
8343
  type: "date";
8332
8344
  value?: Date | null;
8345
+ } | {
8346
+ type: "file";
8347
+ value?: string[] | null;
8333
8348
  });
8334
8349
 
8335
8350
  export declare type OnChangeSectionParams = {
@@ -8835,11 +8850,13 @@ export declare type QuestionElement = Omit<TextQuestionProps, QuestionPropsToOmi
8835
8850
  type: "link";
8836
8851
  }, QuestionPropsToOmit> | Omit<DateQuestionProps & {
8837
8852
  type: "date";
8853
+ }, QuestionPropsToOmit> | Omit<FileQuestionProps & {
8854
+ type: "file";
8838
8855
  }, QuestionPropsToOmit>;
8839
8856
 
8840
8857
  declare type QuestionPropsToOmit = "onAction" | "onChange" | "onAddNewElement";
8841
8858
 
8842
- export declare type QuestionType = "rating" | "select" | "multi-select" | "dropdown-single" | "text" | "longText" | "numeric" | "link" | "date";
8859
+ export declare type QuestionType = "rating" | "select" | "multi-select" | "dropdown-single" | "text" | "longText" | "numeric" | "link" | "date" | "file";
8843
8860
 
8844
8861
  export declare interface RadarChartConfig {
8845
8862
  type: "radar";
@@ -9359,7 +9376,7 @@ declare type SummaryKey<Definition extends SummariesDefinition> = Definition ext
9359
9376
 
9360
9377
  declare type SummaryType = "sum";
9361
9378
 
9362
- export declare function SurveyAnsweringForm({ elements, onSubmit: onSubmitProp, mode, title, description, resourceHeader, isOpen, onClose, position: positionProp, module, allowToChangeFullscreen, defaultValues, errorTriggerMode, loading, labels, preview, }: SurveyAnsweringFormProps): JSX_2.Element;
9379
+ export declare function SurveyAnsweringForm({ elements, onSubmit: onSubmitProp, mode, title, description, resourceHeader, isOpen, onClose, position: positionProp, module, allowToChangeFullscreen, defaultValues, errorTriggerMode, loading, labels, preview, useUpload, }: SurveyAnsweringFormProps): JSX_2.Element;
9363
9380
 
9364
9381
  declare interface SurveyAnsweringFormBaseProps {
9365
9382
  elements: SurveyFormBuilderElement[];
@@ -9375,6 +9392,7 @@ declare interface SurveyAnsweringFormBaseProps {
9375
9392
  defaultValues?: Partial<SurveyAnswers>;
9376
9393
  errorTriggerMode?: F0FormErrorTriggerMode;
9377
9394
  loading?: boolean;
9395
+ useUpload?: UseFileUpload;
9378
9396
  labels?: {
9379
9397
  empty?: {
9380
9398
  title?: string;
@@ -9430,9 +9448,12 @@ export declare type SurveyAnswerValue = {
9430
9448
  } | {
9431
9449
  type: "date";
9432
9450
  value: Date | null;
9451
+ } | {
9452
+ type: "file";
9453
+ value: string[] | null;
9433
9454
  };
9434
9455
 
9435
- export declare const SurveyFormBuilder: WithDataTestIdReturnType_7<({ elements: elementsProp, disabled, onChange, disallowOptionalQuestions, allowedQuestionTypes, applyingChanges, }: SurveyFormBuilderProps) => JSX_2.Element>;
9456
+ export declare const SurveyFormBuilder: WithDataTestIdReturnType_7<({ elements: elementsProp, disabled, onChange, disallowOptionalQuestions, allowedQuestionTypes, applyingChanges, useUpload, }: SurveyFormBuilderProps) => JSX_2.Element>;
9436
9457
 
9437
9458
  export declare type SurveyFormBuilderCallbacks = {
9438
9459
  onQuestionChange?: (params: OnChangeQuestionParams) => void;
@@ -9456,6 +9477,7 @@ export declare type SurveyFormBuilderProps = {
9456
9477
  disallowOptionalQuestions?: boolean;
9457
9478
  allowedQuestionTypes?: QuestionType[];
9458
9479
  applyingChanges?: boolean;
9480
+ useUpload?: UseFileUpload;
9459
9481
  };
9460
9482
 
9461
9483
  export declare type SurveyFormSubmitResult = {
@@ -10790,11 +10812,6 @@ declare module "gridstack" {
10790
10812
  }
10791
10813
 
10792
10814
 
10793
- declare namespace Calendar {
10794
- var displayName: string;
10795
- }
10796
-
10797
-
10798
10815
  declare module "@tiptap/core" {
10799
10816
  interface Commands<ReturnType> {
10800
10817
  aiBlock: {
@@ -10842,3 +10859,8 @@ declare module "@tiptap/core" {
10842
10859
  };
10843
10860
  }
10844
10861
  }
10862
+
10863
+
10864
+ declare namespace Calendar {
10865
+ var displayName: string;
10866
+ }