@factorialco/f0-react 3.9.0 → 3.10.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.
@@ -82552,15 +82552,18 @@ const Li = B1(RJ), IJ = Z(
82552
82552
  );
82553
82553
  IJ.displayName = "F0TagPerson";
82554
82554
  const jJ = B1(IJ), WJ = Z(
82555
- ({ text: e, additionalAccessibleText: t, icon: n, onlyIcon: r, info: o }, i) => ($0(
82555
+ ({ text: e, additionalAccessibleText: t, icon: n, onlyIcon: r, info: o, className: i }, s) => ($0(
82556
82556
  e,
82557
82557
  { disallowEmpty: !0 },
82558
82558
  { componentName: "F0TagRaw" }
82559
82559
  ), /* @__PURE__ */ a(
82560
82560
  E9,
82561
82561
  {
82562
- ref: i,
82563
- className: "border-[1px] border-solid border-f1-border-secondary",
82562
+ ref: s,
82563
+ className: r2(
82564
+ "border-[1px] border-solid border-f1-border-secondary",
82565
+ i
82566
+ ),
82564
82567
  left: n ? /* @__PURE__ */ a(
82565
82568
  m1,
82566
82569
  {
package/dist/ai.d.ts CHANGED
@@ -2348,6 +2348,9 @@ export declare const defaultTranslations: {
2348
2348
  readonly questionType: "Question type";
2349
2349
  readonly questionOptions: "Question options";
2350
2350
  readonly actions: "Actions";
2351
+ readonly locked: "Locked";
2352
+ readonly lockedSectionNotice: "These questions are predefined and can't be edited, moved, or removed.";
2353
+ readonly lockedQuestionNotice: "This question is predefined and can't be edited or removed.";
2351
2354
  readonly sectionTitlePlaceholder: "Section title";
2352
2355
  readonly lastQuestionDialogTitle: "Remove last question from section";
2353
2356
  readonly lastQuestionDialogDescription: "Moving this question will leave the section empty and it will be removed. Do you want to continue?";
@@ -3644,6 +3647,10 @@ declare type F0TagRawProps = {
3644
3647
  * Info text to display an i icon and a tooltip next to the tag
3645
3648
  */
3646
3649
  info?: string;
3650
+ /**
3651
+ * Extra classes merged onto the tag (e.g. to give it a background).
3652
+ */
3653
+ className?: string;
3647
3654
  } & ({
3648
3655
  icon: IconType;
3649
3656
  onlyIcon: true;
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { C as e, D as r, c as t, F as o, a as i, f as n, g as F, d as C, e as A, I as l, P as d, b as u, u as m } from "./F0CanvasPanel-CH3MV6yL.js";
1
+ import { C as e, D as r, c as t, F as o, a as i, f as n, g as F, d as C, e as A, I as l, P as d, b as u, u as m } from "./F0CanvasPanel-BvLSkRnA.js";
2
2
  import { defaultTranslations as c } from "./i18n-provider-defaults.js";
3
- import { A as P, s as v, t as f, w as g, l as p, i as T, q as y, x as S, p as x, r as H, j as V, e as b, g as k, k as w, F as M, h as O, a as D, n as j, m as q, o as z, b as B, f as E, v as L, c as R, d as G, u as J } from "./useChatHistory-BhXUZia6.js";
3
+ import { A as P, s as v, t as f, w as g, l as p, i as T, q as y, x as S, p as x, r as H, j as V, e as b, g as k, k as w, F as M, h as O, a as D, n as j, m as q, o as z, b as B, f as E, v as L, c as R, d as G, u as J } from "./useChatHistory-BiGAedQR.js";
4
4
  export {
5
5
  P as AiChatTranslationsProvider,
6
6
  e as ChatSpinner,
@@ -3579,6 +3579,9 @@ declare const defaultTranslations: {
3579
3579
  readonly questionType: "Question type";
3580
3580
  readonly questionOptions: "Question options";
3581
3581
  readonly actions: "Actions";
3582
+ readonly locked: "Locked";
3583
+ readonly lockedSectionNotice: "These questions are predefined and can't be edited, moved, or removed.";
3584
+ readonly lockedQuestionNotice: "This question is predefined and can't be edited or removed.";
3582
3585
  readonly sectionTitlePlaceholder: "Section title";
3583
3586
  readonly lastQuestionDialogTitle: "Remove last question from section";
3584
3587
  readonly lastQuestionDialogDescription: "Moving this question will leave the section empty and it will be removed. Do you want to continue?";
@@ -5011,6 +5014,10 @@ declare type F0TagRawProps = {
5011
5014
  * Info text to display an i icon and a tooltip next to the tag
5012
5015
  */
5013
5016
  info?: string;
5017
+ /**
5018
+ * Extra classes merged onto the tag (e.g. to give it a background).
5019
+ */
5020
+ className?: string;
5014
5021
  } & ({
5015
5022
  icon: IconType;
5016
5023
  onlyIcon: true;
@@ -1,9 +1,9 @@
1
- import { h as ga, B as pa, i as ba, j as xa, k as Dt, l as Be, m as Te, n as va, o as b, p as J, q as ye, u as oe, T as ya, r as wa, s as Na, R as Ca, t as Ia, v as ce, w as ka, x as Nt, y as ut, z as Ve, A as Le, E as Sa, G as Fa, H as U, J as Aa, K as La, L as xe, M as mn, N as Oa, O as Pa, Q as H, S as hn, U as z, V as ke, W as Ea, X as _a, Y as Da, Z as Ta, _ as za, $ as Oe, a0 as gn, a1 as Ra, a2 as we, a3 as Ue, a4 as Ba, e as pn, a5 as Ae, a6 as $a, a7 as bn, a8 as ie, a9 as X, aa as xn, ab as vn, ac as Ma, ad as yn, ae as pe, af as ae, ag as Wa, ah as ja, ai as Va, aj as Ua, ak as ve, al as Ye, am as Ha, an as Ga, ao as Ka, ap as qa, aq as Je, ar as wn, as as Ya, at as Ja, au as Za, av as He, aw as Xa, ax as Nn, ay as Qa, az as er, aA as tr, aB as nr, aC as ar, aD as rr, aE as ir, aF as lr, aG as ft, aH as Cn, aI as mt, aJ as In, aK as sr, aL as or, aM as cr, aN as dr, aO as ur, aP as Ze, aQ as Xe, aR as ht, aS as kn, aT as fr, aU as Ct, aV as mr, aW as hr, aX as gr, aY as Re, aZ as pr, a_ as br, a$ as $e, b0 as Tt, b1 as gt, b2 as xr, b3 as vr, a as yr, b as wr, b4 as Sn, b5 as Nr, g as Cr, F as Ir, b6 as kr, b7 as Fn, b8 as Sr, b9 as An, ba as Ln, bb as Fr, bc as Ar, bd as Lr, be as Or, bf as Pr, bg as Er, bh as _r, bi as Dr, bj as Tr, bk as On, bl as zr, bm as Rr, bn as Br, bo as $r, bp as ge, bq as It, br as kt, bs as St, bt as Pn, bu as Ft, bv as En, bw as _n, bx as Mr, by as Wr, bz as jr, bA as Vr, bB as Ur, bC as Hr, bD as Gr, bE as Kr, bF as zt, bG as qr, bH as Yr, bI as Rt, bJ as Bt, bK as $t, bL as Jr, bM as Zr, bN as Xr, bO as Qr, bP as Dn, bQ as ei, bR as ti } from "./F0CanvasPanel-CH3MV6yL.js";
2
- import { c1 as Kc, c0 as qc, cd as Yc, bZ as Jc, b_ as Zc, bS as Xc, cg as Qc, bT as ed, bU as td, ch as nd, b$ as ad, c9 as rd, ca as id, ce as ld, bV as sd, c3 as od, c2 as cd, bW as dd, bX as ud, cb as fd, ci as md, cc as hd, cf as gd, c8 as pd, c5 as bd, c7 as xd, c4 as vd, bY as yd, c6 as wd } from "./F0CanvasPanel-CH3MV6yL.js";
1
+ import { h as ga, B as pa, i as ba, j as xa, k as Dt, l as Be, m as Te, n as va, o as b, p as J, q as ye, u as oe, T as ya, r as wa, s as Na, R as Ca, t as Ia, v as ce, w as ka, x as Nt, y as ut, z as Ve, A as Le, E as Sa, G as Fa, H as U, J as Aa, K as La, L as xe, M as mn, N as Oa, O as Pa, Q as H, S as hn, U as z, V as ke, W as Ea, X as _a, Y as Da, Z as Ta, _ as za, $ as Oe, a0 as gn, a1 as Ra, a2 as we, a3 as Ue, a4 as Ba, e as pn, a5 as Ae, a6 as $a, a7 as bn, a8 as ie, a9 as X, aa as xn, ab as vn, ac as Ma, ad as yn, ae as pe, af as ae, ag as Wa, ah as ja, ai as Va, aj as Ua, ak as ve, al as Ye, am as Ha, an as Ga, ao as Ka, ap as qa, aq as Je, ar as wn, as as Ya, at as Ja, au as Za, av as He, aw as Xa, ax as Nn, ay as Qa, az as er, aA as tr, aB as nr, aC as ar, aD as rr, aE as ir, aF as lr, aG as ft, aH as Cn, aI as mt, aJ as In, aK as sr, aL as or, aM as cr, aN as dr, aO as ur, aP as Ze, aQ as Xe, aR as ht, aS as kn, aT as fr, aU as Ct, aV as mr, aW as hr, aX as gr, aY as Re, aZ as pr, a_ as br, a$ as $e, b0 as Tt, b1 as gt, b2 as xr, b3 as vr, a as yr, b as wr, b4 as Sn, b5 as Nr, g as Cr, F as Ir, b6 as kr, b7 as Fn, b8 as Sr, b9 as An, ba as Ln, bb as Fr, bc as Ar, bd as Lr, be as Or, bf as Pr, bg as Er, bh as _r, bi as Dr, bj as Tr, bk as On, bl as zr, bm as Rr, bn as Br, bo as $r, bp as ge, bq as It, br as kt, bs as St, bt as Pn, bu as Ft, bv as En, bw as _n, bx as Mr, by as Wr, bz as jr, bA as Vr, bB as Ur, bC as Hr, bD as Gr, bE as Kr, bF as zt, bG as qr, bH as Yr, bI as Rt, bJ as Bt, bK as $t, bL as Jr, bM as Zr, bN as Xr, bO as Qr, bP as Dn, bQ as ei, bR as ti } from "./F0CanvasPanel-BvLSkRnA.js";
2
+ import { c1 as Kc, c0 as qc, cd as Yc, bZ as Jc, b_ as Zc, bS as Xc, cg as Qc, bT as ed, bU as td, ch as nd, b$ as ad, c9 as rd, ca as id, ce as ld, bV as sd, c3 as od, c2 as cd, bW as dd, bX as ud, cb as fd, ci as md, cc as hd, cf as gd, c8 as pd, c5 as bd, c7 as xd, c4 as vd, bY as yd, c6 as wd } from "./F0CanvasPanel-BvLSkRnA.js";
3
3
  import { jsx as e, jsxs as o, Fragment as Z } from "react/jsx-runtime";
4
4
  import ue, { forwardRef as G, useRef as j, useTransition as ni, useState as D, useLayoutEffect as Tn, useId as pt, useContext as Pe, createContext as Qe, useEffect as W, useCallback as ne, useMemo as q, Fragment as ai, isValidElement as ri, cloneElement as zn, Children as Rn } from "react";
5
- import { C as ii, P as li, a as Bn, M as si, p as oi, b as ci, R as Mt, c as $n, u as di, d as ui, e as fi, f as mi, g as hi, h as Mn, S as gi, A as pi, B as bi, L as xi, i as vi, V as yi, j as wi, k as Ni, l as Ci, O as Ii } from "./useDataCollectionSource-DpNHp64q.js";
6
- import { r as Cd, s as Id, o as kd, H as Sd, t as Fd, z as Ad, a8 as Ld, G as Od, q as Pd, aa as Ed, a9 as _d, Q as Dd, ad as Td, F as zd, Y as Rd, U as Bd, J as $d, af as Md, K as Wd, Z as jd, _ as Vd, v as Ud, ab as Hd, ac as Gd, N as Kd, $ as qd, a5 as Yd, a7 as Jd, w as Zd, y as Xd, D as Qd, W as eu, ae as tu, X as nu, T as au, ag as ru, x as iu, E as lu, m as su, n as ou, a1 as cu, a2 as du, a6 as uu, I as fu, a3 as mu, a0 as hu, a4 as gu } from "./useDataCollectionSource-DpNHp64q.js";
5
+ import { C as ii, P as li, a as Bn, M as si, p as oi, b as ci, R as Mt, c as $n, u as di, d as ui, e as fi, f as mi, g as hi, h as Mn, S as gi, A as pi, B as bi, L as xi, i as vi, V as yi, j as wi, k as Ni, l as Ci, O as Ii } from "./useDataCollectionSource-i7W7yrnF.js";
6
+ import { r as Cd, s as Id, o as kd, H as Sd, t as Fd, z as Ad, a8 as Ld, G as Od, q as Pd, aa as Ed, a9 as _d, Q as Dd, ad as Td, F as zd, Y as Rd, U as Bd, J as $d, af as Md, K as Wd, Z as jd, _ as Vd, v as Ud, ab as Hd, ac as Gd, N as Kd, $ as qd, a5 as Yd, a7 as Jd, w as Zd, y as Xd, D as Qd, W as eu, ae as tu, X as nu, T as au, ag as ru, x as iu, E as lu, m as su, n as ou, a1 as cu, a2 as du, a6 as uu, I as fu, a3 as mu, a0 as hu, a4 as gu } from "./useDataCollectionSource-i7W7yrnF.js";
7
7
  const ki = ga("Search", [
8
8
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
9
9
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
package/dist/f0.d.ts CHANGED
@@ -1551,8 +1551,19 @@ declare type BaseQuestionProps = {
1551
1551
  type: QuestionType;
1552
1552
  children: React.ReactNode;
1553
1553
  required?: boolean;
1554
- locked?: boolean;
1555
1554
  hiddenActions?: HiddenActions;
1555
+ /**
1556
+ * Locks the question on its own — independent of any section. A question is
1557
+ * also locked when its containing section is locked.
1558
+ */
1559
+ locked?: boolean;
1560
+ /**
1561
+ * Optional notice shown in the lock tooltip when the question is locked. Use
1562
+ * it to say what this specific question is — it takes precedence over the
1563
+ * parent section's `LockedSectionNotice` and over the default question notice
1564
+ * from the i18n provider.
1565
+ */
1566
+ lockedNote?: LockedQuestionNotice;
1556
1567
  };
1557
1568
 
1558
1569
  declare type BaseQuestionPropsForOtherQuestionComponents = Omit<BaseQuestionProps, "children" | "onChange">;
@@ -4862,6 +4873,9 @@ export declare const defaultTranslations: {
4862
4873
  readonly questionType: "Question type";
4863
4874
  readonly questionOptions: "Question options";
4864
4875
  readonly actions: "Actions";
4876
+ readonly locked: "Locked";
4877
+ readonly lockedSectionNotice: "These questions are predefined and can't be edited, moved, or removed.";
4878
+ readonly lockedQuestionNotice: "This question is predefined and can't be edited or removed.";
4865
4879
  readonly sectionTitlePlaceholder: "Section title";
4866
4880
  readonly lastQuestionDialogTitle: "Remove last question from section";
4867
4881
  readonly lastQuestionDialogDescription: "Moving this question will leave the section empty and it will be removed. Do you want to continue?";
@@ -12341,6 +12355,23 @@ export declare interface LoadingStateProps {
12341
12355
  label: string;
12342
12356
  }
12343
12357
 
12358
+ export declare type LockedQuestionNotice = {
12359
+ description: string;
12360
+ };
12361
+
12362
+ /**
12363
+ * Explanation surfaced in a locked item's lock tooltip (authoring view only —
12364
+ * never shown in the answering/preview form), saying why it can't be edited,
12365
+ * moved, or removed. Rendered as a title-less popover on hovering the lock.
12366
+ *
12367
+ * A section and an individual question each carry their own `lockedNote`; a
12368
+ * locked question prefers its own `LockedQuestionNotice` and otherwise falls
12369
+ * back to the section's `LockedSectionNotice`.
12370
+ */
12371
+ export declare type LockedSectionNotice = {
12372
+ description: string;
12373
+ };
12374
+
12344
12375
  /** Margin tokens (spacing + auto for centering) */
12345
12376
  export declare type MarginToken = SpacingToken | "auto";
12346
12377
 
@@ -14447,9 +14478,20 @@ export declare type SectionElement = Omit<SectionProps, "onAction" | "onChange">
14447
14478
 
14448
14479
  declare type SectionProps = {
14449
14480
  id: string;
14450
- title: string;
14481
+ /**
14482
+ * Section heading. Optional — a section may have no title (e.g. a predefined,
14483
+ * blocked section that leads with a `lockedNote` instead). In the editable
14484
+ * view an empty title shows a placeholder so authors can add one; when the
14485
+ * section is locked/read-only an empty title is hidden entirely.
14486
+ */
14487
+ title?: string;
14451
14488
  description?: string;
14452
14489
  locked?: boolean;
14490
+ /**
14491
+ * Optional explanation surfaced in the lock tooltip (authoring view only).
14492
+ * Pair with `locked` to say why a predefined section can't be edited or moved.
14493
+ */
14494
+ lockedNote?: LockedSectionNotice;
14453
14495
  questions?: QuestionElement[];
14454
14496
  };
14455
14497
 
@@ -14734,6 +14776,11 @@ declare interface SurveyAnsweringFormDialogProps extends SurveyAnsweringFormShar
14734
14776
  /** Inline mode: read-only rendering embedded in the page, no dialog */
14735
14777
  declare interface SurveyAnsweringFormInlineProps extends SurveyAnsweringFormSharedProps {
14736
14778
  inline: true;
14779
+ /**
14780
+ * Hide the built-in ResourceHeader (title + description). Useful when the
14781
+ * embedding page already renders its own resource header above the form.
14782
+ */
14783
+ hideResourceHeader?: boolean;
14737
14784
  mode?: never;
14738
14785
  module?: never;
14739
14786
  position?: never;
@@ -15157,6 +15204,10 @@ export declare type TagRawProps = {
15157
15204
  * Info text to display an i icon and a tooltip next to the tag
15158
15205
  */
15159
15206
  info?: string;
15207
+ /**
15208
+ * Extra classes merged onto the tag (e.g. to give it a background).
15209
+ */
15210
+ className?: string;
15160
15211
  } & ({
15161
15212
  icon: IconType;
15162
15213
  onlyIcon: true;