react-semaphor 0.1.565 → 0.1.567

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 (39) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/briefings/index.js +50 -46
  3. package/dist/chunks/{assistant-chat-DNfb5fbF.js → assistant-chat-D-IuHHwh.js} +6 -6
  4. package/dist/chunks/{bookmark-impact-CHr7b1J2.js → bookmark-impact-B0estCHn.js} +9 -9
  5. package/dist/chunks/{bookmark-state-ByODVqee.js → bookmark-state-Du3s13_V.js} +333 -321
  6. package/dist/chunks/{card-filter-builder-CcEcfaYz.js → card-filter-builder-DbSmzvem.js} +46 -46
  7. package/dist/chunks/{dashboard-briefing-launcher-D3mc6peE.js → dashboard-briefing-launcher-DunvZYsU.js} +333 -333
  8. package/dist/chunks/{dashboard-controls-BFv0zdws.js → dashboard-controls-B09cN2Dz.js} +57 -57
  9. package/dist/chunks/{dashboard-CtIfxycc.js → dashboard-f8J9DHh5.js} +1 -1
  10. package/dist/chunks/{dashboard-json-CXn_3OYb.js → dashboard-json-BNNCaKEc.js} +1 -1
  11. package/dist/chunks/{dates-DcRxw17S.js → dates-BsJcyoC_.js} +5 -5
  12. package/dist/chunks/{edit-dashboard-visual-Y6HatqBd.js → edit-dashboard-visual-Cwzbpty8.js} +213 -197
  13. package/dist/chunks/{filter-reach-copy-DbggA5B7.js → filter-reach-copy-P-kDwUpY.js} +852 -858
  14. package/dist/chunks/{index-DDa_rklN.js → index-BcXw0CpM.js} +648 -574
  15. package/dist/chunks/{report-preferences-dialog-Db-b04B4.js → report-preferences-dialog-CbgmdWeZ.js} +8 -8
  16. package/dist/chunks/{resolve-dashboard-input-context-C18J-YZC.js → resolve-dashboard-input-context-DPKSF3qj.js} +3403 -3378
  17. package/dist/chunks/{saved-dashboard-context-DhC_EVus.js → saved-dashboard-context-CNudmm9U.js} +13 -13
  18. package/dist/chunks/{semaphor-ready-indicator-T6TsiBMT.js → semaphor-ready-indicator-CQd-PCCZ.js} +32568 -32581
  19. package/dist/chunks/{shelf-drop-preview-context-CNWL_b0S.js → shelf-drop-preview-context-CWS3e20y.js} +2 -2
  20. package/dist/chunks/{stored-dashboard-IdmtrNkA.js → stored-dashboard-CrQFT27O.js} +1074 -1055
  21. package/dist/chunks/{variable-draft-3xseULxR.js → variable-draft-BDxlD0dM.js} +2 -2
  22. package/dist/dashboard/index.js +2 -2
  23. package/dist/dashboard-authoring/index.js +1669 -1642
  24. package/dist/index.js +12 -12
  25. package/dist/style.css +1 -1
  26. package/dist/surfboard/index.js +2 -2
  27. package/dist/types/briefings/delivery-outcome.d.ts +37 -0
  28. package/dist/types/briefings/index.d.ts +2 -0
  29. package/dist/types/briefings/run-outcomes.d.ts +6 -0
  30. package/dist/types/components/briefings/briefing-author/run-model.d.ts +9 -0
  31. package/dist/types/index.js +33 -32
  32. package/dist/types/lib/dashboard-viewer/table-view.d.ts +24 -2
  33. package/dist/types/lib/dashboard-viewer/use-table-view.d.ts +15 -0
  34. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +15 -3
  35. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +2 -0
  36. package/dist/types/shared/dashboard-authoring/dashboard-filter-sql-subscription.d.ts +24 -0
  37. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +20 -4
  38. package/dist/types/shared/dashboard-viewer/table-settings.d.ts +9 -0
  39. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { a, R as s, D as o } from "../chunks/report-preferences-dialog-Db-b04B4.js";
2
- import { C as f, E as D } from "../chunks/bookmark-state-ByODVqee.js";
1
+ import { a, R as s, D as o } from "../chunks/report-preferences-dialog-CbgmdWeZ.js";
2
+ import { C as f, E as D } from "../chunks/bookmark-state-Du3s13_V.js";
3
3
  export {
4
4
  f as CONTROL_CARD_DEFAULT_VALUE,
5
5
  a as DisplayFormatPreferencesFields,
@@ -0,0 +1,37 @@
1
+ export declare const BRIEFING_DELIVERY_OUTCOME_STATUSES: readonly ["sent", "partly_sent", "failed", "not_set_up"];
2
+ export type BriefingDeliveryOutcomeStatus = (typeof BRIEFING_DELIVERY_OUTCOME_STATUSES)[number];
3
+ export type BriefingDeliveryOutcomeChannel = 'EMAIL' | 'SLACK';
4
+ export type BriefingDeliveryChannelOutcome = {
5
+ channel: BriefingDeliveryOutcomeChannel;
6
+ status: BriefingDeliveryOutcomeStatus;
7
+ /** Recipients the email reached; 1 when Slack posted. */
8
+ sent: number;
9
+ /** Recipients the email did not reach; 1 when the Slack post failed. */
10
+ failed: number;
11
+ /** Slack: the channel's name as the author picked it, without '#'. */
12
+ destination: string | null;
13
+ /** Why it was not (fully) delivered, in the author's words; null when sent. */
14
+ reason: string | null;
15
+ };
16
+ export type BriefingDeliveryOutcome = {
17
+ channels: BriefingDeliveryChannelOutcome[];
18
+ };
19
+ /** One channel's result as the senders report it (email or Slack delivery). */
20
+ export type BriefingChannelDeliveryReport = {
21
+ status: string;
22
+ sentCount?: number;
23
+ failedCount?: number;
24
+ message?: string;
25
+ channelName?: string | null;
26
+ };
27
+ /**
28
+ * The one mapping from a sender's report to an outcome entry. The app calls it
29
+ * when it writes the outcome; the reader calls it only for runs stored before
30
+ * the outcome existed. A channel the run did not ask for (SKIPPED) has none.
31
+ */
32
+ export declare function briefingDeliveryChannelOutcome(channel: BriefingDeliveryOutcomeChannel, report: BriefingChannelDeliveryReport): BriefingDeliveryChannelOutcome | null;
33
+ /**
34
+ * A run's delivery outcome from its stored result, or null when the run never
35
+ * reached delivery.
36
+ */
37
+ export declare function readBriefingDeliveryOutcome(result: unknown): BriefingDeliveryOutcome | null;
@@ -7,6 +7,8 @@ export declare const BRIEFING_KIND: "BRIEFING";
7
7
  export { DEFAULT_BRIEFING_SCHEDULE, briefingScheduleMonths, briefingScheduleDayOccurs, briefingScheduleShortMonths, buildBriefingScheduleExpr, canonicalBriefingMonthDays, describeBriefingSchedule, isValidBriefingTimezone, nextBriefingScheduleDates, parseBriefingScheduleExpr, type BriefingScheduleFrequency, type BriefingScheduleMonthDay, type BriefingScheduleMonthInterval, type BriefingScheduleMonthlyOn, type BriefingScheduleOrdinal, type BriefingScheduleViewModel, } from './schedule.js';
8
8
  export { briefingAttachmentFileTraits, briefingAttachmentFormatLabel, briefingAttachmentNeedsExportJob, briefingAttachmentProduction, type BriefingAttachmentFileTraits, type BriefingAttachmentProduction, getBriefingCardAttachmentCapability, getBriefingCardAttachmentFormats, getDefaultBriefingCardAttachmentFormat, isBriefingTableExportCardType, type BriefingCardAttachmentCapability, } from './attachments.js';
9
9
  export { BRIEFING_ATTACHMENT_OMISSION_CODES, isBriefingAttachmentOmissionCode, readBriefingOmittedAttachments, type BriefingAttachmentOmissionCode, type BriefingOmittedAttachment, } from './attachment-outcomes.js';
10
+ export { BRIEFING_RUN_CANCELLED_ERROR } from './run-outcomes.js';
11
+ export { BRIEFING_DELIVERY_OUTCOME_STATUSES, briefingDeliveryChannelOutcome, readBriefingDeliveryOutcome, type BriefingChannelDeliveryReport, type BriefingDeliveryChannelOutcome, type BriefingDeliveryOutcome, type BriefingDeliveryOutcomeChannel, type BriefingDeliveryOutcomeStatus, } from './delivery-outcome.js';
10
12
  export { canCreateBriefingForUser, type BriefingUiUser } from './capabilities.js';
11
13
  export { getBriefingCreationIntents, type BriefingAuthorIntent, } from './creation.js';
12
14
  export { getBriefingDisplayTypeLabel, getBriefingPresentation, isEmailOnlyBriefingDelivery, type BriefingDisplayTypeLabel, type BriefingEntityPresentation, } from './display.js';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The error a cancelled Briefing run stores. The app writes it when an author
3
+ * cancels a run, and readers (Activity, run history) compare against it
4
+ * exactly instead of searching the error text (background-activity SPEC §2.3).
5
+ */
6
+ export declare const BRIEFING_RUN_CANCELLED_ERROR = "Briefing run cancelled by user";
@@ -46,3 +46,12 @@ export declare function isRecord(value: unknown): value is Record<string, unknow
46
46
  export declare function parseEmailPreviewArtifact(value: unknown): EmailPreviewArtifact | null;
47
47
  export declare function parseSlackPreviewArtifact(value: unknown): SlackPreviewArtifact | null;
48
48
  export declare function parseSavedRunEmailArtifact(run: BriefingRun): EmailPreviewArtifact | null;
49
+ /**
50
+ * The attachments a saved run's package lists (`result.package.attachments`),
51
+ * in order, with whether each was left out. The email preview header and the
52
+ * run status's Details both read this.
53
+ */
54
+ export declare function readRunPackageAttachments(packageResult: unknown): Array<{
55
+ name: string;
56
+ omitted: boolean;
57
+ }>;
@@ -1,8 +1,8 @@
1
- import { B as s, x 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, w as p, v as D, h as A, l as I, u as _, s as F, m as S, n as b, p as L, k as f, o as N, q as R, i as y, r as g, t as h } from "../chunks/bookmark-state-ByODVqee.js";
2
- import { C as M, D as O, L as V, e as w, g as k, j as U, h as B, k as K, d as z, b as v, i as Y, c as q, n as G, f as P } from "../chunks/validators-wtjw0aw6.js";
3
- import { D as j } from "../chunks/token-types-C8JymO8s.js";
4
- import { r as J, a as X } from "../chunks/pivot-result-identity-BlbLrqaC.js";
5
- import { D as Z } from "../chunks/report-runtime-context-DnA_PiKo.js";
1
+ import { B as s, y 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, x as p, w as D, l as A, h as I, o as _, v as F, u as S, m as b, n as L, p as f, k as N, q as y, s as R, i as h, r as g, t as x } from "../chunks/bookmark-state-Du3s13_V.js";
2
+ import { C as O, D as V, L as w, e as k, g as U, j as z, h as B, k as K, d as v, b as Y, i as q, c as G, n as P, f as Q } from "../chunks/validators-wtjw0aw6.js";
3
+ import { D as W } from "../chunks/token-types-C8JymO8s.js";
4
+ import { r as X, a as H } from "../chunks/pivot-result-identity-BlbLrqaC.js";
5
+ import { D as $ } from "../chunks/report-runtime-context-DnA_PiKo.js";
6
6
  const e = [
7
7
  "concatenate",
8
8
  "conditional-category",
@@ -38,14 +38,14 @@ const e = [
38
38
  export {
39
39
  s as BOOKMARK_STATE_VERSION,
40
40
  r as BOOKMARK_VISIBILITIES,
41
- M as CALCULATED_FIELD_ENTITY_MARKER,
41
+ O as CALCULATED_FIELD_ENTITY_MARKER,
42
42
  e as CALCULATED_FIELD_TEMPLATE_IDS,
43
43
  l as CONTROL_CARD_DEFAULT_VALUE,
44
- O as DATE_FORMAT_VALUES,
45
- Z as DEFAULT_CALENDAR_CONTEXT,
46
- j as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
44
+ V as DATE_FORMAT_VALUES,
45
+ $ as DEFAULT_CALENDAR_CONTEXT,
46
+ W as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
47
47
  o as EMPTY_SELECTION,
48
- V as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,
48
+ w as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,
49
49
  i as VIEWER_LIMITS,
50
50
  n as VIEWER_TABLE_SETTINGS_VERSION,
51
51
  d as collectDatasetNamesFromExplorerField,
@@ -55,32 +55,33 @@ export {
55
55
  E as collectQualifiedDatasetNamesFromExplorerField,
56
56
  C as datasetRefFromSource,
57
57
  T as dependencyDisplayIdentity,
58
- w as getCalculatedFieldComputeStage,
58
+ k as getCalculatedFieldComputeStage,
59
59
  p as getCustomizableTableCardIds,
60
- k as getFieldRuntimeColumnName,
60
+ U as getFieldRuntimeColumnName,
61
61
  D as getSortableTableCardIds,
62
- U as hasCalculatedFieldMarker,
62
+ z as hasCalculatedFieldMarker,
63
63
  B as hasCalculatedFormulaInputs,
64
+ A as hasColumnCustomization,
64
65
  K as hasSyntheticCalculatedFieldOwner,
65
- A as humanizeDatasetName,
66
- z as inspectCalculatedField,
67
- v as isCalculatedDimension,
68
- Y as isCalculatedMetric,
69
- q as isDerivedField,
70
- I as isEmptyViewerTableSettings,
71
- _ as isTableCardCustomizable,
72
- F as isTableCardSortable,
73
- S as measureJsonBytes,
74
- G as normalizeCalculatedFieldRepresentation,
75
- b as normalizeViewerTableSettings,
76
- L as parseBookmarkState,
77
- f as parseTableColumnId,
78
- N as parseViewerTableSettings,
66
+ I as humanizeDatasetName,
67
+ v as inspectCalculatedField,
68
+ Y as isCalculatedDimension,
69
+ q as isCalculatedMetric,
70
+ G as isDerivedField,
71
+ _ as isEmptyViewerTableSettings,
72
+ F as isTableCardCustomizable,
73
+ S as isTableCardSortable,
74
+ b as measureJsonBytes,
75
+ P as normalizeCalculatedFieldRepresentation,
76
+ L as normalizeViewerTableSettings,
77
+ f as parseBookmarkState,
78
+ N as parseTableColumnId,
79
+ y as parseViewerTableSettings,
79
80
  R as parseViewerTableSettingsMap,
80
- y as readBookmarkState,
81
+ h as readBookmarkState,
81
82
  g as resolveFieldDatasetDependencies,
82
- J as resolveQueryColumnKeyMapEntry,
83
- X as resolveUniqueQueryColumnKeyMapEntry,
84
- P as shouldDropInheritedCalculationAggregate,
85
- h as toTableColumnId
83
+ X as resolveQueryColumnKeyMapEntry,
84
+ H as resolveUniqueQueryColumnKeyMapEntry,
85
+ Q as shouldDropInheritedCalculationAggregate,
86
+ x as toTableColumnId
86
87
  };
@@ -40,6 +40,16 @@ export type TableViewColumn = {
40
40
  readonly visible: boolean;
41
41
  /** Final header: viewer name, else today's pivot, comparison or field label, else the output key. */
42
42
  readonly label: string;
43
+ /**
44
+ * A viewer can drag this column's width: an addressable base column with
45
+ * customization on. Comparison and pivot member columns keep the author's
46
+ * width (PLAN CW-D2 to CW-D4).
47
+ */
48
+ readonly resizable: boolean;
49
+ };
50
+ /** A base column with an id: the columns a viewer's sort and widths address. */
51
+ export declare function isAddressableBaseColumn(column: Pick<TableViewColumn, 'part' | 'columnId'>): column is Pick<TableViewColumn, 'part'> & {
52
+ columnId: TableColumnId;
43
53
  };
44
54
  export type ColumnPanelItem = {
45
55
  readonly columnId: TableColumnId;
@@ -69,6 +79,12 @@ export type TableView = {
69
79
  readonly visibleKeys: readonly string[];
70
80
  /** outputKey -> header, for every key. */
71
81
  readonly labels: Readonly<Record<string, string>>;
82
+ /**
83
+ * outputKey -> width in pixels: the author's `tablePrefs.columnSizing` with
84
+ * the viewer's widths over resizable columns. The only sizing the table and
85
+ * the fast PDF use (PLAN CW-INV-2).
86
+ */
87
+ readonly columnSizing: Readonly<Record<string, number>>;
72
88
  readonly sortMode: TableSortMode;
73
89
  /** The table's controlled sort, by output key. */
74
90
  readonly clientSort: readonly {
@@ -81,8 +97,9 @@ export type TableView = {
81
97
  /** Setting entries that match no column (ignored; cleaned on the next save). */
82
98
  readonly dropped: readonly TableColumnId[];
83
99
  /**
84
- * Hide, order or rename settings apply (never with customization off): the
85
- * "Your columns" marks and Reset columns. A sort alone shows by its arrow.
100
+ * Hide, order, rename or width settings apply (never with customization
101
+ * off): the "Your columns" marks and Reset columns. A sort alone shows by
102
+ * its arrow.
86
103
  */
87
104
  readonly isCustomized: boolean;
88
105
  /**
@@ -119,6 +136,11 @@ export type TableColumnEdit = {
119
136
  readonly outputKey: string;
120
137
  readonly desc: boolean;
121
138
  }[];
139
+ }
140
+ /** The renderer's sizing at the end of a drag, by output key (PLAN CW-D10). */
141
+ | {
142
+ readonly type: 'resize';
143
+ readonly sizing: Readonly<Record<string, number>>;
122
144
  } | {
123
145
  readonly type: 'reset';
124
146
  };
@@ -29,6 +29,18 @@ export declare function useTableView(card: TCard, result: TableResultShape | und
29
29
  export type ViewerDataTable = ExportViewerTable & {
30
30
  readonly view?: TableView;
31
31
  };
32
+ /**
33
+ * The sizing props a viewer's table takes (`TableVisual`'s controlled
34
+ * sizing): the view's widths, and a finished drag goes to the viewer's
35
+ * settings, never the dashboard (PLAN CW-INV-1, CW-INV-2).
36
+ */
37
+ type ColumnSizing = Record<string, number>;
38
+ export type ViewerTableSizing = {
39
+ readonly columnSizing: Readonly<ColumnSizing>;
40
+ /** Takes the table's sizing, or TanStack's updater of it. */
41
+ readonly onColumnSizingChange: (sizing: ColumnSizing | ((old: ColumnSizing) => ColumnSizing)) => void;
42
+ readonly showColumnResizeHandles: boolean;
43
+ };
32
44
  /**
33
45
  * A dashboard table rendered for a viewer: the view handle, the
34
46
  * `viewerTable` the renderer takes, and a sort handler that keeps the viewer's
@@ -48,4 +60,7 @@ export declare function useViewerDataTable(card: TCard, result: {
48
60
  readonly id: string;
49
61
  readonly desc?: boolean;
50
62
  }[]) => boolean;
63
+ /** Absent outside a viewer context or before the view resolves: the author's widths, no handles. */
64
+ readonly viewerSizing: ViewerTableSizing | undefined;
51
65
  };
66
+ export {};
@@ -140,8 +140,14 @@ export type DashboardFilterCardReach =
140
140
  | 'bound'
141
141
  /** The card executes the filter's own field (or a proven binding's), so it applies with no mapping. */
142
142
  | 'automatic'
143
- /** A SQL card takes the filter's value as is. */
143
+ /** A SQL card takes the filter's value as is, and its SQL uses filters through a plain collection helper. */
144
144
  | 'sql'
145
+ /**
146
+ * A SQL card whose SQL names a filter another way (`filter('…')`, a helper
147
+ * with arguments): it may apply, as that SQL decides. A reader never counts
148
+ * it as reached or as not reached (MCP-20261027-82HEYK).
149
+ */
150
+ | 'sqlTemplate'
145
151
  /** More than one field of the card could take it: the card blocks until it is mapped. */
146
152
  | 'ambiguous'
147
153
  /** The mapping binds a target the card can't run or no longer has: the card blocks until it is mapped again. */
@@ -154,13 +160,19 @@ export type DashboardFilterCardReach =
154
160
  | 'relationship'
155
161
  /** A server-side resolver confirmed the route the card will apply (RF-D15). */
156
162
  | 'relationshipApplied' | 'notApplicable';
163
+ /**
164
+ * Why a filter in scope doesn't reach a card: a relationship resolver's
165
+ * reason, or `sql_no_filter_reference` for a SQL card whose SQL names no
166
+ * filter, which runs as written whatever the filter holds.
167
+ */
168
+ export type DashboardFilterNotReachedReason = SemaphorSkippedConstraintReason | 'sql_no_filter_reference';
157
169
  /** How a filter reaches a card, with the route or the reason a resolver gave (RF-D15). */
158
170
  export type DashboardFilterCardReachDetail = {
159
171
  reach: DashboardFilterCardReach;
160
172
  /** With 'relationshipApplied'. */
161
173
  route?: SemaphorRelationshipRoute;
162
- /** With 'notApplicable' from a resolver. */
163
- reason?: SemaphorSkippedConstraintReason;
174
+ /** With 'notApplicable': from a resolver, or a SQL card's own SQL. */
175
+ reason?: DashboardFilterNotReachedReason;
164
176
  /** With reason 'relationship_ambiguous'. */
165
177
  candidates?: SemaphorRelationshipRoute[];
166
178
  /** With 'blocked' from a resolver. */
@@ -49,6 +49,8 @@ export type ChangeWarningCode =
49
49
  'filter_not_reaching_cards'
50
50
  /** In-scope cards on another dataset of the filter's domain: decided when each card runs, through the relationships. */
51
51
  | 'filter_reach_through_relationships'
52
+ /** In-scope SQL cards whose SQL names a filter another way than a plain helper: their SQL decides (MCP-20261027-82HEYK). */
53
+ | 'filter_reach_through_sql'
52
54
  /** The compiled card stores the window as fixed dates. */
53
55
  | 'window_saved_as_fixed_dates'
54
56
  /** A type change leaves out fields or preferences. */
@@ -1,3 +1,27 @@
1
+ /**
2
+ * How a SQL card's SQL takes dashboard filters, read from its template
3
+ * markers, never from the SQL itself (MCP-20261027-82HEYK):
4
+ * - `subscribed`: a plain collection helper, `{{ filters | where }}` or
5
+ * `{{ filters | and }}`: the filter applies.
6
+ * - `template`: another template use that names a filter, such as
7
+ * `{{ filter('Region') }}`, `{{ filters.get(…) }}` or a helper with
8
+ * arguments: it may apply, as that SQL decides.
9
+ * - `none`: nothing in a template names a filter, so the data service runs
10
+ * the SQL as written and no filter changes it.
11
+ *
12
+ * One rule for every reader: the outline, the change resolver, the reducer's
13
+ * counts and the editor's filter mapping sheet.
14
+ *
15
+ * A hint over template markers, not a SQL parser (Rohit, 2026-10-27): the data
16
+ * service's template parser is the only exact reader, and the app parses no
17
+ * SQL. Known limits, kept on purpose: a marker inside a SQL comment or string
18
+ * literal still counts, and a SQL dataset the SQL reads may take filters in
19
+ * its own SQL, which isn't seen. The first two can say a rare card is reached
20
+ * when it isn't; the last can say a card isn't reached when its dataset's SQL
21
+ * takes the filter.
22
+ */
23
+ export type SqlFilterUse = 'subscribed' | 'template' | 'none';
24
+ export declare function readSqlFilterUse(sql: string | null | undefined): SqlFilterUse;
1
25
  export type DashboardFilterSubscriptionHint = {
2
26
  helper: '{{ filters | where }}' | '{{ filters | and }}';
3
27
  description: string;
@@ -1,6 +1,5 @@
1
1
  import { TDashboard } from '../../../lib/types/common-types.js';
2
- import { DashboardRelationshipReachResolver } from '../../../lib/query-context/dashboard-filter-mapping-resolution.js';
3
- import { SemaphorSkippedConstraintReason } from '../../analytics-protocol/index.js';
2
+ import { DashboardFilterNotReachedReason, DashboardRelationshipReachResolver } from '../../../lib/query-context/dashboard-filter-mapping-resolution.js';
4
3
  import { FilterInputEntry } from '../filter-model/index.js';
5
4
  import { CalendarContext } from '../../report-runtime-context/index.js';
6
5
  import { FilterValue, TimeWindow } from '../changes/dashboard-change.js';
@@ -37,12 +36,15 @@ export type OutlineFilter = {
37
36
  reaches: string[];
38
37
  /** Targets excluded explicitly. */
39
38
  excluded: string[];
40
- /** In scope, not matched; with a resolver (server side), the reason relationship reach gave. */
39
+ /**
40
+ * In scope, not matched; with a resolver (server side), the reason relationship reach gave.
41
+ * `sql_no_filter_reference`: a SQL card whose SQL names no filter, so it runs as written.
42
+ */
41
43
  notReached: Array<{
42
44
  cardId: string;
43
45
  title: string;
44
46
  datasetName?: string;
45
- reason?: SemaphorSkippedConstraintReason;
47
+ reason?: DashboardFilterNotReachedReason;
46
48
  }>;
47
49
  /** In scope, and blocked when the filter has a value: a binding the card can't run, or two fields it could take. */
48
50
  blocked?: Array<{
@@ -60,6 +62,16 @@ export type OutlineFilter = {
60
62
  title: string;
61
63
  datasetName?: string;
62
64
  }>;
65
+ /**
66
+ * In scope, a SQL card whose SQL names a filter other than through
67
+ * `{{ filters | where }}` or `{{ filters | and }}` (`filter('…')`, a
68
+ * helper with arguments): it may apply, as that SQL decides. Never
69
+ * counted as reached or as not reached.
70
+ */
71
+ sqlPending?: Array<{
72
+ cardId: string;
73
+ title: string;
74
+ }>;
63
75
  } | {
64
76
  filterId: string;
65
77
  label: string;
@@ -81,6 +93,10 @@ export type OutlineFilter = {
81
93
  title: string;
82
94
  datasetName?: string;
83
95
  }>;
96
+ sqlPending?: Array<{
97
+ cardId: string;
98
+ title: string;
99
+ }>;
84
100
  };
85
101
  /** Server-side readers resolve relationship reach the way the card query does (RF-D15). */
86
102
  export type OutlineReachOptions = {
@@ -3,6 +3,7 @@ export declare const VIEWER_LIMITS: {
3
3
  readonly bookmarksPerViewerPerDashboard: 20;
4
4
  readonly bookmarkNameMaxChars: 100;
5
5
  readonly columnLabelMaxChars: 120;
6
+ readonly columnWidthMaxPx: 4000;
6
7
  readonly tableSettingsMaxBytes: 65536;
7
8
  readonly rememberedTableSettingsMaxBytes: 262144;
8
9
  readonly bookmarkStateMaxBytes: 65536;
@@ -57,12 +58,20 @@ export type ViewerTableSettings = {
57
58
  readonly labels?: Readonly<Record<TableColumnId, string>>;
58
59
  /** Absent: the author's sort. `[]`: explicitly unsorted. Never saved in `page-only` mode. */
59
60
  readonly sort?: readonly TableSortEntry[];
61
+ /** Column widths in whole pixels, only for columns the viewer resized. Unlisted columns keep the author's width. */
62
+ readonly widths?: Readonly<Record<TableColumnId, number>>;
60
63
  };
61
64
  /**
62
65
  * Drops empty fields and duplicate or malformed column ids. `sort: []` is kept:
63
66
  * it means "explicitly unsorted". Returns `undefined` when nothing is left.
64
67
  */
65
68
  export declare function normalizeViewerTableSettings(settings: ViewerTableSettings | undefined): ViewerTableSettings | undefined;
69
+ /**
70
+ * The viewer changed the columns themselves: hidden, reordered, renamed or
71
+ * resized. A sort alone is not a customization (PLAN B35, CW-D7): it shows by
72
+ * its arrow. The one predicate for "Your columns" and Reset columns.
73
+ */
74
+ export declare function hasColumnCustomization(settings: ViewerTableSettings | undefined): boolean;
66
75
  export declare function isEmptyViewerTableSettings(settings: ViewerTableSettings | undefined): boolean;
67
76
  /**
68
77
  * Strict shape check, then normalization: malformed column ids are dropped,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.565",
8
+ "version": "0.1.567",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",