@factorialco/f0-react 4.38.0 → 4.39.1

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
@@ -3151,6 +3151,13 @@ declare type CollectionProps<Record extends RecordType, Filters extends FiltersD
3151
3151
  tmpFullWidth?: boolean;
3152
3152
  /** Indicates the source visualization type */
3153
3153
  fromVisualization?: TableVisualizationType;
3154
+ /**
3155
+ * Bumps on every shared-search result selection. Lets a visualization
3156
+ * re-fire its reveal/focus even when the selected record (hence the derived
3157
+ * reveal target) is unchanged — so re-searching the same node re-centers,
3158
+ * like the graph's "Find me". Only the graph view reads it today.
3159
+ */
3160
+ searchSelectionNonce?: number;
3154
3161
  } & VisualizationOptions;
3155
3162
 
3156
3163
  declare type CollectionVisualizations<Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>> = {
@@ -4312,6 +4319,9 @@ declare type DateValue = {
4312
4319
  declare type DefaultAction = BannerAction;
4313
4320
 
4314
4321
  export declare const defaultTranslations: {
4322
+ readonly common: {
4323
+ readonly selectPlaceholder: "Select";
4324
+ };
4315
4325
  readonly countries: {
4316
4326
  ad: string;
4317
4327
  ae: string;
@@ -4617,6 +4627,9 @@ export declare const defaultTranslations: {
4617
4627
  readonly saveFailed: "Save failed";
4618
4628
  };
4619
4629
  readonly addRow: "Add row";
4630
+ readonly removeRow: "Remove row";
4631
+ readonly editRow: "Edit";
4632
+ readonly reorderRow: "Drag to reorder";
4620
4633
  };
4621
4634
  readonly itemsCount: "items";
4622
4635
  readonly emptyStates: {
@@ -5159,6 +5172,15 @@ export declare const defaultTranslations: {
5159
5172
  readonly invalidFileType: "File type not accepted. Accepted formats: {{types}}";
5160
5173
  readonly maxFilesReached: "Maximum {{maxFiles}} files";
5161
5174
  };
5175
+ readonly entitiesList: {
5176
+ readonly add: "Add";
5177
+ readonly edit: "Edit";
5178
+ readonly remove: "Remove";
5179
+ readonly view: "View";
5180
+ readonly addBlockedHint: "Finish filling out the last item you just added in order to add another one";
5181
+ readonly addBlockedErrorHint: "Fix the errors in the existing items before adding another one";
5182
+ readonly addBlockedMaxHint: "You've reached the maximum number of items";
5183
+ };
5162
5184
  readonly moreInformation: "More information";
5163
5185
  readonly validation: {
5164
5186
  readonly required: "This field is required";
@@ -5695,6 +5717,11 @@ declare type EditableTableColumnDefinition<R extends RecordType, Sortings extend
5695
5717
  * function whose return value isn't statically known.
5696
5718
  */
5697
5719
  selectConfig?: SelectCellConfig<R>;
5720
+ /**
5721
+ * Configuration for `"text"` cells. Sets the input type and an optional
5722
+ * leading icon (url/email get one by default).
5723
+ */
5724
+ textConfig?: TextCellConfig;
5698
5725
  /**
5699
5726
  * Configuration for `"number"` cells. Accepts constraints (`min`, `max`),
5700
5727
  * stepping (`step`), formatting (`maxDecimals`, `locale`), and units.
@@ -5866,6 +5893,17 @@ export declare type enhanceTextParams = {
5866
5893
  context?: string;
5867
5894
  };
5868
5895
 
5896
+ /**
5897
+ * All valid renderIf conditions for entities list fields
5898
+ */
5899
+ declare type EntitiesListFieldRenderIf = CommonRenderIfCondition | F0BaseFieldRenderIfFunction;
5900
+
5901
+ /**
5902
+ * A single entry in a entities list field. The row shape is defined by the
5903
+ * field's item `schema` (a Zod object), so entries are plain records.
5904
+ */
5905
+ declare type EntitiesListItem = Record<string, unknown>;
5906
+
5869
5907
  /**
5870
5908
  * Grouped configuration for entity references in the AI chat.
5871
5909
  * Combines resolver functions (data fetching) with URL builders (navigation).
@@ -7292,6 +7330,14 @@ export declare interface F0BaseConfig {
7292
7330
  * @default false
7293
7331
  */
7294
7332
  resetOnDisable?: boolean;
7333
+ /**
7334
+ * When true, a change to this field auto-saves the form (a debounced submit),
7335
+ * without waiting for the submit button. Other fields still save on submit.
7336
+ * Independent from the form-level `submitConfig: { type: "autosubmit" }`,
7337
+ * which auto-saves on any field change.
7338
+ * @default false
7339
+ */
7340
+ autoSave?: boolean;
7295
7341
  /** Row ID for horizontal grouping with other fields */
7296
7342
  row?: string;
7297
7343
  /**
@@ -7360,6 +7406,13 @@ export declare interface F0BaseField {
7360
7406
  * @default false
7361
7407
  */
7362
7408
  resetOnDisable?: boolean;
7409
+ /**
7410
+ * When true, a change to this field auto-saves the form (a debounced submit).
7411
+ * Other fields still save on submit. Independent from the form-level
7412
+ * `submitConfig: { type: "autosubmit" }`.
7413
+ * @default false
7414
+ */
7415
+ autoSave?: boolean;
7363
7416
  /** Alert displayed below the field (static props or conditional callback) */
7364
7417
  alert?: F0FieldAlert;
7365
7418
  /**
@@ -8690,6 +8743,308 @@ export declare interface F0DurationInputProps {
8690
8743
  size?: DurationInputSize;
8691
8744
  }
8692
8745
 
8746
+ /**
8747
+ * Per-column presentation options, keyed by the item-schema property name.
8748
+ *
8749
+ * @typeParam T - The row value type; inferred from the field `schema` so
8750
+ * callbacks like `listTag` receive a fully-typed `item`.
8751
+ */
8752
+ declare interface F0EntitiesListColumnConfig<T = EntitiesListItem> {
8753
+ /** Column header (defaults to the capitalized property name) */
8754
+ label?: string;
8755
+ /** Placeholder shown in the cell input */
8756
+ placeholder?: string;
8757
+ /** Fixed column width in pixels */
8758
+ width?: number;
8759
+ /**
8760
+ * For number/money columns, show the locale's thousands separators in the
8761
+ * resting cell display (grouped while blurred, ungrouped while editing).
8762
+ * Defaults to `true`; set `false` for numbers that shouldn't group (years,
8763
+ * IDs, …).
8764
+ */
8765
+ grouping?: boolean;
8766
+ /**
8767
+ * Hides the column while keeping its value in each row. Useful for values
8768
+ * that drive row actions (e.g. an `archived` flag toggled from a custom
8769
+ * action) but shouldn't be shown or edited as a cell.
8770
+ */
8771
+ hidden?: boolean;
8772
+ /**
8773
+ * In `list-view`, render this field as a read-only colored tag (a semantic
8774
+ * status tag or a dot-color tag) instead of plain text — e.g. map an enum
8775
+ * value to a color. Returned per row; return `undefined` to fall back to
8776
+ * text. The tag shows on the right side of the row and the field is dropped
8777
+ * from the description lines. Ignored in `editable-table` mode.
8778
+ */
8779
+ listTag?: (value: unknown, item: T) => F0EntitiesListFieldTag | undefined;
8780
+ }
8781
+
8782
+ /**
8783
+ * F0 config options specific to entities list fields.
8784
+ *
8785
+ * A entities list renders an editable table for an array of objects whose
8786
+ * shape is defined by `schema`. Columns and cell types are derived from the
8787
+ * schema: `z.string()` → text cell, `z.number()` → number cell,
8788
+ * `z.enum([...])` → select cell. Rows can be reordered by dragging, removed
8789
+ * individually, and appended (when `config.canAddItems` is not false).
8790
+ */
8791
+ declare interface F0EntitiesListConfig {
8792
+ /**
8793
+ * Zod object schema describing one row of the list (used for add, edit and
8794
+ * display). Provide this — the add/edit dialogs share the parent form's
8795
+ * submit — or `createFormDefinition` + `updateFormDefinition` for separate
8796
+ * submit handlers.
8797
+ */
8798
+ schema?: z.ZodObject<z.ZodRawShape>;
8799
+ /**
8800
+ * Form definition (own `onSubmit`) for the add dialog. Pair with
8801
+ * `updateFormDefinition`. Its submit runs on add, then the item is committed
8802
+ * to the field value.
8803
+ */
8804
+ createFormDefinition?: F0FormDefinitionSingleSchema<z.ZodObject<z.ZodRawShape>>;
8805
+ /**
8806
+ * Form definition (own `onSubmit`) for the edit dialog. Its schema is the
8807
+ * canonical row shape (columns, display, value type). Its submit runs on
8808
+ * edit, then the row is updated in the field value.
8809
+ */
8810
+ updateFormDefinition?: F0FormDefinitionSingleSchema<z.ZodObject<z.ZodRawShape>>;
8811
+ /** Behavior options (add button, min/max items, column presentation) */
8812
+ config?: F0EntitiesListOptions;
8813
+ }
8814
+
8815
+ /** Title and supporting description for one of the add/edit dialogs. */
8816
+ declare interface F0EntitiesListDialogLabels {
8817
+ /**
8818
+ * Dialog title. For the edit dialog this is also the tooltip of the per-row
8819
+ * edit action when it's shown icon-only (e.g. in `list-view`).
8820
+ */
8821
+ title?: string;
8822
+ /**
8823
+ * Supporting description shown under the dialog title. For the add (create)
8824
+ * dialog this is also shown as the add button's hover tooltip.
8825
+ */
8826
+ description?: string;
8827
+ }
8828
+
8829
+ /**
8830
+ * Entities list field with all properties for rendering (runtime type)
8831
+ */
8832
+ declare type F0EntitiesListField = F0BaseField & {
8833
+ type: "entitiesList";
8834
+ /** Canonical row schema; columns/display/value are derived from it */
8835
+ itemSchema: z.ZodObject<z.ZodRawShape>;
8836
+ /** User-provided add-dialog form definition (own onSubmit), if any */
8837
+ createFormDefinition?: F0FormDefinitionSingleSchema<z.ZodObject<z.ZodRawShape>>;
8838
+ /** User-provided edit-dialog form definition (own onSubmit), if any */
8839
+ updateFormDefinition?: F0FormDefinitionSingleSchema<z.ZodObject<z.ZodRawShape>>;
8840
+ /** Whether rows can be reordered by dragging (defaults to true) */
8841
+ sortable?: boolean;
8842
+ /** Whether the user can append new rows (defaults to true) */
8843
+ canAddItems?: boolean;
8844
+ /** Forces inline cell editing on/off, overriding the column-count heuristic */
8845
+ supportInlineEditing?: boolean;
8846
+ /** How the list is presented in dialog mode (@default "editable-table") */
8847
+ visualization?: F0EntitiesListVisualization;
8848
+ /** Overrides row title/description/avatar in `list-view` mode */
8849
+ listItem?: F0EntitiesListItemDefinition;
8850
+ /** Per-item link for navigable `list-view` rows (no `updateSchema`) */
8851
+ itemHref?: (item: EntitiesListItem) => string | undefined;
8852
+ /** User-facing text (add button, dialog description/title) */
8853
+ labels?: F0EntitiesListLabels;
8854
+ /** Ids of the items that can be edited (matched against `item.id`) */
8855
+ editableIds?: Array<string | number>;
8856
+ /** Maximum number of rows allowed */
8857
+ maxItems?: number;
8858
+ /** Per-column presentation options, keyed by item-schema property name */
8859
+ columns?: Record<string, F0EntitiesListColumnConfig>;
8860
+ /** Custom trailing actions per row (resolved per row) */
8861
+ rowActions?: (item: EntitiesListItem, index: number) => F0EntitiesListRowAction[];
8862
+ /** Conditional rendering based on another field's value */
8863
+ renderIf?: EntitiesListFieldRenderIf;
8864
+ };
8865
+
8866
+ /**
8867
+ * Config for entities list fields (array of `{ title, url }` objects with
8868
+ * drag-to-reorder and per-row removal).
8869
+ */
8870
+ declare type F0EntitiesListFieldConfig = F0BaseConfig & F0EntitiesListConfig & {
8871
+ fieldType: "entitiesList";
8872
+ };
8873
+
8874
+ /**
8875
+ * A read-only colored tag for a field in `list-view`: either a semantic status
8876
+ * tag or a dot-color tag. Returned per row from a column's `listTag`.
8877
+ */
8878
+ declare type F0EntitiesListFieldTag = {
8879
+ type: "status";
8880
+ /** Semantic status color (neutral/info/positive/warning/critical). */
8881
+ status: StatusVariant;
8882
+ /** Tag text. */
8883
+ label: string;
8884
+ /** Optional leading icon. */
8885
+ icon?: IconType;
8886
+ /** Optional hover tooltip. */
8887
+ tooltip?: string;
8888
+ } | {
8889
+ type: "dotTag";
8890
+ /** Dot color. */
8891
+ color: NewColor;
8892
+ /** Tag text. */
8893
+ label: string;
8894
+ };
8895
+
8896
+ /**
8897
+ * Overrides how each row is labelled in `list-view` mode. When omitted, the
8898
+ * first visible field becomes the title and the remaining visible fields
8899
+ * become description lines.
8900
+ *
8901
+ * @typeParam T - The row value type; inferred from the field `schema`.
8902
+ */
8903
+ declare interface F0EntitiesListItemDefinition<T = EntitiesListItem> {
8904
+ /** Row title (defaults to the first visible field's value). */
8905
+ title?: (item: T) => string;
8906
+ /** Description lines shown under the title (defaults to the other fields). */
8907
+ description?: (item: T) => string[];
8908
+ /** Optional leading avatar for the row. */
8909
+ avatar?: (item: T) => AvatarVariant | undefined;
8910
+ }
8911
+
8912
+ /**
8913
+ * User-facing text for a entities list field. All labels are optional and
8914
+ * fall back to sensible i18n defaults.
8915
+ */
8916
+ declare interface F0EntitiesListLabels {
8917
+ /** Label for the button that appends a new row (defaults to i18n "Add"). */
8918
+ addButton?: string;
8919
+ /**
8920
+ * Title/description for the add (create) dialog. `title` defaults to
8921
+ * `addButton`; `description` also becomes the add button's hover tooltip.
8922
+ */
8923
+ create?: F0EntitiesListDialogLabels;
8924
+ /**
8925
+ * Title/description for the edit (update) dialog. `title` also becomes the
8926
+ * tooltip of the per-row edit action when it's shown icon-only (list-view).
8927
+ */
8928
+ update?: F0EntitiesListDialogLabels;
8929
+ /**
8930
+ * Label for the per-row edit action. Shown as visible text in the editable
8931
+ * table and as the tooltip on the icon-only edit action in `list-view`
8932
+ * (where it defaults to the `update` dialog title).
8933
+ */
8934
+ edit?: string;
8935
+ /** Label for the per-row remove action (defaults to i18n "Remove"). */
8936
+ remove?: string;
8937
+ }
8938
+
8939
+ /**
8940
+ * Behavior options for a entities list field.
8941
+ *
8942
+ * @typeParam T - The row value type; inferred from the field `schema` so
8943
+ * `itemHref`, `listItem`, `rowActions` and `columns` receive a typed `item`.
8944
+ */
8945
+ declare interface F0EntitiesListOptions<T = EntitiesListItem> {
8946
+ /**
8947
+ * Whether rows can be reordered by dragging their handle.
8948
+ * @default true
8949
+ */
8950
+ sortable?: boolean;
8951
+ /**
8952
+ * Whether the user can append new rows.
8953
+ * @default true
8954
+ */
8955
+ canAddItems?: boolean;
8956
+ /**
8957
+ * Forces inline cell editing on/off, overriding the automatic behavior.
8958
+ * By default, lists with 2 or fewer columns edit inline and larger ones
8959
+ * add/edit through a dialog. Set `true` to edit inline even with 3+ columns,
8960
+ * or `false` to always use the dialog.
8961
+ */
8962
+ supportInlineEditing?: boolean;
8963
+ /**
8964
+ * How the list is presented when there's no inline editing (dialog mode).
8965
+ * @default "editable-table"
8966
+ * @see {@link F0EntitiesListVisualization}
8967
+ */
8968
+ visualization?: F0EntitiesListVisualization;
8969
+ /**
8970
+ * Overrides how each row is labelled in `list-view` mode. Ignored for the
8971
+ * `editable-table` visualization.
8972
+ */
8973
+ listItem?: F0EntitiesListItemDefinition<T>;
8974
+ /**
8975
+ * Per-item link (`list-view` only). When set, each row becomes navigable —
8976
+ * clicking the row (or its trailing arrow) goes to the returned URL. Only
8977
+ * honored when there's no `updateSchema`: with a split schema the row shows
8978
+ * the edit (pencil) action and opens the update dialog on click instead.
8979
+ */
8980
+ itemHref?: (item: T) => string | undefined;
8981
+ /** User-facing text (add button, dialog description/title). */
8982
+ labels?: F0EntitiesListLabels;
8983
+ /**
8984
+ * Restricts which items can be edited, matched against each item's `id`
8985
+ * property. When omitted, every item is editable. Items without an `id`
8986
+ * (e.g. rows just added by the user and not yet persisted) stay editable.
8987
+ *
8988
+ * With 2 or fewer schema properties this enables/disables inline cell
8989
+ * editing per row; with more than 2 it shows/hides the per-row edit
8990
+ * (pencil) action that opens the edit dialog.
8991
+ */
8992
+ editableIds?: Array<string | number>;
8993
+ /** Minimum number of rows required (defaults to 1 unless the field is optional) */
8994
+ minItems?: number;
8995
+ /** Maximum number of rows allowed. When reached the add button is hidden. */
8996
+ maxItems?: number;
8997
+ /** Per-column presentation options, keyed by item-schema property name */
8998
+ columns?: Record<string, F0EntitiesListColumnConfig<T>>;
8999
+ /**
9000
+ * Custom trailing actions per row. Resolved per row, so the actions can
9001
+ * depend on the row's value — e.g. show "Archive" or "Unarchive" based on a
9002
+ * hidden `archived` column. Each action's `onClick` receives helpers to
9003
+ * update or remove the row.
9004
+ */
9005
+ rowActions?: (item: T, index: number) => F0EntitiesListRowAction<T>[];
9006
+ }
9007
+
9008
+ /**
9009
+ * A custom trailing action for a row.
9010
+ *
9011
+ * @typeParam T - The row value type; inferred from the field `schema`.
9012
+ */
9013
+ declare interface F0EntitiesListRowAction<T = EntitiesListItem> {
9014
+ /** Icon shown in the action button. */
9015
+ icon: IconType;
9016
+ /** Accessible label; also shown next to the icon when `showLabel` is set. */
9017
+ label: string;
9018
+ /** Render the label next to the icon. Icon-only by default. */
9019
+ showLabel?: boolean;
9020
+ /** Use the destructive (critical) button styling. */
9021
+ critical?: boolean;
9022
+ /** Disables the button. */
9023
+ disabled?: boolean;
9024
+ /** Called when the action is clicked, with helpers to mutate the row. */
9025
+ onClick: (context: F0EntitiesListRowActionContext<T>) => void;
9026
+ }
9027
+
9028
+ /** Helpers passed to a row action's `onClick` to mutate that row. */
9029
+ declare interface F0EntitiesListRowActionContext<T = EntitiesListItem> {
9030
+ /** The row's current values. */
9031
+ item: T;
9032
+ /** The row's index. */
9033
+ index: number;
9034
+ /** Merge a partial update into this row and commit it to the form value. */
9035
+ update: (partial: Partial<T>) => void;
9036
+ /** Remove this row. */
9037
+ remove: () => void;
9038
+ }
9039
+
9040
+ /**
9041
+ * How the list is presented when inline cell editing is off (dialog mode).
9042
+ * - `"editable-table"` (default): a read-only editable-style table.
9043
+ * - `"list-view"`: a OneDataCollection list of the items; add/edit still go
9044
+ * through the form dialog, and each row gets edit/remove actions.
9045
+ */
9046
+ declare type F0EntitiesListVisualization = "editable-table" | "list-view";
9047
+
8693
9048
  export declare function F0EventCatcherProvider({ children, onEvent, enabled, catchEvents, }: EventCatcherProviderProps): JSX.Element;
8694
9049
 
8695
9050
  export declare const F0FAQCard: ({ headerIcon, items, defaultExpandedId, expandedId: controlledExpandedId, onExpandedChange, allowMultiple, }: F0FAQCardProps) => JSX_2.Element | null;
@@ -8741,7 +9096,7 @@ export declare interface F0FAQItem {
8741
9096
  /**
8742
9097
  * Union of all F0 field types used for rendering
8743
9098
  */
8744
- export declare type F0Field = F0TextField | F0NumberField | F0DurationField | F0TextareaField | F0SelectField | F0CheckboxField | F0SwitchField | F0DateField | F0TimeField | F0DateTimeField | F0DateRangeField | F0PeriodField | F0RichTextField | F0FileField | F0CardSelectField | F0CustomField;
9099
+ export declare type F0Field = F0TextField | F0NumberField | F0DurationField | F0TextareaField | F0SelectField | F0CheckboxField | F0SwitchField | F0DateField | F0TimeField | F0DateTimeField | F0DateRangeField | F0PeriodField | F0RichTextField | F0FileField | F0CardSelectField | F0EntitiesListField | F0CustomField;
8745
9100
 
8746
9101
  /**
8747
9102
  * Alert configuration for a field.
@@ -8776,12 +9131,12 @@ export declare type F0FieldAlertProps = Omit<F0AlertProps, "variant"> & {
8776
9131
  * @typeParam T - The value type for select fields (string or number)
8777
9132
  * @typeParam R - Record type for data source (when using source instead of options)
8778
9133
  */
8779
- export declare type F0FieldConfig<T extends string | number = string | number, R extends Record<string, unknown> = Record<string, unknown>> = F0StringConfig<string, undefined, R> | F0NumberFieldConfig<R> | F0BooleanConfig | F0DateFieldConfig | F0TimeFieldConfig | F0DateTimeFieldConfig | F0ArrayConfig<T, R> | F0FileFieldConfig | F0ObjectConfig | F0PeriodFieldConfig | F0StringCardSelectConfig;
9134
+ export declare type F0FieldConfig<T extends string | number = string | number, R extends Record<string, unknown> = Record<string, unknown>> = F0StringConfig<string, undefined, R> | F0NumberFieldConfig<R> | F0BooleanConfig | F0DateFieldConfig | F0TimeFieldConfig | F0DateTimeFieldConfig | F0ArrayConfig<T, R> | F0FileFieldConfig | F0ObjectConfig | F0PeriodFieldConfig | F0StringCardSelectConfig | F0EntitiesListFieldConfig;
8780
9135
 
8781
9136
  /**
8782
9137
  * Field types for rendering
8783
9138
  */
8784
- export declare type F0FieldType = "text" | "number" | "percentage" | "money" | "duration" | "textarea" | "select" | "checkbox" | "switch" | "date" | "time" | "datetime" | "daterange" | "period" | "richtext" | "file" | "cardSelect" | "custom";
9139
+ export declare type F0FieldType = "text" | "number" | "percentage" | "money" | "duration" | "textarea" | "select" | "checkbox" | "switch" | "date" | "time" | "datetime" | "daterange" | "period" | "richtext" | "file" | "cardSelect" | "entitiesList" | "custom";
8785
9140
 
8786
9141
  export declare type F0FileAction = {
8787
9142
  icon?: IconType;
@@ -9358,6 +9713,53 @@ export declare namespace f0FormField {
9358
9713
  export function multiSelect<V extends string | number = string, R extends Record<string, unknown> = Record<string, unknown>>(config: MultiSelectConfig<V, R> & {
9359
9714
  optional?: false | undefined;
9360
9715
  }): z.ZodArray<z.ZodString> & F0ZodType<z.ZodArray<z.ZodString>>;
9716
+ /* Excluded from this release type: EntitiesListBaseConfig */
9717
+ /* Excluded from this release type: EntitiesListSingleConfig */
9718
+ /* Excluded from this release type: EntitiesListFormDefsConfig */
9719
+ /* Excluded from this release type: WithRowId */
9720
+ /* Excluded from this release type: EntitiesListArray */
9721
+ /* Excluded from this release type: OptionalEntitiesListArray */
9722
+ /**
9723
+ * Entities list field: an editable table for an array of objects.
9724
+ *
9725
+ * The row shape is defined by `schema` and columns are derived from it
9726
+ * (`z.string()` → text, `z.number()` → number, `z.enum()` → select).
9727
+ *
9728
+ * @example
9729
+ * // Single schema — same fields for add and edit:
9730
+ * links: f0FormField.entitiesList({
9731
+ * label: "Links",
9732
+ * schema: z.object({
9733
+ * title: z.string().min(1),
9734
+ * url: z.string().url(),
9735
+ * }),
9736
+ * config: { labels: { addButton: "Add link" }, maxItems: 8 },
9737
+ * })
9738
+ *
9739
+ * @example
9740
+ * // Split form definitions — add and update persist independently:
9741
+ * const createFormDefinition = useF0FormDefinition({
9742
+ * schema: z.object({ name: z.string(), email: z.string().email() }),
9743
+ * onSubmit: async ({ data }) => { await api.create(data); return { success: true } },
9744
+ * })
9745
+ * const updateFormDefinition = useF0FormDefinition({
9746
+ * schema: z.object({ name: z.string(), email: z.string().email(), role: … }),
9747
+ * onSubmit: async ({ data }) => { await api.update(data); return { success: true } },
9748
+ * })
9749
+ * members: f0FormField.entitiesList({ createFormDefinition, updateFormDefinition })
9750
+ */
9751
+ export function entitiesList<TItem extends z.ZodObject<z.ZodRawShape>>(config: EntitiesListSingleConfig<TItem> & {
9752
+ optional: true;
9753
+ }): OptionalEntitiesListArray<TItem> & F0ZodType<z.ZodOptional<z.ZodArray<TItem>>>;
9754
+ export function entitiesList<TItem extends z.ZodObject<z.ZodRawShape>>(config: EntitiesListSingleConfig<TItem> & {
9755
+ optional?: false | undefined;
9756
+ }): EntitiesListArray<TItem> & F0ZodType<z.ZodArray<TItem>>;
9757
+ export function entitiesList<TCreate extends z.ZodObject<z.ZodRawShape>, TUpdate extends z.ZodObject<z.ZodRawShape>>(config: EntitiesListFormDefsConfig<TCreate, TUpdate> & {
9758
+ optional: true;
9759
+ }): OptionalEntitiesListArray<TUpdate> & F0ZodType<z.ZodOptional<z.ZodArray<TUpdate>>>;
9760
+ export function entitiesList<TCreate extends z.ZodObject<z.ZodRawShape>, TUpdate extends z.ZodObject<z.ZodRawShape>>(config: EntitiesListFormDefsConfig<TCreate, TUpdate> & {
9761
+ optional?: false | undefined;
9762
+ }): EntitiesListArray<TUpdate> & F0ZodType<z.ZodArray<TUpdate>>;
9361
9763
  {};
9362
9764
  }
9363
9765
 
@@ -11470,7 +11872,7 @@ export declare function fieldsToSeconds(fields: DurationFields): number;
11470
11872
  /**
11471
11873
  * Field types for rendering
11472
11874
  */
11473
- export declare type FieldType = "text" | "number" | "duration" | "textarea" | "select" | "checkbox" | "switch" | "date" | "time" | "datetime" | "daterange" | "period" | "richtext" | "file" | "cardSelect" | "custom";
11875
+ export declare type FieldType = "text" | "number" | "duration" | "textarea" | "select" | "checkbox" | "switch" | "date" | "time" | "datetime" | "daterange" | "period" | "richtext" | "file" | "cardSelect" | "entitiesList" | "custom";
11474
11876
 
11475
11877
  export declare const FILE_TYPES: {
11476
11878
  readonly PDF: "pdf";
@@ -13533,6 +13935,12 @@ declare type NumberCellConfig<R extends RecordType = RecordType> = {
13533
13935
  step?: number;
13534
13936
  maxDecimals?: number;
13535
13937
  locale?: string;
13938
+ /**
13939
+ * Show the locale's thousands separators in the resting display (grouped
13940
+ * while blurred, ungrouped while editing). Defaults to `true`; set `false`
13941
+ * for numbers that shouldn't be grouped (years, IDs, …).
13942
+ */
13943
+ grouping?: boolean;
13536
13944
  /**
13537
13945
  * Unit label displayed next to the number input.
13538
13946
  * Can be a static string (e.g. `"h"`) or a function that receives the
@@ -13593,6 +14001,13 @@ declare type NumberInputInternalProps = Pick<ComponentProps<typeof Input_2>, "re
13593
14001
  min?: number;
13594
14002
  max?: number;
13595
14003
  maxDecimals?: number;
14004
+ /**
14005
+ * Show the locale's thousands separators in the resting display (e.g.
14006
+ * `1,234,567`). While the field is focused the number is shown ungrouped
14007
+ * for easy editing. Off by default — enable it for amounts/quantities, but
14008
+ * leave it off for years, IDs and other non-grouped numbers. @default false
14009
+ */
14010
+ grouping?: boolean;
13596
14011
  onChange?: (value: number | null) => void;
13597
14012
  units?: string;
13598
14013
  extraContent?: ReactNode;
@@ -16108,6 +16523,23 @@ declare type TextareaFieldRenderIf = TextRenderIfCondition | CommonRenderIfCondi
16108
16523
  */
16109
16524
  export declare type TextareaProps = F0TextAreaInputProps;
16110
16525
 
16526
+ declare type TextCellConfig = {
16527
+ /**
16528
+ * Input type passed to the underlying text input. Also selects a default
16529
+ * leading icon (`url` → link, `email` → envelope) matching F0Form's text
16530
+ * fields. Defaults to `"text"`.
16531
+ */
16532
+ inputType?: TextCellInputType;
16533
+ /**
16534
+ * Leading icon. Overrides the default derived from `inputType`; pass to add
16535
+ * an icon to a plain text cell or replace the url/email default.
16536
+ */
16537
+ icon?: IconType;
16538
+ };
16539
+
16540
+ /** The HTML-ish input type of a text cell. Drives a default leading icon. */
16541
+ declare type TextCellInputType = "text" | "email" | "url" | "tel";
16542
+
16111
16543
  /**
16112
16544
  * All valid renderIf conditions for text fields
16113
16545
  */