react-semaphor 0.1.563 → 0.1.565

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 (139) hide show
  1. package/DATA_APP_SDK.md +3 -3
  2. package/README.md +2 -2
  3. package/dist/analytics-protocol/index.js +8 -8
  4. package/dist/assistant-context/index.js +3 -2
  5. package/dist/brand-studio/index.js +28 -29
  6. package/dist/briefings/index.js +4 -4
  7. package/dist/chunks/{assistant-chat-iIp02_77.js → assistant-chat-DNfb5fbF.js} +294 -294
  8. package/dist/chunks/{bookmark-impact-D4Kl4amw.js → bookmark-impact-CHr7b1J2.js} +2 -2
  9. package/dist/chunks/bookmark-state-ByODVqee.js +1613 -0
  10. package/dist/chunks/card-filter-builder-CcEcfaYz.js +4100 -0
  11. package/dist/chunks/{switch-BW4yXSYs.js → code-editor-DJNOsgJH.js} +463 -442
  12. package/dist/chunks/{comparison-window-caption-D1EUXzaR.js → comparison-window-caption-CMLb3mut.js} +451 -419
  13. package/dist/chunks/{dashboard-CmqeP3QZ.js → dashboard-CtIfxycc.js} +1 -1
  14. package/dist/chunks/dashboard-briefing-launcher-D3mc6peE.js +4910 -0
  15. package/dist/chunks/{dashboard-controls-B253nJS-.js → dashboard-controls-BFv0zdws.js} +684 -674
  16. package/dist/chunks/{dashboard-json-osQuinUZ.js → dashboard-json-CXn_3OYb.js} +4 -4
  17. package/dist/chunks/{dates-DFY7Gfss.js → dates-DcRxw17S.js} +13 -13
  18. package/dist/chunks/{edit-dashboard-visual-CMar-NhA.js → edit-dashboard-visual-Y6HatqBd.js} +7704 -10337
  19. package/dist/chunks/filter-reach-copy-DbggA5B7.js +4673 -0
  20. package/dist/chunks/{filter-value-text-CPwFkrMz.js → filter-value-text-7zhmth1S.js} +2 -2
  21. package/dist/chunks/{index-CNGkfUp4.js → index-DDa_rklN.js} +69 -64
  22. package/dist/chunks/index-RNaTnE3m.js +585 -0
  23. package/dist/chunks/{layout-grid-BM65viQh.js → layout-grid-0hIlqEtk.js} +1 -1
  24. package/dist/chunks/{list-filter-BoeLBfL3.js → list-filter-DkgoCeBm.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-hEucouWM.js → matrix-analytical-definition-C9xB_T84.js} +18 -18
  26. package/dist/chunks/{matrix-card-CCh9JjP1.js → matrix-card-BSUeSXpD.js} +2 -2
  27. package/dist/chunks/{matrix-member-presentation-DsAUbuoL.js → matrix-member-presentation-DZNgQpUq.js} +1 -1
  28. package/dist/chunks/{matrix-operation-contract-DsLdFdSa.js → matrix-operation-contract-Eb6elidS.js} +1 -1
  29. package/dist/chunks/{metric-comparison-Bnso1cm1.js → metric-comparison-ChXUFaZu.js} +1 -1
  30. package/dist/chunks/{palette-p1XSJFgB.js → palette-4vf2BEEg.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-B53jqszr.js → pivot-result-contract-expectations-Ddh1rNz5.js} +4 -4
  32. package/dist/chunks/{pivot-result-identity-Dq5jm-EC.js → pivot-result-identity-BlbLrqaC.js} +1 -1
  33. package/dist/chunks/{report-preferences-dialog-l54wJyYE.js → report-preferences-dialog-Db-b04B4.js} +122 -131
  34. package/dist/chunks/{report-runtime-context-BITkNSDa.js → report-runtime-context-DnA_PiKo.js} +1 -1
  35. package/dist/chunks/resolve-dashboard-input-context-C18J-YZC.js +21394 -0
  36. package/dist/chunks/{save-CHV1B1fL.js → save-D6pHmSSP.js} +1 -1
  37. package/dist/chunks/saved-dashboard-context-DhC_EVus.js +629 -0
  38. package/dist/chunks/{selection-reducer-Bz5aywT4.js → selection-reducer-OaJ-N5uN.js} +1 -1
  39. package/dist/chunks/{semaphor-ready-indicator-C3EQEiD9.js → semaphor-ready-indicator-T6TsiBMT.js} +80879 -80744
  40. package/dist/chunks/{shelf-drop-preview-context-BODiBlqT.js → shelf-drop-preview-context-CNWL_b0S.js} +407 -407
  41. package/dist/chunks/{source-entity-resolution-DdDVXFB8.js → source-entity-resolution-DF6GulDn.js} +1 -1
  42. package/dist/chunks/stored-dashboard-IdmtrNkA.js +5026 -0
  43. package/dist/chunks/{table-export-sheet-bSXxGn-v.js → table-export-sheet--DUKWk6o.js} +1 -1
  44. package/dist/chunks/{temporal-input-presentation-sk9gqLi6.js → temporal-input-presentation--2r9BLr0.js} +392 -377
  45. package/dist/chunks/{token-types-BUK06hU2.js → token-types-C8JymO8s.js} +1 -1
  46. package/dist/chunks/{upload-BnmuyPqW.js → upload-Cf3wXZT8.js} +1 -1
  47. package/dist/chunks/{validators-BIM0FE31.js → validators-wtjw0aw6.js} +7 -7
  48. package/dist/chunks/variable-draft-3xseULxR.js +241 -0
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +2226 -1704
  51. package/dist/data-app-sdk/index.js +4 -4
  52. package/dist/data-app-sdk-adapters/index.js +2 -2
  53. package/dist/data-app-sdk-validation/index.js +5 -5
  54. package/dist/format-utils/index.js +174 -167
  55. package/dist/index.js +190 -188
  56. package/dist/layouts/index.js +1 -1
  57. package/dist/pdf-export-policy/index.js +80 -28
  58. package/dist/pdf-table-layout/index.js +65 -65
  59. package/dist/report-runtime-context/index.js +1 -1
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  63. package/dist/types/components/activity/activity-bell.d.ts +5 -1
  64. package/dist/types/components/activity/activity-types.d.ts +12 -4
  65. package/dist/types/components/dashboard-variables/data-variables-menu.d.ts +8 -0
  66. package/dist/types/components/dashboard-variables/variable-editor-host.d.ts +1 -0
  67. package/dist/types/components/index.d.ts +2 -0
  68. package/dist/types/index.js +5 -5
  69. package/dist/types/lib/dashboard-inputs/build-normalized-dashboard-inputs.d.ts +62 -0
  70. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +33 -2
  71. package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +7 -2
  72. package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +4 -2
  73. package/dist/types/lib/dashboard-variables/data-text.d.ts +33 -0
  74. package/dist/types/lib/dashboard-variables/types.d.ts +207 -0
  75. package/dist/types/lib/document/document-edits.d.ts +16 -1
  76. package/dist/types/lib/document/document-panel-target.d.ts +1 -1
  77. package/dist/types/lib/document/document-section-query-options.d.ts +29 -0
  78. package/dist/types/lib/document/document-table-data-policy.d.ts +0 -1
  79. package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +92 -0
  80. package/dist/types/lib/query-context/build-card-query-context.d.ts +6 -0
  81. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +1 -0
  82. package/dist/types/lib/query-context/use-semantic-execution-payload-for-cards.d.ts +24 -0
  83. package/dist/types/lib/stores/dashboard-store.d.ts +36 -0
  84. package/dist/types/lib/text-variables/temporal-input-text.d.ts +28 -0
  85. package/dist/types/lib/text-variables/text-variable-types.d.ts +72 -0
  86. package/dist/types/lib/types/common-types.d.ts +155 -51
  87. package/dist/types/lib/utils/card-definition.d.ts +2 -2
  88. package/dist/types/shared/assistant-context/index.d.ts +1 -1
  89. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +51 -1
  90. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +7 -1
  91. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +10 -0
  92. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +7 -1
  93. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +1088 -431
  94. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +18 -1
  95. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -1
  96. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +1 -1
  97. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +10 -0
  98. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +40 -40
  99. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +16 -16
  100. package/dist/types/shared/dashboard-authoring/dashboard-card-source-index.d.ts +1 -0
  101. package/dist/types/shared/dashboard-authoring/dashboard-filter-targets.d.ts +29 -0
  102. package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +7 -4
  103. package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +159 -0
  104. package/dist/types/shared/dashboard-authoring/dashboard-variable-changes.d.ts +61 -0
  105. package/dist/types/shared/dashboard-authoring/document-section-cards.d.ts +7 -0
  106. package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +2 -0
  107. package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +10 -0
  108. package/dist/types/shared/dashboard-authoring/index.d.ts +6 -0
  109. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +2 -0
  110. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +1 -1
  111. package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +1 -1
  112. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +50 -3
  113. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +48 -1
  114. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +2 -2
  115. package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +87 -13
  116. package/dist/types/shared/dashboard-authoring/text-card-words/chip-colors.d.ts +23 -0
  117. package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +90 -8
  118. package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +31 -3
  119. package/dist/types/shared/dashboard-authoring/text-card-words/variable-words.d.ts +8 -0
  120. package/dist/types/shared/dashboard-authoring/variable-draft.d.ts +125 -0
  121. package/dist/types/shared/dashboard-authoring/variable-editability.d.ts +24 -0
  122. package/dist/types/shared/dashboard-authoring/variable-references.d.ts +39 -0
  123. package/dist/types/shared/format-utils/document-print.d.ts +4 -2
  124. package/dist/types/shared/format-utils/index.d.ts +1 -0
  125. package/dist/types/shared/format-utils/pdf-capacity-lines.d.ts +17 -0
  126. package/dist/types/shared/format-utils/pdf-delivery.d.ts +8 -1
  127. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +74 -6
  128. package/dist/types/shared/format-utils/presentation-execution.d.ts +9 -0
  129. package/package.json +2 -2
  130. package/src/data-app-sdk/README.md +3 -3
  131. package/dist/chunks/bookmark-state-CWeoGbrx.js +0 -743
  132. package/dist/chunks/braces-DzgoQC64.js +0 -23
  133. package/dist/chunks/dashboard-briefing-launcher-TYlSW77S.js +0 -3828
  134. package/dist/chunks/filter-reach-copy-CvV7W5dd.js +0 -3965
  135. package/dist/chunks/global-date-filter-utils-N1kcsOFE.js +0 -16722
  136. package/dist/chunks/index-CJW5BdWT.js +0 -583
  137. package/dist/chunks/resolve-dashboard-input-context-DaDrZGuA.js +0 -8214
  138. package/dist/chunks/saved-dashboard-context-DFYBrE6O.js +0 -564
  139. package/dist/chunks/use-create-flow-overlay-state-BXY8-Cyz.js +0 -1436
@@ -1,4 +1,4 @@
1
- import { TCard, TDashboard } from '../../lib/types/common-types.js';
1
+ import { DataVariable, TCard, TDashboard } from '../../lib/types/common-types.js';
2
2
  import { CardViewStateMap } from '../../lib/dashboard-view-state/index.js';
3
3
  import { ControlContractOverrides } from '../../lib/dashboard-inputs/control-contract-overrides.js';
4
4
  import { SemanticExecutionPayload } from '../../lib/types/semantic-runtime-types.js';
@@ -149,3 +149,53 @@ export declare function buildSavedCardRequest(input: {
149
149
  reason: SavedCardRequestRefusal;
150
150
  message?: string;
151
151
  };
152
+ /** Why a saved variable has no request to run at the place asked (data variables spec S-3). */
153
+ export type SavedVariableRequestRefusal = {
154
+ reason: 'variable_unknown';
155
+ message: string;
156
+ available: string[];
157
+ } | {
158
+ reason: 'place_unknown';
159
+ message: string;
160
+ available: string[];
161
+ }
162
+ /** A required input has no value: nothing runs, never an earlier value (DV-D7). */
163
+ | {
164
+ reason: 'held';
165
+ message: string;
166
+ missingRequired: string[];
167
+ }
168
+ /** The query no longer compiles against its mapping, or the given inputs don't fit. */
169
+ | {
170
+ reason: 'broken';
171
+ message: string;
172
+ };
173
+ /**
174
+ * A data variable's request for a server replay at a tab or a Document
175
+ * (data variables DV-D29, spec S-3, `semaphor_analyze { fromVariable }`): the
176
+ * variable's card from the one target list (DV-INV-2), run at the sheet as a
177
+ * fresh viewer opens it, as `buildSavedCardRequest` runs a card. At a Document
178
+ * the card runs in the Document's runtime with no section, as the page runs
179
+ * its text (DV-D29). A Document's inputs are dashboard inputs scoped to it
180
+ * (the filter model folds a Document's own, ledger P2-31), so the values
181
+ * `inputs` gives by name replay as a Document's capture does
182
+ * (`resolveCapturedRuntimeValues`, one filter model SPEC 5.9): every input's
183
+ * default as a slot, the given values as slots over them. Pure; the caller
184
+ * loads the dashboard, its semantic payload and calendar, and checks access.
185
+ */
186
+ export declare function buildSavedVariableRequest(input: {
187
+ dashboard: TDashboard;
188
+ name: string;
189
+ sheetId: string;
190
+ /** Values for the inputs that reach a Document, by variable name: a control's value, or a filter's values. */
191
+ inputs?: Record<string, unknown>;
192
+ semanticExecutionPayload: SemanticExecutionPayload | undefined;
193
+ calendar: CalendarContext;
194
+ }): {
195
+ status: 'ready';
196
+ variable: DataVariable;
197
+ place: 'sheet' | 'document';
198
+ request: AssistantCardRequest;
199
+ } | ({
200
+ status: 'refused';
201
+ } & SavedVariableRequestRefusal);
@@ -36,9 +36,15 @@ export type DashboardCardQueryRequestPayloadBase = {
36
36
  resolvedPrimaryDateField?: ResolvedPrimaryDateField;
37
37
  globalDateComparison?: GlobalDateComparisonContext;
38
38
  calendarContext: CalendarContext;
39
+ /**
40
+ * A data variable's SQL query: the rows it may return (P1a-08), and the
41
+ * server returns the result's column types with it (P1a-18). Never set for
42
+ * a card's own request.
43
+ */
44
+ sqlRowLimit?: number;
39
45
  };
40
46
  /** The fields the server runs a card with. */
41
- export declare const CARD_QUERY_REQUEST_EXECUTED_FIELDS: readonly ["cardType", "sql", "python", "resultOwner", "cardConfig", "cardDataSource", "active_filters", "controlValues", "controlDefinitions", "cardControlDefinitions", "controlBindings", "resolvedPrimaryDateField", "globalDateComparison", "calendarContext"];
47
+ export declare const CARD_QUERY_REQUEST_EXECUTED_FIELDS: readonly ["cardType", "sql", "python", "resultOwner", "cardConfig", "cardDataSource", "active_filters", "controlValues", "controlDefinitions", "cardControlDefinitions", "controlBindings", "resolvedPrimaryDateField", "globalDateComparison", "calendarContext", "sqlRowLimit"];
42
48
  /**
43
49
  * The fields that describe the card for its own view and logs; the server
44
50
  * does not run with them (the result cache `cache_config` names is off).
@@ -8,6 +8,16 @@ export type HighlightsRequest = {
8
8
  add?: HighlightRuleInput[];
9
9
  remove?: string[];
10
10
  };
11
+ export declare const COLORS_ALLOWED: string[];
12
+ /** A color a highlight takes: a theme name or `#rrggbb` (CA-D11); a chip's colours take the same (P3b-08). */
13
+ export declare function isHighlightColor(color: string): boolean;
14
+ /**
15
+ * A stored colour in the words a highlight takes, or undefined when it has
16
+ * none: a theme name as it is, a hex as `#rrggbb` (the rule panel's colour
17
+ * picker may store `#fff`). Read through it, a colour sent back is one the
18
+ * writer takes (data variables P3b-17).
19
+ */
20
+ export declare function highlightColorWords(color: string): string | undefined;
11
21
  export declare function resolveCardHighlights(card: TCard, kind: CardSettingsKind, named: readonly NamedColumn[], request: HighlightsRequest, context: {
12
22
  path: string;
13
23
  newId?: () => string;
@@ -121,6 +121,7 @@ export declare const CARD_KEY_CLASSES: {
121
121
  readonly linkedInteractionTargetOverrides: "presentation";
122
122
  readonly clickToFilter: "presentation";
123
123
  readonly respondsToSelections: "presentation";
124
+ readonly dataVariableId: "presentation";
124
125
  readonly linkedClickToFilterOverrides: "presentation";
125
126
  readonly paginationConfig: "presentation";
126
127
  readonly queryConfig: "presentation";
@@ -345,7 +346,12 @@ type ColumnRole = ColumnKey['role'];
345
346
  type Column = MetricField | GroupByField | DetailField;
346
347
  /** The dataset a column's field belongs to: its semantic source, else its entity. */
347
348
  export declare function columnDataset(field: Pick<Field, 'source' | 'entityName' | 'entityId'>): string;
348
- /** A field's identity from its name and dataset: the one key columns and field refs are compared by. */
349
+ /**
350
+ * A field's identity from its name and dataset: the one key columns and field
351
+ * refs are compared by. The row count is one field however it is named: `__count`
352
+ * in a query, `*` with COUNT as its column is stored (MCP first-run fixes,
353
+ * ledger IN-08), so a label, sort or check that names it finds its column.
354
+ */
349
355
  export declare function fieldIdentityKey(name: string, dataset: string): string;
350
356
  /** A column's field identity: its name and dataset (never its label). */
351
357
  export declare function columnFieldKey(field: Pick<Field, 'name' | 'source' | 'entityName' | 'entityId'>): string;