@factorialco/f0-react 1.403.1 → 1.404.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/ai.d.ts CHANGED
@@ -1546,11 +1546,6 @@ declare module "gridstack" {
1546
1546
  }
1547
1547
 
1548
1548
 
1549
- declare namespace Calendar {
1550
- var displayName: string;
1551
- }
1552
-
1553
-
1554
1549
  declare module "@tiptap/core" {
1555
1550
  interface Commands<ReturnType> {
1556
1551
  aiBlock: {
@@ -1598,3 +1593,8 @@ declare module "@tiptap/core" {
1598
1593
  };
1599
1594
  }
1600
1595
  }
1596
+
1597
+
1598
+ declare namespace Calendar {
1599
+ var displayName: string;
1600
+ }
@@ -2936,6 +2936,16 @@ declare type EditableTableColumnDefinition<R extends RecordType, Sortings extend
2936
2936
  * When omitted, the cell is always rendered read-only.
2937
2937
  */
2938
2938
  editType?: (item: R) => EditableTableCellEditType | undefined;
2939
+ /**
2940
+ * Configuration for `"select"` cells. Required when `editType` returns `"select"`.
2941
+ * Accepts either static `options` or a `source` + `mapOptions` for async data.
2942
+ *
2943
+ * If `editType` returns `"select"` but `selectConfig` is missing, the cell
2944
+ * falls back to a non-editable display with a `console.warn` at runtime.
2945
+ * Type-level enforcement is not possible because `editType` is a per-row
2946
+ * function whose return value isn't statically known.
2947
+ */
2948
+ selectConfig?: SelectCellConfig<R>;
2939
2949
  };
2940
2950
 
2941
2951
  declare type EditableTableVisualizationOptions<R extends RecordType, _Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition> = Omit<TableVisualizationOptions<R, _Filters, Sortings, Summaries>, "columns"> & {
@@ -5808,6 +5818,26 @@ export declare const Select: <T extends string = string, R = unknown>(props: F0S
5808
5818
  ref?: React.Ref<HTMLButtonElement>;
5809
5819
  }) => React.ReactElement;
5810
5820
 
5821
+ /**
5822
+ * Configuration for select-type cells. Mirrors F0Select's two data modes:
5823
+ * - Static `options` (array or per-row function)
5824
+ * - Async `source` (DataSourceDefinition) with `mapOptions`
5825
+ */
5826
+ declare type SelectCellConfig<R extends RecordType> = {
5827
+ placeholder?: string;
5828
+ clearable?: boolean;
5829
+ showSearchBox?: boolean;
5830
+ defaultItem?: (item: R) => F0SelectItemObject<string, RecordType> | undefined;
5831
+ } & ({
5832
+ options: F0SelectItemProps<string>[] | ((item: R) => F0SelectItemProps<string>[]);
5833
+ source?: never;
5834
+ mapOptions?: never;
5835
+ } | {
5836
+ source: Omit<DataSourceDefinition<RecordType, FiltersDefinition, SortingsDefinition, GroupingDefinition<RecordType>>, "selectable" | "grouping" | "defaultGrouping" | "currentGrouping" | "fetchChildren" | "itemsWithChildren" | "childrenCount">;
5837
+ mapOptions: (record: RecordType) => F0SelectItemProps<string, RecordType>;
5838
+ options?: never;
5839
+ });
5840
+
5811
5841
  /**
5812
5842
  * Represents a collection of selected items.
5813
5843
  * @template T - The type of items in the collection
@@ -6136,6 +6166,12 @@ declare type TableColumnDefinition<R extends RecordType, Sortings extends Sortin
6136
6166
  * References a key in the Summaries definition, similar to how sorting works
6137
6167
  */
6138
6168
  summary?: SummaryKey<Summaries>;
6169
+ /**
6170
+ * Placeholder to display in this column's summary-row cell when no summary
6171
+ * value is rendered. This also applies to columns without a `summary`
6172
+ * definition. Takes precedence over the row-level `summaryPlaceholder`.
6173
+ */
6174
+ summaryPlaceholder?: string;
6139
6175
  /**
6140
6176
  * The id of the column (if not provided, the id will be the label of the column)
6141
6177
  */
@@ -6216,6 +6252,13 @@ declare type TableVisualizationOptions<R extends RecordType, _Filters extends Fi
6216
6252
  * The columns to display
6217
6253
  */
6218
6254
  columns: ReadonlyArray<TableColumnDefinition<R, Sortings, Summaries>>;
6255
+ /**
6256
+ * Placeholder to display in summary-row cells when no summary value is
6257
+ * rendered. This also applies to columns without a `summary` definition.
6258
+ * Column-level `summaryPlaceholder` takes precedence.
6259
+ * @default "-"
6260
+ */
6261
+ summaryPlaceholder?: string;
6219
6262
  /**
6220
6263
  * The number of columns to freeze on the left
6221
6264
  */
@@ -7016,11 +7059,6 @@ declare module "gridstack" {
7016
7059
  }
7017
7060
 
7018
7061
 
7019
- declare namespace Calendar {
7020
- var displayName: string;
7021
- }
7022
-
7023
-
7024
7062
  declare module "@tiptap/core" {
7025
7063
  interface Commands<ReturnType> {
7026
7064
  aiBlock: {
@@ -7068,3 +7106,8 @@ declare module "@tiptap/core" {
7068
7106
  };
7069
7107
  }
7070
7108
  }
7109
+
7110
+
7111
+ declare namespace Calendar {
7112
+ var displayName: string;
7113
+ }
@@ -3,8 +3,8 @@ import { dw as HI, dv as VI, dq as WI, dr as UI, du as GI, dE as KI, dF as qI, d
3
3
  import { jsx as c, jsxs as g, Fragment as re } from "react/jsx-runtime";
4
4
  import * as Sn from "react";
5
5
  import z, { PureComponent as Cp, forwardRef as P, useRef as K, useTransition as Sp, useState as R, useLayoutEffect as Va, useContext as js, createContext as Hs, useCallback as J, useMemo as ee, useEffect as W, useId as Wa, useImperativeHandle as Ua, memo as Ga, Fragment as Np, isValidElement as Ip, cloneElement as Ka, Children as qa } from "react";
6
- import { f as Yt, p as Nn, i as tr, D as Ap, L as bi, P as _p, A as Ep, a as nr, b as Tp, c as Dp, G as Lp, g as Do, l as Rp, d as Lo, e as Op, h as Ya, j as Ja, k as Mp, C as Pp, m as Fp, N as je, n as ot, o as Ee, q as zp, r as mr, T as Ue, s as Xa, S as Me, t as Vs, u as $e, v as Ro, w as $p, x as Za, F as Ie, y as Fe, z as In, B as Tr, E as Qa, H as Bp, I as Vt, J as jp, K as Hp, M as Vp, R as Vn, O as Wn, Q as Ws, U as Wp, V as ec, W as tc, X as nc, Y as Up, Z as rc, _ as ic, $ as sc, a0 as oc, a1 as lc, a2 as ac, a3 as Oo, a4 as Gp, a5 as Mo, a6 as Kp, a7 as qp, a8 as Yp, a9 as Jp, aa as Xp, ab as Zp, ac as Qp, ad as em, ae as tm, af as cc, ag as nm, ah as rm, ai as im, aj as dc, ak as Wi, al as sm, am as om, an as Po, ao as uc, ap as lm, aq as am, ar as cm, as as dm, at as um, au as fm, av as hm, aw as pm, ax as mm, ay as fc, az as gm, aA as bm, aB as wm, aC as hc, aD as xm, aE as ym, aF as vm, aG as km, aH as Cm, aI as Sm, aJ as Nm, aK as Fo, aL as Im, aM as Am, aN as _m, aO as Em } from "./useDataCollectionSource-T2-Pxmlu.js";
7
- import { aP as oA, aR as lA, b5 as aA, aQ as cA, aX as dA, b8 as uA, b6 as fA, aY as hA, aZ as pA, aT as mA, a_ as gA, b2 as bA, b4 as wA, aV as xA, b7 as yA, aW as vA, aU as kA, b3 as CA, aS as SA, a$ as NA, b0 as IA, b1 as AA } from "./useDataCollectionSource-T2-Pxmlu.js";
6
+ import { f as Yt, p as Nn, i as tr, D as Ap, L as bi, P as _p, A as Ep, a as nr, b as Tp, c as Dp, G as Lp, g as Do, l as Rp, d as Lo, e as Op, h as Ya, j as Ja, k as Mp, C as Pp, m as Fp, N as je, n as ot, o as Ee, q as zp, r as mr, T as Ue, s as Xa, S as Me, t as Vs, u as $e, v as Ro, w as $p, x as Za, F as Ie, y as Fe, z as In, B as Tr, E as Qa, H as Bp, I as Vt, J as jp, K as Hp, M as Vp, R as Vn, O as Wn, Q as Ws, U as Wp, V as ec, W as tc, X as nc, Y as Up, Z as rc, _ as ic, $ as sc, a0 as oc, a1 as lc, a2 as ac, a3 as Oo, a4 as Gp, a5 as Mo, a6 as Kp, a7 as qp, a8 as Yp, a9 as Jp, aa as Xp, ab as Zp, ac as Qp, ad as em, ae as tm, af as cc, ag as nm, ah as rm, ai as im, aj as dc, ak as Wi, al as sm, am as om, an as Po, ao as uc, ap as lm, aq as am, ar as cm, as as dm, at as um, au as fm, av as hm, aw as pm, ax as mm, ay as fc, az as gm, aA as bm, aB as wm, aC as hc, aD as xm, aE as ym, aF as vm, aG as km, aH as Cm, aI as Sm, aJ as Nm, aK as Fo, aL as Im, aM as Am, aN as _m, aO as Em } from "./useDataCollectionSource-CLodAfWT.js";
7
+ import { aP as oA, aR as lA, b5 as aA, aQ as cA, aX as dA, b8 as uA, b6 as fA, aY as hA, aZ as pA, aT as mA, a_ as gA, b2 as bA, b4 as wA, aV as xA, b7 as yA, aW as vA, aU as kA, b3 as CA, aS as SA, a$ as NA, b0 as IA, b1 as AA } from "./useDataCollectionSource-CLodAfWT.js";
8
8
  import './experimental.css';const Tm = hf("Search", [
9
9
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
10
10
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
package/dist/f0.d.ts CHANGED
@@ -3121,6 +3121,16 @@ declare type EditableTableColumnDefinition<R extends RecordType, Sortings extend
3121
3121
  * When omitted, the cell is always rendered read-only.
3122
3122
  */
3123
3123
  editType?: (item: R) => EditableTableCellEditType | undefined;
3124
+ /**
3125
+ * Configuration for `"select"` cells. Required when `editType` returns `"select"`.
3126
+ * Accepts either static `options` or a `source` + `mapOptions` for async data.
3127
+ *
3128
+ * If `editType` returns `"select"` but `selectConfig` is missing, the cell
3129
+ * falls back to a non-editable display with a `console.warn` at runtime.
3130
+ * Type-level enforcement is not possible because `editType` is a per-row
3131
+ * function whose return value isn't statically known.
3132
+ */
3133
+ selectConfig?: SelectCellConfig<R>;
3124
3134
  };
3125
3135
 
3126
3136
  declare type EditableTableVisualizationOptions<R extends RecordType, _Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition> = Omit<TableVisualizationOptions<R, _Filters, Sortings, Summaries>, "columns"> & {
@@ -8265,6 +8275,26 @@ declare type SectionProps = {
8265
8275
  */
8266
8276
  export declare type SectionRenderIf = RenderIfCondition | F0BaseFieldRenderIfFunction;
8267
8277
 
8278
+ /**
8279
+ * Configuration for select-type cells. Mirrors F0Select's two data modes:
8280
+ * - Static `options` (array or per-row function)
8281
+ * - Async `source` (DataSourceDefinition) with `mapOptions`
8282
+ */
8283
+ declare type SelectCellConfig<R extends RecordType> = {
8284
+ placeholder?: string;
8285
+ clearable?: boolean;
8286
+ showSearchBox?: boolean;
8287
+ defaultItem?: (item: R) => F0SelectItemObject<string, RecordType> | undefined;
8288
+ } & ({
8289
+ options: F0SelectItemProps<string>[] | ((item: R) => F0SelectItemProps<string>[]);
8290
+ source?: never;
8291
+ mapOptions?: never;
8292
+ } | {
8293
+ source: Omit<DataSourceDefinition<RecordType, FiltersDefinition, SortingsDefinition, GroupingDefinition<RecordType>>, "selectable" | "grouping" | "defaultGrouping" | "currentGrouping" | "fetchChildren" | "itemsWithChildren" | "childrenCount">;
8294
+ mapOptions: (record: RecordType) => F0SelectItemProps<string, RecordType>;
8295
+ options?: never;
8296
+ });
8297
+
8268
8298
  /**
8269
8299
  * Represents a collection of selected items.
8270
8300
  * @template T - The type of items in the collection
@@ -8600,6 +8630,12 @@ declare type TableColumnDefinition<R extends RecordType, Sortings extends Sortin
8600
8630
  * References a key in the Summaries definition, similar to how sorting works
8601
8631
  */
8602
8632
  summary?: SummaryKey<Summaries>;
8633
+ /**
8634
+ * Placeholder to display in this column's summary-row cell when no summary
8635
+ * value is rendered. This also applies to columns without a `summary`
8636
+ * definition. Takes precedence over the row-level `summaryPlaceholder`.
8637
+ */
8638
+ summaryPlaceholder?: string;
8603
8639
  /**
8604
8640
  * The id of the column (if not provided, the id will be the label of the column)
8605
8641
  */
@@ -8688,6 +8724,13 @@ declare type TableVisualizationOptions<R extends RecordType, _Filters extends Fi
8688
8724
  * The columns to display
8689
8725
  */
8690
8726
  columns: ReadonlyArray<TableColumnDefinition<R, Sortings, Summaries>>;
8727
+ /**
8728
+ * Placeholder to display in summary-row cells when no summary value is
8729
+ * rendered. This also applies to columns without a `summary` definition.
8730
+ * Column-level `summaryPlaceholder` takes precedence.
8731
+ * @default "-"
8732
+ */
8733
+ summaryPlaceholder?: string;
8691
8734
  /**
8692
8735
  * The number of columns to freeze on the left
8693
8736
  */
@@ -9828,11 +9871,6 @@ declare module "gridstack" {
9828
9871
  }
9829
9872
 
9830
9873
 
9831
- declare namespace Calendar {
9832
- var displayName: string;
9833
- }
9834
-
9835
-
9836
9874
  declare module "@tiptap/core" {
9837
9875
  interface Commands<ReturnType> {
9838
9876
  aiBlock: {
@@ -9880,3 +9918,8 @@ declare module "@tiptap/core" {
9880
9918
  };
9881
9919
  }
9882
9920
  }
9921
+
9922
+
9923
+ declare namespace Calendar {
9924
+ var displayName: string;
9925
+ }
package/dist/f0.js CHANGED
@@ -4,8 +4,8 @@ import { jsx as C, jsxs as W, Fragment as fn } from "react/jsx-runtime";
4
4
  import * as Kn from "react";
5
5
  import Ie, { forwardRef as Qr, useRef as ge, useImperativeHandle as XG, Children as Qv, createContext as Tn, useContext as kr, useState as Ee, useMemo as se, useEffect as Fe, useCallback as oe, useLayoutEffect as n_, createElement as Qd, isValidElement as Hk, Fragment as Wk, memo as $k, useReducer as qG, cloneElement as jG, PureComponent as KG, useId as Q1 } from "react";
6
6
  import { createPortal as Uk, unstable_batchedUpdates as Jd, flushSync as QG } from "react-dom";
7
- import { b9 as Zk, C as JG, b as Yk, ba as uT, bb as eH, f as ey, L as yc, bc as tH, A as rH, a as eh, bd as Xk, be as nH, g as xv, bf as iH, i as aH, bg as oH, d as ru, c as qk, bh as sH, G as lH, aN as uH, bi as cT, bj as cH, e as fH, bk as jk, bl as dH, bm as Kk, bn as Qk, bo as i_, bp as hH, ae as Jk, bq as vH, br as pH, a9 as gH, aa as mH, bs as yH, ab as bH, bt as _H, bu as xH, bv as fT, bw as wH, ac as SH, ad as CH, aE as TH, aF as DH, aJ as AH, aG as MH, aH as EH, aI as LH, ay as IH, aQ as a_, bx as eR, aT as tR, b7 as NH, aU as kH, aR as RH, aW as rR, aX as J1, b5 as PH, by as OH, bz as BH, ao as Fg, a3 as VH, an as ew, ap as tw, aV as zH, aO as nR, bA as iR, bB as aR, aP as FH, b0 as GH, a_ as HH, bC as WH, bD as $H, am as UH } from "./useDataCollectionSource-T2-Pxmlu.js";
8
- import { bF as L0e, ak as I0e, m as N0e, bE as k0e, b3 as R0e, aS as P0e, bG as O0e, bH as B0e, bI as V0e, aC as z0e } from "./useDataCollectionSource-T2-Pxmlu.js";
7
+ import { b9 as Zk, C as JG, b as Yk, ba as uT, bb as eH, f as ey, L as yc, bc as tH, A as rH, a as eh, bd as Xk, be as nH, g as xv, bf as iH, i as aH, bg as oH, d as ru, c as qk, bh as sH, G as lH, aN as uH, bi as cT, bj as cH, e as fH, bk as jk, bl as dH, bm as Kk, bn as Qk, bo as i_, bp as hH, ae as Jk, bq as vH, br as pH, a9 as gH, aa as mH, bs as yH, ab as bH, bt as _H, bu as xH, bv as fT, bw as wH, ac as SH, ad as CH, aE as TH, aF as DH, aJ as AH, aG as MH, aH as EH, aI as LH, ay as IH, aQ as a_, bx as eR, aT as tR, b7 as NH, aU as kH, aR as RH, aW as rR, aX as J1, b5 as PH, by as OH, bz as BH, ao as Fg, a3 as VH, an as ew, ap as tw, aV as zH, aO as nR, bA as iR, bB as aR, aP as FH, b0 as GH, a_ as HH, bC as WH, bD as $H, am as UH } from "./useDataCollectionSource-CLodAfWT.js";
8
+ import { bF as L0e, ak as I0e, m as N0e, bE as k0e, b3 as R0e, aS as P0e, bG as O0e, bH as B0e, bI as V0e, aC as z0e } from "./useDataCollectionSource-CLodAfWT.js";
9
9
  import { A as G0e, F as H0e, c as W0e, d as $0e, b as U0e, a as Z0e, o as Y0e, u as X0e } from "./F0HILActionConfirmation-B3Hwp5tS.js";
10
10
  import { defaultTranslations as j0e } from "./i18n-provider-defaults.js";
11
11
  import './f0.css';const ZH = {
@@ -667,11 +667,6 @@ declare module "gridstack" {
667
667
  }
668
668
 
669
669
 
670
- declare namespace Calendar {
671
- var displayName: string;
672
- }
673
-
674
-
675
670
  declare module "@tiptap/core" {
676
671
  interface Commands<ReturnType> {
677
672
  aiBlock: {
@@ -719,3 +714,8 @@ declare module "@tiptap/core" {
719
714
  };
720
715
  }
721
716
  }
717
+
718
+
719
+ declare namespace Calendar {
720
+ var displayName: string;
721
+ }