react-semaphor 0.1.597 → 0.1.599

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 (96) hide show
  1. package/dist/analytics-protocol/index.js +355 -346
  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-DUDiH9z4.js → assistant-chat-f3XuzrAm.js} +88 -89
  9. package/dist/chunks/{bookmark-impact-Dh-wiTs3.js → bookmark-impact-B5hyttm2.js} +3 -3
  10. package/dist/chunks/{bookmark-state-Be2W3s6t.js → bookmark-state-h1OLXVjE.js} +153 -153
  11. package/dist/chunks/{card-filter-builder-2-OxEBWf.js → card-filter-builder-DfLqD2RV.js} +1047 -1075
  12. package/dist/chunks/{comparison-window-caption-DmMFtNP5.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-g-7XY0Kw.js → dashboard-CoI4aOUc.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CVDhvsTk.js → dashboard-briefing-launcher-RxYGtk-F.js} +181 -181
  16. package/dist/chunks/{dashboard-controls-CtQY-J33.js → dashboard-controls-DeaXrtLK.js} +85 -85
  17. package/dist/chunks/{dashboard-json-DkhzPI3-.js → dashboard-json-DvxKpKd_.js} +5 -5
  18. package/dist/chunks/dates-BhtO28Sn.js +164 -0
  19. package/dist/chunks/{edit-dashboard-visual-DWn74pCl.js → edit-dashboard-visual-C4f5hONA.js} +5489 -5433
  20. package/dist/chunks/{filter-line-BpdPq1D2.js → filter-line-Dkg3yuOX.js} +6 -6
  21. package/dist/chunks/{filter-reach-copy-DoXmRmk-.js → filter-reach-copy-Cl5Od38Q.js} +1760 -1584
  22. package/dist/chunks/{filter-value-text-CDQCIREQ.js → filter-value-text-CXyuLW9Q.js} +4 -4
  23. package/dist/chunks/{index-C0jX5wlM.js → index-EKpTtkYF.js} +7 -7
  24. package/dist/chunks/{layout-grid-DoFIfQGd.js → layout-grid-DSrBSfPM.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CyWOwLmE.js → matrix-analytical-definition-BuUSBDm7.js} +242 -214
  26. package/dist/chunks/matrix-member-presentation-B_2beBc0.js +258 -0
  27. package/dist/chunks/{matrix-operation-contract-CAanJeCj.js → matrix-operation-contract-DdK0J_KU.js} +47 -47
  28. package/dist/chunks/{metric-comparison-BeKnUD08.js → metric-comparison-Bhz0V841.js} +2 -2
  29. package/dist/chunks/{paintbrush-KeaU1L1a.js → paintbrush-1UiU-uTz.js} +1 -1
  30. package/dist/chunks/{palette-BcFJLeXB.js → palette-DFIFf_-m.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-Dt0E1Wou.js → pivot-result-contract-expectations-Dk7WFR_u.js} +47 -47
  32. package/dist/chunks/{pivot-result-identity-BKUjYO1u.js → pivot-result-identity-CzzrJpEm.js} +1 -1
  33. package/dist/chunks/{raw-temporal-value-BzdgeDa7.js → raw-temporal-value-BLvdaMng.js} +2 -2
  34. package/dist/chunks/{report-preferences-dialog-5WUi6jC0.js → report-preferences-dialog-CZaYsQLK.js} +14 -14
  35. package/dist/chunks/{report-runtime-context-g4Zp_TU9.js → report-runtime-context-CEGluufW.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-DfJshnw8.js → resolve-dashboard-input-context-vPtbuDDz.js} +11786 -11247
  37. package/dist/chunks/{save-C9CZAk6V.js → save-CWQ02kHo.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-DdhPU2Kq.js → saved-dashboard-context-C6X5nP4C.js} +97 -97
  39. package/dist/chunks/{selection-filter-compiler-BclSpK3P.js → selection-filter-compiler-Ce4BpjRX.js} +1 -1
  40. package/dist/chunks/{semaphor-ready-indicator-miYoJ-HP.js → semaphor-ready-indicator-BUiaKY6O.js} +60709 -59628
  41. package/dist/chunks/{shelf-drop-preview-context-D-awfyyo.js → shelf-drop-preview-context-CwxWJjBv.js} +6 -6
  42. package/dist/chunks/{stored-dashboard-D6FtWx_3.js → stored-dashboard-Bmct-STp.js} +1165 -1148
  43. package/dist/chunks/{style-sheet-parts-DM_Mw_sm.js → style-sheet-parts-BX7d7-2-.js} +198 -198
  44. package/dist/chunks/{table-export-sheet-DBlFMvE8.js → table-export-sheet-BWSVTclx.js} +1 -1
  45. package/dist/chunks/{token-types-BB2ImFx6.js → token-types-CnlEiAdS.js} +1 -1
  46. package/dist/chunks/{upload-CMTCg47S.js → upload-DsqUSS8l.js} +1 -1
  47. package/dist/chunks/{validators-BlEWWX9O.js → validators-D2Hm57lJ.js} +1090 -1071
  48. package/dist/chunks/{variable-draft-CxdgKDCx.js → variable-draft-Bi-zUa_a.js} +4 -4
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +2554 -2538
  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/lib/utils/filter-default-value-utils.d.ts +1 -1
  68. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +64 -0
  69. package/dist/types/shared/analytics-protocol/catalog-field-grounding.d.ts +7 -0
  70. package/dist/types/shared/analytics-protocol/column-filter-id.d.ts +4 -0
  71. package/dist/types/shared/analytics-protocol/contracts.d.ts +26 -0
  72. package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
  73. package/dist/types/shared/analytics-protocol/numeric-range-options.d.ts +46 -0
  74. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +12 -1
  75. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +12 -0
  76. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  77. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -1
  78. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +4 -0
  79. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
  80. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +63 -0
  81. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  82. package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +2 -0
  83. package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +2 -0
  84. package/dist/types/shared/dashboard-authoring/filter-model/number-condition-spec.d.ts +24 -0
  85. package/dist/types/shared/dashboard-authoring/filter-model/number-range-setting.d.ts +47 -0
  86. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +8 -1
  87. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +3 -1
  88. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +35 -3
  89. package/dist/types/shared/usage-events/attribution.d.ts +2 -2
  90. package/dist/types/shared/usage-events/envelope.d.ts +2 -2
  91. package/dist/usage-events/index.js +1 -1
  92. package/package.json +1 -1
  93. package/dist/chunks/aggregate-measure-field-DHlDj0Pc.js +0 -22
  94. package/dist/chunks/dates-B-bKEsiu.js +0 -115
  95. package/dist/chunks/list-filter-BeTQxjNy.js +0 -15
  96. package/dist/chunks/matrix-member-presentation-Bj2YcHAP.js +0 -169
@@ -1,5 +1,5 @@
1
- import { a, R as s, D as o } from "../chunks/report-preferences-dialog-5WUi6jC0.js";
2
- import { C as f, E as D } from "../chunks/bookmark-state-Be2W3s6t.js";
1
+ import { a, R as s, D as o } from "../chunks/report-preferences-dialog-CZaYsQLK.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-Be2W3s6t.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-BlEWWX9O.js";
3
- import { D as J } from "../chunks/token-types-BB2ImFx6.js";
4
- import { r as H, a as Z } from "../chunks/pivot-result-identity-BKUjYO1u.js";
5
- import { D as ee } from "../chunks/report-runtime-context-g4Zp_TU9.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;
@@ -6,7 +6,7 @@ import { TInlineFilter } from '../types/common-types.js';
6
6
  * clock and Monday weeks; a calendar carries its anchor and fiscal periods.
7
7
  */
8
8
  export type DefaultsCalendar = string | DefaultDateCalendar;
9
- export type DefaultBackedFilter = Pick<TFilter, 'id' | 'column' | 'operation' | 'dataType' | 'nativeDataType' | 'dateSelectionMode' | 'defaultValues' | 'defaultDateFilter' | 'fieldMeta' | 'semanticContext'> & Partial<Pick<TInlineFilter, 'id' | 'column' | 'operation' | 'dataType' | 'nativeDataType' | 'dateSelectionMode' | 'defaultValues' | 'defaultDateFilter' | 'fieldMeta' | 'semanticContext'>>;
9
+ export type DefaultBackedFilter = Pick<TFilter, 'id' | 'column' | 'operation' | 'dataType' | 'nativeDataType' | 'dateSelectionMode' | 'defaultValues' | 'defaultDateFilter' | 'fieldMeta' | 'semanticContext'> & Partial<Pick<TFilter, 'searchMode'>> & Partial<Pick<TInlineFilter, 'id' | 'column' | 'operation' | 'dataType' | 'nativeDataType' | 'dateSelectionMode' | 'defaultValues' | 'defaultDateFilter' | 'fieldMeta' | 'semanticContext'>>;
10
10
  /**
11
11
  * Converts a filter's default configuration into an active runtime filter value.
12
12
  * Returns undefined when no defaults are configured.
@@ -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"]>;
@@ -49,6 +49,13 @@ export declare function normalizeAnalyticsCatalogDataType(value: unknown): Analy
49
49
  export type AnalyticsNumericStorageKind = 'integer' | 'decimal' | 'float';
50
50
  /** Native result representation, distinct from the semantic "number" datatype. */
51
51
  export declare function getAnalyticsNumericStorageKind(value: unknown): AnalyticsNumericStorageKind | null;
52
+ /**
53
+ * The decimal places a numeric storage type holds: 0 for integers, `s` for an
54
+ * explicit `decimal(p, s)`, `numeric(p, s)`, `number(p, s)` or ClickHouse
55
+ * `DecimalNN(s)`. Null when the type has no fixed scale (floats, a bare
56
+ * `decimal` or `number`), so nothing may be placed on a grid it doesn't have.
57
+ */
58
+ export declare function getAnalyticsNumericStorageScale(value: unknown): number | null;
52
59
  export declare function isAnalyticsDateLikeDataType(value: unknown): boolean;
53
60
  export declare function isAnalyticsCatalogDateField(field: AnalyticsCatalogField): boolean;
54
61
  export declare function isAnalyticsTechnicalIdentifierField(field: AnalyticsCatalogField): boolean;
@@ -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';
@@ -42,6 +43,7 @@ export { filterGroupSchema as savedFilterGroupSchema } from './explorer-input-sc
42
43
  export * from '../temporal/index.js';
43
44
  export * from './agent-time-window.js';
44
45
  export * from './scalar-value.js';
46
+ export * from './numeric-range-options.js';
45
47
  export * from './matrix-window-contract.js';
46
48
  export * from './matrix-member-presentation.js';
47
49
  export { matrixFormattingRoleSchema, type MatrixFormattingRole } from './matrix-path-contract.js';
@@ -0,0 +1,46 @@
1
+ /** The request asks for this shape instead of distinct values. */
2
+ export declare const NUMERIC_RANGE_VALUE_SHAPE: "numeric_range";
3
+ /** At most this many equal-width buckets (NR-D6). */
4
+ export declare const NUMERIC_RANGE_BUCKET_COUNT = 32;
5
+ export type NumericRangeOptions = {
6
+ kind: typeof NUMERIC_RANGE_VALUE_SHAPE;
7
+ /** null when no row has a value. */
8
+ min: number | null;
9
+ max: number | null;
10
+ /** Rows where the field is empty, under the same filters. */
11
+ emptyRows: number;
12
+ /**
13
+ * `width`: equal-width buckets over [min, max], the last one closed at max.
14
+ * `value`: bucket i holds exactly the value min + i: one per whole number
15
+ * from min to max (an integer field whose range spans at most
16
+ * NUMERIC_RANGE_BUCKET_COUNT values), or the one bucket of a field whose
17
+ * every value is min = max, whole or not.
18
+ */
19
+ bucketing: 'width' | 'value';
20
+ /** Rows with a value, per bucket, low to high; [] when min = max or no value. */
21
+ buckets: number[];
22
+ /** Width of a bucket in field units (1 for `value`). */
23
+ bucketWidth: number;
24
+ };
25
+ /**
26
+ * The range options in an option response's first record, or undefined when
27
+ * the response is not one (an older server, an authored option SQL, an
28
+ * aggregate field): the popover then shows its inputs without a distribution.
29
+ */
30
+ export declare function readNumericRangeOptions(record: unknown): NumericRangeOptions | undefined;
31
+ /** Rows that have a value. */
32
+ export declare function numericRangeValueRows(range: NumericRangeOptions): number;
33
+ /** The bounds bucket `index` covers: [from, to). The last width bucket is closed at max. */
34
+ export declare function numericRangeBucketBounds(range: NumericRangeOptions, index: number): {
35
+ from: number;
36
+ to: number;
37
+ };
38
+ /**
39
+ * About how many rows a number condition keeps, read off the distribution
40
+ * the popover already has (never a count query, NR-D7). Null when it can't be
41
+ * read off buckets: Equal to / Not equal to on width buckets.
42
+ */
43
+ export declare function estimateNumericConditionRows(range: NumericRangeOptions, operation: string, values: readonly number[]): {
44
+ rows: number;
45
+ exact: boolean;
46
+ } | null;
@@ -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