@factorialco/f0-react 6.2.1 → 6.3.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.
@@ -3,8 +3,8 @@ import { cX as l1, cW as c1, d7 as d1, cT as u1, cU as f1, cN as m1, cO as h1, c
3
3
  import { jsx as n, jsxs as h, Fragment as Fe } from "react/jsx-runtime";
4
4
  import Y, { forwardRef as Oe, useRef as O, useTransition as gu, useState as B, useLayoutEffect as Hn, useId as Ln, useContext as zt, createContext as ht, useEffect as q, useCallback as U, useMemo as de, Fragment as _t, isValidElement as bu, cloneElement as hs, Suspense as Lr, lazy as sn, createElement as or, memo as ps, Children as gs } from "react";
5
5
  import { d as k, T as vu, a as xu, b as yu, f as qe, c as wu, u as Nu } from "./tooltip-Cik7KBQT.js";
6
- import { C as Cu, P as Iu, E as ku, a as Uo, b as Wn, M as Su, p as Tu, c as Ru, R as Ri, e as bs, u as Eu, f as Lu, g as zu, h as Au, i as Fu, j as Pu, O as vs, k as xs, S as Mu, A as Ou, B as Du, L as Bu, l as _u, V as $u, m as Hu, n as Wu, o as ju } from "./index-I-IS7yrG.js";
7
- import { a5 as _1, a6 as $1, v as H1, w as W1, s as j1, N as U1, x as V1, H as G1, ag as K1, K as q1, t as Y1, a3 as X1, ai as J1, ah as Q1, X as Z1, al as ey, F as ty, a0 as ny, Z as ry, T as oy, an as iy, U as ay, a1 as sy, a2 as ly, y as cy, aj as dy, ak as uy, W as fy, a4 as my, ad as hy, af as py, z as gy, G as by, I as vy, _ as xy, am as yy, $ as wy, Y as Ny, ao as Cy, D as Iy, J as ky, q as Sy, r as Ty, a9 as Ry, aa as Ey, a7 as Ly, ae as zy, Q as Ay, ab as Fy, a8 as Py, ac as My } from "./index-I-IS7yrG.js";
6
+ import { C as Cu, P as Iu, E as ku, a as Uo, b as Wn, M as Su, p as Tu, c as Ru, R as Ri, e as bs, u as Eu, f as Lu, g as zu, h as Au, i as Fu, j as Pu, O as vs, k as xs, S as Mu, A as Ou, B as Du, L as Bu, l as _u, V as $u, m as Hu, n as Wu, o as ju } from "./index-BONXxGHX.js";
7
+ import { a5 as _1, a6 as $1, v as H1, w as W1, s as j1, N as U1, x as V1, H as G1, ag as K1, K as q1, t as Y1, a3 as X1, ai as J1, ah as Q1, X as Z1, al as ey, F as ty, a0 as ny, Z as ry, T as oy, an as iy, U as ay, a1 as sy, a2 as ly, y as cy, aj as dy, ak as uy, W as fy, a4 as my, ad as hy, af as py, z as gy, G as by, I as vy, _ as xy, am as yy, $ as wy, Y as Ny, ao as Cy, D as Iy, J as ky, q as Sy, r as Ty, a9 as Ry, aa as Ey, a7 as Ly, ae as zy, Q as Ay, ab as Fy, a8 as Py, ac as My } from "./index-BONXxGHX.js";
8
8
  import Uu from "react-dom";
9
9
  const Vu = mc("Search", [
10
10
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
@@ -7911,7 +7911,7 @@ const ul = () => Vt(rl, "useChatJump"), Zh = () => Vt(ol, "useChatHighlightedId"
7911
7911
  }, Mr = (e, t) => {
7912
7912
  const r = document.createElement("a");
7913
7913
  r.href = e, r.download = t, r.rel = "noreferrer", r.click();
7914
- }, rp = sn(() => import("./ChatPdfThumbnail-CzuQkZFw.js")), op = sn(() => import("./ChatSheetThumbnail-BvnxT-4A.js")), ip = sn(() => import("./ChatDocxThumbnail-DzNPNFya.js")), ap = sn(() => import("./ChatTextThumbnail-yVt_iYi7.js")), sp = 288, lp = 160, cp = (e) => {
7914
+ }, rp = sn(() => import("./ChatPdfThumbnail-BLCNW9tn.js")), op = sn(() => import("./ChatSheetThumbnail-BvnxT-4A.js")), ip = sn(() => import("./ChatDocxThumbnail-DzNPNFya.js")), ap = sn(() => import("./ChatTextThumbnail-yVt_iYi7.js")), sp = 288, lp = 160, cp = (e) => {
7915
7915
  const [t, r] = B(!1);
7916
7916
  return q(() => {
7917
7917
  const o = e.current;
@@ -9954,7 +9954,7 @@ const Tp = {
9954
9954
  ] })
9955
9955
  ] }) });
9956
9956
  }, _p = sn(
9957
- () => import("./index-C6WEXI8t.js").then((e) => e.i).then((e) => ({
9957
+ () => import("./index-QfL3G68m.js").then((e) => e.i).then((e) => ({
9958
9958
  default: e.F0PdfViewer
9959
9959
  }))
9960
9960
  ), $p = () => {
package/dist/f0.d.ts CHANGED
@@ -16797,7 +16797,7 @@ export declare type SurveyDataset = {
16797
16797
 
16798
16798
  export declare type SurveyDatasets = Record<string, SurveyDataset>;
16799
16799
 
16800
- export declare const SurveyFormBuilder: WithDataTestIdReturnType_8<({ elements: elementsProp, disabled, onChange, disallowOptionalQuestions, allowedQuestionTypes, applyingChanges, useUpload, datasets, }: SurveyFormBuilderProps) => JSX_2.Element>;
16800
+ export declare const SurveyFormBuilder: WithDataTestIdReturnType_8<({ elements: elementsProp, disabled, onChange, disallowOptionalQuestions, allowedQuestionTypes, applyingChanges, useUpload, datasets, placeholders, labels, skipDefaultSection, }: SurveyFormBuilderProps) => JSX_2.Element>;
16801
16801
 
16802
16802
  export declare type SurveyFormBuilderCallbacks = {
16803
16803
  onQuestionChange?: (params: OnChangeQuestionParams) => void;
@@ -16814,6 +16814,22 @@ export declare type SurveyFormBuilderElement = {
16814
16814
  question: QuestionElement;
16815
16815
  };
16816
16816
 
16817
+ export declare type SurveyFormBuilderLabels = {
16818
+ /** Overrides the label/tooltip of the "add" buttons (default: "Add question"). */
16819
+ addQuestion?: string;
16820
+ };
16821
+
16822
+ export declare type SurveyFormBuilderPlaceholders = {
16823
+ /** Overrides the default "Question title" placeholder shown on empty questions. */
16824
+ questionTitle?: string;
16825
+ /** Overrides the default "Section title" placeholder shown on empty sections. */
16826
+ sectionTitle?: string;
16827
+ /** Overrides the default question description placeholder (pass "" to hide the hint). */
16828
+ questionDescription?: string;
16829
+ /** Overrides the default text-answer preview placeholder (pass "" to hide the hint). */
16830
+ answer?: string;
16831
+ };
16832
+
16817
16833
  export declare type SurveyFormBuilderProps = {
16818
16834
  elements: SurveyFormBuilderElement[];
16819
16835
  onChange: (elements: SurveyFormBuilderElement[]) => void;
@@ -16823,6 +16839,16 @@ export declare type SurveyFormBuilderProps = {
16823
16839
  applyingChanges?: boolean;
16824
16840
  useUpload?: UseFileUpload;
16825
16841
  datasets?: SurveyDatasets;
16842
+ /** Per-instance overrides for the builder's title placeholders. Falls back to i18n defaults. */
16843
+ placeholders?: SurveyFormBuilderPlaceholders;
16844
+ /** Per-instance overrides for the builder's action labels. Falls back to i18n defaults. */
16845
+ labels?: SurveyFormBuilderLabels;
16846
+ /**
16847
+ * When true, an empty builder does NOT auto-insert a default section on mount,
16848
+ * letting the consumer start from a blank form. Defaults to the legacy behaviour
16849
+ * (a section is created).
16850
+ */
16851
+ skipDefaultSection?: boolean;
16826
16852
  };
16827
16853
 
16828
16854
  export declare type SurveyFormSubmitResult = {