@factorialco/f0-react 1.423.0 → 1.425.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/f0.d.ts CHANGED
@@ -1916,6 +1916,12 @@ declare interface CheckboxProps extends DataAttributes_2 {
1916
1916
  required?: boolean;
1917
1917
  }
1918
1918
 
1919
+ declare type CheckboxQuestionProps = BaseQuestionPropsForOtherQuestionComponents & {
1920
+ type: "checkbox";
1921
+ value?: boolean | null;
1922
+ label: string;
1923
+ };
1924
+
1919
1925
  declare type ChildrenPaginationInfo = {
1920
1926
  total: number;
1921
1927
  perPage: number;
@@ -3305,6 +3311,7 @@ export declare const defaultTranslations: {
3305
3311
  readonly date: "Date";
3306
3312
  readonly dropdownSingle: "Dropdown";
3307
3313
  readonly file: "File upload";
3314
+ readonly checkbox: "Checkbox";
3308
3315
  };
3309
3316
  readonly selectQuestion: {
3310
3317
  readonly addOption: "Add option";
@@ -3317,6 +3324,9 @@ export declare const defaultTranslations: {
3317
3324
  readonly fileQuestion: {
3318
3325
  readonly uploadButton: "Upload file";
3319
3326
  };
3327
+ readonly checkboxQuestion: {
3328
+ readonly placeholder: "Provide a label for the checkbox";
3329
+ };
3320
3330
  readonly answer: {
3321
3331
  readonly label: "Answer";
3322
3332
  readonly dropdownPlaceholder: "Pick an option";
@@ -3628,7 +3638,7 @@ export declare type DurationUnit = (typeof durationUnits)[number];
3628
3638
  export declare const durationUnits: readonly ["days", "hours", "minutes", "seconds"];
3629
3639
 
3630
3640
  /** The edit mode for a column cell in the editable table. */
3631
- declare type EditableTableCellEditType = "text" | "date" | "select" | "multiselect" | "display-only" | "disabled";
3641
+ declare type EditableTableCellEditType = "text" | "number" | "date" | "select" | "multiselect" | "display-only" | "disabled";
3632
3642
 
3633
3643
  declare type EditableTableCollectionProps<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<R>> = CollectionProps<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping, EditableTableVisualizationOptions<R, Filters, Sortings, Summaries>>;
3634
3644
 
@@ -3660,6 +3670,12 @@ declare type EditableTableColumnDefinition<R extends RecordType, Sortings extend
3660
3670
  * function whose return value isn't statically known.
3661
3671
  */
3662
3672
  selectConfig?: SelectCellConfig<R>;
3673
+ /**
3674
+ * Configuration for `"number"` cells. Accepts constraints (`min`, `max`),
3675
+ * stepping (`step`), formatting (`maxDecimals`, `locale`), and units.
3676
+ * Falls back to sensible defaults when omitted.
3677
+ */
3678
+ numberConfig?: NumberCellConfig;
3663
3679
  };
3664
3680
 
3665
3681
  declare type EditableTableVisualizationOptions<R extends RecordType, _Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition> = Omit<TableVisualizationOptions<R, _Filters, Sortings, Summaries>, "columns"> & {
@@ -8111,6 +8127,15 @@ export declare interface NextStepsProps {
8111
8127
  items: StepItemProps[];
8112
8128
  }
8113
8129
 
8130
+ declare type NumberCellConfig = {
8131
+ min?: number;
8132
+ max?: number;
8133
+ step?: number;
8134
+ maxDecimals?: number;
8135
+ locale?: string;
8136
+ units?: string;
8137
+ };
8138
+
8114
8139
  /**
8115
8140
  * All valid renderIf conditions for number fields
8116
8141
  */
@@ -8345,6 +8370,10 @@ declare type OnChangeQuestionParams = BaseQuestionOnChangeParams & ({
8345
8370
  } | {
8346
8371
  type: "file";
8347
8372
  value?: string[] | null;
8373
+ } | {
8374
+ type: "checkbox";
8375
+ value?: boolean | null;
8376
+ label: string;
8348
8377
  });
8349
8378
 
8350
8379
  export declare type OnChangeSectionParams = {
@@ -8852,11 +8881,13 @@ export declare type QuestionElement = Omit<TextQuestionProps, QuestionPropsToOmi
8852
8881
  type: "date";
8853
8882
  }, QuestionPropsToOmit> | Omit<FileQuestionProps & {
8854
8883
  type: "file";
8884
+ }, QuestionPropsToOmit> | Omit<CheckboxQuestionProps & {
8885
+ type: "checkbox";
8855
8886
  }, QuestionPropsToOmit>;
8856
8887
 
8857
8888
  declare type QuestionPropsToOmit = "onAction" | "onChange" | "onAddNewElement";
8858
8889
 
8859
- export declare type QuestionType = "rating" | "select" | "multi-select" | "dropdown-single" | "text" | "longText" | "numeric" | "link" | "date" | "file";
8890
+ export declare type QuestionType = "rating" | "select" | "multi-select" | "dropdown-single" | "text" | "longText" | "numeric" | "link" | "date" | "file" | "checkbox";
8860
8891
 
8861
8892
  export declare interface RadarChartConfig {
8862
8893
  type: "radar";
@@ -9451,6 +9482,9 @@ export declare type SurveyAnswerValue = {
9451
9482
  } | {
9452
9483
  type: "file";
9453
9484
  value: string[] | null;
9485
+ } | {
9486
+ type: "checkbox";
9487
+ value: boolean | null;
9454
9488
  };
9455
9489
 
9456
9490
  export declare const SurveyFormBuilder: WithDataTestIdReturnType_7<({ elements: elementsProp, disabled, onChange, disallowOptionalQuestions, allowedQuestionTypes, applyingChanges, useUpload, }: SurveyFormBuilderProps) => JSX_2.Element>;
@@ -9488,7 +9522,7 @@ export declare type SurveyFormSubmitResult = {
9488
9522
  errors?: Record<string, string>;
9489
9523
  };
9490
9524
 
9491
- export declare type SurveySubmitAnswers = Record<string, string | number | string[] | Date | null>;
9525
+ export declare type SurveySubmitAnswers = Record<string, string | number | boolean | string[] | Date | null>;
9492
9526
 
9493
9527
  /**
9494
9528
  * All valid renderIf conditions for switch fields
@@ -10812,6 +10846,11 @@ declare module "gridstack" {
10812
10846
  }
10813
10847
 
10814
10848
 
10849
+ declare namespace Calendar {
10850
+ var displayName: string;
10851
+ }
10852
+
10853
+
10815
10854
  declare module "@tiptap/core" {
10816
10855
  interface Commands<ReturnType> {
10817
10856
  aiBlock: {
@@ -10859,8 +10898,3 @@ declare module "@tiptap/core" {
10859
10898
  };
10860
10899
  }
10861
10900
  }
10862
-
10863
-
10864
- declare namespace Calendar {
10865
- var displayName: string;
10866
- }