@factorialco/f0-react 2.46.0 → 2.48.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/ai.d.ts CHANGED
@@ -1826,6 +1826,7 @@ export declare const defaultTranslations: {
1826
1826
  readonly save: "Save";
1827
1827
  readonly send: "Send";
1828
1828
  readonly cancel: "Cancel";
1829
+ readonly ok: "Ok";
1829
1830
  readonly delete: "Delete";
1830
1831
  readonly copy: "Copy";
1831
1832
  readonly paste: "Paste";
@@ -1853,6 +1854,8 @@ export declare const defaultTranslations: {
1853
1854
  readonly selectAll: "Select all";
1854
1855
  readonly selectAllItems: "Select all {{total}} items";
1855
1856
  readonly apply: "Apply";
1857
+ readonly saveAsPreset: "Save view";
1858
+ readonly editPreset: "Edit view";
1856
1859
  };
1857
1860
  readonly status: {
1858
1861
  readonly selected: {
@@ -1923,6 +1926,22 @@ export declare const defaultTranslations: {
1923
1926
  readonly actions: {
1924
1927
  readonly actions: "Actions";
1925
1928
  };
1929
+ readonly presets: {
1930
+ readonly createTitle: "Save view";
1931
+ readonly createDescription: "Save the current filters, sorting, grouping and columns as a view.";
1932
+ readonly updateTitle: "Update view";
1933
+ readonly updateDescription: "Update this view's name and description.";
1934
+ readonly nameLabel: "Title";
1935
+ readonly namePlaceholder: "View name";
1936
+ readonly duplicateName: "A view with this name already exists";
1937
+ readonly descriptionLabel: "Description";
1938
+ readonly descriptionPlaceholder: "Optional description";
1939
+ readonly save: "Save";
1940
+ readonly delete: "Remove";
1941
+ readonly share: "Share view";
1942
+ readonly copiedToClipboard: "Copied to your clipboard";
1943
+ readonly cancel: "Cancel";
1944
+ };
1926
1945
  readonly visualizations: {
1927
1946
  readonly table: "Table view";
1928
1947
  readonly editableTable: "Editable table view";
@@ -4686,16 +4705,11 @@ declare module "gridstack" {
4686
4705
  }
4687
4706
 
4688
4707
 
4689
- declare namespace Calendar {
4690
- var displayName: string;
4691
- }
4692
-
4693
-
4694
4708
  declare module "@tiptap/core" {
4695
4709
  interface Commands<ReturnType> {
4696
- enhanceHighlight: {
4697
- setEnhanceHighlight: (from: number, to: number) => ReturnType;
4698
- clearEnhanceHighlight: () => ReturnType;
4710
+ aiBlock: {
4711
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
4712
+ executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
4699
4713
  };
4700
4714
  }
4701
4715
  }
@@ -4703,9 +4717,9 @@ declare module "@tiptap/core" {
4703
4717
 
4704
4718
  declare module "@tiptap/core" {
4705
4719
  interface Commands<ReturnType> {
4706
- aiBlock: {
4707
- insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
4708
- executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
4720
+ enhanceHighlight: {
4721
+ setEnhanceHighlight: (from: number, to: number) => ReturnType;
4722
+ clearEnhanceHighlight: () => ReturnType;
4709
4723
  };
4710
4724
  }
4711
4725
  }
@@ -4740,6 +4754,11 @@ declare module "@tiptap/core" {
4740
4754
  }
4741
4755
 
4742
4756
 
4757
+ declare namespace Calendar {
4758
+ var displayName: string;
4759
+ }
4760
+
4761
+
4743
4762
  declare namespace F0GraphNodeWrapperInner {
4744
4763
  var displayName: string;
4745
4764
  }
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { D as e, F as r, a as t, e as o, f as i, c as n, d as F, I as C, P as A, b as l, u as d } from "./F0CanvasPanel-CTpW3vtK.js";
1
+ import { D as e, F as r, a as t, e as o, f as i, c as n, d as F, I as C, P as A, b as l, u as d } from "./F0CanvasPanel-D70oNR2G.js";
2
2
  import { defaultTranslations as m } from "./i18n-provider-defaults.js";
3
- import { A as c, C as I, h as P, t as v, v as f, x as p, n as T, j as g, r as y, y as S, q as x, s as H, k as V, e as b, g as k, l as w, F as M, i as O, a as D, p as j, m as q, o as z, b as B, f as E, w as L, c as R, d as G, u as J } from "./useChatHistory-CyZmi4kr.js";
3
+ import { A as c, C as I, h as P, t as v, v as f, x as p, n as T, j as g, r as y, y as S, q as x, s as H, k as V, e as b, g as k, l as w, F as M, i as O, a as D, p as j, m as q, o as z, b as B, f as E, w as L, c as R, d as G, u as J } from "./useChatHistory-DjftH8dD.js";
4
4
  export {
5
5
  c as AiChatTranslationsProvider,
6
6
  I as ChatSpinner,
@@ -1329,6 +1329,11 @@ declare type ButtonInternalProps = Pick<ActionProps, "size" | "disabled" | "clas
1329
1329
  * The style of the button.
1330
1330
  */
1331
1331
  style?: React.CSSProperties;
1332
+ /**
1333
+ * @private
1334
+ * If true, the button will stretch to the full width of its container.
1335
+ */
1336
+ block?: boolean;
1332
1337
  } & ({
1333
1338
  /**
1334
1339
  * The URL to navigate to when the button is clicked.
@@ -2520,6 +2525,8 @@ declare type DataCollectionStatus<CurrentFiltersState extends FiltersState<Filte
2520
2525
  /** Per-visualization filter states, keyed by visualization index.
2521
2526
  * Only present when visualizations declare per-view filter overrides. */
2522
2527
  visualizationFilters?: Record<string, CurrentFiltersState>;
2528
+ /** User-created custom presets persisted alongside the rest of the state. */
2529
+ customPresets?: PresetsDefinition<FiltersDefinition>;
2523
2530
  };
2524
2531
 
2525
2532
  declare type DataCollectionStatusComplete<CurrentFiltersState extends FiltersState<FiltersDefinition>> = DataCollectionStatus<CurrentFiltersState> & {
@@ -2971,6 +2978,7 @@ declare const defaultTranslations: {
2971
2978
  readonly save: "Save";
2972
2979
  readonly send: "Send";
2973
2980
  readonly cancel: "Cancel";
2981
+ readonly ok: "Ok";
2974
2982
  readonly delete: "Delete";
2975
2983
  readonly copy: "Copy";
2976
2984
  readonly paste: "Paste";
@@ -2998,6 +3006,8 @@ declare const defaultTranslations: {
2998
3006
  readonly selectAll: "Select all";
2999
3007
  readonly selectAllItems: "Select all {{total}} items";
3000
3008
  readonly apply: "Apply";
3009
+ readonly saveAsPreset: "Save view";
3010
+ readonly editPreset: "Edit view";
3001
3011
  };
3002
3012
  readonly status: {
3003
3013
  readonly selected: {
@@ -3068,6 +3078,22 @@ declare const defaultTranslations: {
3068
3078
  readonly actions: {
3069
3079
  readonly actions: "Actions";
3070
3080
  };
3081
+ readonly presets: {
3082
+ readonly createTitle: "Save view";
3083
+ readonly createDescription: "Save the current filters, sorting, grouping and columns as a view.";
3084
+ readonly updateTitle: "Update view";
3085
+ readonly updateDescription: "Update this view's name and description.";
3086
+ readonly nameLabel: "Title";
3087
+ readonly namePlaceholder: "View name";
3088
+ readonly duplicateName: "A view with this name already exists";
3089
+ readonly descriptionLabel: "Description";
3090
+ readonly descriptionPlaceholder: "Optional description";
3091
+ readonly save: "Save";
3092
+ readonly delete: "Remove";
3093
+ readonly share: "Share view";
3094
+ readonly copiedToClipboard: "Copied to your clipboard";
3095
+ readonly cancel: "Cancel";
3096
+ };
3071
3097
  readonly visualizations: {
3072
3098
  readonly table: "Table view";
3073
3099
  readonly editableTable: "Editable table view";
@@ -6550,6 +6576,23 @@ declare type OneFilterPickerRootProps<Definition extends FiltersDefinition> = {
6550
6576
  displayCounter?: boolean;
6551
6577
  /** Total number of items matching the current filters, displayed as "N results for:" prefix in the chips row */
6552
6578
  resultCount?: number;
6579
+ /**
6580
+ * Id of the currently selected preset. When provided together with
6581
+ * `onSelectPreset`, preset selection is identity-based (the preset stays
6582
+ * selected as the user changes state on top of it). When absent, the picker
6583
+ * falls back to legacy exact-filter-match selection.
6584
+ */
6585
+ selectedPresetId?: string;
6586
+ /** Selects a preset by id. Enables identity-based selection. */
6587
+ onSelectPreset?: (presetId: string) => void;
6588
+ /** Ids of presets that can be edited/deleted (user-created presets). */
6589
+ editablePresetIds?: string[];
6590
+ /** Opens the edit flow for a preset (hover icon on editable presets). */
6591
+ onEditPreset?: (presetId: string) => void;
6592
+ /** Whether to show the dashed "Save view" chip ("save" | "none"). */
6593
+ presetActionState?: "save" | "none";
6594
+ /** Opens the preset create/update dialog. */
6595
+ onPresetAction?: () => void;
6553
6596
  };
6554
6597
 
6555
6598
  /**
@@ -6855,23 +6898,66 @@ declare type PostEventProps = {
6855
6898
  export declare const predefinedPresets: Record<string, DatePreset>;
6856
6899
 
6857
6900
  /**
6858
- * Defines preset filter configurations that can be applied to a collection.
6901
+ * Defines preset configurations that can be applied to a collection.
6902
+ *
6903
+ * A preset is a saveable snapshot of the collection view. Historically it only
6904
+ * captured a group of filters; it can now also capture the sorting, view mode
6905
+ * (visualization), grouping and column order/visibility. All non-filter fields are
6906
+ * optional so existing filter-only presets remain valid.
6907
+ *
6859
6908
  * @template Filters - The available filter configurations
6860
6909
  */
6861
6910
  export declare type PresetDefinition<Filters extends FiltersDefinition> = {
6911
+ /**
6912
+ * Stable identifier for the preset. Optional for developer-provided presets (a
6913
+ * fallback id is derived from the label at merge time); user-created custom
6914
+ * presets always carry a generated id.
6915
+ */
6916
+ id?: string;
6862
6917
  /** Display name for the preset */
6863
6918
  label: string;
6919
+ /** Optional longer description, shown/edited in the preset form */
6920
+ description?: string;
6864
6921
  /** Filter configuration to apply when this preset is selected.
6865
6922
  * Clicking a preset replaces all current filters with this value.
6866
- * The preset shows as selected only when the current filters exactly match this value.
6867
6923
  */
6868
6924
  filter: FiltersState<Filters>;
6925
+ /**
6926
+ * Captured sorting state (`SortingsState`). Typed loosely here to avoid forcing
6927
+ * the `Sortings` generic onto every preset consumer; narrowed at the
6928
+ * OneDataCollection boundary.
6929
+ */
6930
+ sortings?: unknown;
6931
+ /** Captured grouping state (`GroupingState`). Typed loosely; see `sortings`. */
6932
+ grouping?: unknown;
6933
+ /** Captured view mode as the visualization index. */
6934
+ visualization?: number;
6935
+ /**
6936
+ * Captured column order/visibility settings (`DataCollectionSettings`, shaped
6937
+ * like `PresetSettings`). Typed loosely; narrowed at the OneDataCollection
6938
+ * boundary.
6939
+ */
6940
+ settings?: unknown;
6869
6941
  /** Function to count the number of items that match the filter */
6870
6942
  itemsCount?: (filters: FiltersState<Filters>) => Promise<number | undefined> | number | undefined;
6871
6943
  };
6872
6944
 
6873
6945
  export declare type PresetsDefinition<Filters extends FiltersDefinition> = PresetDefinition<Filters>[];
6874
6946
 
6947
+ /**
6948
+ * Structural snapshot of the visualization (column order/visibility) settings a
6949
+ * preset can capture. Typed structurally (rather than importing
6950
+ * `DataCollectionSettings`) to keep the filter pattern free of a dependency on
6951
+ * OneDataCollection. Narrowed to `DataCollectionSettings` at the OneDataCollection
6952
+ * boundary.
6953
+ */
6954
+ export declare type PresetSettings = {
6955
+ visualization?: Record<string, {
6956
+ order?: string[];
6957
+ hidden?: string[];
6958
+ }>;
6959
+ };
6960
+
6875
6961
  export declare type PrevNextDateNavigation = {
6876
6962
  prev: DateRange | false;
6877
6963
  next: DateRange | false;
@@ -6921,7 +7007,7 @@ declare interface PrimaryDropdownAction<T> extends PrimaryAction {
6921
7007
 
6922
7008
  export declare const PrivateBox: FC<PropsWithChildren>;
6923
7009
 
6924
- declare const privateProps: readonly ["append", "className", "pressed", "compact", "noTitle", "noAutoTooltip", "style"];
7010
+ declare const privateProps: readonly ["append", "className", "pressed", "compact", "noTitle", "noAutoTooltip", "style", "block"];
6925
7011
 
6926
7012
  declare const privateProps_2: readonly ["withBorder"];
6927
7013
 
@@ -8772,16 +8858,11 @@ declare module "gridstack" {
8772
8858
  }
8773
8859
 
8774
8860
 
8775
- declare namespace Calendar {
8776
- var displayName: string;
8777
- }
8778
-
8779
-
8780
8861
  declare module "@tiptap/core" {
8781
8862
  interface Commands<ReturnType> {
8782
- enhanceHighlight: {
8783
- setEnhanceHighlight: (from: number, to: number) => ReturnType;
8784
- clearEnhanceHighlight: () => ReturnType;
8863
+ aiBlock: {
8864
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
8865
+ executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
8785
8866
  };
8786
8867
  }
8787
8868
  }
@@ -8789,9 +8870,9 @@ declare module "@tiptap/core" {
8789
8870
 
8790
8871
  declare module "@tiptap/core" {
8791
8872
  interface Commands<ReturnType> {
8792
- aiBlock: {
8793
- insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
8794
- executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
8873
+ enhanceHighlight: {
8874
+ setEnhanceHighlight: (from: number, to: number) => ReturnType;
8875
+ clearEnhanceHighlight: () => ReturnType;
8795
8876
  };
8796
8877
  }
8797
8878
  }
@@ -8826,6 +8907,11 @@ declare module "@tiptap/core" {
8826
8907
  }
8827
8908
 
8828
8909
 
8910
+ declare namespace Calendar {
8911
+ var displayName: string;
8912
+ }
8913
+
8914
+
8829
8915
  declare namespace F0GraphNodeWrapperInner {
8830
8916
  var displayName: string;
8831
8917
  }
@@ -1,9 +1,9 @@
1
- import { g as da, B as ua, h as fa, i as ma, j as At, k as De, l as ha, m as p, n as X, o as ge, u as ie, T as pa, p as ga, q as ba, R as xa, r as va, s as re, t as wa, v as pt, w as rt, x as Re, A as _e, y as ya, z as Na, C as M, E as Ca, G as ka, H as ve, J as sn, K as Sa, L as Ia, M as W, N as on, S as O, O as we, Q as Fa, U as Aa, V as La, W as Ea, X as _a, Y as ke, Z as cn, _ as Oa, $ as be, a0 as $e, a1 as Da, a2 as gt, d as dn, a3 as Ce, a4 as Ta, a5 as un, a6 as ne, a7 as K, a8 as fn, a9 as mn, aa as za, ab as hn, ac as me, ad as ee, ae as Pa, af as Ba, ag as Ra, ah as $a, ai as pe, aj as Ge, ak as Wa, al as Ma, am as ja, an as Va, ao as He, ap as pn, aq as Ga, ar as Ha, as as Ua, at as We, au as Ka, av as qa, aw as Ya, ax as Za, ay as Xa, az as Ja, aA as Qa, aB as er, aC as tr, aD as nr, aE as lt, aF as gn, aG as it, aH as bn, aI as ar, aJ as rr, aK as lr, aL as ir, aM as sr, aN as Ue, aO as bt, aP as st, aQ as xn, aR as or, aS as vn, aT as cr, aU as dr, aV as ur, aW as Ee, aX as fr, aY as mr, aZ as Te, a_ as Lt, a$ as ot, b0 as hr, b1 as pr, a as gr, b as br, b2 as wn, b3 as xr, f as vr, F as wr, b4 as yr, b5 as yn, b6 as Nr, b7 as Nn, b8 as Cr, b9 as kr, ba as Sr, bb as Ir, bc as Fr, bd as Ar, be as Lr, bf as Er, bg as _r, bh as Cn, bi as ue, bj as xt, bk as vt, bl as wt, bm as kn, bn as yt, bo as Sn, bp as In, bq as Or, br as Dr, bs as Tr, bt as zr, bu as Pr, bv as Br, bw as Rr, bx as $r, by as Et, bz as Wr, bA as Mr, bB as _t, bC as Ot, bD as Dt, bE as jr, bF as Vr, bG as Gr, bH as Hr, bI as Fn, bJ as Ur, bK as Kr } from "./F0CanvasPanel-CTpW3vtK.js";
2
- import { bW as Lc, bV as Ec, c6 as _c, bS as Oc, bT as Dc, bL as Tc, bM as zc, bN as Pc, c7 as Bc, bU as Rc, c2 as $c, c3 as Wc, bO as Mc, bY as jc, bX as Vc, bP as Gc, bQ as Hc, c4 as Uc, c8 as Kc, c5 as qc, c1 as Yc, b_ as Zc, c0 as Xc, bZ as Jc, bR as Qc, b$ as ed } from "./F0CanvasPanel-CTpW3vtK.js";
1
+ import { g as da, B as ua, h as fa, i as ma, j as At, k as De, l as ha, m as p, n as X, o as ge, u as ie, T as pa, p as ga, q as ba, R as xa, r as va, s as re, t as wa, v as pt, w as rt, x as Re, A as _e, y as ya, z as Na, C as M, E as Ca, G as ka, H as ve, J as sn, K as Sa, L as Ia, M as W, N as on, S as O, O as we, Q as Fa, U as Aa, V as La, W as Ea, X as _a, Y as ke, Z as cn, _ as Oa, $ as be, a0 as $e, a1 as Da, a2 as gt, d as dn, a3 as Ce, a4 as Ta, a5 as un, a6 as ne, a7 as K, a8 as fn, a9 as mn, aa as za, ab as hn, ac as me, ad as ee, ae as Pa, af as Ba, ag as Ra, ah as $a, ai as pe, aj as Ge, ak as Wa, al as Ma, am as ja, an as Va, ao as He, ap as pn, aq as Ga, ar as Ha, as as Ua, at as We, au as Ka, av as qa, aw as Ya, ax as Za, ay as Xa, az as Ja, aA as Qa, aB as er, aC as tr, aD as nr, aE as lt, aF as gn, aG as it, aH as bn, aI as ar, aJ as rr, aK as lr, aL as ir, aM as sr, aN as Ue, aO as bt, aP as st, aQ as xn, aR as or, aS as vn, aT as cr, aU as dr, aV as ur, aW as Ee, aX as fr, aY as mr, aZ as Te, a_ as Lt, a$ as ot, b0 as hr, b1 as pr, a as gr, b as br, b2 as wn, b3 as xr, f as vr, F as wr, b4 as yr, b5 as yn, b6 as Nr, b7 as Nn, b8 as Cr, b9 as kr, ba as Sr, bb as Ir, bc as Fr, bd as Ar, be as Lr, bf as Er, bg as _r, bh as Cn, bi as ue, bj as xt, bk as vt, bl as wt, bm as kn, bn as yt, bo as Sn, bp as In, bq as Or, br as Dr, bs as Tr, bt as zr, bu as Pr, bv as Br, bw as Rr, bx as $r, by as Et, bz as Wr, bA as Mr, bB as _t, bC as Ot, bD as Dt, bE as jr, bF as Vr, bG as Gr, bH as Hr, bI as Fn, bJ as Ur, bK as Kr } from "./F0CanvasPanel-D70oNR2G.js";
2
+ import { bW as Lc, bV as Ec, c6 as _c, bS as Oc, bT as Dc, bL as Tc, bM as zc, bN as Pc, c7 as Bc, bU as Rc, c2 as $c, c3 as Wc, bO as Mc, bY as jc, bX as Vc, bP as Gc, bQ as Hc, c4 as Uc, c8 as Kc, c5 as qc, c1 as Yc, b_ as Zc, c0 as Xc, bZ as Jc, bR as Qc, b$ as ed } from "./F0CanvasPanel-D70oNR2G.js";
3
3
  import { jsx as e, jsxs as o, Fragment as U } from "react/jsx-runtime";
4
4
  import se, { forwardRef as j, useRef as G, useTransition as qr, useState as _, useLayoutEffect as An, useId as ct, useContext as Ke, createContext as Nt, useEffect as $, useCallback as Q, useMemo as q, Fragment as Yr, isValidElement as Zr, cloneElement as Ln, Children as En } from "react";
5
- import { C as Xr, P as Jr, a as _n, M as Qr, R as Tt, b as On, u as el, c as Dn, S as tl, A as nl, B as al, L as rl, d as ll, V as il, e as sl, f as ol, g as cl, O as dl } from "./useDataCollectionSource-DspGeRMB.js";
6
- import { l as nd, m as ad, j as rd, x as ld, n as id, s as sd, a3 as od, w as cd, k as dd, D as ud, F as fd, J as md, E as hd, z as pd, a9 as gd, I as bd, K as xd, Q as vd, o as wd, a5 as yd, a6 as Nd, a4 as Cd, a7 as kd, N as Sd, U as Id, a0 as Fd, a2 as Ad, p as Ld, r as Ed, t as _d, G as Od, a8 as Dd, H as Td, T as zd, q as Pd, v as Bd, h as Rd, i as $d, X as Wd, Y as Md, a1 as jd, y as Vd, Z as Gd, _ as Hd, W as Ud, $ as Kd } from "./useDataCollectionSource-DspGeRMB.js";
5
+ import { C as Xr, P as Jr, a as _n, M as Qr, R as Tt, b as On, u as el, c as Dn, S as tl, A as nl, B as al, L as rl, d as ll, V as il, e as sl, f as ol, g as cl, O as dl } from "./useDataCollectionSource-CDB1LCNu.js";
6
+ import { l as nd, m as ad, j as rd, x as ld, n as id, s as sd, a3 as od, w as cd, k as dd, D as ud, F as fd, J as md, E as hd, z as pd, a9 as gd, I as bd, K as xd, Q as vd, o as wd, a5 as yd, a6 as Nd, a4 as Cd, a7 as kd, N as Sd, U as Id, a0 as Fd, a2 as Ad, p as Ld, r as Ed, t as _d, G as Od, a8 as Dd, H as Td, T as zd, q as Pd, v as Bd, h as Rd, i as $d, X as Wd, Y as Md, a1 as jd, y as Vd, Z as Gd, _ as Hd, W as Ud, $ as Kd } from "./useDataCollectionSource-CDB1LCNu.js";
7
7
  const ul = da("Search", [
8
8
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
9
9
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
package/dist/f0.d.ts CHANGED
@@ -1824,6 +1824,11 @@ declare type ButtonInternalProps = Pick<ActionProps, "size" | "disabled" | "clas
1824
1824
  * The style of the button.
1825
1825
  */
1826
1826
  style?: React.CSSProperties;
1827
+ /**
1828
+ * @private
1829
+ * If true, the button will stretch to the full width of its container.
1830
+ */
1831
+ block?: boolean;
1827
1832
  } & ({
1828
1833
  /**
1829
1834
  * The URL to navigate to when the button is clicked.
@@ -3562,7 +3567,7 @@ export declare type Data<R extends RecordType> = {
3562
3567
 
3563
3568
  /**
3564
3569
  * Every data collection URL param shares this prefix, so each filter is its own
3565
- * readable param — e.g. `?dc_department=Sales&dc_search=ada&dc_view=kanban`
3570
+ * readable param — e.g. `?dc_department=Sales&dc_search=ada&dc_visualization=kanban`
3566
3571
  * instead of a single JSON blob. Params are not scoped to a collection id, so
3567
3572
  * this assumes a single URL-synced collection per page.
3568
3573
  */
@@ -3578,9 +3583,11 @@ export declare const DATA_COLLECTION_URL_PARAMS: {
3578
3583
  readonly search: "dc_search";
3579
3584
  readonly sortings: "dc_sort";
3580
3585
  /** Active visualization type/key, e.g. `table` (omitted for the default one). */
3581
- readonly visualization: "dc_view";
3586
+ readonly visualization: "dc_visualization";
3582
3587
  /** Current page (1-indexed; omitted for the first page). */
3583
3588
  readonly page: "dc_page";
3589
+ /** Selected view id (omitted when no view is selected). */
3590
+ readonly preset: "dc_view";
3584
3591
  };
3585
3592
 
3586
3593
  /**
@@ -3705,6 +3712,8 @@ declare type DataCollectionStatus<CurrentFiltersState extends FiltersState<Filte
3705
3712
  /** Per-visualization filter states, keyed by visualization index.
3706
3713
  * Only present when visualizations declare per-view filter overrides. */
3707
3714
  visualizationFilters?: Record<string, CurrentFiltersState>;
3715
+ /** User-created custom presets persisted alongside the rest of the state. */
3716
+ customPresets?: PresetsDefinition<FiltersDefinition>;
3708
3717
  };
3709
3718
 
3710
3719
  export declare type DataCollectionStorage<CurrentFiltersState extends FiltersState<FiltersDefinition> = FiltersState<FiltersDefinition>> = {
@@ -3730,6 +3739,8 @@ export declare type DataCollectionUrlState<CurrentFiltersState extends FiltersSt
3730
3739
  visualization?: string;
3731
3740
  /** Current page (1-indexed). Not part of persisted storage — URL only. */
3732
3741
  page?: number;
3742
+ /** Selected preset id (absent when no preset is selected). URL only. */
3743
+ preset?: string;
3733
3744
  };
3734
3745
 
3735
3746
  /**
@@ -4267,6 +4278,7 @@ export declare const defaultTranslations: {
4267
4278
  readonly save: "Save";
4268
4279
  readonly send: "Send";
4269
4280
  readonly cancel: "Cancel";
4281
+ readonly ok: "Ok";
4270
4282
  readonly delete: "Delete";
4271
4283
  readonly copy: "Copy";
4272
4284
  readonly paste: "Paste";
@@ -4294,6 +4306,8 @@ export declare const defaultTranslations: {
4294
4306
  readonly selectAll: "Select all";
4295
4307
  readonly selectAllItems: "Select all {{total}} items";
4296
4308
  readonly apply: "Apply";
4309
+ readonly saveAsPreset: "Save view";
4310
+ readonly editPreset: "Edit view";
4297
4311
  };
4298
4312
  readonly status: {
4299
4313
  readonly selected: {
@@ -4364,6 +4378,22 @@ export declare const defaultTranslations: {
4364
4378
  readonly actions: {
4365
4379
  readonly actions: "Actions";
4366
4380
  };
4381
+ readonly presets: {
4382
+ readonly createTitle: "Save view";
4383
+ readonly createDescription: "Save the current filters, sorting, grouping and columns as a view.";
4384
+ readonly updateTitle: "Update view";
4385
+ readonly updateDescription: "Update this view's name and description.";
4386
+ readonly nameLabel: "Title";
4387
+ readonly namePlaceholder: "View name";
4388
+ readonly duplicateName: "A view with this name already exists";
4389
+ readonly descriptionLabel: "Description";
4390
+ readonly descriptionPlaceholder: "Optional description";
4391
+ readonly save: "Save";
4392
+ readonly delete: "Remove";
4393
+ readonly share: "Share view";
4394
+ readonly copiedToClipboard: "Copied to your clipboard";
4395
+ readonly cancel: "Cancel";
4396
+ };
4367
4397
  readonly visualizations: {
4368
4398
  readonly table: "Table view";
4369
4399
  readonly editableTable: "Editable table view";
@@ -6694,7 +6724,7 @@ export declare interface F0BoxProps extends Omit<React.ComponentPropsWithoutRef<
6694
6724
  xl?: ResponsiveStyleProps;
6695
6725
  }
6696
6726
 
6697
- export declare const F0Button: WithDataTestIdReturnType_3<ForwardRefExoticComponent<Omit<ButtonInternalProps, "style" | "className" | "variant" | "pressed" | "append" | "compact" | "noAutoTooltip" | "noTitle"> & {
6727
+ export declare const F0Button: WithDataTestIdReturnType_3<ForwardRefExoticComponent<Omit<ButtonInternalProps, "style" | "className" | "block" | "variant" | "pressed" | "append" | "compact" | "noAutoTooltip" | "noTitle"> & {
6698
6728
  variant?: Exclude<ButtonInternalProps["variant"], "ai">;
6699
6729
  } & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>>;
6700
6730
 
@@ -12543,6 +12573,23 @@ declare type OneFilterPickerRootProps<Definition extends FiltersDefinition> = {
12543
12573
  displayCounter?: boolean;
12544
12574
  /** Total number of items matching the current filters, displayed as "N results for:" prefix in the chips row */
12545
12575
  resultCount?: number;
12576
+ /**
12577
+ * Id of the currently selected preset. When provided together with
12578
+ * `onSelectPreset`, preset selection is identity-based (the preset stays
12579
+ * selected as the user changes state on top of it). When absent, the picker
12580
+ * falls back to legacy exact-filter-match selection.
12581
+ */
12582
+ selectedPresetId?: string;
12583
+ /** Selects a preset by id. Enables identity-based selection. */
12584
+ onSelectPreset?: (presetId: string) => void;
12585
+ /** Ids of presets that can be edited/deleted (user-created presets). */
12586
+ editablePresetIds?: string[];
12587
+ /** Opens the edit flow for a preset (hover icon on editable presets). */
12588
+ onEditPreset?: (presetId: string) => void;
12589
+ /** Whether to show the dashed "Save view" chip ("save" | "none"). */
12590
+ presetActionState?: "save" | "none";
12591
+ /** Opens the preset create/update dialog. */
12592
+ onPresetAction?: () => void;
12546
12593
  };
12547
12594
 
12548
12595
  export declare type OneIconSize = (typeof oneIconSizes)[number];
@@ -12790,23 +12837,66 @@ export declare type PositionToken = "static" | "relative" | "absolute" | "fixed"
12790
12837
  export declare const predefinedPresets: Record<string, DatePreset>;
12791
12838
 
12792
12839
  /**
12793
- * Defines preset filter configurations that can be applied to a collection.
12840
+ * Defines preset configurations that can be applied to a collection.
12841
+ *
12842
+ * A preset is a saveable snapshot of the collection view. Historically it only
12843
+ * captured a group of filters; it can now also capture the sorting, view mode
12844
+ * (visualization), grouping and column order/visibility. All non-filter fields are
12845
+ * optional so existing filter-only presets remain valid.
12846
+ *
12794
12847
  * @template Filters - The available filter configurations
12795
12848
  */
12796
12849
  export declare type PresetDefinition<Filters extends FiltersDefinition> = {
12850
+ /**
12851
+ * Stable identifier for the preset. Optional for developer-provided presets (a
12852
+ * fallback id is derived from the label at merge time); user-created custom
12853
+ * presets always carry a generated id.
12854
+ */
12855
+ id?: string;
12797
12856
  /** Display name for the preset */
12798
12857
  label: string;
12858
+ /** Optional longer description, shown/edited in the preset form */
12859
+ description?: string;
12799
12860
  /** Filter configuration to apply when this preset is selected.
12800
12861
  * Clicking a preset replaces all current filters with this value.
12801
- * The preset shows as selected only when the current filters exactly match this value.
12802
12862
  */
12803
12863
  filter: FiltersState<Filters>;
12864
+ /**
12865
+ * Captured sorting state (`SortingsState`). Typed loosely here to avoid forcing
12866
+ * the `Sortings` generic onto every preset consumer; narrowed at the
12867
+ * OneDataCollection boundary.
12868
+ */
12869
+ sortings?: unknown;
12870
+ /** Captured grouping state (`GroupingState`). Typed loosely; see `sortings`. */
12871
+ grouping?: unknown;
12872
+ /** Captured view mode as the visualization index. */
12873
+ visualization?: number;
12874
+ /**
12875
+ * Captured column order/visibility settings (`DataCollectionSettings`, shaped
12876
+ * like `PresetSettings`). Typed loosely; narrowed at the OneDataCollection
12877
+ * boundary.
12878
+ */
12879
+ settings?: unknown;
12804
12880
  /** Function to count the number of items that match the filter */
12805
12881
  itemsCount?: (filters: FiltersState<Filters>) => Promise<number | undefined> | number | undefined;
12806
12882
  };
12807
12883
 
12808
12884
  export declare type PresetsDefinition<Filters extends FiltersDefinition> = PresetDefinition<Filters>[];
12809
12885
 
12886
+ /**
12887
+ * Structural snapshot of the visualization (column order/visibility) settings a
12888
+ * preset can capture. Typed structurally (rather than importing
12889
+ * `DataCollectionSettings`) to keep the filter pattern free of a dependency on
12890
+ * OneDataCollection. Narrowed to `DataCollectionSettings` at the OneDataCollection
12891
+ * boundary.
12892
+ */
12893
+ export declare type PresetSettings = {
12894
+ visualization?: Record<string, {
12895
+ order?: string[];
12896
+ hidden?: string[];
12897
+ }>;
12898
+ };
12899
+
12810
12900
  export declare type PrevNextDateNavigation = {
12811
12901
  prev: DateRange | false;
12812
12902
  next: DateRange | false;
@@ -12853,7 +12943,7 @@ export declare const PrivacyModeProvider: React_2.FC<{
12853
12943
  children: ReactNode;
12854
12944
  }>;
12855
12945
 
12856
- declare const privateProps: readonly ["append", "className", "pressed", "compact", "noTitle", "noAutoTooltip", "style"];
12946
+ declare const privateProps: readonly ["append", "className", "pressed", "compact", "noTitle", "noAutoTooltip", "style", "block"];
12857
12947
 
12858
12948
  declare const privateProps_2: readonly ["withBorder"];
12859
12949
 
@@ -15740,16 +15830,11 @@ declare module "gridstack" {
15740
15830
  }
15741
15831
 
15742
15832
 
15743
- declare namespace Calendar {
15744
- var displayName: string;
15745
- }
15746
-
15747
-
15748
15833
  declare module "@tiptap/core" {
15749
15834
  interface Commands<ReturnType> {
15750
- enhanceHighlight: {
15751
- setEnhanceHighlight: (from: number, to: number) => ReturnType;
15752
- clearEnhanceHighlight: () => ReturnType;
15835
+ aiBlock: {
15836
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
15837
+ executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
15753
15838
  };
15754
15839
  }
15755
15840
  }
@@ -15757,9 +15842,9 @@ declare module "@tiptap/core" {
15757
15842
 
15758
15843
  declare module "@tiptap/core" {
15759
15844
  interface Commands<ReturnType> {
15760
- aiBlock: {
15761
- insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
15762
- executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
15845
+ enhanceHighlight: {
15846
+ setEnhanceHighlight: (from: number, to: number) => ReturnType;
15847
+ clearEnhanceHighlight: () => ReturnType;
15763
15848
  };
15764
15849
  }
15765
15850
  }
@@ -15794,6 +15879,11 @@ declare module "@tiptap/core" {
15794
15879
  }
15795
15880
 
15796
15881
 
15882
+ declare namespace Calendar {
15883
+ var displayName: string;
15884
+ }
15885
+
15886
+
15797
15887
  declare namespace F0GraphNodeWrapperInner {
15798
15888
  var displayName: string;
15799
15889
  }