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