react-semaphor 0.1.598 → 0.1.600

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.
Files changed (90) hide show
  1. package/dist/analytics-protocol/index.js +336 -333
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +8 -8
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{add-to-dashboard-C86FsM8D.js → add-to-dashboard-ClhEIFst.js} +1 -1
  7. package/dist/chunks/{analytics-base-schemas-8wz9vqn_.js → analytics-base-schemas-DevrgqQb.js} +67 -60
  8. package/dist/chunks/{assistant-chat-DrI442Ld.js → assistant-chat-BULOkG9j.js} +88 -89
  9. package/dist/chunks/{bookmark-impact-C6uWtNWF.js → bookmark-impact-kdvXke8n.js} +3 -3
  10. package/dist/chunks/{bookmark-state-BfeKmj5s.js → bookmark-state-h1OLXVjE.js} +153 -153
  11. package/dist/chunks/{card-filter-builder-CSKCSpNo.js → card-filter-builder-CSCdSQQy.js} +1035 -1063
  12. package/dist/chunks/{comparison-window-caption-3bum5j00.js → comparison-window-caption-DJDwP9XO.js} +6 -6
  13. package/dist/chunks/{context-CVXTFljo.js → context-BJoEFgNl.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-C2AuKs10.js → dashboard-briefing-launcher-9YwUclHA.js} +255 -255
  15. package/dist/chunks/{dashboard-controls-BSbhyIkY.js → dashboard-controls-O6PNXMCp.js} +85 -85
  16. package/dist/chunks/{dashboard-json-Bd1rxD3y.js → dashboard-json-Bxf91TYq.js} +5 -5
  17. package/dist/chunks/{dashboard-PYd63LbL.js → dashboard-y9ON19ge.js} +1 -1
  18. package/dist/chunks/dates-DPTbpNxK.js +164 -0
  19. package/dist/chunks/{edit-dashboard-visual-D_0ZiWev.js → edit-dashboard-visual-CKwaW8H_.js} +5489 -5435
  20. package/dist/chunks/{filter-line-BdLyPYjH.js → filter-line-Dkg3yuOX.js} +6 -6
  21. package/dist/chunks/{filter-reach-copy-Dxn-mTuG.js → filter-reach-copy-ClzNcNhP.js} +1740 -1643
  22. package/dist/chunks/{filter-value-text-C6g-nDUW.js → filter-value-text-CXyuLW9Q.js} +4 -4
  23. package/dist/chunks/{index-BHSDE54O.js → index-CRo5--Y6.js} +7 -7
  24. package/dist/chunks/{layout-grid-CYR-LVpl.js → layout-grid-DSrBSfPM.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-C0IGLTZH.js → matrix-analytical-definition-i9PQY066.js} +443 -394
  26. package/dist/chunks/{matrix-member-presentation-D5BIYuy5.js → matrix-member-presentation-B_2beBc0.js} +1 -1
  27. package/dist/chunks/{matrix-operation-contract-RckfqkQm.js → matrix-operation-contract-DdK0J_KU.js} +36 -36
  28. package/dist/chunks/{metric-comparison-DsE8wdRh.js → metric-comparison-Bhz0V841.js} +2 -2
  29. package/dist/chunks/{paintbrush-xDDRjIyF.js → paintbrush-1UiU-uTz.js} +1 -1
  30. package/dist/chunks/{palette-CbOgFCy2.js → palette-DFIFf_-m.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-Cnq55Uno.js → pivot-result-contract-expectations-Dk7WFR_u.js} +8 -8
  32. package/dist/chunks/{pivot-result-identity-b4-ugQhm.js → pivot-result-identity-CzzrJpEm.js} +1 -1
  33. package/dist/chunks/{raw-temporal-value-B9W38mi3.js → raw-temporal-value-BLvdaMng.js} +2 -2
  34. package/dist/chunks/{report-preferences-dialog-DTu3a7ce.js → report-preferences-dialog-DiDsYpng.js} +14 -14
  35. package/dist/chunks/{report-runtime-context-BvJkcbar.js → report-runtime-context-CEGluufW.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-Bw-DesV2.js → resolve-dashboard-input-context-BAv33KGg.js} +11811 -11331
  37. package/dist/chunks/{save-BgvAsp6X.js → save-CWQ02kHo.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-BFh0oOnF.js → saved-dashboard-context-CvzYqADe.js} +97 -97
  39. package/dist/chunks/{selection-filter-compiler-DHYsq3yM.js → selection-filter-compiler-SwrBvyyJ.js} +1 -1
  40. package/dist/chunks/{semaphor-ready-indicator-WvgHMnj8.js → semaphor-ready-indicator-1PRI9Yh2.js} +59336 -58569
  41. package/dist/chunks/{shelf-drop-preview-context-D6HgYFJp.js → shelf-drop-preview-context-BLk5Nc6K.js} +6 -6
  42. package/dist/chunks/{stored-dashboard-vlG0Knxi.js → stored-dashboard-xhYYKBsO.js} +1200 -1183
  43. package/dist/chunks/{style-sheet-parts-ClmvtkSC.js → style-sheet-parts-BX7d7-2-.js} +198 -198
  44. package/dist/chunks/{table-export-sheet-Bv6tVuMu.js → table-export-sheet-BWSVTclx.js} +1 -1
  45. package/dist/chunks/{token-types-eMdcuB6j.js → token-types-CnlEiAdS.js} +1 -1
  46. package/dist/chunks/{upload-ClUeK8F0.js → upload-DsqUSS8l.js} +1 -1
  47. package/dist/chunks/{validators-DwhBEvnh.js → validators-D2Hm57lJ.js} +23 -13
  48. package/dist/chunks/{variable-draft-CauoSBN0.js → variable-draft-DcKj8T1b.js} +4 -4
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +2497 -2549
  51. package/dist/format-utils/index.js +14 -14
  52. package/dist/index.js +48 -48
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/components/surfboard/filter/types.d.ts +13 -1
  57. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -2
  58. package/dist/types/components/visual/data-table/types/data-table.d.ts +14 -21
  59. package/dist/types/index.js +5 -5
  60. package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +11 -1
  61. package/dist/types/lib/dashboard-view-state/drill-path.d.ts +7 -0
  62. package/dist/types/lib/dashboard-viewer/table-view.d.ts +20 -0
  63. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +8 -0
  64. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +1 -0
  65. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +2 -0
  66. package/dist/types/lib/stores/dashboard-store.d.ts +3 -1
  67. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +64 -0
  68. package/dist/types/shared/analytics-protocol/catalog-source-address.d.ts +16 -0
  69. package/dist/types/shared/analytics-protocol/column-filter-id.d.ts +4 -0
  70. package/dist/types/shared/analytics-protocol/contracts.d.ts +26 -0
  71. package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
  72. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +12 -1
  73. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +12 -0
  74. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  75. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -1
  76. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +4 -0
  77. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
  78. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +18 -0
  79. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  80. package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +2 -0
  81. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +8 -1
  82. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +3 -1
  83. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +29 -1
  84. package/dist/types/shared/usage-events/attribution.d.ts +2 -2
  85. package/dist/types/shared/usage-events/envelope.d.ts +2 -2
  86. package/dist/usage-events/index.js +1 -1
  87. package/package.json +1 -1
  88. package/dist/chunks/aggregate-measure-field-DtKcEjG5.js +0 -22
  89. package/dist/chunks/dates-DHMCf-F7.js +0 -115
  90. package/dist/chunks/list-filter-B67GsjTw.js +0 -15
@@ -1,5 +1,5 @@
1
- import { a, R as s, D as o } from "../chunks/report-preferences-dialog-DTu3a7ce.js";
2
- import { C as f, E as D } from "../chunks/bookmark-state-BfeKmj5s.js";
1
+ import { a, R as s, D as o } from "../chunks/report-preferences-dialog-DiDsYpng.js";
2
+ import { C as f, E as D } from "../chunks/bookmark-state-h1OLXVjE.js";
3
3
  export {
4
4
  f as CONTROL_CARD_DEFAULT_VALUE,
5
5
  a as DisplayFormatPreferencesFields,
@@ -1,6 +1,6 @@
1
1
  import { DashboardInputTargetContext } from '../../../lib/dashboard-inputs/dashboard-input-target-context.js';
2
2
  import { NormalizedDashboardInput } from '../../../lib/types/common-types.js';
3
- import { CalculatedFieldFormula, Field } from '../../../lib/types/explorer-types.js';
3
+ import { AggregateFunction, CalculatedFieldFormula, Field, FilterGroup } from '../../../lib/types/explorer-types.js';
4
4
  import { RawTemporalSelection, TemporalBucketMetadata } from '../../../shared/analytics-protocol/contracts.js';
5
5
  import { RelativeDateOperator, DateUnit, RelativeDateUnit, RelativeDateWindow, StoredRelativeDate, SubDayDateUnit } from '../../../shared/analytics-protocol/relative-date/index.js';
6
6
  export type DateSelectionMode = 'range' | 'months' | 'day';
@@ -68,6 +68,18 @@ export type FilterFieldMeta = Pick<Field, 'name' | 'qualifiedFieldName'> & Parti
68
68
  entityType?: string;
69
69
  /** Exact database type used by server-side predicate formatting. */
70
70
  nativeDataType?: string;
71
+ /**
72
+ * A measure's aggregate: a filter on it tests the aggregated value
73
+ * (HAVING), never a row (table column filters TCF-D9). Set only by a
74
+ * measure column's filter; `buildFilterFieldMeta` copies neither, so
75
+ * every other filter on a measure field keeps testing rows.
76
+ */
77
+ aggregate?: AggregateFunction;
78
+ isPreAggregated?: boolean;
79
+ /** A measure column's own filter, so HAVING tests the value the column shows. */
80
+ parameters?: {
81
+ filters?: FilterGroup;
82
+ };
71
83
  expression?: string;
72
84
  calculatedFormula?: CalculatedFieldFormula;
73
85
  /**
@@ -70,8 +70,6 @@ export declare function useDataTableLogic(props: DataTableLogicProps): {
70
70
  contextTimezone: string | undefined;
71
71
  browserTimezone: string;
72
72
  };
73
- globalFilter: string;
74
- setGlobalFilter: React.Dispatch<React.SetStateAction<string>>;
75
73
  setRowSelection: React.Dispatch<React.SetStateAction<RowSelectionState>>;
76
74
  columnSettingsOpen: boolean;
77
75
  activeColumnId: string | null;
@@ -123,6 +123,18 @@ export type TablePreferences = {
123
123
  * turns it off. Viewers sort either way (PLAN B30).
124
124
  */
125
125
  allowViewerColumnCustomization?: boolean;
126
+ /**
127
+ * Viewers may filter this table's columns from their headers, for this card
128
+ * only (table column filters TCF-D6). Absent means on; only `false` turns
129
+ * it off.
130
+ */
131
+ allowViewerColumnFilters?: boolean;
132
+ /**
133
+ * Viewers may search this table's text columns, for this card only (table
134
+ * column filters TCF-D6, TCF-D10). Absent means on; only `false` turns it
135
+ * off.
136
+ */
137
+ allowViewerSearch?: boolean;
126
138
  /**
127
139
  * The author's column order (table column order TCO-D2, TCO-D4): the
128
140
  * addressable columns' ids, arranged over the field order by the viewer's
@@ -239,27 +251,6 @@ export interface DataTableColumnSettingsProps {
239
251
  /** Classified temporal semantics for the active SQL-only result column. */
240
252
  rawTemporalValueKind?: RawTemporalValueKind;
241
253
  }
242
- export interface DataTableToolbarProps {
243
- card: TCard;
244
- globalFilter: string;
245
- totalColumns: number;
246
- totalRows: number;
247
- onGlobalFilterChange: (value: string) => void;
248
- selectedRowsCount: number;
249
- columns: Column<any, unknown>[];
250
- selectColumnVisible: boolean;
251
- onToggleSelectColumn: (visible: boolean) => void;
252
- onColumnVisibilityChange?: (columnId: string, isVisible: boolean) => void;
253
- data: {
254
- rows: Record<string, any>[];
255
- selectedRows: Record<string, any>[];
256
- visibleColumns: string[];
257
- columnSettings: ColumnSettingsMap;
258
- contextTimezone?: string;
259
- browserTimezone?: string;
260
- };
261
- exportFileName?: string;
262
- }
263
254
  export type DataTablePaginationAppearance = {
264
255
  containerStyle?: CSSProperties;
265
256
  controlStyle?: CSSProperties;
@@ -271,6 +262,8 @@ export interface DataTablePaginationProps {
271
262
  pageIndex: number;
272
263
  pageSize: number;
273
264
  rowCount: number;
265
+ /** The total the rows are filtered from by the viewer's column filters (TCF-D8). */
266
+ filteredFromRowCount?: number;
274
267
  selectedRowCount: number;
275
268
  setPageIndex: (pageIndex: number) => void;
276
269
  setPageSize: (pageSize: number) => void;
@@ -1,8 +1,8 @@
1
- import { B as t, z as r, C as l, E as o, V as i, j as n, c as d, g as m, f as u, b as c, e as E, d as C, a as T, y as p, x as D, o as A, h as I, q as _, w as F, v as S, m as b, n as L, l as f, p as N, k as y, s as R, u as h, i as g, r as x, t as M } from "../chunks/bookmark-state-BfeKmj5s.js";
2
- import { C as V, D as w, L as z, d as U, g as k, h as B, e as K, f as v, c as Y, a as q, i as G, b as P, n as Q, s as W } from "../chunks/validators-DwhBEvnh.js";
3
- import { D as J } from "../chunks/token-types-eMdcuB6j.js";
4
- import { r as H, a as Z } from "../chunks/pivot-result-identity-b4-ugQhm.js";
5
- import { D as ee } from "../chunks/report-runtime-context-BvJkcbar.js";
1
+ import { B as t, z as r, C as l, E as o, V as i, j as n, c as d, g as m, f as u, b as c, e as E, d as C, a as T, y as p, x as D, o as A, h as I, q as _, w as F, v as S, m as b, n as L, l as f, p as N, k as y, s as R, u as h, i as g, r as x, t as M } from "../chunks/bookmark-state-h1OLXVjE.js";
2
+ import { C as V, D as w, L as z, d as U, g as k, e as B, h as K, f as v, c as Y, a as q, i as G, b as P, n as Q, s as W } from "../chunks/validators-D2Hm57lJ.js";
3
+ import { D as J } from "../chunks/token-types-CnlEiAdS.js";
4
+ import { r as H, a as Z } from "../chunks/pivot-result-identity-CzzrJpEm.js";
5
+ import { D as ee } from "../chunks/report-runtime-context-CEGluufW.js";
6
6
  const e = [
7
7
  "concatenate",
8
8
  "conditional-category",
@@ -51,10 +51,18 @@ export type CardDateZoom = {
51
51
  to: string;
52
52
  madeUnder: string;
53
53
  };
54
+ /**
55
+ * A viewer's search on a table (table column filters TCF-D10): the words,
56
+ * for the visit only (TCF-D7). The card's query searches its text columns.
57
+ */
58
+ export type CardTableSearch = {
59
+ text: string;
60
+ };
54
61
  export type CardViewState = {
55
62
  drill?: CardDrillPath;
56
63
  grainPick?: CardGrainPick;
57
64
  zoom?: CardDateZoom;
65
+ search?: CardTableSearch;
58
66
  };
59
67
  export type CardViewStateMap = Record<string, CardViewState>;
60
68
  /** Shared empty path, so selectors return a stable reference. */
@@ -72,6 +80,8 @@ export declare function clearDrillFromViewState(viewState: CardViewState | undef
72
80
  /** Sets or clears (null) a card's grain pick; undefined when nothing is left to keep for the card. */
73
81
  export declare function setGrainPickInViewState(viewState: CardViewState | undefined, pick: CardGrainPick | null): CardViewState | undefined;
74
82
  /** Sets or clears (null, Reset) a card's zoom (DZ-D6); undefined when nothing is left to keep for the card. */
83
+ /** Sets or clears a card's search; empty words clear it. */
84
+ export declare function setSearchInViewState(viewState: CardViewState | undefined, search: CardTableSearch | null): CardViewState | undefined;
75
85
  export declare function setZoomInViewState(viewState: CardViewState | undefined, zoom: CardDateZoom | null): CardViewState | undefined;
76
86
  /**
77
87
  * Reads card view state that crossed a serialization boundary (the print URL,
@@ -81,5 +91,5 @@ export declare function setZoomInViewState(viewState: CardViewState | undefined,
81
91
  * is dropped alone: a drill path holds without it.
82
92
  */
83
93
  export declare function parseCardViewStateMap(value: unknown): CardViewStateMap;
84
- /** Only cards that hold a drill path, a grain pick (DG-D13) or a zoom (DZ-D12); an export should not carry empty entries. */
94
+ /** Only cards that hold a drill path, a grain pick (DG-D13), a zoom (DZ-D12) or a search (TCF-D10); an export should not carry empty entries. */
85
95
  export declare function compactCardViewStateMap(viewStates: CardViewStateMap | undefined, cardIds?: ReadonlySet<string>): CardViewStateMap | undefined;
@@ -9,6 +9,13 @@ import { CardDrillPath } from './card-view-state.js';
9
9
  * its configuration unchanged.
10
10
  */
11
11
  export declare function applyDrillPathToCardConfig(card: TCard, drill: CardDrillPath | undefined): CardConfig;
12
+ /**
13
+ * The card at its drill level: the saved card when it isn't drilled, else the
14
+ * card grouped as the drill shows it. What a table's search reads, so the
15
+ * search box and the query decide on the same columns (table column filters
16
+ * ledger P3-06, P3-10).
17
+ */
18
+ export declare function cardAtDrillLevel<T extends TCard>(card: T, drill: CardDrillPath | undefined): T;
12
19
  /** Grouped by the last step's field, with a sort on the old grouping following it. */
13
20
  export declare function applyDrillPathToShelfCardConfig(card: ShelfCard, drill: CardDrillPath | undefined): CardConfig;
14
21
  /**
@@ -174,6 +174,26 @@ export declare function listConfiguredTableColumnIds(card: TCard): ReadonlySet<T
174
174
  * so a move is decided the same way with or without rows.
175
175
  */
176
176
  export declare function isPivotedTableCard(card: TCard): boolean;
177
+ /**
178
+ * A builder table's dimension columns in field order, each with its column
179
+ * id: what a viewer may filter from a header (table column filters TCF-D5).
180
+ * The same field groups and identities the view addresses columns by.
181
+ */
182
+ export declare function listTableDimensionColumns(card: TCard): Array<{
183
+ columnId: TableColumnId;
184
+ field: DetailField | GroupByField;
185
+ role: 'detail' | 'groupby';
186
+ }>;
187
+ /**
188
+ * A builder Table's measure columns in field order, each with its column id:
189
+ * what a viewer may filter from a header (table column filters Phase 4). Not
190
+ * a pivoted table's, whose measures show as pivot members, and not one the
191
+ * author hid.
192
+ */
193
+ export declare function listTableMetricColumns(card: TCard): Array<{
194
+ columnId: TableColumnId;
195
+ field: MetricField;
196
+ }>;
177
197
  /** A configured field's column id: undefined for a field without an id. */
178
198
  export declare function tableColumnIdOfField(field: DetailField | GroupByField | MetricField, role: 'detail' | 'groupby' | 'metric'): TableColumnId | undefined;
179
199
  /**
@@ -27,6 +27,14 @@ export type MatrixViewport = {
27
27
  start: number;
28
28
  end: number;
29
29
  };
30
+ /**
31
+ * Row items the view keeps on screen outside the scrolled range (the pinned
32
+ * grand total), by item key: indexes shift as pages load. The runtime loads,
33
+ * protects and counts them as it does the range. Absent means none.
34
+ */
35
+ pinned?: {
36
+ rows: readonly string[];
37
+ };
30
38
  };
31
39
  export type MatrixAxisItem = {
32
40
  kind: 'member' | 'subtotal' | 'grand_total';
@@ -86,6 +86,7 @@ export declare class MatrixRuntimeController {
86
86
  /** Used by explicit refresh/retry integrations; latest-issued response wins. */
87
87
  refetchCell: (coordinate: MatrixCoordinate) => void;
88
88
  refetchPage: (key: string) => void;
89
+ /** The scrolled range plus the rows the view pins, in axis order, once each. */
89
90
  private visible;
90
91
  private plan;
91
92
  private loadPage;
@@ -46,6 +46,8 @@ export type RuntimeCardFilterParts = {
46
46
  selections?: FilterGroup;
47
47
  /** A viewer's zoom on the card's date (chart date zoom DZ-D5). */
48
48
  zoom?: FilterGroup;
49
+ /** A viewer's search on a table (table column filters TCF-D10). */
50
+ search?: FilterGroup;
49
51
  };
50
52
  export declare function resolveRuntimeCardFilterParts(card: TCard, options?: RuntimeCardFilterOptions): RuntimeCardFilterParts;
51
53
  /**
@@ -26,7 +26,7 @@ import { GlobalDateComparisonSelection } from '../../shared/analytics-protocol/i
26
26
  import { CalendarPreferencesResponse, ReportRuntimeContext, ResolvedCalendarPreferenceSources } from '../../shared/report-runtime-context/index.js';
27
27
  import { ResolvedValueFormatPreferenceSources, ResolvedValueFormatPreferences } from '../../shared/value-format-preferences/index.js';
28
28
  import { DashboardNavigationEntry, DashboardNavigationState, DashboardTransientContextScope, InsightRenderRequest, NavigationRejection } from '../dashboard-navigation/index.js';
29
- import { CardDateZoom, CardGrainPick, CardViewStateMap, DrillStep } from '../dashboard-view-state/index.js';
29
+ import { CardTableSearch, CardDateZoom, CardGrainPick, CardViewStateMap, DrillStep } from '../dashboard-view-state/index.js';
30
30
  import { DashboardCardPaginationState } from '../dashboard-pagination/dashboard-card-pagination.js';
31
31
  export declare function mergeSemanticExecutionPayloadIntoTarget(target: SemanticExecutionPayload, incoming?: SemanticExecutionPayload): void;
32
32
  /** What the "Variable from data" dialog opens on (data variables DV-D26). */
@@ -328,6 +328,8 @@ type Actions = {
328
328
  setCardGrainPick: (cardId: string, pick: CardGrainPick | null) => void;
329
329
  /** Chart date zoom DZ-D6: a viewer's zoom on one card's dates; null is Reset. A new zoom replaces the one held. */
330
330
  setCardZoom: (cardId: string, zoom: CardDateZoom | null) => void;
331
+ /** Table column filters TCF-D10: a viewer's search on one table; null or empty words clear it. */
332
+ setCardSearch: (cardId: string, search: CardTableSearch | null) => void;
331
333
  resetAllCardViewState: () => void;
332
334
  setDashboardCardPagination: (cardId: string, pagination: DashboardCardPaginationState) => void;
333
335
  setDashboardControlsModel: (controls: ControlDefinition[], defaultValues?: Record<string, unknown>, options?: DashboardControlsModelOptions) => void;
@@ -1743,6 +1743,22 @@ export declare const semaphorOptionMatchResultSchema: z.ZodObject<{
1743
1743
  complete: boolean;
1744
1744
  reason?: "unsupported" | "truncated" | undefined;
1745
1745
  }>;
1746
+ export declare const semaphorOptionPageSchema: z.ZodObject<{
1747
+ kind: z.ZodLiteral<"standardCursor">;
1748
+ pageSize: z.ZodNumber;
1749
+ hasMore: z.ZodBoolean;
1750
+ nextCursor: z.ZodOptional<z.ZodString>;
1751
+ }, "strip", z.ZodTypeAny, {
1752
+ kind: "standardCursor";
1753
+ pageSize: number;
1754
+ hasMore: boolean;
1755
+ nextCursor?: string | undefined;
1756
+ }, {
1757
+ kind: "standardCursor";
1758
+ pageSize: number;
1759
+ hasMore: boolean;
1760
+ nextCursor?: string | undefined;
1761
+ }>;
1746
1762
  export declare const semaphorInputOptionsResultSchema: z.ZodObject<{
1747
1763
  kind: z.ZodLiteral<"inputOptions">;
1748
1764
  dependencyOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1768,6 +1784,22 @@ export declare const semaphorInputOptionsResultSchema: z.ZodObject<{
1768
1784
  complete: boolean;
1769
1785
  reason?: "unsupported" | "truncated" | undefined;
1770
1786
  }>>;
1787
+ page: z.ZodOptional<z.ZodObject<{
1788
+ kind: z.ZodLiteral<"standardCursor">;
1789
+ pageSize: z.ZodNumber;
1790
+ hasMore: z.ZodBoolean;
1791
+ nextCursor: z.ZodOptional<z.ZodString>;
1792
+ }, "strip", z.ZodTypeAny, {
1793
+ kind: "standardCursor";
1794
+ pageSize: number;
1795
+ hasMore: boolean;
1796
+ nextCursor?: string | undefined;
1797
+ }, {
1798
+ kind: "standardCursor";
1799
+ pageSize: number;
1800
+ hasMore: boolean;
1801
+ nextCursor?: string | undefined;
1802
+ }>>;
1771
1803
  options: z.ZodArray<z.ZodEffects<z.ZodObject<z.ZodRawShape, "passthrough", z.ZodTypeAny, z.objectOutputType<z.ZodRawShape, z.ZodTypeAny, "passthrough">, z.objectInputType<z.ZodRawShape, z.ZodTypeAny, "passthrough">>, z.objectOutputType<z.ZodRawShape, z.ZodTypeAny, "passthrough">, z.objectInputType<z.ZodRawShape, z.ZodTypeAny, "passthrough">>, "many">;
1772
1804
  intentId: z.ZodOptional<z.ZodString>;
1773
1805
  queryPath: z.ZodEnum<["query_spec", "sql", "sql_python"]>;
@@ -1822,6 +1854,22 @@ export declare const semaphorInputOptionsResultSchema: z.ZodObject<{
1822
1854
  complete: boolean;
1823
1855
  reason?: "unsupported" | "truncated" | undefined;
1824
1856
  }>>;
1857
+ page: z.ZodOptional<z.ZodObject<{
1858
+ kind: z.ZodLiteral<"standardCursor">;
1859
+ pageSize: z.ZodNumber;
1860
+ hasMore: z.ZodBoolean;
1861
+ nextCursor: z.ZodOptional<z.ZodString>;
1862
+ }, "strip", z.ZodTypeAny, {
1863
+ kind: "standardCursor";
1864
+ pageSize: number;
1865
+ hasMore: boolean;
1866
+ nextCursor?: string | undefined;
1867
+ }, {
1868
+ kind: "standardCursor";
1869
+ pageSize: number;
1870
+ hasMore: boolean;
1871
+ nextCursor?: string | undefined;
1872
+ }>>;
1825
1873
  options: z.ZodArray<z.ZodEffects<z.ZodObject<z.ZodRawShape, "passthrough", z.ZodTypeAny, z.objectOutputType<z.ZodRawShape, z.ZodTypeAny, "passthrough">, z.objectInputType<z.ZodRawShape, z.ZodTypeAny, "passthrough">>, z.objectOutputType<z.ZodRawShape, z.ZodTypeAny, "passthrough">, z.objectInputType<z.ZodRawShape, z.ZodTypeAny, "passthrough">>, "many">;
1826
1874
  intentId: z.ZodOptional<z.ZodString>;
1827
1875
  queryPath: z.ZodEnum<["query_spec", "sql", "sql_python"]>;
@@ -1876,6 +1924,22 @@ export declare const semaphorInputOptionsResultSchema: z.ZodObject<{
1876
1924
  complete: boolean;
1877
1925
  reason?: "unsupported" | "truncated" | undefined;
1878
1926
  }>>;
1927
+ page: z.ZodOptional<z.ZodObject<{
1928
+ kind: z.ZodLiteral<"standardCursor">;
1929
+ pageSize: z.ZodNumber;
1930
+ hasMore: z.ZodBoolean;
1931
+ nextCursor: z.ZodOptional<z.ZodString>;
1932
+ }, "strip", z.ZodTypeAny, {
1933
+ kind: "standardCursor";
1934
+ pageSize: number;
1935
+ hasMore: boolean;
1936
+ nextCursor?: string | undefined;
1937
+ }, {
1938
+ kind: "standardCursor";
1939
+ pageSize: number;
1940
+ hasMore: boolean;
1941
+ nextCursor?: string | undefined;
1942
+ }>>;
1879
1943
  options: z.ZodArray<z.ZodEffects<z.ZodObject<z.ZodRawShape, "passthrough", z.ZodTypeAny, z.objectOutputType<z.ZodRawShape, z.ZodTypeAny, "passthrough">, z.objectInputType<z.ZodRawShape, z.ZodTypeAny, "passthrough">>, z.objectOutputType<z.ZodRawShape, z.ZodTypeAny, "passthrough">, z.objectInputType<z.ZodRawShape, z.ZodTypeAny, "passthrough">>, "many">;
1880
1944
  intentId: z.ZodOptional<z.ZodString>;
1881
1945
  queryPath: z.ZodEnum<["query_spec", "sql", "sql_python"]>;
@@ -15,6 +15,22 @@ export type SemaphorPhysicalCatalogAddressResolution = {
15
15
  * PostgreSQL). Schema requirements continue to follow connector grammar.
16
16
  */
17
17
  export declare function getSemaphorCatalogCoordinateLevels(capabilities: Pick<SemaphorConnectionCapabilities, 'prefixLevels'>): SemaphorSourceLevel[];
18
+ /**
19
+ * The coordinates a selected dataset records for its backing table, for the
20
+ * connection its capabilities describe. A level the connection's catalog
21
+ * addresses (`getSemaphorCatalogCoordinateLevels`) is kept as recorded. A
22
+ * level it doesn't address, such as a `schema` on a connection whose tables
23
+ * are `database.table`, is not dropped: the recorded levels are read as one
24
+ * path through the connection's grammar (`parseSemaphorQualifiedSourcePath`),
25
+ * as any qualified name is, and fill only the levels the dataset didn't
26
+ * record. The resolver matches datasets and builds their sources from this
27
+ * one reading (support 2026-11-10: a ClickHouse dataset recording its
28
+ * database as `schema` lost it, and its column lookups failed).
29
+ */
30
+ export declare function readSemaphorRecordedSourceCoordinates(input: {
31
+ recorded: SemaphorSourceCoordinateInput;
32
+ capabilities: Pick<SemaphorConnectionCapabilities, 'prefixLevels'>;
33
+ }): SemaphorSourceCoordinateInput;
18
34
  /**
19
35
  * Separates physical runtime identity from the stronger coordinates required
20
36
  * to address the governed columns catalog.
@@ -0,0 +1,4 @@
1
+ /** The column filter id for a column id. */
2
+ export declare function columnFilterIdFor(columnId: string): string;
3
+ /** Whether a filter id is a viewer's column filter. */
4
+ export declare function isColumnFilterId(filterId: string | undefined | null): boolean;
@@ -237,6 +237,14 @@ export type SemaphorOptionPopulation = {
237
237
  kind: 'related_population';
238
238
  baseSource: SemaphorSourceRef;
239
239
  relationshipHint?: SemaphorRelationshipHint;
240
+ /**
241
+ * When the server can't connect the option source to the base (no
242
+ * path within its hops, or one that would repeat rows): list the
243
+ * option source's own values instead of refusing. A table column
244
+ * filter's derived narrowing sets it (table column filters TCF-D18);
245
+ * an author's chosen population leaves it out and keeps the refusal.
246
+ */
247
+ ifUnreachable?: 'option_source';
240
248
  };
241
249
  export declare const SEMAPHOR_TIME_GRAINS: readonly ["second", "minute", "hour", "day", "week", "month", "quarter", "year"];
242
250
  export type SemaphorTimeGrain = (typeof SEMAPHOR_TIME_GRAINS)[number];
@@ -705,11 +713,29 @@ export type SemaphorOptionMatchResult = {
705
713
  complete: boolean;
706
714
  reason?: 'unsupported' | 'truncated';
707
715
  };
716
+ /**
717
+ * Asks for one page of a filter's option list: the first without a cursor,
718
+ * the next with the `nextCursor` the last page returned. Plain lists and
719
+ * lists with an option source share it (complete option lists OL-D1).
720
+ */
721
+ export type SemaphorOptionPageRequest = {
722
+ kind: 'standardCursor';
723
+ cursor?: string;
724
+ };
725
+ /** The page an option list returned; absent when the list is one page. */
726
+ export type SemaphorOptionPage = {
727
+ kind: 'standardCursor';
728
+ pageSize: number;
729
+ hasMore: boolean;
730
+ nextCursor?: string;
731
+ };
708
732
  export type SemaphorInputOptionsResult = SemaphorAnalyticsResultBase & {
709
733
  kind: 'inputOptions';
710
734
  dependencyOutcomes?: SemaphorOptionDependencyOutcome[];
711
735
  /** Present when the intent carried `matchValues`. */
712
736
  match?: SemaphorOptionMatchResult;
737
+ /** Present when the request asked for a page and the list pages. */
738
+ page?: SemaphorOptionPage;
713
739
  options: Array<{
714
740
  label: string;
715
741
  value: unknown;
@@ -22,6 +22,7 @@ export * from './dashboard-input-contract.js';
22
22
  export * from './selection-contract.js';
23
23
  export * from './selection-filter-compiler.js';
24
24
  export * from './aggregate-measure-field.js';
25
+ export * from './column-filter-id.js';
25
26
  export * from './temporal-context.js';
26
27
  export * from './temporal-bucket-contract.js';
27
28
  export * from './raw-temporal-contract.js';
@@ -76,6 +76,12 @@ export type CardQueryRequestExtras = {
76
76
  pageSize: number;
77
77
  };
78
78
  tableTotalsRequest?: TableTotalsRequest;
79
+ /**
80
+ * A measure column's Range asks for the distribution of the card's rows by
81
+ * that measure's value (table column filters TCF-D19): bounds and bucket
82
+ * counts over the card's own grouped rows, answered beside them.
83
+ */
84
+ measureDistribution?: MeasureDistributionRequest;
79
85
  /** Strict table print only; never sent with `pagination`. */
80
86
  sourceRowProbe?: CardQuerySourceRowProbe;
81
87
  };
@@ -94,7 +100,12 @@ export type CardQuerySourceRowProbe = {
94
100
  export type CardQuerySourceRowEvidence = {
95
101
  sourceRowOverflow?: boolean;
96
102
  };
97
- type DecidedExtrasField = 'pagination' | 'tableTotalsRequest' | 'sourceRowProbe';
103
+ type DecidedExtrasField = 'pagination' | 'tableTotalsRequest' | 'measureDistribution' | 'sourceRowProbe';
104
+ /** Which measure a `measureDistribution` ask counts the card's rows by: its field id and result alias. */
105
+ export type MeasureDistributionRequest = {
106
+ fieldId: string;
107
+ metricAlias: string;
108
+ };
98
109
  /** Every extras field is parsed here and built by `resolveCardRequestExtras`. */
99
110
  export type CardQueryRequestExtrasDecided = AssertNever<Exclude<keyof CardQueryRequestExtras, DecidedExtrasField>>;
100
111
  /** The context fields any query body may carry, checked the same way for every reader. */
@@ -108,4 +108,16 @@ export declare function writeComparisonPresentation(preferences: TCardPreference
108
108
  * the MCP both write through this.
109
109
  */
110
110
  export declare function writeSeeRecords<T extends Pick<TCard, 'seeRecords'>>(card: T, on: boolean): T;
111
+ /**
112
+ * Whether viewers can filter a table's columns from their headers (table
113
+ * column filters TCF-D6): `false` stored, `true` the key removed. The table
114
+ * settings switch and the MCP both write through this.
115
+ */
116
+ export declare function writeTableColumnFilters(preferences: TCardPreferences | undefined, on: boolean): TCardPreferences;
117
+ /**
118
+ * Whether viewers can search a table's text columns (table column filters
119
+ * TCF-D6, TCF-D10): `false` stored, `true` the key removed. The table
120
+ * settings switch and the MCP both write through this.
121
+ */
122
+ export declare function writeTableSearch(preferences: TCardPreferences | undefined, on: boolean): TCardPreferences;
111
123
  export declare function writeInheritComparison(preferences: TCardPreferences | undefined, inherit: boolean): TCardPreferences;
@@ -1,6 +1,6 @@
1
1
  import { TCard } from '../../../lib/types/common-types.js';
2
2
  import { CardType } from '../changes/card-types.js';
3
- export type SettingName = 'columns.label' | 'columns.format' | 'columns.hidden' | 'columns.width' | 'orientation' | 'stack' | 'donut' | 'totals' | 'dataLabels' | 'legend' | 'axes' | 'highlights' | 'columns.polarity' | 'comparisonDisplay' | 'inheritComparison' | 'trend' | 'trendGrain' | 'seeRecords' | 'columnOrder';
3
+ export type SettingName = 'columns.label' | 'columns.format' | 'columns.hidden' | 'columns.width' | 'orientation' | 'stack' | 'donut' | 'totals' | 'dataLabels' | 'legend' | 'axes' | 'highlights' | 'columns.polarity' | 'comparisonDisplay' | 'inheritComparison' | 'trend' | 'trendGrain' | 'seeRecords' | 'columnOrder' | 'columnFilters' | 'tableSearch';
4
4
  export declare const SETTINGS_BY_KIND: Readonly<Record<CardType, readonly SettingName[]>>;
5
5
  export type CardSettingsKind = {
6
6
  type: CardType;
@@ -10,7 +10,7 @@ export { carryColumnSettings } from './carry-column-settings.js';
10
10
  export { confirmClassFor, type ConfirmClass } from './confirm-class.js';
11
11
  export { writeColumnFormat, withFormatOverride } from './column-format-write.js';
12
12
  export { writeColumnPolarity } from './column-polarity-write.js';
13
- export { writeComparisonDisplay, writeComparisonPresentation, writeInheritComparison, writeSeeRecords } from './card-display-write.js';
13
+ export { writeComparisonDisplay, writeComparisonPresentation, writeInheritComparison, writeSeeRecords, writeTableColumnFilters, writeTableSearch } from './card-display-write.js';
14
14
  export type { ResolvedCardSettings, ResolvedColumnSettings, ResolvedComparisonDisplay } from './resolved.js';
15
15
  export { SETTINGS_BY_KIND, cardSettingsKind, type CardSettingsKind, type SettingName } from './card-kinds.js';
16
16
  export type { AxisInput, CardSettingsInput, ColumnSettingsInput, ComparisonDisplayInput, DashboardUpdateChange, FormatInput, FormatPatch, HighlightAddChange, HighlightColor, HighlightCondition, HighlightRemoveChange, HighlightStyleInput, LegendPosition, Polarity, } from './inputs.js';
@@ -87,6 +87,10 @@ export type CardSettingsInput = {
87
87
  trendGrain?: 'automatic' | KpiTrendGrain;
88
88
  /** false: viewers can't open the records behind the card's numbers; true removes the stored opt-out (see-records SR-D4). */
89
89
  seeRecords?: boolean;
90
+ /** false: viewers can't filter a table's columns from their headers; true removes the stored opt-out (TCF-D6). */
91
+ columnFilters?: boolean;
92
+ /** false: viewers can't search a table's text columns; true removes the stored opt-out (TCF-D10). */
93
+ tableSearch?: boolean;
90
94
  };
91
95
  /** The filter operators (CA-D11): formatting and filtering share one condition language. */
92
96
  export type HighlightCondition = {
@@ -59,6 +59,8 @@ export type ResolvedCardSettings = {
59
59
  trendGrain?: KpiTrendGrain | null;
60
60
  /** Whether viewers can open the records behind the card's numbers (see-records SR-D4). */
61
61
  seeRecords?: boolean;
62
+ columnFilters?: boolean;
63
+ tableSearch?: boolean;
62
64
  /**
63
65
  * The named columns' ids in the stated order, and the baseline the one
64
66
  * writer stores them against (`writeTableColumnOrder`, table column order
@@ -5343,6 +5343,10 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
5343
5343
  }>>;
5344
5344
  defaultPeriod: z.ZodOptional<z.ZodType<import('../../analytics-protocol/agent-time-window.js').AgentTimeWindow, z.ZodTypeDef, import('../../analytics-protocol/index.js').SemaphorTimeWindow>>;
5345
5345
  sheetIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5346
+ /** Pins the filter on this card instead (no sheetIds). */
5347
+ cardId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
5348
+ /** A pinned filter's place, 0 first. */
5349
+ position: z.ZodOptional<z.ZodNumber>;
5346
5350
  }, "strict", z.ZodTypeAny, {
5347
5351
  domainId: string;
5348
5352
  datasetName: string;
@@ -5351,6 +5355,8 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
5351
5355
  op: "filter.add";
5352
5356
  selection?: "single" | "multiple" | undefined;
5353
5357
  defaultPeriod?: import('../../analytics-protocol/agent-time-window.js').AgentTimeWindow | undefined;
5358
+ position?: number | undefined;
5359
+ cardId?: string | undefined;
5354
5360
  defaultValues?: (string | number | boolean)[] | undefined;
5355
5361
  handle?: string | undefined;
5356
5362
  showAs?: string | undefined;
@@ -5367,6 +5373,8 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
5367
5373
  op: "filter.add";
5368
5374
  selection?: "single" | "multiple" | undefined;
5369
5375
  defaultPeriod?: import('../../analytics-protocol/index.js').SemaphorTimeWindow | undefined;
5376
+ position?: number | undefined;
5377
+ cardId?: string | undefined;
5370
5378
  defaultValues?: (string | number | boolean)[] | undefined;
5371
5379
  handle?: string | undefined;
5372
5380
  showAs?: string | undefined;
@@ -5395,12 +5403,17 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
5395
5403
  }>>>;
5396
5404
  defaultPeriod: z.ZodOptional<z.ZodNullable<z.ZodType<import('../../analytics-protocol/agent-time-window.js').AgentTimeWindow, z.ZodTypeDef, import('../../analytics-protocol/index.js').SemaphorTimeWindow>>>;
5397
5405
  sheetIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
5406
+ position: z.ZodOptional<z.ZodNumber>;
5407
+ /** The card a pinned filter is on, as the outline lists it (an id or a handle, as filterId). */
5408
+ cardId: z.ZodOptional<z.ZodString>;
5398
5409
  }, "strict", z.ZodTypeAny, {
5399
5410
  filterId: string;
5400
5411
  op: "filter.update";
5401
5412
  selection?: "single" | "multiple" | undefined;
5402
5413
  label?: string | undefined;
5403
5414
  defaultPeriod?: import('../../analytics-protocol/agent-time-window.js').AgentTimeWindow | null | undefined;
5415
+ position?: number | undefined;
5416
+ cardId?: string | undefined;
5404
5417
  defaultValues?: (string | number | boolean)[] | null | undefined;
5405
5418
  showAs?: string | undefined;
5406
5419
  defaultCondition?: {
@@ -5414,6 +5427,8 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
5414
5427
  selection?: "single" | "multiple" | undefined;
5415
5428
  label?: string | undefined;
5416
5429
  defaultPeriod?: import('../../analytics-protocol/index.js').SemaphorTimeWindow | null | undefined;
5430
+ position?: number | undefined;
5431
+ cardId?: string | undefined;
5417
5432
  defaultValues?: (string | number | boolean)[] | null | undefined;
5418
5433
  showAs?: string | undefined;
5419
5434
  defaultCondition?: {
@@ -5424,12 +5439,15 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
5424
5439
  }>, z.ZodObject<{
5425
5440
  op: z.ZodLiteral<"filter.remove">;
5426
5441
  filterId: z.ZodString;
5442
+ cardId: z.ZodOptional<z.ZodString>;
5427
5443
  }, "strict", z.ZodTypeAny, {
5428
5444
  filterId: string;
5429
5445
  op: "filter.remove";
5446
+ cardId?: string | undefined;
5430
5447
  }, {
5431
5448
  filterId: string;
5432
5449
  op: "filter.remove";
5450
+ cardId?: string | undefined;
5433
5451
  }>, z.ZodObject<{
5434
5452
  op: z.ZodLiteral<"filter.bind">;
5435
5453
  filterId: z.ZodUnion<[z.ZodString, z.ZodString]>;