@factorialco/f0-react 3.9.0 → 3.11.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/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-DWqZRYSD.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-BJpDjaBs.js";
4
4
  export {
5
5
  P as AiChatTranslationsProvider,
6
6
  e as ChatSpinner,
@@ -14,6 +14,7 @@ import { BarChartProps } from './experimental';
14
14
  import { BarSeriesCellValue } from './types/barSeries';
15
15
  import { baseColors } from '@factorialco/f0-core';
16
16
  import { ButtonHTMLAttributes } from 'react';
17
+ import { CategoryBarChartCellValue } from './types/categoryBarChart';
17
18
  import { CategoryBarProps } from './CategoryBarChart';
18
19
  import { ChartConfig } from './experimental';
19
20
  import { ChartConfig as ChartConfig_2 } from './utils/types';
@@ -3579,6 +3580,9 @@ declare const defaultTranslations: {
3579
3580
  readonly questionType: "Question type";
3580
3581
  readonly questionOptions: "Question options";
3581
3582
  readonly actions: "Actions";
3583
+ readonly locked: "Locked";
3584
+ readonly lockedSectionNotice: "These questions are predefined and can't be edited, moved, or removed.";
3585
+ readonly lockedQuestionNotice: "This question is predefined and can't be edited or removed.";
3582
3586
  readonly sectionTitlePlaceholder: "Section title";
3583
3587
  readonly lastQuestionDialogTitle: "Remove last question from section";
3584
3588
  readonly lastQuestionDialogDescription: "Moving this question will leave the section empty and it will be removed. Do you want to continue?";
@@ -5011,6 +5015,10 @@ declare type F0TagRawProps = {
5011
5015
  * Info text to display an i icon and a tooltip next to the tag
5012
5016
  */
5013
5017
  info?: string;
5018
+ /**
5019
+ * Extra classes merged onto the tag (e.g. to give it a background).
5020
+ */
5021
+ className?: string;
5014
5022
  } & ({
5015
5023
  icon: IconType;
5016
5024
  onlyIcon: true;
@@ -9016,6 +9024,7 @@ declare const valueDisplayRenderers: {
9016
9024
  readonly percentage: (args: PercentageCellValue, meta: ValueDisplayRendererContext) => JSX_2.Element | null;
9017
9025
  readonly progressBar: (args: ProgressBarCellValue, _meta: ValueDisplayRendererContext) => JSX_2.Element | null;
9018
9026
  readonly barSeries: (args: BarSeriesCellValue, meta: ValueDisplayRendererContext) => JSX_2.Element;
9027
+ readonly categoryBarChart: (args: CategoryBarChartCellValue, meta: ValueDisplayRendererContext) => JSX_2.Element;
9019
9028
  readonly hourDistribution: (args: HourDistributionCellValue, meta: ValueDisplayRendererContext) => JSX_2.Element;
9020
9029
  readonly company: (args: CompanyCellValue, meta: ValueDisplayRendererContext) => JSX_2.Element;
9021
9030
  readonly team: (args: TeamCellValue, meta: ValueDisplayRendererContext) => JSX_2.Element;
@@ -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-DWqZRYSD.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-DWqZRYSD.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-5Ik4-_94.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-5Ik4-_94.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
@@ -17,6 +17,7 @@ import { baseColors } from '@factorialco/f0-core';
17
17
  import { BigNumberProps as BigNumberProps_2 } from './types';
18
18
  import { BlockContentExtraProps } from './blocks/BlockContent';
19
19
  import { BlockProps } from './blocks/Block';
20
+ import { CategoryBarChartCellValue } from './types/categoryBarChart';
20
21
  import { CategoryBarProps } from './CategoryBarChart';
21
22
  import { ChartConfig } from './f0';
22
23
  import { ChartConfig as ChartConfig_2 } from './utils/types';
@@ -1551,8 +1552,19 @@ declare type BaseQuestionProps = {
1551
1552
  type: QuestionType;
1552
1553
  children: React.ReactNode;
1553
1554
  required?: boolean;
1554
- locked?: boolean;
1555
1555
  hiddenActions?: HiddenActions;
1556
+ /**
1557
+ * Locks the question on its own — independent of any section. A question is
1558
+ * also locked when its containing section is locked.
1559
+ */
1560
+ locked?: boolean;
1561
+ /**
1562
+ * Optional notice shown in the lock tooltip when the question is locked. Use
1563
+ * it to say what this specific question is — it takes precedence over the
1564
+ * parent section's `LockedSectionNotice` and over the default question notice
1565
+ * from the i18n provider.
1566
+ */
1567
+ lockedNote?: LockedQuestionNotice;
1556
1568
  };
1557
1569
 
1558
1570
  declare type BaseQuestionPropsForOtherQuestionComponents = Omit<BaseQuestionProps, "children" | "onChange">;
@@ -4862,6 +4874,9 @@ export declare const defaultTranslations: {
4862
4874
  readonly questionType: "Question type";
4863
4875
  readonly questionOptions: "Question options";
4864
4876
  readonly actions: "Actions";
4877
+ readonly locked: "Locked";
4878
+ readonly lockedSectionNotice: "These questions are predefined and can't be edited, moved, or removed.";
4879
+ readonly lockedQuestionNotice: "This question is predefined and can't be edited or removed.";
4865
4880
  readonly sectionTitlePlaceholder: "Section title";
4866
4881
  readonly lastQuestionDialogTitle: "Remove last question from section";
4867
4882
  readonly lastQuestionDialogDescription: "Moving this question will leave the section empty and it will be removed. Do you want to continue?";
@@ -12341,6 +12356,23 @@ export declare interface LoadingStateProps {
12341
12356
  label: string;
12342
12357
  }
12343
12358
 
12359
+ export declare type LockedQuestionNotice = {
12360
+ description: string;
12361
+ };
12362
+
12363
+ /**
12364
+ * Explanation surfaced in a locked item's lock tooltip (authoring view only —
12365
+ * never shown in the answering/preview form), saying why it can't be edited,
12366
+ * moved, or removed. Rendered as a title-less popover on hovering the lock.
12367
+ *
12368
+ * A section and an individual question each carry their own `lockedNote`; a
12369
+ * locked question prefers its own `LockedQuestionNotice` and otherwise falls
12370
+ * back to the section's `LockedSectionNotice`.
12371
+ */
12372
+ export declare type LockedSectionNotice = {
12373
+ description: string;
12374
+ };
12375
+
12344
12376
  /** Margin tokens (spacing + auto for centering) */
12345
12377
  export declare type MarginToken = SpacingToken | "auto";
12346
12378
 
@@ -14447,9 +14479,20 @@ export declare type SectionElement = Omit<SectionProps, "onAction" | "onChange">
14447
14479
 
14448
14480
  declare type SectionProps = {
14449
14481
  id: string;
14450
- title: string;
14482
+ /**
14483
+ * Section heading. Optional — a section may have no title (e.g. a predefined,
14484
+ * blocked section that leads with a `lockedNote` instead). In the editable
14485
+ * view an empty title shows a placeholder so authors can add one; when the
14486
+ * section is locked/read-only an empty title is hidden entirely.
14487
+ */
14488
+ title?: string;
14451
14489
  description?: string;
14452
14490
  locked?: boolean;
14491
+ /**
14492
+ * Optional explanation surfaced in the lock tooltip (authoring view only).
14493
+ * Pair with `locked` to say why a predefined section can't be edited or moved.
14494
+ */
14495
+ lockedNote?: LockedSectionNotice;
14453
14496
  questions?: QuestionElement[];
14454
14497
  };
14455
14498
 
@@ -14734,6 +14777,11 @@ declare interface SurveyAnsweringFormDialogProps extends SurveyAnsweringFormShar
14734
14777
  /** Inline mode: read-only rendering embedded in the page, no dialog */
14735
14778
  declare interface SurveyAnsweringFormInlineProps extends SurveyAnsweringFormSharedProps {
14736
14779
  inline: true;
14780
+ /**
14781
+ * Hide the built-in ResourceHeader (title + description). Useful when the
14782
+ * embedding page already renders its own resource header above the form.
14783
+ */
14784
+ hideResourceHeader?: boolean;
14737
14785
  mode?: never;
14738
14786
  module?: never;
14739
14787
  position?: never;
@@ -15157,6 +15205,10 @@ export declare type TagRawProps = {
15157
15205
  * Info text to display an i icon and a tooltip next to the tag
15158
15206
  */
15159
15207
  info?: string;
15208
+ /**
15209
+ * Extra classes merged onto the tag (e.g. to give it a background).
15210
+ */
15211
+ className?: string;
15160
15212
  } & ({
15161
15213
  icon: IconType;
15162
15214
  onlyIcon: true;
@@ -16477,6 +16529,7 @@ declare const valueDisplayRenderers: {
16477
16529
  readonly percentage: (args: PercentageCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element | null;
16478
16530
  readonly progressBar: (args: ProgressBarCellValue_2, _meta: ValueDisplayRendererContext_2) => JSX_2.Element | null;
16479
16531
  readonly barSeries: (args: BarSeriesCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
16532
+ readonly categoryBarChart: (args: CategoryBarChartCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
16480
16533
  readonly hourDistribution: (args: HourDistributionCellValue_2, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
16481
16534
  readonly company: (args: CompanyCellValue_2, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
16482
16535
  readonly team: (args: TeamCellValue_2, meta: ValueDisplayRendererContext_2) => JSX_2.Element;