@factorialco/f0-react 2.47.0 → 2.49.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
@@ -1854,6 +1854,8 @@ export declare const defaultTranslations: {
1854
1854
  readonly selectAll: "Select all";
1855
1855
  readonly selectAllItems: "Select all {{total}} items";
1856
1856
  readonly apply: "Apply";
1857
+ readonly saveAsPreset: "Save view";
1858
+ readonly editPreset: "Edit view";
1857
1859
  };
1858
1860
  readonly status: {
1859
1861
  readonly selected: {
@@ -1924,6 +1926,22 @@ export declare const defaultTranslations: {
1924
1926
  readonly actions: {
1925
1927
  readonly actions: "Actions";
1926
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
+ };
1927
1945
  readonly visualizations: {
1928
1946
  readonly table: "Table view";
1929
1947
  readonly editableTable: "Editable table view";
@@ -4687,6 +4705,11 @@ declare module "gridstack" {
4687
4705
  }
4688
4706
 
4689
4707
 
4708
+ declare namespace Calendar {
4709
+ var displayName: string;
4710
+ }
4711
+
4712
+
4690
4713
  declare module "@tiptap/core" {
4691
4714
  interface Commands<ReturnType> {
4692
4715
  enhanceHighlight: {
@@ -4736,11 +4759,6 @@ declare module "@tiptap/core" {
4736
4759
  }
4737
4760
 
4738
4761
 
4739
- declare namespace Calendar {
4740
- var displayName: string;
4741
- }
4742
-
4743
-
4744
4762
  declare namespace F0GraphNodeWrapperInner {
4745
4763
  var displayName: string;
4746
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-DAS9OuMu.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-widnlpnJ.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,
@@ -2525,6 +2525,8 @@ declare type DataCollectionStatus<CurrentFiltersState extends FiltersState<Filte
2525
2525
  /** Per-visualization filter states, keyed by visualization index.
2526
2526
  * Only present when visualizations declare per-view filter overrides. */
2527
2527
  visualizationFilters?: Record<string, CurrentFiltersState>;
2528
+ /** User-created custom presets persisted alongside the rest of the state. */
2529
+ customPresets?: PresetsDefinition<FiltersDefinition>;
2528
2530
  };
2529
2531
 
2530
2532
  declare type DataCollectionStatusComplete<CurrentFiltersState extends FiltersState<FiltersDefinition>> = DataCollectionStatus<CurrentFiltersState> & {
@@ -3004,6 +3006,8 @@ declare const defaultTranslations: {
3004
3006
  readonly selectAll: "Select all";
3005
3007
  readonly selectAllItems: "Select all {{total}} items";
3006
3008
  readonly apply: "Apply";
3009
+ readonly saveAsPreset: "Save view";
3010
+ readonly editPreset: "Edit view";
3007
3011
  };
3008
3012
  readonly status: {
3009
3013
  readonly selected: {
@@ -3074,6 +3078,22 @@ declare const defaultTranslations: {
3074
3078
  readonly actions: {
3075
3079
  readonly actions: "Actions";
3076
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
+ };
3077
3097
  readonly visualizations: {
3078
3098
  readonly table: "Table view";
3079
3099
  readonly editableTable: "Editable table view";
@@ -6556,6 +6576,23 @@ declare type OneFilterPickerRootProps<Definition extends FiltersDefinition> = {
6556
6576
  displayCounter?: boolean;
6557
6577
  /** Total number of items matching the current filters, displayed as "N results for:" prefix in the chips row */
6558
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;
6559
6596
  };
6560
6597
 
6561
6598
  /**
@@ -6861,23 +6898,66 @@ declare type PostEventProps = {
6861
6898
  export declare const predefinedPresets: Record<string, DatePreset>;
6862
6899
 
6863
6900
  /**
6864
- * 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
+ *
6865
6908
  * @template Filters - The available filter configurations
6866
6909
  */
6867
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;
6868
6917
  /** Display name for the preset */
6869
6918
  label: string;
6919
+ /** Optional longer description, shown/edited in the preset form */
6920
+ description?: string;
6870
6921
  /** Filter configuration to apply when this preset is selected.
6871
6922
  * Clicking a preset replaces all current filters with this value.
6872
- * The preset shows as selected only when the current filters exactly match this value.
6873
6923
  */
6874
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;
6875
6941
  /** Function to count the number of items that match the filter */
6876
6942
  itemsCount?: (filters: FiltersState<Filters>) => Promise<number | undefined> | number | undefined;
6877
6943
  };
6878
6944
 
6879
6945
  export declare type PresetsDefinition<Filters extends FiltersDefinition> = PresetDefinition<Filters>[];
6880
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
+
6881
6961
  export declare type PrevNextDateNavigation = {
6882
6962
  prev: DateRange | false;
6883
6963
  next: DateRange | false;
@@ -8778,6 +8858,11 @@ declare module "gridstack" {
8778
8858
  }
8779
8859
 
8780
8860
 
8861
+ declare namespace Calendar {
8862
+ var displayName: string;
8863
+ }
8864
+
8865
+
8781
8866
  declare module "@tiptap/core" {
8782
8867
  interface Commands<ReturnType> {
8783
8868
  enhanceHighlight: {
@@ -8827,11 +8912,6 @@ declare module "@tiptap/core" {
8827
8912
  }
8828
8913
 
8829
8914
 
8830
- declare namespace Calendar {
8831
- var displayName: string;
8832
- }
8833
-
8834
-
8835
8915
  declare namespace F0GraphNodeWrapperInner {
8836
8916
  var displayName: string;
8837
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-DAS9OuMu.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-DAS9OuMu.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-RSypR7CQ.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-RSypR7CQ.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
@@ -3567,7 +3567,7 @@ export declare type Data<R extends RecordType> = {
3567
3567
 
3568
3568
  /**
3569
3569
  * Every data collection URL param shares this prefix, so each filter is its own
3570
- * 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`
3571
3571
  * instead of a single JSON blob. Params are not scoped to a collection id, so
3572
3572
  * this assumes a single URL-synced collection per page.
3573
3573
  */
@@ -3583,9 +3583,11 @@ export declare const DATA_COLLECTION_URL_PARAMS: {
3583
3583
  readonly search: "dc_search";
3584
3584
  readonly sortings: "dc_sort";
3585
3585
  /** Active visualization type/key, e.g. `table` (omitted for the default one). */
3586
- readonly visualization: "dc_view";
3586
+ readonly visualization: "dc_visualization";
3587
3587
  /** Current page (1-indexed; omitted for the first page). */
3588
3588
  readonly page: "dc_page";
3589
+ /** Selected view id (omitted when no view is selected). */
3590
+ readonly preset: "dc_view";
3589
3591
  };
3590
3592
 
3591
3593
  /**
@@ -3710,6 +3712,8 @@ declare type DataCollectionStatus<CurrentFiltersState extends FiltersState<Filte
3710
3712
  /** Per-visualization filter states, keyed by visualization index.
3711
3713
  * Only present when visualizations declare per-view filter overrides. */
3712
3714
  visualizationFilters?: Record<string, CurrentFiltersState>;
3715
+ /** User-created custom presets persisted alongside the rest of the state. */
3716
+ customPresets?: PresetsDefinition<FiltersDefinition>;
3713
3717
  };
3714
3718
 
3715
3719
  export declare type DataCollectionStorage<CurrentFiltersState extends FiltersState<FiltersDefinition> = FiltersState<FiltersDefinition>> = {
@@ -3735,6 +3739,8 @@ export declare type DataCollectionUrlState<CurrentFiltersState extends FiltersSt
3735
3739
  visualization?: string;
3736
3740
  /** Current page (1-indexed). Not part of persisted storage — URL only. */
3737
3741
  page?: number;
3742
+ /** Selected preset id (absent when no preset is selected). URL only. */
3743
+ preset?: string;
3738
3744
  };
3739
3745
 
3740
3746
  /**
@@ -4300,6 +4306,8 @@ export declare const defaultTranslations: {
4300
4306
  readonly selectAll: "Select all";
4301
4307
  readonly selectAllItems: "Select all {{total}} items";
4302
4308
  readonly apply: "Apply";
4309
+ readonly saveAsPreset: "Save view";
4310
+ readonly editPreset: "Edit view";
4303
4311
  };
4304
4312
  readonly status: {
4305
4313
  readonly selected: {
@@ -4370,6 +4378,22 @@ export declare const defaultTranslations: {
4370
4378
  readonly actions: {
4371
4379
  readonly actions: "Actions";
4372
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
+ };
4373
4397
  readonly visualizations: {
4374
4398
  readonly table: "Table view";
4375
4399
  readonly editableTable: "Editable table view";
@@ -12549,6 +12573,23 @@ declare type OneFilterPickerRootProps<Definition extends FiltersDefinition> = {
12549
12573
  displayCounter?: boolean;
12550
12574
  /** Total number of items matching the current filters, displayed as "N results for:" prefix in the chips row */
12551
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;
12552
12593
  };
12553
12594
 
12554
12595
  export declare type OneIconSize = (typeof oneIconSizes)[number];
@@ -12796,23 +12837,66 @@ export declare type PositionToken = "static" | "relative" | "absolute" | "fixed"
12796
12837
  export declare const predefinedPresets: Record<string, DatePreset>;
12797
12838
 
12798
12839
  /**
12799
- * 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
+ *
12800
12847
  * @template Filters - The available filter configurations
12801
12848
  */
12802
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;
12803
12856
  /** Display name for the preset */
12804
12857
  label: string;
12858
+ /** Optional longer description, shown/edited in the preset form */
12859
+ description?: string;
12805
12860
  /** Filter configuration to apply when this preset is selected.
12806
12861
  * Clicking a preset replaces all current filters with this value.
12807
- * The preset shows as selected only when the current filters exactly match this value.
12808
12862
  */
12809
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;
12810
12880
  /** Function to count the number of items that match the filter */
12811
12881
  itemsCount?: (filters: FiltersState<Filters>) => Promise<number | undefined> | number | undefined;
12812
12882
  };
12813
12883
 
12814
12884
  export declare type PresetsDefinition<Filters extends FiltersDefinition> = PresetDefinition<Filters>[];
12815
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
+
12816
12900
  export declare type PrevNextDateNavigation = {
12817
12901
  prev: DateRange | false;
12818
12902
  next: DateRange | false;
@@ -15746,6 +15830,11 @@ declare module "gridstack" {
15746
15830
  }
15747
15831
 
15748
15832
 
15833
+ declare namespace Calendar {
15834
+ var displayName: string;
15835
+ }
15836
+
15837
+
15749
15838
  declare module "@tiptap/core" {
15750
15839
  interface Commands<ReturnType> {
15751
15840
  enhanceHighlight: {
@@ -15795,11 +15884,6 @@ declare module "@tiptap/core" {
15795
15884
  }
15796
15885
 
15797
15886
 
15798
- declare namespace Calendar {
15799
- var displayName: string;
15800
- }
15801
-
15802
-
15803
15887
  declare namespace F0GraphNodeWrapperInner {
15804
15888
  var displayName: string;
15805
15889
  }