@factorialco/f0-react 1.396.0 → 1.398.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/{F0AiChat-sQnVZIig.js → F0AiChat-CiwHSzAS.js} +395 -390
- package/dist/{F0HILActionConfirmation-D74w-tBZ.js → F0HILActionConfirmation-Ba7uFrN1.js} +1 -1
- package/dist/ai.d.ts +16 -2
- package/dist/ai.js +2 -2
- package/dist/experimental.css +1 -1
- package/dist/experimental.d.ts +26 -235
- package/dist/experimental.js +10510 -19081
- package/dist/f0.d.ts +789 -6
- package/dist/f0.js +60502 -7072
- package/dist/i18n-provider-defaults.d.ts +16 -2
- package/dist/i18n-provider-defaults.js +16 -2
- package/dist/styles.css +1 -1
- package/dist/{DataCollectionStorageProvider-DBFaWjh6.js → useDataCollectionSource-DmcT_gl5.js} +23584 -17660
- package/dist/{DataCollectionStorageProvider.css → useDataCollectionSource.css} +1 -1
- package/package.json +1 -1
package/dist/f0.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ import { default as default_2 } from 'react';
|
|
|
39
39
|
import { DeltaCellValue } from './types/delta';
|
|
40
40
|
import { DotTagCellValue } from './f0';
|
|
41
41
|
import { DotTagCellValue as DotTagCellValue_2 } from './types/dotTag';
|
|
42
|
+
import { F0AnalyticsDashboardProps as F0AnalyticsDashboardProps_2 } from './types';
|
|
42
43
|
import { F0AvatarCompanyProps as F0AvatarCompanyProps_2 } from './types';
|
|
43
44
|
import { F0AvatarDateProps } from './F0AvatarDate';
|
|
44
45
|
import { F0AvatarEmojiProps as F0AvatarEmojiProps_2 } from './F0AvatarEmoji';
|
|
@@ -62,6 +63,7 @@ import { f1Colors } from '@factorialco/f0-core';
|
|
|
62
63
|
import { FC } from 'react';
|
|
63
64
|
import { FileCellValue } from './f0';
|
|
64
65
|
import { FileCellValue as FileCellValue_2 } from './types/file';
|
|
66
|
+
import { FiltersDefinition as FiltersDefinition_2 } from './f0';
|
|
65
67
|
import { FolderCellValue } from './f0';
|
|
66
68
|
import { FolderCellValue as FolderCellValue_2 } from './types/folder';
|
|
67
69
|
import { ForwardedRef } from 'react';
|
|
@@ -82,7 +84,7 @@ import { internalAvatarColors as internalAvatarColors_2 } from './f0';
|
|
|
82
84
|
import { internalAvatarSizes as internalAvatarSizes_2 } from './f0';
|
|
83
85
|
import { internalAvatarTypes as internalAvatarTypes_2 } from './f0';
|
|
84
86
|
import { JSX as JSX_2 } from 'react';
|
|
85
|
-
import { LineChartConfig } from './f0';
|
|
87
|
+
import { LineChartConfig as LineChartConfig_2 } from './f0';
|
|
86
88
|
import { LineChartPropsBase } from './utils/types';
|
|
87
89
|
import { LocalAudioTrack } from 'livekit-client';
|
|
88
90
|
import { LongTextCellValue } from './types/longText';
|
|
@@ -133,6 +135,7 @@ import { WithDataTestIdReturnType as WithDataTestIdReturnType_3 } from './f0';
|
|
|
133
135
|
import { WithDataTestIdReturnType as WithDataTestIdReturnType_4 } from './f0';
|
|
134
136
|
import { WithDataTestIdReturnType as WithDataTestIdReturnType_5 } from './f0';
|
|
135
137
|
import { WithDataTestIdReturnType as WithDataTestIdReturnType_6 } from './f0';
|
|
138
|
+
import { WithDataTestIdReturnType as WithDataTestIdReturnType_7 } from './f0';
|
|
136
139
|
import { z } from 'zod';
|
|
137
140
|
import { ZodEffects } from 'zod';
|
|
138
141
|
import { ZodRawShape } from 'zod';
|
|
@@ -288,6 +291,8 @@ declare type ActionSize = (typeof actionSizes)[number];
|
|
|
288
291
|
|
|
289
292
|
declare const actionSizes: readonly ["sm", "md", "lg"];
|
|
290
293
|
|
|
294
|
+
export declare type ActionType = "duplicate" | "delete";
|
|
295
|
+
|
|
291
296
|
declare type ActionVariant = (typeof actionVariants)[number];
|
|
292
297
|
|
|
293
298
|
declare const actionVariants: readonly ["default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote", "ai", "link", "unstyled", "mention"];
|
|
@@ -594,7 +599,7 @@ declare type AnimationVariantsOptions = {
|
|
|
594
599
|
maxDelay?: number;
|
|
595
600
|
};
|
|
596
601
|
|
|
597
|
-
export declare const AreaChart: WithDataTestIdReturnType_5<ForwardRefExoticComponent<Omit<LineChartPropsBase<
|
|
602
|
+
export declare const AreaChart: WithDataTestIdReturnType_5<ForwardRefExoticComponent<Omit<LineChartPropsBase<LineChartConfig_2> & {
|
|
598
603
|
lineType?: "step" | "linear" | "natural" | "monotoneX";
|
|
599
604
|
marginTop?: number;
|
|
600
605
|
canBeBlurred?: boolean;
|
|
@@ -726,6 +731,14 @@ values: {
|
|
|
726
731
|
}) => void) | undefined;
|
|
727
732
|
} & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>>;
|
|
728
733
|
|
|
734
|
+
export declare interface BarChartConfig extends ChartConfigBase {
|
|
735
|
+
type: "bar";
|
|
736
|
+
/** @default "vertical" */
|
|
737
|
+
orientation?: "vertical" | "horizontal";
|
|
738
|
+
/** Stack all series into a single bar per category. @default false */
|
|
739
|
+
stacked?: boolean;
|
|
740
|
+
}
|
|
741
|
+
|
|
729
742
|
declare type BaseAction = {
|
|
730
743
|
label: string;
|
|
731
744
|
onClick: () => Promise<void> | void;
|
|
@@ -861,6 +874,25 @@ export declare type BasePaginatedResponse<R> = BaseResponse<R> & {
|
|
|
861
874
|
perPage: number;
|
|
862
875
|
};
|
|
863
876
|
|
|
877
|
+
export declare type BaseQuestionOnChangeParams = {
|
|
878
|
+
id: string;
|
|
879
|
+
title?: string;
|
|
880
|
+
description?: string;
|
|
881
|
+
required?: boolean;
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
declare type BaseQuestionProps = {
|
|
885
|
+
id: string;
|
|
886
|
+
title: string;
|
|
887
|
+
description?: string;
|
|
888
|
+
type: QuestionType;
|
|
889
|
+
children: React.ReactNode;
|
|
890
|
+
required?: boolean;
|
|
891
|
+
locked?: boolean;
|
|
892
|
+
};
|
|
893
|
+
|
|
894
|
+
declare type BaseQuestionPropsForOtherQuestionComponents = Omit<BaseQuestionProps, "children" | "onChange">;
|
|
895
|
+
|
|
864
896
|
/**
|
|
865
897
|
* Base response type for collection data
|
|
866
898
|
* @template R - The type of records in the collection
|
|
@@ -1378,6 +1410,28 @@ declare type CardVisualizationOptions<T, _Filters extends FiltersDefinition, _So
|
|
|
1378
1410
|
|
|
1379
1411
|
export declare const CategoryBarChart: WithDataTestIdReturnType_5<ForwardRefExoticComponent<Omit<CategoryBarProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>>;
|
|
1380
1412
|
|
|
1413
|
+
/** A valid chart color token — one of the 15 chromatic F0 base-color names. */
|
|
1414
|
+
declare type ChartColorToken = (typeof chartColorTokens)[number];
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* The 15 chromatic color names from the F0 design token palette.
|
|
1418
|
+
* These are the only colors allowed for custom series / data-point colors.
|
|
1419
|
+
*/
|
|
1420
|
+
declare const chartColorTokens: readonly ["lilac", "barbie", "smoke", "army", "flubber", "indigo", "camel", "radical", "viridian", "orange", "red", "grass", "malibu", "yellow", "purple"];
|
|
1421
|
+
|
|
1422
|
+
declare interface ChartConfigBase {
|
|
1423
|
+
/** Show the legend below the chart. @default true */
|
|
1424
|
+
showLegend?: boolean;
|
|
1425
|
+
/** Show background grid lines. @default true */
|
|
1426
|
+
showGrid?: boolean;
|
|
1427
|
+
/** Show value labels on each data point. @default false */
|
|
1428
|
+
showLabels?: boolean;
|
|
1429
|
+
/** Format the value axis tick labels */
|
|
1430
|
+
valueFormatter?: (value: number) => string;
|
|
1431
|
+
/** Format category axis tick labels */
|
|
1432
|
+
categoryFormatter?: (value: string) => string;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1381
1435
|
export declare const ChatSpinner: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
1382
1436
|
|
|
1383
1437
|
/**
|
|
@@ -1610,6 +1664,8 @@ declare type ComponentTypes = (typeof componentTypes)[number];
|
|
|
1610
1664
|
|
|
1611
1665
|
declare const componentTypes: readonly ["layout", "info", "action", "form"];
|
|
1612
1666
|
|
|
1667
|
+
export declare function computeSectionEndIds(elements: SurveyFormBuilderElement[]): Set<string>;
|
|
1668
|
+
|
|
1613
1669
|
declare type CountryCode = keyof TranslationsType["countries"];
|
|
1614
1670
|
|
|
1615
1671
|
export declare function createAtlaskitDriver(instanceId: symbol): DndDriver;
|
|
@@ -1710,6 +1766,116 @@ declare interface CustomFieldRenderPropsBase {
|
|
|
1710
1766
|
|
|
1711
1767
|
export declare const Dashboard: WithDataTestIdReturnType_3<ComponentType<DashboardProps_2> & PageLayoutGroupComponent_2>;
|
|
1712
1768
|
|
|
1769
|
+
/**
|
|
1770
|
+
* Chart display configuration — discriminated on `type`.
|
|
1771
|
+
* This object is JSON-serializable (no functions, except optional formatters).
|
|
1772
|
+
*/
|
|
1773
|
+
export declare type DashboardChartConfig = BarChartConfig | LineChartConfig | FunnelChartConfig | PieChartConfig | RadarChartConfig | GaugeChartConfig | HeatmapChartConfig;
|
|
1774
|
+
|
|
1775
|
+
export declare interface DashboardChartData {
|
|
1776
|
+
/** Category axis labels. Required for bar/line charts. */
|
|
1777
|
+
categories?: string[];
|
|
1778
|
+
/** X-axis category labels for heatmap charts. */
|
|
1779
|
+
xCategories?: string[];
|
|
1780
|
+
/** Y-axis category labels for heatmap charts. */
|
|
1781
|
+
yCategories?: string[];
|
|
1782
|
+
/** Radar chart axis indicators. */
|
|
1783
|
+
indicators?: F0DataChartRadarIndicator[];
|
|
1784
|
+
/** Chart series data — shape depends on chart type. Omit for heatmaps. */
|
|
1785
|
+
series?: F0DataChartBarSeries[] | F0DataChartLineSeries[] | F0DataChartFunnelSeries | F0DataChartPieSeries | F0DataChartRadarSeries[] | {
|
|
1786
|
+
value: number;
|
|
1787
|
+
name?: string;
|
|
1788
|
+
};
|
|
1789
|
+
/** Heatmap data points as [xIndex, yIndex, value] tuples. */
|
|
1790
|
+
data?: [number, number, number][];
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
export declare interface DashboardChartItem<Filters extends FiltersDefinition = FiltersDefinition> extends DashboardItemBase {
|
|
1794
|
+
type: "chart";
|
|
1795
|
+
/** Visual chart configuration (JSON-serializable) */
|
|
1796
|
+
chart: DashboardChartConfig;
|
|
1797
|
+
/**
|
|
1798
|
+
* Reserved for future use. Currently all chart cells share the same
|
|
1799
|
+
* height derived from the grid column width.
|
|
1800
|
+
*/
|
|
1801
|
+
aspectRatio?: string;
|
|
1802
|
+
/** Async data fetcher — receives dashboard filters when useDashboardFilters is true */
|
|
1803
|
+
fetchData: (filters: FiltersState<Filters>) => Promise<DashboardChartData>;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
/**
|
|
1807
|
+
* Minimal collection config — enough to render a table/card/list inside
|
|
1808
|
+
* a dashboard widget without its own filter bar.
|
|
1809
|
+
*
|
|
1810
|
+
* The consumer provides `createSource` which receives the dashboard-level
|
|
1811
|
+
* filters and returns a full DataCollectionSourceDefinition. The dashboard
|
|
1812
|
+
* calls `useDataCollectionSource` internally.
|
|
1813
|
+
*/
|
|
1814
|
+
export declare interface DashboardCollectionItem<Filters extends FiltersDefinition = FiltersDefinition> extends DashboardItemBase {
|
|
1815
|
+
type: "collection";
|
|
1816
|
+
/**
|
|
1817
|
+
* Factory that creates a DataCollectionSourceDefinition for this item.
|
|
1818
|
+
* Called whenever dashboard filters change.
|
|
1819
|
+
* The returned definition should NOT include its own filters/presets
|
|
1820
|
+
* (the dashboard provides those globally).
|
|
1821
|
+
*/
|
|
1822
|
+
createSource: (filters: FiltersState<Filters>) => any;
|
|
1823
|
+
/**
|
|
1824
|
+
* Visualization configs for the collection (table, card, list, kanban).
|
|
1825
|
+
* Same shape as OneDataCollection's `visualizations` prop.
|
|
1826
|
+
*/
|
|
1827
|
+
visualizations: ReadonlyArray<any>;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
/**
|
|
1831
|
+
* A single dashboard item. Discriminated on `type`.
|
|
1832
|
+
*
|
|
1833
|
+
* Currently supports `"chart"`, `"metric"`, and `"collection"`.
|
|
1834
|
+
* Future types (e.g. `"custom"`) extend this union.
|
|
1835
|
+
*/
|
|
1836
|
+
export declare type DashboardItem<Filters extends FiltersDefinition = FiltersDefinition> = DashboardChartItem<Filters> | DashboardMetricItem<Filters> | DashboardCollectionItem<Filters>;
|
|
1837
|
+
|
|
1838
|
+
export declare interface DashboardItemBase {
|
|
1839
|
+
/** Unique key for React reconciliation and identity */
|
|
1840
|
+
id: string;
|
|
1841
|
+
/** Widget title displayed in the header */
|
|
1842
|
+
title: string;
|
|
1843
|
+
/** Optional description below the title */
|
|
1844
|
+
description?: string;
|
|
1845
|
+
/** Number of grid columns this item spans (1–3). @default 1 */
|
|
1846
|
+
colSpan?: 1 | 2 | 3;
|
|
1847
|
+
/**
|
|
1848
|
+
* Whether this item receives dashboard-level filters in its fetchData.
|
|
1849
|
+
* When false, fetchData receives an empty object.
|
|
1850
|
+
* @default true
|
|
1851
|
+
*/
|
|
1852
|
+
useDashboardFilters?: boolean;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
/** Data returned by a metric item's fetchData */
|
|
1856
|
+
export declare interface DashboardMetricData {
|
|
1857
|
+
/** The main numeric value displayed in large text */
|
|
1858
|
+
value: number;
|
|
1859
|
+
/** Optional previous value — used to compute a trend indicator */
|
|
1860
|
+
previousValue?: number;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
/**
|
|
1864
|
+
* A single big-number KPI widget.
|
|
1865
|
+
*
|
|
1866
|
+
* Displays a large formatted number with optional trend indicator
|
|
1867
|
+
* (up/down vs previous value). Receives dashboard filters like any other item.
|
|
1868
|
+
*/
|
|
1869
|
+
export declare interface DashboardMetricItem<Filters extends FiltersDefinition = FiltersDefinition> extends DashboardItemBase {
|
|
1870
|
+
type: "metric";
|
|
1871
|
+
/** How to format the value. @default { type: "number" } */
|
|
1872
|
+
format?: MetricFormat;
|
|
1873
|
+
/** Number of decimal places. @default 0 */
|
|
1874
|
+
decimals?: number;
|
|
1875
|
+
/** Async data fetcher — receives dashboard filters */
|
|
1876
|
+
fetchData: (filters: FiltersState<Filters>) => Promise<DashboardMetricData>;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1713
1879
|
export declare type DashboardProps = GroupGridProps<DashboardWidget>;
|
|
1714
1880
|
|
|
1715
1881
|
export declare type DashboardWidget = GroupGridWidget<{
|
|
@@ -2072,6 +2238,10 @@ export declare interface DatePreset {
|
|
|
2072
2238
|
value: DateRange | (() => DateRange);
|
|
2073
2239
|
}
|
|
2074
2240
|
|
|
2241
|
+
declare type DateQuestionProps = BaseQuestionPropsForOtherQuestionComponents & {
|
|
2242
|
+
value?: Date | null;
|
|
2243
|
+
};
|
|
2244
|
+
|
|
2075
2245
|
declare type DateRange = {
|
|
2076
2246
|
from: Date;
|
|
2077
2247
|
to?: Date;
|
|
@@ -2582,7 +2752,7 @@ export declare const defaultTranslations: {
|
|
|
2582
2752
|
readonly dismiss: "Dismiss";
|
|
2583
2753
|
};
|
|
2584
2754
|
};
|
|
2585
|
-
readonly
|
|
2755
|
+
readonly surveyFormBuilder: {
|
|
2586
2756
|
readonly actions: {
|
|
2587
2757
|
readonly actions: "Actions";
|
|
2588
2758
|
readonly duplicateQuestion: "Duplicate question";
|
|
@@ -2614,7 +2784,11 @@ export declare const defaultTranslations: {
|
|
|
2614
2784
|
};
|
|
2615
2785
|
readonly answer: {
|
|
2616
2786
|
readonly label: "Answer";
|
|
2617
|
-
readonly
|
|
2787
|
+
readonly dropdownPlaceholder: "Pick an option";
|
|
2788
|
+
readonly textPlaceholder: "Type your answer";
|
|
2789
|
+
readonly numericPlaceholder: "Enter a number";
|
|
2790
|
+
readonly linkPlaceholder: "https://example.com";
|
|
2791
|
+
readonly invalidUrl: "Enter a valid URL";
|
|
2618
2792
|
};
|
|
2619
2793
|
readonly labels: {
|
|
2620
2794
|
readonly applyingChanges: "Applying changes";
|
|
@@ -2633,6 +2807,16 @@ export declare const defaultTranslations: {
|
|
|
2633
2807
|
readonly lastQuestionDialogDescription: "Moving this question will leave the section empty and it will be removed. Do you want to continue?";
|
|
2634
2808
|
};
|
|
2635
2809
|
};
|
|
2810
|
+
readonly surveyAnsweringForm: {
|
|
2811
|
+
readonly actions: {
|
|
2812
|
+
readonly submit: "Submit survey";
|
|
2813
|
+
readonly cancel: "Cancel";
|
|
2814
|
+
readonly next: "Next";
|
|
2815
|
+
readonly previous: "Previous";
|
|
2816
|
+
readonly expand: "Expand";
|
|
2817
|
+
readonly collapse: "Collapse";
|
|
2818
|
+
};
|
|
2819
|
+
};
|
|
2636
2820
|
readonly richTextEditor: {
|
|
2637
2821
|
readonly bold: "Bold";
|
|
2638
2822
|
readonly italic: "Italic";
|
|
@@ -2819,6 +3003,12 @@ declare type DropdownItemSeparator = {
|
|
|
2819
3003
|
type: "separator";
|
|
2820
3004
|
};
|
|
2821
3005
|
|
|
3006
|
+
declare type DropdownSingleQuestionProps = BaseQuestionPropsForOtherQuestionComponents & {
|
|
3007
|
+
type: "dropdown-single";
|
|
3008
|
+
options: SelectQuestionOption[];
|
|
3009
|
+
value?: string | null;
|
|
3010
|
+
};
|
|
3011
|
+
|
|
2822
3012
|
export declare type DropIntent = {
|
|
2823
3013
|
type: "reorder";
|
|
2824
3014
|
containerId: string;
|
|
@@ -2885,6 +3075,8 @@ declare type EditableTableVisualizationOptions<R extends RecordType, _Filters ex
|
|
|
2885
3075
|
|
|
2886
3076
|
declare type EditableTableVisualizationSettings = TableVisualizationSettings;
|
|
2887
3077
|
|
|
3078
|
+
export declare type ElementType = QuestionType | "section";
|
|
3079
|
+
|
|
2888
3080
|
export declare function Em({ children, ...props }: React.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
|
|
2889
3081
|
|
|
2890
3082
|
export declare function EmojiImage({ emoji, size, alt }: EmojiImageProps): JSX_2.Element;
|
|
@@ -3131,6 +3323,45 @@ export declare interface F0AlertProps {
|
|
|
3131
3323
|
variant: AlertVariant;
|
|
3132
3324
|
}
|
|
3133
3325
|
|
|
3326
|
+
/**
|
|
3327
|
+
* @experimental This is an experimental component use it at your own risk
|
|
3328
|
+
*/
|
|
3329
|
+
export declare const F0AnalyticsDashboard: {
|
|
3330
|
+
<Filters extends FiltersDefinition_2 = FiltersDefinition_2>({ filters, presets, defaultFilters, items, }: F0AnalyticsDashboardProps_2<Filters>): JSX_2.Element;
|
|
3331
|
+
displayName: string;
|
|
3332
|
+
};
|
|
3333
|
+
|
|
3334
|
+
/**
|
|
3335
|
+
* Props for the F0AnalyticsDashboard component.
|
|
3336
|
+
*
|
|
3337
|
+
* The entire dashboard is defined declaratively via `filters` (optional shared
|
|
3338
|
+
* filter definitions), `presets`, and `items` (an ordered array of chart /
|
|
3339
|
+
* collection configs).
|
|
3340
|
+
*
|
|
3341
|
+
* An LLM can generate the full `items` array as JSON (minus the `fetchData`
|
|
3342
|
+
* functions) to build dashboards on the fly.
|
|
3343
|
+
*/
|
|
3344
|
+
export declare interface F0AnalyticsDashboardProps<Filters extends FiltersDefinition = FiltersDefinition> {
|
|
3345
|
+
/**
|
|
3346
|
+
* Filter definitions for the dashboard-level filter bar.
|
|
3347
|
+
* When omitted, no filter bar is rendered.
|
|
3348
|
+
*/
|
|
3349
|
+
filters?: Filters;
|
|
3350
|
+
/**
|
|
3351
|
+
* Preset filter configurations shown as quick-select chips.
|
|
3352
|
+
*/
|
|
3353
|
+
presets?: PresetsDefinition<Filters>;
|
|
3354
|
+
/**
|
|
3355
|
+
* Initial filter values applied when the dashboard first renders.
|
|
3356
|
+
*/
|
|
3357
|
+
defaultFilters?: FiltersState<Filters>;
|
|
3358
|
+
/**
|
|
3359
|
+
* Ordered list of dashboard items to render in the grid.
|
|
3360
|
+
* Each item declares its type, visual config, grid span, and data fetcher.
|
|
3361
|
+
*/
|
|
3362
|
+
items: DashboardItem<Filters>[];
|
|
3363
|
+
}
|
|
3364
|
+
|
|
3134
3365
|
/**
|
|
3135
3366
|
* Config for array fields (multi-select or multi-file)
|
|
3136
3367
|
* @typeParam T - The value type (string or number)
|
|
@@ -3782,6 +4013,130 @@ declare type F0CustomFieldConfigWithConfig<TValue = unknown, TConfig = unknown>
|
|
|
3782
4013
|
fieldType: "custom";
|
|
3783
4014
|
};
|
|
3784
4015
|
|
|
4016
|
+
/**
|
|
4017
|
+
* A single data point in a bar chart series.
|
|
4018
|
+
* Can be a simple number or an object with value and optional target.
|
|
4019
|
+
*/
|
|
4020
|
+
declare type F0DataChartBarDataPoint = number | {
|
|
4021
|
+
value: number;
|
|
4022
|
+
/** When set, renders a gradient fade from the bar top up to the target value */
|
|
4023
|
+
target?: number;
|
|
4024
|
+
/** Override color for this individual bar. Must be an F0 design token name. */
|
|
4025
|
+
color?: ChartColorToken;
|
|
4026
|
+
};
|
|
4027
|
+
|
|
4028
|
+
/**
|
|
4029
|
+
* A series of bars to render in the chart.
|
|
4030
|
+
*/
|
|
4031
|
+
declare interface F0DataChartBarSeries {
|
|
4032
|
+
/** Display name used in legend and tooltip */
|
|
4033
|
+
name: string;
|
|
4034
|
+
/** Data points — one per category */
|
|
4035
|
+
data: F0DataChartBarDataPoint[];
|
|
4036
|
+
/** Override color for this series. Must be an F0 design token name. Falls back to the theme palette. */
|
|
4037
|
+
color?: ChartColorToken;
|
|
4038
|
+
}
|
|
4039
|
+
|
|
4040
|
+
/**
|
|
4041
|
+
* A single data point in a funnel chart series.
|
|
4042
|
+
* Each point has a value and a stage name.
|
|
4043
|
+
*/
|
|
4044
|
+
declare interface F0DataChartFunnelDataPoint {
|
|
4045
|
+
/** Numeric value for this funnel stage */
|
|
4046
|
+
value: number;
|
|
4047
|
+
/** Stage label (e.g. "Applied", "Phone Screen", "Hired") */
|
|
4048
|
+
name: string;
|
|
4049
|
+
/** Override color for this individual stage. Must be an F0 design token name. */
|
|
4050
|
+
color?: ChartColorToken;
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
/**
|
|
4054
|
+
* A single funnel series with named data points.
|
|
4055
|
+
*/
|
|
4056
|
+
declare interface F0DataChartFunnelSeries {
|
|
4057
|
+
/** Display name used in legend and tooltip */
|
|
4058
|
+
name: string;
|
|
4059
|
+
/** Data points — one per funnel stage */
|
|
4060
|
+
data: F0DataChartFunnelDataPoint[];
|
|
4061
|
+
/** Override color for the entire series. Must be an F0 design token name. */
|
|
4062
|
+
color?: ChartColorToken;
|
|
4063
|
+
}
|
|
4064
|
+
|
|
4065
|
+
/**
|
|
4066
|
+
* A single data point in a line chart series.
|
|
4067
|
+
* Can be a simple number or an object with a value.
|
|
4068
|
+
*/
|
|
4069
|
+
declare type F0DataChartLineDataPoint = number | {
|
|
4070
|
+
value: number;
|
|
4071
|
+
};
|
|
4072
|
+
|
|
4073
|
+
/**
|
|
4074
|
+
* A series of data points to render as a line.
|
|
4075
|
+
*/
|
|
4076
|
+
declare interface F0DataChartLineSeries {
|
|
4077
|
+
/** Display name used in legend and tooltip */
|
|
4078
|
+
name: string;
|
|
4079
|
+
/** Data points — one per category */
|
|
4080
|
+
data: F0DataChartLineDataPoint[];
|
|
4081
|
+
/** Override color for this series. Must be an F0 design token name. Falls back to the theme palette. */
|
|
4082
|
+
color?: ChartColorToken;
|
|
4083
|
+
/** Render this line with a dashed pattern (useful for projections/targets) */
|
|
4084
|
+
dashed?: boolean;
|
|
4085
|
+
/** Override line interpolation for this series */
|
|
4086
|
+
lineType?: F0DataChartLineType;
|
|
4087
|
+
/** Override area fill for this series */
|
|
4088
|
+
showArea?: boolean;
|
|
4089
|
+
}
|
|
4090
|
+
|
|
4091
|
+
/** Line interpolation type */
|
|
4092
|
+
declare type F0DataChartLineType = "linear" | "smooth" | "step";
|
|
4093
|
+
|
|
4094
|
+
/**
|
|
4095
|
+
* A single data point in a pie chart.
|
|
4096
|
+
*/
|
|
4097
|
+
declare interface F0DataChartPieDataPoint {
|
|
4098
|
+
/** Numeric value for this segment */
|
|
4099
|
+
value: number;
|
|
4100
|
+
/** Segment label */
|
|
4101
|
+
name: string;
|
|
4102
|
+
/** Override color for this individual segment. Must be an F0 design token name. */
|
|
4103
|
+
color?: ChartColorToken;
|
|
4104
|
+
}
|
|
4105
|
+
|
|
4106
|
+
/**
|
|
4107
|
+
* A single pie series with named data points.
|
|
4108
|
+
*/
|
|
4109
|
+
declare interface F0DataChartPieSeries {
|
|
4110
|
+
/** Display name used in tooltip */
|
|
4111
|
+
name: string;
|
|
4112
|
+
/** Data points — one per pie segment */
|
|
4113
|
+
data: F0DataChartPieDataPoint[];
|
|
4114
|
+
/** Override color for the entire series. Must be an F0 design token name. */
|
|
4115
|
+
color?: ChartColorToken;
|
|
4116
|
+
}
|
|
4117
|
+
|
|
4118
|
+
/**
|
|
4119
|
+
* A radar chart indicator (axis/dimension).
|
|
4120
|
+
*/
|
|
4121
|
+
declare interface F0DataChartRadarIndicator {
|
|
4122
|
+
/** Name of the axis/dimension (e.g. "Performance", "Engagement") */
|
|
4123
|
+
name: string;
|
|
4124
|
+
/** Maximum value for this axis. @default auto-calculated from data */
|
|
4125
|
+
max?: number;
|
|
4126
|
+
}
|
|
4127
|
+
|
|
4128
|
+
/**
|
|
4129
|
+
* A series of data points for a radar chart.
|
|
4130
|
+
*/
|
|
4131
|
+
declare interface F0DataChartRadarSeries {
|
|
4132
|
+
/** Display name used in legend and tooltip (e.g. "Team A", "Team B") */
|
|
4133
|
+
name: string;
|
|
4134
|
+
/** Values — one per indicator, in the same order */
|
|
4135
|
+
data: number[];
|
|
4136
|
+
/** Override color for this series. Must be an F0 design token name. */
|
|
4137
|
+
color?: ChartColorToken;
|
|
4138
|
+
}
|
|
4139
|
+
|
|
3785
4140
|
/**
|
|
3786
4141
|
* Component that renders an optional markdown preview followed by
|
|
3787
4142
|
* a dropdown button with "Download Excel" as the primary action and
|
|
@@ -4304,6 +4659,20 @@ export declare interface F0FormDiscardConfig {
|
|
|
4304
4659
|
*/
|
|
4305
4660
|
export declare type F0FormErrorTriggerMode = "on-blur" | "on-change" | "on-submit";
|
|
4306
4661
|
|
|
4662
|
+
/**
|
|
4663
|
+
* Standalone form field component that renders the appropriate F0Form input
|
|
4664
|
+
* without requiring a react-hook-form context.
|
|
4665
|
+
*
|
|
4666
|
+
* Supports all field types that F0Form supports: text, number, textarea,
|
|
4667
|
+
* select, checkbox, switch, date, time, datetime, daterange, richtext, custom,
|
|
4668
|
+
* and file.
|
|
4669
|
+
*/
|
|
4670
|
+
export declare function F0FormField({ field, value, onChange, onBlur, error, errorMessage, loading, required, disabled, hideLabel: hideLabelProp, initialFiles, }: F0FormFieldProps): JSX_2.Element;
|
|
4671
|
+
|
|
4672
|
+
export declare namespace F0FormField {
|
|
4673
|
+
var displayName: string;
|
|
4674
|
+
}
|
|
4675
|
+
|
|
4307
4676
|
/**
|
|
4308
4677
|
* String field - text input, textarea, select, or custom
|
|
4309
4678
|
* @typeParam R - Record type for data source (when using source instead of options)
|
|
@@ -4379,6 +4748,44 @@ export declare function f0FormField<T extends ZodTypeAny, TConfig = undefined>(s
|
|
|
4379
4748
|
*/
|
|
4380
4749
|
export declare function f0FormField<T extends ZodTypeAny, V extends string | number = string | number, R extends Record<string, unknown> = Record<string, unknown>>(schema: T, config: F0FieldConfig<V, R>): T & F0ZodType<T>;
|
|
4381
4750
|
|
|
4751
|
+
declare interface F0FormFieldCommonProps {
|
|
4752
|
+
/** Field definition (type, label, placeholder, etc.) */
|
|
4753
|
+
/** Current field value */
|
|
4754
|
+
value: unknown;
|
|
4755
|
+
/** Called when the field value changes */
|
|
4756
|
+
onChange: (value: unknown) => void;
|
|
4757
|
+
/** Called when the field loses focus */
|
|
4758
|
+
onBlur?: () => void;
|
|
4759
|
+
/** Whether the field has an error */
|
|
4760
|
+
error?: boolean;
|
|
4761
|
+
/** Error message to display */
|
|
4762
|
+
errorMessage?: string;
|
|
4763
|
+
/** Whether the field is in a loading/validating state */
|
|
4764
|
+
loading?: boolean;
|
|
4765
|
+
/** Whether the field is required */
|
|
4766
|
+
required?: boolean;
|
|
4767
|
+
/** Whether the field is disabled (overrides field.disabled) */
|
|
4768
|
+
disabled?: boolean;
|
|
4769
|
+
/** Whether to hide the label (useful when label is rendered externally) */
|
|
4770
|
+
hideLabel?: boolean;
|
|
4771
|
+
}
|
|
4772
|
+
|
|
4773
|
+
declare interface F0FormFieldFileProps extends F0FormFieldCommonProps {
|
|
4774
|
+
/** File field definition */
|
|
4775
|
+
field: F0FileField;
|
|
4776
|
+
/** Shared pool of pre-existing file metadata for standalone file fields */
|
|
4777
|
+
initialFiles?: InitialFile[];
|
|
4778
|
+
}
|
|
4779
|
+
|
|
4780
|
+
declare interface F0FormFieldNonFileProps extends F0FormFieldCommonProps {
|
|
4781
|
+
/** Non-file field definition */
|
|
4782
|
+
field: Exclude<F0Field, F0FileField>;
|
|
4783
|
+
/** Only supported for file fields */
|
|
4784
|
+
initialFiles?: never;
|
|
4785
|
+
}
|
|
4786
|
+
|
|
4787
|
+
export declare type F0FormFieldProps = F0FormFieldFileProps | F0FormFieldNonFileProps;
|
|
4788
|
+
|
|
4382
4789
|
/**
|
|
4383
4790
|
* Union of all F0Form prop variants.
|
|
4384
4791
|
* The component detects the mode based on whether `schema` is a single Zod schema
|
|
@@ -4570,6 +4977,12 @@ declare interface F0FormSubmitConfigBase {
|
|
|
4570
4977
|
icon?: IconType | null;
|
|
4571
4978
|
/** Label shown in the action bar while submitting (defaults to i18n "forms.actionBar.saving") */
|
|
4572
4979
|
savingMessage?: string;
|
|
4980
|
+
/**
|
|
4981
|
+
* Duration in ms before the success message auto-clears.
|
|
4982
|
+
* - number: auto-clear after this many ms (default: 3000)
|
|
4983
|
+
* - null: never auto-clear (caller is responsible for unmounting)
|
|
4984
|
+
*/
|
|
4985
|
+
successMessageDuration?: number | null;
|
|
4573
4986
|
}
|
|
4574
4987
|
|
|
4575
4988
|
/**
|
|
@@ -5163,7 +5576,7 @@ export declare const F0TableOfContentPopover: WithDataTestIdReturnType_3<typeof
|
|
|
5163
5576
|
* Internal implementation of the TableOfContentPopover component.
|
|
5164
5577
|
* This component includes all props including private ones.
|
|
5165
5578
|
*/
|
|
5166
|
-
declare function F0TableOfContentPopover_2({ title, items, className, activeItem, collapsible, sortable, onReorder, showChildrenCounter, barsAlign, size, variant, }: F0TableOfContentPopoverProps): JSX_2.Element;
|
|
5579
|
+
declare function F0TableOfContentPopover_2({ title, items, className, activeItem, collapsible, sortable, onReorder, showChildrenCounter, barsAlign, size, variant, portalContainer, }: F0TableOfContentPopoverProps): JSX_2.Element;
|
|
5167
5580
|
|
|
5168
5581
|
declare interface F0TableOfContentPopoverProps extends Omit<TOCProps, "showSearchBox" | "title" | "hideChildrenCounter"> {
|
|
5169
5582
|
/** Optional title displayed at the top of the menu popup */
|
|
@@ -5178,6 +5591,8 @@ declare interface F0TableOfContentPopoverProps extends Omit<TOCProps, "showSearc
|
|
|
5178
5591
|
size?: PopupSize;
|
|
5179
5592
|
/** Visual variant: "dark" for light backgrounds (default), "light" for dark backgrounds */
|
|
5180
5593
|
variant?: TableOfContentPopoverVariant;
|
|
5594
|
+
/** Container element for the portal. When inside a modal, pass the modal's container to prevent focus/click issues */
|
|
5595
|
+
portalContainer?: HTMLElement | null;
|
|
5181
5596
|
}
|
|
5182
5597
|
|
|
5183
5598
|
export declare const F0TagAlert: WithDataTestIdReturnType_4<ForwardRefExoticComponent<Props_2 & RefAttributes<HTMLDivElement>>>;
|
|
@@ -5643,6 +6058,30 @@ export declare type FlagAvatarVariant = Extract<AvatarVariant, {
|
|
|
5643
6058
|
type: "flag";
|
|
5644
6059
|
}>;
|
|
5645
6060
|
|
|
6061
|
+
export declare type FlatFormItem = {
|
|
6062
|
+
type: "section-header";
|
|
6063
|
+
id: string;
|
|
6064
|
+
section: SectionElement;
|
|
6065
|
+
} | {
|
|
6066
|
+
type: "question";
|
|
6067
|
+
id: string;
|
|
6068
|
+
question: QuestionElement;
|
|
6069
|
+
} | {
|
|
6070
|
+
type: "section-end";
|
|
6071
|
+
id: string;
|
|
6072
|
+
sectionId: string;
|
|
6073
|
+
};
|
|
6074
|
+
|
|
6075
|
+
export declare type FlatQuestion = {
|
|
6076
|
+
id: string;
|
|
6077
|
+
type: string;
|
|
6078
|
+
required?: boolean;
|
|
6079
|
+
sectionTitle?: string;
|
|
6080
|
+
sectionDescription?: string;
|
|
6081
|
+
};
|
|
6082
|
+
|
|
6083
|
+
export declare function flattenElements(elements: SurveyFormBuilderElement[]): FlatFormItem[];
|
|
6084
|
+
|
|
5646
6085
|
/** Flex direction */
|
|
5647
6086
|
export declare type FlexDirectionToken = "row" | "column" | "row-reverse" | "column-reverse";
|
|
5648
6087
|
|
|
@@ -5655,6 +6094,23 @@ declare const fontSizes: readonly ["sm", "md", "lg"];
|
|
|
5655
6094
|
|
|
5656
6095
|
/* Excluded from this release type: FormDefinitionItem */
|
|
5657
6096
|
|
|
6097
|
+
/**
|
|
6098
|
+
* Standalone form field props — decoupled from react-hook-form.
|
|
6099
|
+
* This is the minimal contract that field renderers need to operate.
|
|
6100
|
+
*/
|
|
6101
|
+
export declare interface FormFieldProps {
|
|
6102
|
+
/** Current field value */
|
|
6103
|
+
value: unknown;
|
|
6104
|
+
/** Called when the field value changes */
|
|
6105
|
+
onChange: (value: unknown) => void;
|
|
6106
|
+
/** Called when the field loses focus (used for validation triggers) */
|
|
6107
|
+
onBlur: () => void;
|
|
6108
|
+
/** Field name (defaults to field.id if not provided) */
|
|
6109
|
+
name?: string;
|
|
6110
|
+
/** Ref callback for the underlying input element */
|
|
6111
|
+
ref?: React.RefCallback<HTMLElement>;
|
|
6112
|
+
}
|
|
6113
|
+
|
|
5658
6114
|
/** Fraction tokens for proportional widths */
|
|
5659
6115
|
export declare type FractionToken = "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "5/6";
|
|
5660
6116
|
|
|
@@ -5668,6 +6124,28 @@ declare type FullscreenChatContextType = {
|
|
|
5668
6124
|
setInProgress: (value: boolean) => void;
|
|
5669
6125
|
};
|
|
5670
6126
|
|
|
6127
|
+
export declare interface FunnelChartConfig {
|
|
6128
|
+
type: "funnel";
|
|
6129
|
+
/** Sort direction of funnel stages. @default "descending" */
|
|
6130
|
+
sort?: "descending" | "ascending" | "none";
|
|
6131
|
+
/** Funnel orientation. @default "horizontal" */
|
|
6132
|
+
orient?: "horizontal" | "vertical";
|
|
6133
|
+
/** Show the legend below the chart. @default false */
|
|
6134
|
+
showLegend?: boolean;
|
|
6135
|
+
/** Show value labels on each stage. @default true */
|
|
6136
|
+
showLabels?: boolean;
|
|
6137
|
+
/**
|
|
6138
|
+
* Show conversion percentages in labels.
|
|
6139
|
+
* Each stage displays its value as a percentage of the first stage.
|
|
6140
|
+
* @default false
|
|
6141
|
+
*/
|
|
6142
|
+
showConversion?: boolean;
|
|
6143
|
+
/** Use a color scale gradient instead of distinct colors. @default true */
|
|
6144
|
+
colorScale?: boolean;
|
|
6145
|
+
/** Format the value displayed in labels and tooltip */
|
|
6146
|
+
valueFormatter?: (value: number) => string;
|
|
6147
|
+
}
|
|
6148
|
+
|
|
5671
6149
|
/**
|
|
5672
6150
|
* Gap tokens for spacing between flex/grid children.
|
|
5673
6151
|
* Uses betweenSpacing (rem) for sm–xl, absoluteSpacing (px) for extended sizes.
|
|
@@ -5687,6 +6165,20 @@ declare type FullscreenChatContextType = {
|
|
|
5687
6165
|
*/
|
|
5688
6166
|
export declare type GapToken = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl";
|
|
5689
6167
|
|
|
6168
|
+
export declare interface GaugeChartConfig {
|
|
6169
|
+
type: "gauge";
|
|
6170
|
+
/** Minimum value. @default 0 */
|
|
6171
|
+
min?: number;
|
|
6172
|
+
/** Maximum value. @default 100 */
|
|
6173
|
+
max?: number;
|
|
6174
|
+
/** Color token for the gauge arc */
|
|
6175
|
+
color?: ChartColorToken;
|
|
6176
|
+
/** Show the numeric value inside the gauge. @default true */
|
|
6177
|
+
showValue?: boolean;
|
|
6178
|
+
/** Format the value displayed inside the gauge */
|
|
6179
|
+
valueFormatter?: (value: number) => string;
|
|
6180
|
+
}
|
|
6181
|
+
|
|
5690
6182
|
/**
|
|
5691
6183
|
* Generates an anchor ID for a form element
|
|
5692
6184
|
* Format: forms.[formName].[sectionId].[fieldId]
|
|
@@ -5894,6 +6386,20 @@ declare type HeadingTags = (typeof headingTags)[number];
|
|
|
5894
6386
|
|
|
5895
6387
|
declare const headingTags: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
5896
6388
|
|
|
6389
|
+
export declare interface HeatmapChartConfig {
|
|
6390
|
+
type: "heatmap";
|
|
6391
|
+
/** Minimum value for the color scale */
|
|
6392
|
+
min?: number;
|
|
6393
|
+
/** Maximum value for the color scale */
|
|
6394
|
+
max?: number;
|
|
6395
|
+
/** Show value labels on each cell. @default false */
|
|
6396
|
+
showLabels?: boolean;
|
|
6397
|
+
/** Show the visual map legend. @default false */
|
|
6398
|
+
showVisualMap?: boolean;
|
|
6399
|
+
/** Format the value displayed in cells and tooltip */
|
|
6400
|
+
valueFormatter?: (value: number) => string;
|
|
6401
|
+
}
|
|
6402
|
+
|
|
5897
6403
|
declare type heightType = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | "auto";
|
|
5898
6404
|
|
|
5899
6405
|
export declare const HomeLayout: WithDataTestIdReturnType_2<ForwardRefExoticComponent<Omit<{
|
|
@@ -6063,6 +6569,21 @@ export declare interface InitialFile {
|
|
|
6063
6569
|
size?: number;
|
|
6064
6570
|
}
|
|
6065
6571
|
|
|
6572
|
+
/**
|
|
6573
|
+
* Re-inject section-end markers into a flat list that has none.
|
|
6574
|
+
*
|
|
6575
|
+
* Uses `inSectionQuestionIds` (the set of question IDs that originally
|
|
6576
|
+
* belonged to *any* section) to determine where each section ends:
|
|
6577
|
+
* - Questions in the set stay inside the current section.
|
|
6578
|
+
* - Original standalone questions (NOT in the set) cause the section to close
|
|
6579
|
+
* before them so they remain standalone.
|
|
6580
|
+
*
|
|
6581
|
+
* This allows cross-section moves (a question from section B placed after
|
|
6582
|
+
* section A's header joins section A) while keeping standalone questions
|
|
6583
|
+
* outside sections unless the user explicitly drags them between section items.
|
|
6584
|
+
*/
|
|
6585
|
+
export declare function injectSectionEnds(items: FlatFormItem[], inSectionQuestionIds: Set<string>): FlatFormItem[];
|
|
6586
|
+
|
|
6066
6587
|
declare const INPUTFIELD_SIZES: readonly ["sm", "md"];
|
|
6067
6588
|
|
|
6068
6589
|
declare type InputFieldInheritedProps = (typeof inputFieldInheritedProps)[number];
|
|
@@ -6279,10 +6800,20 @@ declare const levels: readonly ["info", "warning", "critical", "positive"];
|
|
|
6279
6800
|
|
|
6280
6801
|
export declare function Li({ children, ...props }: React.HTMLAttributes<HTMLLIElement>): JSX_2.Element;
|
|
6281
6802
|
|
|
6282
|
-
export declare const LineChart: WithDataTestIdReturnType_5<ForwardRefExoticComponent<Omit<LineChartPropsBase<
|
|
6803
|
+
export declare const LineChart: WithDataTestIdReturnType_5<ForwardRefExoticComponent<Omit<LineChartPropsBase<LineChartConfig_2> & {
|
|
6283
6804
|
lineType?: "natural" | "linear";
|
|
6284
6805
|
} & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>>;
|
|
6285
6806
|
|
|
6807
|
+
export declare interface LineChartConfig extends ChartConfigBase {
|
|
6808
|
+
type: "line";
|
|
6809
|
+
/** @default "linear" */
|
|
6810
|
+
lineType?: "linear" | "smooth" | "step";
|
|
6811
|
+
/** Show gradient area fill below lines. @default true */
|
|
6812
|
+
showArea?: boolean;
|
|
6813
|
+
/** Show data point dots on the lines. @default false */
|
|
6814
|
+
showDots?: boolean;
|
|
6815
|
+
}
|
|
6816
|
+
|
|
6286
6817
|
declare type LinkContextValue = {
|
|
6287
6818
|
currentPath?: string;
|
|
6288
6819
|
component?: (props: LinkProps, ref: ForwardedRef<HTMLAnchorElement>) => JSX.Element;
|
|
@@ -6293,6 +6824,10 @@ declare type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
|
6293
6824
|
disabled?: boolean;
|
|
6294
6825
|
};
|
|
6295
6826
|
|
|
6827
|
+
declare type LinkQuestionProps = BaseQuestionPropsForOtherQuestionComponents & {
|
|
6828
|
+
value?: string | null;
|
|
6829
|
+
};
|
|
6830
|
+
|
|
6296
6831
|
export declare const linkVariants: readonly ["link", "unstyled", "mention"];
|
|
6297
6832
|
|
|
6298
6833
|
/**
|
|
@@ -6384,6 +6919,20 @@ declare type MentionsConfig = {
|
|
|
6384
6919
|
users: MentionedUser[];
|
|
6385
6920
|
};
|
|
6386
6921
|
|
|
6922
|
+
/** How to format the metric value */
|
|
6923
|
+
export declare type MetricFormat = {
|
|
6924
|
+
type: "number";
|
|
6925
|
+
} | {
|
|
6926
|
+
type: "currency";
|
|
6927
|
+
currency?: string;
|
|
6928
|
+
} | {
|
|
6929
|
+
type: "percent";
|
|
6930
|
+
} | {
|
|
6931
|
+
type: "custom";
|
|
6932
|
+
suffix?: string;
|
|
6933
|
+
prefix?: string;
|
|
6934
|
+
};
|
|
6935
|
+
|
|
6387
6936
|
/**
|
|
6388
6937
|
* Known MIME types for the file field `accept` prop.
|
|
6389
6938
|
*
|
|
@@ -6664,6 +7213,10 @@ declare type NumericFormatterOptions = {
|
|
|
6664
7213
|
useGrouping?: boolean;
|
|
6665
7214
|
};
|
|
6666
7215
|
|
|
7216
|
+
declare type NumericQuestionProps = BaseQuestionPropsForOtherQuestionComponents & {
|
|
7217
|
+
value?: number | null;
|
|
7218
|
+
};
|
|
7219
|
+
|
|
6667
7220
|
/**
|
|
6668
7221
|
* Numeric size scale matching core spacing (relativeSpacing).
|
|
6669
7222
|
* Maps 1:1 to Tailwind classes like w-0, w-4, w-8, w-16, etc.
|
|
@@ -6732,11 +7285,61 @@ declare type NumericWithFormatter = {
|
|
|
6732
7285
|
|
|
6733
7286
|
export declare function Ol({ children, ...props }: React.HTMLAttributes<HTMLOListElement>): JSX_2.Element;
|
|
6734
7287
|
|
|
7288
|
+
export declare type OnAddNewElementParams = {
|
|
7289
|
+
type: ElementType;
|
|
7290
|
+
afterId?: string;
|
|
7291
|
+
};
|
|
7292
|
+
|
|
6735
7293
|
declare type OnBulkActionCallback<Record extends RecordType, Filters extends FiltersDefinition> = (...args: [
|
|
6736
7294
|
action: BulkAction,
|
|
6737
7295
|
...Parameters<OnSelectItemsCallback<Record, Filters>>
|
|
6738
7296
|
]) => void;
|
|
6739
7297
|
|
|
7298
|
+
declare type OnChangeQuestionParams = BaseQuestionOnChangeParams & ({
|
|
7299
|
+
type: "text" | "longText";
|
|
7300
|
+
value?: string | null;
|
|
7301
|
+
} | {
|
|
7302
|
+
type: "rating";
|
|
7303
|
+
value: number;
|
|
7304
|
+
options?: {
|
|
7305
|
+
value: number;
|
|
7306
|
+
label: string;
|
|
7307
|
+
}[];
|
|
7308
|
+
} | {
|
|
7309
|
+
type: "select";
|
|
7310
|
+
value?: string | null;
|
|
7311
|
+
options: SelectQuestionOption[];
|
|
7312
|
+
} | {
|
|
7313
|
+
type: "multi-select";
|
|
7314
|
+
value?: string[] | null;
|
|
7315
|
+
options: SelectQuestionOption[];
|
|
7316
|
+
} | {
|
|
7317
|
+
type: "dropdown-single";
|
|
7318
|
+
value?: string | null;
|
|
7319
|
+
options?: SelectQuestionOption[];
|
|
7320
|
+
} | {
|
|
7321
|
+
type: "numeric";
|
|
7322
|
+
value?: number | null;
|
|
7323
|
+
} | {
|
|
7324
|
+
type: "link";
|
|
7325
|
+
value?: string | null;
|
|
7326
|
+
} | {
|
|
7327
|
+
type: "date";
|
|
7328
|
+
value?: Date | null;
|
|
7329
|
+
});
|
|
7330
|
+
|
|
7331
|
+
export declare type OnChangeSectionParams = {
|
|
7332
|
+
id: string;
|
|
7333
|
+
title: string;
|
|
7334
|
+
description?: string;
|
|
7335
|
+
questions?: QuestionElement[];
|
|
7336
|
+
};
|
|
7337
|
+
|
|
7338
|
+
export declare type OnDuplicateElementParams = {
|
|
7339
|
+
elementId: string;
|
|
7340
|
+
type: ElementType;
|
|
7341
|
+
};
|
|
7342
|
+
|
|
6740
7343
|
export declare const OneFilterPicker: <Definition extends FiltersDefinition>(props: OneFilterPickerRootProps<Definition> & {
|
|
6741
7344
|
dataTestId?: string;
|
|
6742
7345
|
}) => ReactElement | null;
|
|
@@ -6915,6 +7518,20 @@ declare type PersonTagProps = ComponentProps<typeof F0TagPerson>;
|
|
|
6915
7518
|
|
|
6916
7519
|
export declare const PieChart: WithDataTestIdReturnType_5<ForwardRefExoticComponent<Omit<PieChartProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>>;
|
|
6917
7520
|
|
|
7521
|
+
export declare interface PieChartConfig {
|
|
7522
|
+
type: "pie";
|
|
7523
|
+
/** Inner radius ratio (0 = full pie, >0 = donut). @default 0 */
|
|
7524
|
+
innerRadius?: number;
|
|
7525
|
+
/** Show the legend below the chart. @default true */
|
|
7526
|
+
showLegend?: boolean;
|
|
7527
|
+
/** Show value labels on each segment. @default true */
|
|
7528
|
+
showLabels?: boolean;
|
|
7529
|
+
/** Show percentage in labels. @default false */
|
|
7530
|
+
showPercentage?: boolean;
|
|
7531
|
+
/** Format the value displayed in labels and tooltip */
|
|
7532
|
+
valueFormatter?: (value: number) => string;
|
|
7533
|
+
}
|
|
7534
|
+
|
|
6918
7535
|
declare type PopupSize = "sm" | "md" | "lg";
|
|
6919
7536
|
|
|
6920
7537
|
/** CSS position */
|
|
@@ -7169,6 +7786,53 @@ declare type Props_3 = {
|
|
|
7169
7786
|
list?: TagCounterItem[];
|
|
7170
7787
|
};
|
|
7171
7788
|
|
|
7789
|
+
export declare type QuestionActionParams = {
|
|
7790
|
+
questionId: string;
|
|
7791
|
+
type: ActionType;
|
|
7792
|
+
index: number;
|
|
7793
|
+
};
|
|
7794
|
+
|
|
7795
|
+
export declare type QuestionElement = Omit<TextQuestionProps, QuestionPropsToOmit> | Omit<RatingQuestionProps & {
|
|
7796
|
+
type: "rating";
|
|
7797
|
+
}, QuestionPropsToOmit> | Omit<SelectQuestionProps & {
|
|
7798
|
+
type: "select" | "multi-select";
|
|
7799
|
+
}, QuestionPropsToOmit> | Omit<DropdownSingleQuestionProps & {
|
|
7800
|
+
type: "dropdown-single";
|
|
7801
|
+
}, QuestionPropsToOmit> | Omit<NumericQuestionProps & {
|
|
7802
|
+
type: "numeric";
|
|
7803
|
+
}, QuestionPropsToOmit> | Omit<LinkQuestionProps & {
|
|
7804
|
+
type: "link";
|
|
7805
|
+
}, QuestionPropsToOmit> | Omit<DateQuestionProps & {
|
|
7806
|
+
type: "date";
|
|
7807
|
+
}, QuestionPropsToOmit>;
|
|
7808
|
+
|
|
7809
|
+
declare type QuestionPropsToOmit = "onAction" | "onChange" | "onAddNewElement";
|
|
7810
|
+
|
|
7811
|
+
export declare type QuestionType = "rating" | "select" | "multi-select" | "dropdown-single" | "text" | "longText" | "numeric" | "link" | "date";
|
|
7812
|
+
|
|
7813
|
+
export declare interface RadarChartConfig {
|
|
7814
|
+
type: "radar";
|
|
7815
|
+
/** Fill the radar area. @default true */
|
|
7816
|
+
showArea?: boolean;
|
|
7817
|
+
/** Show the legend below the chart. @default true */
|
|
7818
|
+
showLegend?: boolean;
|
|
7819
|
+
/** Show value labels on data points. @default false */
|
|
7820
|
+
showLabels?: boolean;
|
|
7821
|
+
/** Format the value displayed in labels and tooltip */
|
|
7822
|
+
valueFormatter?: (value: number) => string;
|
|
7823
|
+
}
|
|
7824
|
+
|
|
7825
|
+
declare type RatingQuestionProps = BaseQuestionPropsForOtherQuestionComponents & {
|
|
7826
|
+
value?: number;
|
|
7827
|
+
} & {
|
|
7828
|
+
options: {
|
|
7829
|
+
value: number;
|
|
7830
|
+
label: string;
|
|
7831
|
+
}[];
|
|
7832
|
+
};
|
|
7833
|
+
|
|
7834
|
+
export declare function reconstructElements(flatItems: FlatFormItem[]): SurveyFormBuilderElement[];
|
|
7835
|
+
|
|
7172
7836
|
/**
|
|
7173
7837
|
* Utility type to get all possible paths through an object using dot notation
|
|
7174
7838
|
* @template T - The object type to traverse
|
|
@@ -7336,8 +8000,24 @@ declare type SecondaryActionsDefinition = {
|
|
|
7336
8000
|
|
|
7337
8001
|
declare type SecondaryActionsItems = SecondaryActionItem[] | SecondaryActionItem[][] | SecondaryActionGroup[];
|
|
7338
8002
|
|
|
8003
|
+
export declare type SectionActionParams = {
|
|
8004
|
+
sectionId: string;
|
|
8005
|
+
type: ActionType;
|
|
8006
|
+
index: number;
|
|
8007
|
+
};
|
|
8008
|
+
|
|
7339
8009
|
/* Excluded from this release type: SectionDefinition */
|
|
7340
8010
|
|
|
8011
|
+
export declare type SectionElement = Omit<SectionProps, "onAction" | "onChange">;
|
|
8012
|
+
|
|
8013
|
+
declare type SectionProps = {
|
|
8014
|
+
id: string;
|
|
8015
|
+
title: string;
|
|
8016
|
+
description?: string;
|
|
8017
|
+
locked?: boolean;
|
|
8018
|
+
questions?: QuestionElement[];
|
|
8019
|
+
};
|
|
8020
|
+
|
|
7341
8021
|
/**
|
|
7342
8022
|
* Conditional rendering for sections - can be a condition object or a function
|
|
7343
8023
|
*/
|
|
@@ -7412,6 +8092,23 @@ export declare type SelectionStatus<R extends RecordType, Filters extends Filter
|
|
|
7412
8092
|
totalKnownItemsCount: number;
|
|
7413
8093
|
};
|
|
7414
8094
|
|
|
8095
|
+
export declare type SelectQuestionOption = {
|
|
8096
|
+
id?: string;
|
|
8097
|
+
value: string;
|
|
8098
|
+
label: string;
|
|
8099
|
+
correct?: boolean;
|
|
8100
|
+
};
|
|
8101
|
+
|
|
8102
|
+
declare type SelectQuestionProps = BaseQuestionPropsForOtherQuestionComponents & {
|
|
8103
|
+
options: SelectQuestionOption[];
|
|
8104
|
+
} & ({
|
|
8105
|
+
type: "select";
|
|
8106
|
+
value?: string | null;
|
|
8107
|
+
} | {
|
|
8108
|
+
type: "multi-select";
|
|
8109
|
+
value?: string[] | null;
|
|
8110
|
+
});
|
|
8111
|
+
|
|
7415
8112
|
/**
|
|
7416
8113
|
* Base for select-specific conditions
|
|
7417
8114
|
*/
|
|
@@ -7537,6 +8234,87 @@ declare type SummaryKey<Definition extends SummariesDefinition> = Definition ext
|
|
|
7537
8234
|
|
|
7538
8235
|
declare type SummaryType = "sum";
|
|
7539
8236
|
|
|
8237
|
+
export declare function SurveyAnsweringForm({ elements, onSubmit, mode, title, isOpen, onClose, fullscreen: fullscreenProp, allowToChangeFullscreen, defaultValues, errorTriggerMode, }: SurveyAnsweringFormProps): JSX_2.Element;
|
|
8238
|
+
|
|
8239
|
+
export declare type SurveyAnsweringFormMode = "stepped" | "all-questions";
|
|
8240
|
+
|
|
8241
|
+
export declare interface SurveyAnsweringFormProps {
|
|
8242
|
+
elements: SurveyFormBuilderElement[];
|
|
8243
|
+
onSubmit: (answers: SurveySubmitAnswers) => Promise<SurveyFormSubmitResult> | SurveyFormSubmitResult;
|
|
8244
|
+
mode: SurveyAnsweringFormMode;
|
|
8245
|
+
title: string;
|
|
8246
|
+
isOpen: boolean;
|
|
8247
|
+
onClose: () => void;
|
|
8248
|
+
fullscreen?: boolean;
|
|
8249
|
+
allowToChangeFullscreen?: boolean;
|
|
8250
|
+
defaultValues?: Partial<SurveyAnswers>;
|
|
8251
|
+
errorTriggerMode?: F0FormErrorTriggerMode;
|
|
8252
|
+
}
|
|
8253
|
+
|
|
8254
|
+
export declare type SurveyAnswers = Record<string, SurveyAnswerValue>;
|
|
8255
|
+
|
|
8256
|
+
export declare type SurveyAnswerValue = {
|
|
8257
|
+
type: "text" | "longText";
|
|
8258
|
+
value: string | null;
|
|
8259
|
+
} | {
|
|
8260
|
+
type: "rating";
|
|
8261
|
+
value: number | null;
|
|
8262
|
+
} | {
|
|
8263
|
+
type: "select";
|
|
8264
|
+
value: string | null;
|
|
8265
|
+
} | {
|
|
8266
|
+
type: "multi-select";
|
|
8267
|
+
value: string[] | null;
|
|
8268
|
+
} | {
|
|
8269
|
+
type: "dropdown-single";
|
|
8270
|
+
value: string | null;
|
|
8271
|
+
} | {
|
|
8272
|
+
type: "numeric";
|
|
8273
|
+
value: number | null;
|
|
8274
|
+
} | {
|
|
8275
|
+
type: "link";
|
|
8276
|
+
value: string | null;
|
|
8277
|
+
} | {
|
|
8278
|
+
type: "date";
|
|
8279
|
+
value: Date | null;
|
|
8280
|
+
};
|
|
8281
|
+
|
|
8282
|
+
export declare const SurveyFormBuilder: WithDataTestIdReturnType_7<({ elements: elementsProp, disabled, onChange, disallowOptionalQuestions, allowedQuestionTypes, applyingChanges, }: SurveyFormBuilderProps) => JSX_2.Element>;
|
|
8283
|
+
|
|
8284
|
+
export declare type SurveyFormBuilderCallbacks = {
|
|
8285
|
+
onQuestionChange?: (params: OnChangeQuestionParams) => void;
|
|
8286
|
+
onSectionChange?: (params: OnChangeSectionParams) => void;
|
|
8287
|
+
onAddNewElement?: (params: OnAddNewElementParams) => void;
|
|
8288
|
+
onDuplicateElement?: (params: OnDuplicateElementParams) => void;
|
|
8289
|
+
};
|
|
8290
|
+
|
|
8291
|
+
export declare type SurveyFormBuilderElement = {
|
|
8292
|
+
type: "section";
|
|
8293
|
+
section: SectionElement;
|
|
8294
|
+
} | {
|
|
8295
|
+
type: "question";
|
|
8296
|
+
question: QuestionElement;
|
|
8297
|
+
};
|
|
8298
|
+
|
|
8299
|
+
export declare type SurveyFormBuilderProps = {
|
|
8300
|
+
elements: SurveyFormBuilderElement[];
|
|
8301
|
+
onChange: (elements: SurveyFormBuilderElement[]) => void;
|
|
8302
|
+
disabled?: boolean;
|
|
8303
|
+
disallowOptionalQuestions?: boolean;
|
|
8304
|
+
allowedQuestionTypes?: QuestionType[];
|
|
8305
|
+
applyingChanges?: boolean;
|
|
8306
|
+
};
|
|
8307
|
+
|
|
8308
|
+
export declare type SurveyFormSubmitResult = {
|
|
8309
|
+
success: true;
|
|
8310
|
+
message?: string;
|
|
8311
|
+
} | {
|
|
8312
|
+
success: false;
|
|
8313
|
+
errors?: Record<string, string>;
|
|
8314
|
+
};
|
|
8315
|
+
|
|
8316
|
+
export declare type SurveySubmitAnswers = Record<string, string | number | string[] | Date | null>;
|
|
8317
|
+
|
|
7540
8318
|
/**
|
|
7541
8319
|
* All valid renderIf conditions for switch fields
|
|
7542
8320
|
*/
|
|
@@ -7895,6 +8673,11 @@ declare interface TextProps extends Omit<default_2.HTMLAttributes<HTMLElement>,
|
|
|
7895
8673
|
required?: boolean;
|
|
7896
8674
|
}
|
|
7897
8675
|
|
|
8676
|
+
declare type TextQuestionProps = BaseQuestionPropsForOtherQuestionComponents & {
|
|
8677
|
+
type: "text" | "longText";
|
|
8678
|
+
value?: string | null;
|
|
8679
|
+
};
|
|
8680
|
+
|
|
7898
8681
|
/**
|
|
7899
8682
|
* Base for text-specific conditions
|
|
7900
8683
|
*/
|