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
@@ -43,7 +43,7 @@ export type ChangeProblemCode = 'invalid_change' | 'invalid_change_target' | 'co
43
43
  /** Tabs that can't be made: fewer than two cards, cards on two sheets, a Document section's card, a custom visual's input (building a report SPEC §7). */
44
44
  | 'layout_invalid'
45
45
  /** Text words the subset can't hold, or a token that isn't one of the card's variables (building a report SPEC §2.4, S-9). */
46
- | 'text_invalid';
46
+ | 'text_invalid' | DataVariableProblemCode;
47
47
  export type ChangeWarningCode =
48
48
  /** In-scope cards the filter doesn't reach. */
49
49
  'filter_not_reaching_cards'
@@ -75,6 +75,23 @@ export type ChangeWarningCode =
75
75
  | 'transform_order_not_date'
76
76
  /** A text card in a KPI's spot shows as the KPI's info, as in the editor, not as a tab (building a report SPEC §5.1). */
77
77
  | 'tabs_show_as_kpi_info';
78
+ /**
79
+ * Data variables (spec 4.3): each refusal names the fix in its message; the
80
+ * one writer's other issues (get, columns, measures) come back as `invalid_change`.
81
+ */
82
+ export type DataVariableProblemCode =
83
+ /** A name matches no variable at the place, or an input or report value where a data variable is needed. */
84
+ 'variable_unknown'
85
+ /** A variable on a table or view source, changed in the editor (DV-D33); `details.reason` as the outline's `notEditable`. */
86
+ | 'variable_not_editable'
87
+ /** `nameTaken` or `nameReserved` from the one writer. */
88
+ | 'variable_name_taken'
89
+ /** `variable.remove` while text still shows it; `details.places` names where. */
90
+ | 'variable_in_use'
91
+ /** The dataset isn't in the project or the domain. */
92
+ | 'variable_source_unreachable'
93
+ /** Text that is a formula or a template string. */
94
+ | 'text_holds_no_formulas';
78
95
  export type ChangeDiagnostic = {
79
96
  code: ChangeProblemCode | ChangeWarningCode;
80
97
  /** One sentence, safe to show an end user. */
@@ -1,7 +1,8 @@
1
1
  import { TCard } from '../../../lib/types/common-types.js';
2
+ import { Field } from '../../../lib/types/explorer-types.js';
2
3
  import { RelativeDateFilter } from '../../analytics-protocol/relative-date-filter.js';
3
4
  import { CardType } from './card-types.js';
4
- import { CardQuery, MatrixColumns, TimeWindow } from './dashboard-change.js';
5
+ import { CardQuery, FieldRef, MatrixColumns, TimeWindow } from './dashboard-change.js';
5
6
  /**
6
7
  * A card's query in the public forms (MCP dashboard editing SPEC 3.5), or why
7
8
  * it can't be changed through `card.update`. Conservative: anything the
@@ -57,5 +58,11 @@ export declare function readCardQuery(card: TCard, viewer: {
57
58
  * execution owner's rule (`resolveDashboardCardResultOwner`).
58
59
  */
59
60
  export declare function readCardSource(card: TCard): OutlineCardSource | undefined;
61
+ type SemanticSource = Extract<OutlineCardSource, {
62
+ kind: 'semantic';
63
+ }>;
64
+ /** A column as a query names it: its plain name on the card's own dataset, else its name and dataset. */
65
+ export declare function fieldRef(field: Pick<Field, 'name' | 'source' | 'entityName' | 'entityId'>, base: SemanticSource): FieldRef;
60
66
  /** A saved relative date as the public time window it was compiled from, or null when there isn't one. */
61
67
  export declare function relativeToTimeWindow(meta: RelativeDateFilter): TimeWindow | null;
68
+ export {};
@@ -101,7 +101,7 @@ export type ChangeServices = {
101
101
  };
102
102
  export type ChangeRef = {
103
103
  ref: string;
104
- kind: 'card' | 'filter' | 'sheet';
104
+ kind: 'card' | 'filter' | 'sheet' | 'variable';
105
105
  id: string;
106
106
  title: string;
107
107
  changeIndex: number;
@@ -1,7 +1,17 @@
1
1
  import { TCard } from '../../../lib/types/common-types.js';
2
+ import { CardColumnRef, ConditionalRule } from './types.js';
2
3
  export type KpiValueStyle = {
3
4
  color?: string;
4
5
  backgroundColor?: string;
5
6
  };
6
7
  /** The colors the card's rules give this value. */
7
8
  export declare function resolveKpiValueStyle(card: Pick<TCard, 'sql' | 'config' | 'preferences'>, value: unknown): KpiValueStyle;
9
+ /** How a chip's rules name its value (data variables P3b-06). */
10
+ export declare const CHIP_VALUE_COLUMN: CardColumnRef;
11
+ /**
12
+ * The text and background colors the rules naming `column` give one value
13
+ * (data variables P3b-07): the KPI's value and a variable's chip both read
14
+ * through it, so a rule colors the same way on either. Only text and
15
+ * background colors apply.
16
+ */
17
+ export declare function resolveValueStyle(rules: readonly ConditionalRule[] | undefined, value: unknown, column?: CardColumnRef): KpiValueStyle;
@@ -1369,7 +1369,7 @@ export declare const conditionalRuleSchema: z.ZodObject<{
1369
1369
  }[] | undefined;
1370
1370
  } | undefined;
1371
1371
  depth?: number | undefined;
1372
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
1372
+ tableParts?: ("subtotal" | "header" | "footer" | "body" | "grandTotal")[] | undefined;
1373
1373
  rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
1374
1374
  includeTotals?: boolean | undefined;
1375
1375
  includeSubtotals?: boolean | undefined;
@@ -1416,7 +1416,7 @@ export declare const conditionalRuleSchema: z.ZodObject<{
1416
1416
  }[] | undefined;
1417
1417
  } | undefined;
1418
1418
  depth?: number | undefined;
1419
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
1419
+ tableParts?: ("subtotal" | "header" | "footer" | "body" | "grandTotal")[] | undefined;
1420
1420
  rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
1421
1421
  includeTotals?: boolean | undefined;
1422
1422
  includeSubtotals?: boolean | undefined;
@@ -1439,27 +1439,27 @@ export declare const conditionalRuleSchema: z.ZodObject<{
1439
1439
  showValue: boolean;
1440
1440
  }>>;
1441
1441
  }, "strict", z.ZodTypeAny, {
1442
+ italic?: boolean | undefined;
1442
1443
  dataBar?: {
1443
1444
  color: string;
1444
1445
  showValue: boolean;
1445
1446
  } | undefined;
1446
- italic?: boolean | undefined;
1447
- fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
1448
1447
  backgroundColor?: string | undefined;
1449
1448
  textColor?: string | undefined;
1449
+ fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
1450
1450
  textDecoration?: "none" | "underline" | "line-through" | undefined;
1451
- icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
1451
+ icon?: "warning" | "x" | "arrowUp" | "arrowDown" | "check" | undefined;
1452
1452
  }, {
1453
+ italic?: boolean | undefined;
1453
1454
  dataBar?: {
1454
1455
  color: string;
1455
1456
  showValue: boolean;
1456
1457
  } | undefined;
1457
- italic?: boolean | undefined;
1458
- fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
1459
1458
  backgroundColor?: string | undefined;
1460
1459
  textColor?: string | undefined;
1460
+ fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
1461
1461
  textDecoration?: "none" | "underline" | "line-through" | undefined;
1462
- icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
1462
+ icon?: "warning" | "x" | "arrowUp" | "arrowDown" | "check" | undefined;
1463
1463
  }>>;
1464
1464
  }, "strict", z.ZodTypeAny, {
1465
1465
  id: string;
@@ -1506,7 +1506,7 @@ export declare const conditionalRuleSchema: z.ZodObject<{
1506
1506
  }[] | undefined;
1507
1507
  } | undefined;
1508
1508
  depth?: number | undefined;
1509
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
1509
+ tableParts?: ("subtotal" | "header" | "footer" | "body" | "grandTotal")[] | undefined;
1510
1510
  rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
1511
1511
  includeTotals?: boolean | undefined;
1512
1512
  includeSubtotals?: boolean | undefined;
@@ -1719,16 +1719,16 @@ export declare const conditionalRuleSchema: z.ZodObject<{
1719
1719
  };
1720
1720
  name?: string | undefined;
1721
1721
  style?: {
1722
+ italic?: boolean | undefined;
1722
1723
  dataBar?: {
1723
1724
  color: string;
1724
1725
  showValue: boolean;
1725
1726
  } | undefined;
1726
- italic?: boolean | undefined;
1727
- fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
1728
1727
  backgroundColor?: string | undefined;
1729
1728
  textColor?: string | undefined;
1729
+ fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
1730
1730
  textDecoration?: "none" | "underline" | "line-through" | undefined;
1731
- icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
1731
+ icon?: "warning" | "x" | "arrowUp" | "arrowDown" | "check" | undefined;
1732
1732
  } | undefined;
1733
1733
  enabled?: boolean | undefined;
1734
1734
  }, {
@@ -1776,7 +1776,7 @@ export declare const conditionalRuleSchema: z.ZodObject<{
1776
1776
  }[] | undefined;
1777
1777
  } | undefined;
1778
1778
  depth?: number | undefined;
1779
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
1779
+ tableParts?: ("subtotal" | "header" | "footer" | "body" | "grandTotal")[] | undefined;
1780
1780
  rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
1781
1781
  includeTotals?: boolean | undefined;
1782
1782
  includeSubtotals?: boolean | undefined;
@@ -1989,16 +1989,16 @@ export declare const conditionalRuleSchema: z.ZodObject<{
1989
1989
  };
1990
1990
  name?: string | undefined;
1991
1991
  style?: {
1992
+ italic?: boolean | undefined;
1992
1993
  dataBar?: {
1993
1994
  color: string;
1994
1995
  showValue: boolean;
1995
1996
  } | undefined;
1996
- italic?: boolean | undefined;
1997
- fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
1998
1997
  backgroundColor?: string | undefined;
1999
1998
  textColor?: string | undefined;
1999
+ fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
2000
2000
  textDecoration?: "none" | "underline" | "line-through" | undefined;
2001
- icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
2001
+ icon?: "warning" | "x" | "arrowUp" | "arrowDown" | "check" | undefined;
2002
2002
  } | undefined;
2003
2003
  enabled?: boolean | undefined;
2004
2004
  }>;
@@ -3303,7 +3303,7 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
3303
3303
  }[] | undefined;
3304
3304
  } | undefined;
3305
3305
  depth?: number | undefined;
3306
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
3306
+ tableParts?: ("subtotal" | "header" | "footer" | "body" | "grandTotal")[] | undefined;
3307
3307
  rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
3308
3308
  includeTotals?: boolean | undefined;
3309
3309
  includeSubtotals?: boolean | undefined;
@@ -3350,7 +3350,7 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
3350
3350
  }[] | undefined;
3351
3351
  } | undefined;
3352
3352
  depth?: number | undefined;
3353
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
3353
+ tableParts?: ("subtotal" | "header" | "footer" | "body" | "grandTotal")[] | undefined;
3354
3354
  rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
3355
3355
  includeTotals?: boolean | undefined;
3356
3356
  includeSubtotals?: boolean | undefined;
@@ -3373,27 +3373,27 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
3373
3373
  showValue: boolean;
3374
3374
  }>>;
3375
3375
  }, "strict", z.ZodTypeAny, {
3376
+ italic?: boolean | undefined;
3376
3377
  dataBar?: {
3377
3378
  color: string;
3378
3379
  showValue: boolean;
3379
3380
  } | undefined;
3380
- italic?: boolean | undefined;
3381
- fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
3382
3381
  backgroundColor?: string | undefined;
3383
3382
  textColor?: string | undefined;
3383
+ fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
3384
3384
  textDecoration?: "none" | "underline" | "line-through" | undefined;
3385
- icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
3385
+ icon?: "warning" | "x" | "arrowUp" | "arrowDown" | "check" | undefined;
3386
3386
  }, {
3387
+ italic?: boolean | undefined;
3387
3388
  dataBar?: {
3388
3389
  color: string;
3389
3390
  showValue: boolean;
3390
3391
  } | undefined;
3391
- italic?: boolean | undefined;
3392
- fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
3393
3392
  backgroundColor?: string | undefined;
3394
3393
  textColor?: string | undefined;
3394
+ fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
3395
3395
  textDecoration?: "none" | "underline" | "line-through" | undefined;
3396
- icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
3396
+ icon?: "warning" | "x" | "arrowUp" | "arrowDown" | "check" | undefined;
3397
3397
  }>>;
3398
3398
  }, "strict", z.ZodTypeAny, {
3399
3399
  id: string;
@@ -3440,7 +3440,7 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
3440
3440
  }[] | undefined;
3441
3441
  } | undefined;
3442
3442
  depth?: number | undefined;
3443
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
3443
+ tableParts?: ("subtotal" | "header" | "footer" | "body" | "grandTotal")[] | undefined;
3444
3444
  rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
3445
3445
  includeTotals?: boolean | undefined;
3446
3446
  includeSubtotals?: boolean | undefined;
@@ -3653,16 +3653,16 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
3653
3653
  };
3654
3654
  name?: string | undefined;
3655
3655
  style?: {
3656
+ italic?: boolean | undefined;
3656
3657
  dataBar?: {
3657
3658
  color: string;
3658
3659
  showValue: boolean;
3659
3660
  } | undefined;
3660
- italic?: boolean | undefined;
3661
- fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
3662
3661
  backgroundColor?: string | undefined;
3663
3662
  textColor?: string | undefined;
3663
+ fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
3664
3664
  textDecoration?: "none" | "underline" | "line-through" | undefined;
3665
- icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
3665
+ icon?: "warning" | "x" | "arrowUp" | "arrowDown" | "check" | undefined;
3666
3666
  } | undefined;
3667
3667
  enabled?: boolean | undefined;
3668
3668
  }, {
@@ -3710,7 +3710,7 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
3710
3710
  }[] | undefined;
3711
3711
  } | undefined;
3712
3712
  depth?: number | undefined;
3713
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
3713
+ tableParts?: ("subtotal" | "header" | "footer" | "body" | "grandTotal")[] | undefined;
3714
3714
  rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
3715
3715
  includeTotals?: boolean | undefined;
3716
3716
  includeSubtotals?: boolean | undefined;
@@ -3923,16 +3923,16 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
3923
3923
  };
3924
3924
  name?: string | undefined;
3925
3925
  style?: {
3926
+ italic?: boolean | undefined;
3926
3927
  dataBar?: {
3927
3928
  color: string;
3928
3929
  showValue: boolean;
3929
3930
  } | undefined;
3930
- italic?: boolean | undefined;
3931
- fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
3932
3931
  backgroundColor?: string | undefined;
3933
3932
  textColor?: string | undefined;
3933
+ fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
3934
3934
  textDecoration?: "none" | "underline" | "line-through" | undefined;
3935
- icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
3935
+ icon?: "warning" | "x" | "arrowUp" | "arrowDown" | "check" | undefined;
3936
3936
  } | undefined;
3937
3937
  enabled?: boolean | undefined;
3938
3938
  }>, "many">;
@@ -3983,7 +3983,7 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
3983
3983
  }[] | undefined;
3984
3984
  } | undefined;
3985
3985
  depth?: number | undefined;
3986
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
3986
+ tableParts?: ("subtotal" | "header" | "footer" | "body" | "grandTotal")[] | undefined;
3987
3987
  rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
3988
3988
  includeTotals?: boolean | undefined;
3989
3989
  includeSubtotals?: boolean | undefined;
@@ -4196,16 +4196,16 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
4196
4196
  };
4197
4197
  name?: string | undefined;
4198
4198
  style?: {
4199
+ italic?: boolean | undefined;
4199
4200
  dataBar?: {
4200
4201
  color: string;
4201
4202
  showValue: boolean;
4202
4203
  } | undefined;
4203
- italic?: boolean | undefined;
4204
- fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
4205
4204
  backgroundColor?: string | undefined;
4206
4205
  textColor?: string | undefined;
4206
+ fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
4207
4207
  textDecoration?: "none" | "underline" | "line-through" | undefined;
4208
- icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
4208
+ icon?: "warning" | "x" | "arrowUp" | "arrowDown" | "check" | undefined;
4209
4209
  } | undefined;
4210
4210
  enabled?: boolean | undefined;
4211
4211
  }[];
@@ -4256,7 +4256,7 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
4256
4256
  }[] | undefined;
4257
4257
  } | undefined;
4258
4258
  depth?: number | undefined;
4259
- tableParts?: ("subtotal" | "body" | "header" | "footer" | "grandTotal")[] | undefined;
4259
+ tableParts?: ("subtotal" | "header" | "footer" | "body" | "grandTotal")[] | undefined;
4260
4260
  rowRoles?: ("member" | "subtotal" | "grand_total" | "others")[] | undefined;
4261
4261
  includeTotals?: boolean | undefined;
4262
4262
  includeSubtotals?: boolean | undefined;
@@ -4469,16 +4469,16 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
4469
4469
  };
4470
4470
  name?: string | undefined;
4471
4471
  style?: {
4472
+ italic?: boolean | undefined;
4472
4473
  dataBar?: {
4473
4474
  color: string;
4474
4475
  showValue: boolean;
4475
4476
  } | undefined;
4476
- italic?: boolean | undefined;
4477
- fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
4478
4477
  backgroundColor?: string | undefined;
4479
4478
  textColor?: string | undefined;
4479
+ fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
4480
4480
  textDecoration?: "none" | "underline" | "line-through" | undefined;
4481
- icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
4481
+ icon?: "warning" | "x" | "arrowUp" | "arrowDown" | "check" | undefined;
4482
4482
  } | undefined;
4483
4483
  enabled?: boolean | undefined;
4484
4484
  }[];
@@ -198,15 +198,15 @@ export declare const controlDefinitionExecutionSchema: z.ZodEffects<z.ZodObject<
198
198
  labelColumn?: string | undefined;
199
199
  };
200
200
  scope: "card" | "dashboard";
201
- initialValueStrategy: "saved_default" | "embed_required" | "builtin" | "schedule_snapshot";
202
201
  requiredAtExecution: boolean;
202
+ initialValueStrategy: "saved_default" | "builtin" | "embed_required" | "schedule_snapshot";
203
203
  defaultValue?: unknown;
204
204
  hidden?: boolean | undefined;
205
- locked?: boolean | undefined;
206
- helpText?: string | undefined;
207
- placement?: "toolbar" | "advanced" | "card_header" | undefined;
208
205
  showLabel?: boolean | undefined;
209
206
  toolbarWidth?: number | undefined;
207
+ locked?: boolean | undefined;
208
+ helpText?: string | undefined;
209
+ placement?: "toolbar" | "card_header" | "advanced" | undefined;
210
210
  }, {
211
211
  type: "number" | "boolean" | "date" | "text" | "enum" | "multi_enum" | "field_selector" | "metric_selector" | "aggregation_selector" | "grain_selector";
212
212
  id: string;
@@ -241,15 +241,15 @@ export declare const controlDefinitionExecutionSchema: z.ZodEffects<z.ZodObject<
241
241
  labelColumn?: string | undefined;
242
242
  };
243
243
  scope: "card" | "dashboard";
244
- initialValueStrategy: "saved_default" | "embed_required" | "builtin" | "schedule_snapshot";
245
244
  requiredAtExecution: boolean;
245
+ initialValueStrategy: "saved_default" | "builtin" | "embed_required" | "schedule_snapshot";
246
246
  defaultValue?: unknown;
247
247
  hidden?: boolean | undefined;
248
- locked?: boolean | undefined;
249
- helpText?: string | undefined;
250
- placement?: "toolbar" | "advanced" | "card_header" | undefined;
251
248
  showLabel?: boolean | undefined;
252
249
  toolbarWidth?: number | undefined;
250
+ locked?: boolean | undefined;
251
+ helpText?: string | undefined;
252
+ placement?: "toolbar" | "card_header" | "advanced" | undefined;
253
253
  }>, {
254
254
  type: "number" | "boolean" | "date" | "text" | "enum" | "multi_enum" | "field_selector" | "metric_selector" | "aggregation_selector" | "grain_selector";
255
255
  id: string;
@@ -284,15 +284,15 @@ export declare const controlDefinitionExecutionSchema: z.ZodEffects<z.ZodObject<
284
284
  labelColumn?: string | undefined;
285
285
  };
286
286
  scope: "card" | "dashboard";
287
- initialValueStrategy: "saved_default" | "embed_required" | "builtin" | "schedule_snapshot";
288
287
  requiredAtExecution: boolean;
288
+ initialValueStrategy: "saved_default" | "builtin" | "embed_required" | "schedule_snapshot";
289
289
  defaultValue?: unknown;
290
290
  hidden?: boolean | undefined;
291
- locked?: boolean | undefined;
292
- helpText?: string | undefined;
293
- placement?: "toolbar" | "advanced" | "card_header" | undefined;
294
291
  showLabel?: boolean | undefined;
295
292
  toolbarWidth?: number | undefined;
293
+ locked?: boolean | undefined;
294
+ helpText?: string | undefined;
295
+ placement?: "toolbar" | "card_header" | "advanced" | undefined;
296
296
  }, {
297
297
  type: "number" | "boolean" | "date" | "text" | "enum" | "multi_enum" | "field_selector" | "metric_selector" | "aggregation_selector" | "grain_selector";
298
298
  id: string;
@@ -327,15 +327,15 @@ export declare const controlDefinitionExecutionSchema: z.ZodEffects<z.ZodObject<
327
327
  labelColumn?: string | undefined;
328
328
  };
329
329
  scope: "card" | "dashboard";
330
- initialValueStrategy: "saved_default" | "embed_required" | "builtin" | "schedule_snapshot";
331
330
  requiredAtExecution: boolean;
331
+ initialValueStrategy: "saved_default" | "builtin" | "embed_required" | "schedule_snapshot";
332
332
  defaultValue?: unknown;
333
333
  hidden?: boolean | undefined;
334
- locked?: boolean | undefined;
335
- helpText?: string | undefined;
336
- placement?: "toolbar" | "advanced" | "card_header" | undefined;
337
334
  showLabel?: boolean | undefined;
338
335
  toolbarWidth?: number | undefined;
336
+ locked?: boolean | undefined;
337
+ helpText?: string | undefined;
338
+ placement?: "toolbar" | "card_header" | "advanced" | undefined;
339
339
  }>;
340
340
  export declare const controlBindingExecutionSchema: z.ZodDiscriminatedUnion<"target", [z.ZodObject<{
341
341
  controlId: z.ZodString;
@@ -24,6 +24,7 @@ export type DashboardSqlPinnedCatalogSource = {
24
24
  /** Physical SQL coordinate declared by the pinned entity, when available. */
25
25
  executionTable?: DashboardSqlExecutionTable;
26
26
  };
27
+ export declare function isDatabaseEntityReference(value: unknown): value is DatabaseEntityReference;
27
28
  /** The one dialect a card's selected tables share; undefined when none names one or they differ. */
28
29
  export declare function sharedTableDialect(selectedEntities: readonly unknown[] | undefined): string | undefined;
29
30
  /**
@@ -0,0 +1,29 @@
1
+ import { DashboardInputBase, DataVariable, TCard, TDashboard } from '../../lib/types/common-types.js';
2
+ import { ScopedDashboardInputTarget } from './dashboard-input-scope.js';
3
+ export type DashboardFilterReachTarget = {
4
+ kind: 'card';
5
+ id: string;
6
+ card: TCard;
7
+ sheetId: string;
8
+ sheetKind: 'dashboard' | 'document';
9
+ sectionId?: string;
10
+ } | {
11
+ kind: 'variable';
12
+ id: string;
13
+ variable: DataVariable;
14
+ /** `projectDataVariableToCard(variable)`: what mapping matches fields against. */
15
+ card: TCard;
16
+ };
17
+ /** Every card and data variable a filter can target. Memoized per dashboard object. */
18
+ export declare function listDashboardFilterTargets(dashboard: Pick<TDashboard, 'sheets' | 'variables'>): readonly DashboardFilterReachTarget[];
19
+ export declare function findDashboardFilterTarget(dashboard: Pick<TDashboard, 'sheets' | 'variables'>, id: string): DashboardFilterReachTarget | undefined;
20
+ /** Is this id a card's or a data variable's? One namespace (DV-D35). */
21
+ export declare function isDashboardTargetIdTaken(dashboard: Pick<TDashboard, 'sheets' | 'variables'>, id: string): boolean;
22
+ /** The scope targets of any filter target: a card where it is, a variable where it is used. */
23
+ export declare function listFilterTargetScopeTargets(dashboard: Pick<TDashboard, 'sheets'>, target: DashboardFilterReachTarget): ScopedDashboardInputTarget[];
24
+ /** Does a filter reach this target (DV-D35 for a variable)? */
25
+ export declare function doesDashboardInputReachFilterTarget(dashboard: Pick<TDashboard, 'sheets'>, input: Pick<DashboardInputBase, 'scope' | 'compatibility'>, target: DashboardFilterReachTarget): boolean;
26
+ /** The data variables a filter reaches (DV-D35). */
27
+ export declare function listReachedVariableTargets(dashboard: Pick<TDashboard, 'sheets' | 'variables'>, input: Pick<DashboardInputBase, 'scope' | 'compatibility'>): Extract<DashboardFilterReachTarget, {
28
+ kind: 'variable';
29
+ }>[];
@@ -15,6 +15,8 @@ export type DashboardTabTarget = {
15
15
  sheetKind: 'dashboard' | 'document';
16
16
  /** Every card on the tab: sheet cards, frame cards, section cards. */
17
17
  cardIds: ReadonlySet<string>;
18
+ /** The data variables the tab's text uses (DV-D35). */
19
+ variableIds?: ReadonlySet<string>;
18
20
  };
19
21
  /** Does the input apply to this card, section or tab? */
20
22
  export declare function doesDashboardInputApplyToTarget(input: Pick<DashboardInputBase, 'scope' | 'compatibility'>, target: ScopedDashboardInputTarget): boolean;
@@ -28,13 +30,14 @@ export declare function isDashboardInputOnTab(input: Pick<DashboardInputBase, 's
28
30
  /** The tab targets of a dashboard, by sheet id, memoized per dashboard object. */
29
31
  export declare function listDashboardTabTargets(dashboard: Pick<TDashboard, 'sheets'>): ReadonlyMap<string, DashboardTabTarget>;
30
32
  /**
31
- * Every tab, card and Document section an input reaches, as keys
32
- * (`sheet:<id>`, `card:<id>`, `section:<id>`). A section card is evaluated
33
- * with its section, as the runtime resolves it. Two inputs overlap when their
33
+ * Every tab, card, data variable and Document section an input reaches, as
34
+ * keys (`sheet:<id>`, `card:<id>`, `section:<id>`; a variable is a filter
35
+ * target under `card:`, DV-D30). A section card is evaluated with its
36
+ * section, as the runtime resolves it; a variable where it is used (DV-D35). Two inputs overlap when their
34
37
  * keys intersect: the one reach behind the overlap rules of filter settings
35
38
  * and of the app's save validation (aliases, backing control ids).
36
39
  */
37
- export declare function listDashboardInputReachKeys(dashboard: Pick<TDashboard, 'sheets'>, input: Pick<DashboardInputBase, 'scope' | 'compatibility'>): Set<string>;
40
+ export declare function listDashboardInputReachKeys(dashboard: Pick<TDashboard, 'sheets' | 'variables'>, input: Pick<DashboardInputBase, 'scope' | 'compatibility'>): Set<string>;
38
41
  /**
39
42
  * Whether a filter input still applies when a carried context turns the
40
43
  * dashboard's own filters off (`resolveContextAwareFilterPolicy`): a filter