react-semaphor 0.1.459 → 0.1.461

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 (114) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +32 -32
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +4 -4
  5. package/dist/briefings/index.cjs +1 -1
  6. package/dist/briefings/index.js +4 -4
  7. package/dist/chunks/{analyze-result-contract-BbRJ-C06.js → analyze-result-contract-DROq4vgY.js} +1 -1
  8. package/dist/chunks/{analyze-result-contract-LPDNldic.cjs → analyze-result-contract-DSGoFuXQ.cjs} +1 -1
  9. package/dist/chunks/canonical-result-keys-CEQefvdO.js +33 -0
  10. package/dist/chunks/canonical-result-keys-Cb96edol.cjs +1 -0
  11. package/dist/chunks/{common-types-H51FLKB7.js → common-types-BHVKgxRR.js} +1 -1
  12. package/dist/chunks/{common-types-C57kJ59w.cjs → common-types-BcV9PD9D.cjs} +1 -1
  13. package/dist/chunks/{dashboard-briefing-launcher-ClCj98sq.js → dashboard-briefing-launcher-3owMxX5K.js} +60 -61
  14. package/dist/chunks/{dashboard-briefing-launcher-DHtEouuH.cjs → dashboard-briefing-launcher-xuGrw8H3.cjs} +2 -2
  15. package/dist/chunks/{dashboard-controls-B8gsKlxc.js → dashboard-controls-B4GvjGr1.js} +44 -45
  16. package/dist/chunks/{dashboard-controls-VRShl9J0.cjs → dashboard-controls-Bpm_xOXQ.cjs} +1 -1
  17. package/dist/chunks/dashboard-filter-value-compatibility-KXIyvbhc.js +677 -0
  18. package/dist/chunks/dashboard-filter-value-compatibility-UapptYnn.cjs +1 -0
  19. package/dist/chunks/dashboard-input-contract-BkRFQ7Tq.cjs +1 -0
  20. package/dist/chunks/{dashboard-date-comparison-definition-DC3ekV2S.js → dashboard-input-contract-D5dxTWJ5.js} +41 -25
  21. package/dist/chunks/{dashboard-json-i_Auue_K.js → dashboard-json-DzyxoBp-.js} +13 -14
  22. package/dist/chunks/dashboard-json-yLM01xK4.cjs +1 -0
  23. package/dist/chunks/{edit-dashboard-visual-DWWyT55u.cjs → edit-dashboard-visual-1T278Nr_.cjs} +28 -28
  24. package/dist/chunks/{edit-dashboard-visual-B3JF0fe4.js → edit-dashboard-visual-nwSasO_j.js} +880 -894
  25. package/dist/chunks/{editor-action-buttons-BTlCsP63.cjs → editor-action-buttons-CX1Pken3.cjs} +2 -2
  26. package/dist/chunks/{editor-action-buttons-C9x3nGnb.js → editor-action-buttons-Dqw0asfA.js} +28 -28
  27. package/dist/chunks/index-B1qplNxl.cjs +1392 -0
  28. package/dist/chunks/{index-BS2-ZZGf.js → index-DazD5k0F.js} +45362 -42931
  29. package/dist/chunks/{index-BIFLI8ul.js → index-De_7nrwb.js} +10 -10
  30. package/dist/chunks/index-DjjKJPDy.cjs +4 -0
  31. package/dist/chunks/{matrix-result-contract-CofATICL.js → matrix-result-contract-BTpPuHOc.js} +88 -104
  32. package/dist/chunks/matrix-result-contract-ZRNfeIbI.cjs +1 -0
  33. package/dist/chunks/{pivot-header-presentation-B9nXXKlW.cjs → pivot-header-presentation-BijPbP33.cjs} +1 -1
  34. package/dist/chunks/{pivot-header-presentation-D-0jvUwn.js → pivot-header-presentation-DW0gKG8g.js} +2 -2
  35. package/dist/chunks/{pivot-result-identity-Bb4EixVN.cjs → pivot-result-identity-DxHtiKVj.cjs} +1 -1
  36. package/dist/chunks/{pivot-result-identity-DU1v-5Xk.js → pivot-result-identity-Z9tN2tEV.js} +1 -1
  37. package/dist/chunks/{pivot-result-lifecycle-DTLRuDEW.cjs → pivot-result-lifecycle-BXzIlQVu.cjs} +1 -1
  38. package/dist/chunks/{pivot-result-lifecycle-CHWEGU2o.js → pivot-result-lifecycle-g2U-vzQb.js} +7 -7
  39. package/dist/chunks/{raw-temporal-contract-BtjH_G-d.cjs → raw-temporal-contract-DfAvqNMo.cjs} +1 -1
  40. package/dist/chunks/{raw-temporal-contract-CxncLze5.js → raw-temporal-contract-UtAqoOZO.js} +1 -1
  41. package/dist/chunks/{report-preferences-dialog-BK0yAJnQ.cjs → report-preferences-dialog-DKPyjiCt.cjs} +1 -1
  42. package/dist/chunks/{report-preferences-dialog-BDpkcUtz.js → report-preferences-dialog-Dv3vCCFt.js} +6 -6
  43. package/dist/chunks/{report-runtime-context-DqxS4wbi.cjs → report-runtime-context-C0NfLPfc.cjs} +1 -1
  44. package/dist/chunks/{report-runtime-context-SM6YO61_.js → report-runtime-context-CNncA3VD.js} +11 -11
  45. package/dist/chunks/{saved-temporal-bucket-format-CFfWXRl9.cjs → saved-temporal-bucket-format-3QKveR3v.cjs} +1 -1
  46. package/dist/chunks/{saved-temporal-bucket-format-SGAV0ivR.js → saved-temporal-bucket-format-Dd2eixTH.js} +11 -11
  47. package/dist/chunks/switch-DBZsEV0U.cjs +138 -0
  48. package/dist/chunks/{switch-DQR-Va05.js → switch-kPUJEC1A.js} +6615 -5219
  49. package/dist/chunks/{temporal-bucket-5UYEotyQ.js → temporal-bucket-C85rmFmC.js} +4 -4
  50. package/dist/chunks/temporal-bucket-authoring-1fZuPAVb.js +653 -0
  51. package/dist/chunks/temporal-bucket-authoring-BK1UhYpD.cjs +1 -0
  52. package/dist/chunks/{temporal-bucket-contract-D5d-xEl3.js → temporal-bucket-contract-DXXNZssK.js} +1 -1
  53. package/dist/chunks/{temporal-bucket-contract-D2-93DGr.cjs → temporal-bucket-contract-xFkvboaw.cjs} +1 -1
  54. package/dist/chunks/{temporal-bucket-DHY1y9lq.cjs → temporal-bucket-pMfghsLX.cjs} +1 -1
  55. package/dist/chunks/{token-types-GbxRUozo.js → token-types-BLxc7UwR.js} +1 -1
  56. package/dist/chunks/{token-types-D7CaaI80.cjs → token-types-BYYO109W.cjs} +1 -1
  57. package/dist/chunks/{update-policy-hednMF-0.js → update-policy-CB8XJIoY.js} +1 -1
  58. package/dist/chunks/{update-policy-BmiOd0PB.cjs → update-policy-DMjjGjQY.cjs} +1 -1
  59. package/dist/chunks/{validators-DEmd8Sin.js → validators-DVd8s3qY.js} +416 -350
  60. package/dist/chunks/validators-dJlwubP4.cjs +1 -0
  61. package/dist/dashboard/index.cjs +1 -1
  62. package/dist/dashboard/index.js +2 -2
  63. package/dist/dashboard-authoring/index.cjs +3 -3
  64. package/dist/dashboard-authoring/index.js +328 -311
  65. package/dist/data-app-builder/index.cjs +1 -1
  66. package/dist/data-app-builder/index.js +2 -2
  67. package/dist/data-app-codegen/index.cjs +1 -1
  68. package/dist/data-app-codegen/index.js +2 -2
  69. package/dist/data-app-codegen-node/index.cjs +1 -1
  70. package/dist/data-app-codegen-node/index.js +3 -3
  71. package/dist/data-app-sdk/index.cjs +1 -1
  72. package/dist/data-app-sdk/index.js +55 -55
  73. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  74. package/dist/data-app-sdk-adapters/index.js +61 -56
  75. package/dist/data-app-sdk-validation/index.cjs +1 -1
  76. package/dist/data-app-sdk-validation/index.js +9 -9
  77. package/dist/format-utils/index.cjs +1 -1
  78. package/dist/format-utils/index.js +15 -15
  79. package/dist/index.cjs +1 -1
  80. package/dist/index.js +154 -155
  81. package/dist/report-runtime-context/index.cjs +1 -1
  82. package/dist/report-runtime-context/index.js +2 -2
  83. package/dist/style.css +1 -1
  84. package/dist/surfboard/index.cjs +1 -1
  85. package/dist/surfboard/index.js +3 -3
  86. package/dist/types/analytics-protocol.d.ts +16 -8
  87. package/dist/types/briefings.d.ts +95 -13
  88. package/dist/types/dashboard-assistant.d.ts +11 -6
  89. package/dist/types/dashboard-authoring.d.ts +257 -19
  90. package/dist/types/dashboard.d.ts +109 -14
  91. package/dist/types/data-app-builder.d.ts +11 -6
  92. package/dist/types/data-app-codegen-node.d.ts +16 -8
  93. package/dist/types/data-app-codegen.d.ts +16 -8
  94. package/dist/types/data-app-sdk-adapters.d.ts +17 -11
  95. package/dist/types/data-app-sdk-validation.d.ts +17 -11
  96. package/dist/types/data-app-sdk.d.ts +17 -11
  97. package/dist/types/index.cjs +1 -1
  98. package/dist/types/index.js +4 -4
  99. package/dist/types/main.d.ts +225 -20
  100. package/dist/types/shared.d.ts +95 -13
  101. package/dist/types/surfboard.d.ts +109 -14
  102. package/dist/types/types.d.ts +109 -14
  103. package/package.json +1 -1
  104. package/dist/chunks/canonical-result-keys-BA0HCP4e.cjs +0 -1
  105. package/dist/chunks/canonical-result-keys-D6avdjpA.js +0 -467
  106. package/dist/chunks/dashboard-date-comparison-definition-Ces4alFm.cjs +0 -1
  107. package/dist/chunks/dashboard-json-BhvPMpZA.cjs +0 -1
  108. package/dist/chunks/index-DHF-2AqS.cjs +0 -1392
  109. package/dist/chunks/index-k8tEp0ys.cjs +0 -4
  110. package/dist/chunks/matrix-result-contract-zamd9euI.cjs +0 -1
  111. package/dist/chunks/switch-f3TuZNLr.cjs +0 -138
  112. package/dist/chunks/temporal-bucket-authoring-K1kE6R_z.js +0 -222
  113. package/dist/chunks/temporal-bucket-authoring-o3Emn05L.cjs +0 -1
  114. package/dist/chunks/validators-BDYprKI9.cjs +0 -1
@@ -78,6 +78,13 @@ declare type BaseFilter = {
78
78
 
79
79
  declare type Breakpoint = 'lg' | 'md' | 'sm' | 'xs' | 'xxs';
80
80
 
81
+ /**
82
+ * Inventories config sources proven executable by the card and SQL sources
83
+ * explicitly pinned for catalog authoring. It never infers SQL lineage,
84
+ * discovers a relationship, or adds a join.
85
+ */
86
+ export declare function buildDashboardCardSourceIndex(card: Pick<TCard, 'id' | 'type' | 'sql' | 'config' | 'dataSource'>): DashboardCardFilterSourceInventory;
87
+
81
88
  declare type CacheConfig = {
82
89
  ttl: string;
83
90
  status: 'on' | 'on-refresh' | 'off';
@@ -601,6 +608,8 @@ declare type ControlSource = {
601
608
 
602
609
  declare type ControlType = 'enum' | 'multi_enum' | 'text' | 'number' | 'boolean' | 'date' | 'field_selector' | 'metric_selector' | 'aggregation_selector' | 'grain_selector';
603
610
 
611
+ export declare function createDashboardFilterBindingId(createUuid?: () => string): string;
612
+
604
613
  declare type CurrencyPresentationBinding = {
605
614
  controlId: string;
606
615
  target: 'presentation_currency';
@@ -664,6 +673,21 @@ export declare type DashboardAuthoringValidationResult = {
664
673
  warnings: DashboardPlanWarning[];
665
674
  };
666
675
 
676
+ export declare type DashboardCardFilterSourceInventory = {
677
+ cardId: string;
678
+ kind: 'config';
679
+ executableSources: DashboardFilterTargetSource[];
680
+ } | {
681
+ cardId: string;
682
+ kind: 'sql';
683
+ pinnedCatalogSources: DashboardSqlPinnedCatalogSource[];
684
+ } | {
685
+ cardId: string;
686
+ kind: 'unconfigured';
687
+ };
688
+
689
+ export declare function dashboardCardFilterSourceInventoryContains(inventory: DashboardCardFilterSourceInventory, source: DashboardFilterTargetSource): boolean;
690
+
667
691
  export declare type DashboardCardSizeIntent = 'kpi' | 'chart' | 'table' | 'text';
668
692
 
669
693
  export declare type DashboardChangeCompileResult = {
@@ -717,6 +741,89 @@ export declare type DashboardCompileResult = {
717
741
  skippedOperations: DashboardPlanWarning[];
718
742
  };
719
743
 
744
+ export declare type DashboardFilterApplication = {
745
+ kind: 'cardMappings';
746
+ /**
747
+ * Sparse grounded bindings and explicit exclusions. A missing config card
748
+ * may reuse a proven Option Value target on an executable source; it is not
749
+ * an implicit exclusion, and source identity alone is not field evidence.
750
+ */
751
+ cards: DashboardFilterCardApplication[];
752
+ };
753
+
754
+ export declare type DashboardFilterAutomaticTargetResolution = {
755
+ status: 'matched';
756
+ target: DashboardFilterTarget;
757
+ } | {
758
+ status: 'ambiguous';
759
+ } | {
760
+ status: 'notApplicable';
761
+ };
762
+
763
+ export declare type DashboardFilterBoundCardApplication = {
764
+ kind: 'bound';
765
+ cardId: string;
766
+ bindingId: string;
767
+ target: DashboardFilterTarget;
768
+ };
769
+
770
+ export declare type DashboardFilterCardApplication = DashboardFilterBoundCardApplication | DashboardFilterExcludedCardApplication;
771
+
772
+ export declare type DashboardFilterExcludedCardApplication = {
773
+ kind: 'excluded';
774
+ cardId: string;
775
+ };
776
+
777
+ export declare type DashboardFilterLogicalValueField = Pick<DashboardFilterTargetField, 'name' | 'sourceField'> & {
778
+ dataType: DashboardFilterTargetField['dataType'];
779
+ };
780
+
781
+ export declare class DashboardFilterMappingContractError extends Error {
782
+ readonly issues: DashboardFilterMappingContractIssue[];
783
+ constructor(issues: DashboardFilterMappingContractIssue[]);
784
+ }
785
+
786
+ export declare type DashboardFilterMappingContractIssue = {
787
+ code: DashboardFilterMappingContractIssueCode;
788
+ path: string;
789
+ message: string;
790
+ inputId?: string;
791
+ cardId?: string;
792
+ bindingId?: string;
793
+ };
794
+
795
+ export declare type DashboardFilterMappingContractIssueCode = 'invalid_input' | 'both_filter_definitions' | 'missing_filter_definition' | 'orphaned_filter_reference' | 'invalid_filter_reference' | 'duplicate_filter_reference' | 'global_date_reference' | 'unsupported_mapped_scope' | 'invalid_application' | 'duplicate_card_application' | 'unknown_card' | 'invalid_binding_id' | 'unsupported_target' | 'invalid_target_field' | 'unknown_target_data_type' | 'unavailable_card_source' | 'invalid_option_source';
796
+
797
+ /** Persisted label/value option definition for a mapped dashboard filter. */
798
+ export declare type DashboardFilterOptionSource = SemaphorInputOptionSource;
799
+
800
+ export declare type DashboardFilterSubscriptionHint = {
801
+ helper: '{{ filters | where }}' | '{{ filters | and }}';
802
+ description: string;
803
+ };
804
+
805
+ export declare type DashboardFilterTarget = {
806
+ kind: 'field';
807
+ field: DashboardFilterTargetField;
808
+ };
809
+
810
+ /** Persisted, source-qualified field that a mapped filter targets. */
811
+ export declare type DashboardFilterTargetField = {
812
+ name: string;
813
+ source: DashboardFilterTargetSource;
814
+ dataType: 'string' | 'number' | 'boolean' | 'date' | 'datetime';
815
+ /** Catalog-grounded physical column used when it differs from the semantic name. */
816
+ sourceField?: string;
817
+ };
818
+
819
+ export declare function dashboardFilterTargetMatchesLogicalValue(target: DashboardFilterTarget, logicalValueField: DashboardFilterLogicalValueField): boolean;
820
+
821
+ export declare type DashboardFilterTargetSource = Extract<SemaphorSourceRef, {
822
+ kind: 'semantic' | 'physical';
823
+ }>;
824
+
825
+ export declare function dashboardFilterValueTypeForDataType(dataType: unknown): keyof typeof OPERATIONS_BY_DATA_TYPE;
826
+
720
827
  declare type DashboardInput = FilterDashboardInput | ControlDashboardInput;
721
828
 
722
829
  declare type DashboardInputBase = {
@@ -777,14 +884,14 @@ declare type DashboardInputScope = {
777
884
  sectionIds: string[];
778
885
  };
779
886
 
780
- declare type DashboardInputSlot = ({
887
+ declare type DashboardInputSlot = {
781
888
  status: 'set';
782
889
  value: DashboardInputValue;
783
890
  comparisonSelection?: GlobalDateComparisonSelection;
784
- }) | ({
891
+ } | {
785
892
  status: 'cleared';
786
893
  comparisonSelection?: GlobalDateComparisonSelection;
787
- }) | {
894
+ } | {
788
895
  status?: never;
789
896
  value?: never;
790
897
  comparisonSelection: GlobalDateComparisonSelection;
@@ -901,6 +1008,27 @@ export declare type DashboardPlanWarning = {
901
1008
  cardId?: string;
902
1009
  };
903
1010
 
1011
+ export declare type DashboardSqlExecutionTable = {
1012
+ connectionId: string;
1013
+ databaseName?: string;
1014
+ schemaName?: string;
1015
+ tableName: string;
1016
+ };
1017
+
1018
+ export declare type DashboardSqlFilterTargetResolution = {
1019
+ status: 'eligible';
1020
+ source: DashboardFilterTargetSource;
1021
+ executionIdentifier: string;
1022
+ } | {
1023
+ status: 'ineligible';
1024
+ };
1025
+
1026
+ export declare type DashboardSqlPinnedCatalogSource = {
1027
+ source: DashboardFilterTargetSource;
1028
+ /** Physical SQL coordinate declared by the pinned entity, when available. */
1029
+ executionTable?: DashboardSqlExecutionTable;
1030
+ };
1031
+
904
1032
  export declare type DashboardSuggestion = {
905
1033
  id: string;
906
1034
  title: string;
@@ -973,11 +1101,11 @@ declare type DateOptions = {
973
1101
  options: Intl.DateTimeFormatOptions;
974
1102
  };
975
1103
 
976
- declare type DateSelectionMode = 'range' | 'months';
1104
+ declare type DateSelectionMode = 'range' | 'months' | 'day';
977
1105
 
978
1106
  declare type DateUnit = 'day' | 'week' | 'month' | 'quarter' | 'year';
979
1107
 
980
- declare type DefaultDateFilter = RelativeDateFilter | FixedMonthDefaultDateFilter;
1108
+ declare type DefaultDateFilter = RelativeDateFilter | FixedMonthDefaultDateFilter | FixedDayDefaultDateFilter;
981
1109
 
982
1110
  /**
983
1111
  * Field configuration for detail table columns.
@@ -1348,6 +1476,14 @@ declare type EmailSettings = {
1348
1476
  senderTitle: string;
1349
1477
  };
1350
1478
 
1479
+ declare type EmbeddedFilterDashboardInput = DashboardInputBase & {
1480
+ kind: 'filter';
1481
+ filter: TFilter;
1482
+ filterReference?: never;
1483
+ optionSource?: DashboardFilterOptionSource;
1484
+ application?: DashboardFilterApplication;
1485
+ };
1486
+
1351
1487
  declare type EntityType = 'table' | 'view' | 'materialized view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
1352
1488
 
1353
1489
  declare interface Field {
@@ -1451,10 +1587,7 @@ declare interface FilterCondition {
1451
1587
  temporalBucket?: TemporalBucketMetadata;
1452
1588
  }
1453
1589
 
1454
- declare type FilterDashboardInput = DashboardInputBase & {
1455
- kind: 'filter';
1456
- filter: TFilter;
1457
- };
1590
+ declare type FilterDashboardInput = EmbeddedFilterDashboardInput | ReferencedFilterDashboardInput;
1458
1591
 
1459
1592
  /**
1460
1593
  * Display mode for individual filters
@@ -1564,6 +1697,23 @@ declare type FilterValue = string | number | boolean | Date | null | [number, nu
1564
1697
 
1565
1698
  export declare function findDashboardAuthoringDatasetForSource(datasets: readonly SemaphorSourceRef[], source: SemaphorSourceRef | undefined): SemaphorSourceRef | undefined;
1566
1699
 
1700
+ export declare function findDashboardCardExecutableSource(inventory: DashboardCardFilterSourceInventory, source: DashboardFilterTargetSource): DashboardFilterTargetSource | undefined;
1701
+
1702
+ export declare function findDashboardCardPinnedCatalogSource(inventory: DashboardCardFilterSourceInventory, source: DashboardFilterTargetSource): DashboardFilterTargetSource | undefined;
1703
+
1704
+ export declare function findDashboardSqlPinnedCatalogSource(inventory: DashboardCardFilterSourceInventory, source: DashboardFilterTargetSource): DashboardSqlPinnedCatalogSource | undefined;
1705
+
1706
+ /**
1707
+ * Absolute fixed calendar-day default used by Day Picker defaults.
1708
+ * - `date` is a timezone-agnostic calendar day (`YYYY-MM-DD`); it resolves to
1709
+ * that day's start/end in the dashboard timezone at load time.
1710
+ */
1711
+ declare type FixedDayDefaultDateFilter = {
1712
+ mode: 'fixed';
1713
+ unit: 'day';
1714
+ date: string;
1715
+ };
1716
+
1567
1717
  /**
1568
1718
  * Absolute fixed month/year default used by Month Picker defaults.
1569
1719
  * - `month` is 0-indexed (0=January, 11=December) to align with MonthPicker.
@@ -1623,6 +1773,8 @@ export declare type GeneratedDashboardCardArtifact = {
1623
1773
 
1624
1774
  export declare function getDashboardAuthoringCardSource(card: Pick<DashboardPlanCard, 'analyticsIntent'>): SemaphorSourceRef | undefined;
1625
1775
 
1776
+ export declare function getDashboardFilterSubscriptionHint(sql: string | null | undefined): DashboardFilterSubscriptionHint | null;
1777
+
1626
1778
  export declare function getTemporalBucketAuthoringOptions(granularity: SemaphorTimeGrain, preservedFormat?: TemporalBucketFormat, preferences?: ResolvedTemporalValueFormatPreferences): readonly TemporalBucketAuthoringOption[];
1627
1779
 
1628
1780
  export declare function getTemporalBucketAuthoringSelection(format: TemporalBucketFormat, granularity: SemaphorTimeGrain): TemporalBucketAuthoringSelection;
@@ -1654,6 +1806,12 @@ declare interface GroupByField extends Field {
1654
1806
  calculatedFormula?: CalculatedFieldFormula;
1655
1807
  }
1656
1808
 
1809
+ /**
1810
+ * Existing lightweight authoring hint for the exact plain collection helpers.
1811
+ * It is not SQL validation, execution, security, persistence, or save policy.
1812
+ */
1813
+ export declare function hasDashboardFilterSubscription(sql: string | null | undefined): boolean;
1814
+
1657
1815
  declare type HtmlOptions = {
1658
1816
  html: string;
1659
1817
  };
@@ -1731,6 +1889,8 @@ declare interface InteractionTrigger {
1731
1889
  field: Field;
1732
1890
  }
1733
1891
 
1892
+ export declare function isDashboardFilterOperationCompatible(dataType: unknown, operation: unknown): boolean;
1893
+
1734
1894
  export declare function isMaterializableDashboardAuthoringSource(value: unknown): value is MaterializableDashboardAuthoringSource;
1735
1895
 
1736
1896
  export declare function isSemaphorCartesianChartType(value: string | null | undefined): value is SemaphorCartesianChartType;
@@ -1877,6 +2037,34 @@ declare type MonthAlignedFiscalCalendar = {
1877
2037
 
1878
2038
  declare type NoneOptions = {};
1879
2039
 
2040
+ export declare function normalizeDashboardInputs({ inputs, dashboardFilters, cards, validateCardTargets, }: {
2041
+ inputs: DashboardInput[] | unknown;
2042
+ dashboardFilters: TFilter[] | undefined;
2043
+ cards?: TCard[];
2044
+ /** Save/validation boundary check. Runtime drift is owned per card by the compiler. */
2045
+ validateCardTargets?: boolean;
2046
+ }): NormalizeDashboardInputsResult;
2047
+
2048
+ export declare type NormalizeDashboardInputsResult = {
2049
+ ok: true;
2050
+ inputs: NormalizedDashboardInput[];
2051
+ } | {
2052
+ ok: false;
2053
+ inputs: NormalizedDashboardInput[];
2054
+ issues: DashboardFilterMappingContractIssue[];
2055
+ };
2056
+
2057
+ declare type NormalizedDashboardInput = NormalizedFilterDashboardInput | ControlDashboardInput;
2058
+
2059
+ /** Runtime form after dashboard-filter references are resolved once. */
2060
+ declare type NormalizedFilterDashboardInput = DashboardInputBase & {
2061
+ kind: 'filter';
2062
+ filter: TFilter;
2063
+ optionSource?: DashboardFilterOptionSource;
2064
+ application?: DashboardFilterApplication;
2065
+ definitionOrigin: 'embedded' | 'dashboardFilter';
2066
+ };
2067
+
1880
2068
  declare type NumberAxisFormat = {
1881
2069
  decimalPlaces?: number;
1882
2070
  minimumFractionDigits?: number;
@@ -1899,6 +2087,13 @@ declare type OldFilterValue = string | number | null | (string | number)[] | Ran
1899
2087
 
1900
2088
  declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
1901
2089
 
2090
+ declare const OPERATIONS_BY_DATA_TYPE: {
2091
+ readonly date: Set<string>;
2092
+ readonly number: Set<string>;
2093
+ readonly string: Set<string>;
2094
+ readonly boolean: Set<string>;
2095
+ };
2096
+
1902
2097
  declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'like' | 'not like' | 'in' | 'not in' | 'between' | 'not between' | 'isNull' | 'isNotNull';
1903
2098
 
1904
2099
  declare type OptionsMap = {
@@ -1997,6 +2192,17 @@ declare type RangeValue = {
1997
2192
 
1998
2193
  export declare function reconcileTemporalBucketAuthoringFormat(format: TemporalBucketFormat, granularity: SemaphorTimeGrain): TemporalBucketFormat;
1999
2194
 
2195
+ declare type ReferencedFilterDashboardInput = DashboardInputBase & {
2196
+ kind: 'filter';
2197
+ filter?: never;
2198
+ filterReference: {
2199
+ kind: 'dashboardFilter';
2200
+ filterId: string;
2201
+ };
2202
+ optionSource?: DashboardFilterOptionSource;
2203
+ application?: DashboardFilterApplication;
2204
+ };
2205
+
2000
2206
  declare type RelativeDateFilter = {
2001
2207
  mode: 'last';
2002
2208
  n: number;
@@ -2023,6 +2229,8 @@ declare type RelativeDateFilter = {
2023
2229
  to: number;
2024
2230
  };
2025
2231
 
2232
+ export declare function requireNormalizedDashboardInputs(params: Parameters<typeof normalizeDashboardInputs>[0]): NormalizedDashboardInput[];
2233
+
2026
2234
  /** Physical SQL/result alias used by config-owned detail projections. */
2027
2235
  export declare function resolveCanonicalDetailResultRawKey(field: CanonicalDetailResultFieldIdentity): string;
2028
2236
 
@@ -2048,6 +2256,31 @@ export declare function resolveDashboardAuthoringSource({ explicitSource, field,
2048
2256
  fallbackSources?: readonly SemaphorSourceRef[];
2049
2257
  }): MaterializableDashboardAuthoringSource | undefined;
2050
2258
 
2259
+ /**
2260
+ * Resolves the default Option Value target from proven executable candidates.
2261
+ * Authoring supplies catalog-grounded candidates. Runtime supplies only
2262
+ * governed value fields or previously accepted same-key bindings whose source
2263
+ * is executable by the card. The shared rule keeps UI suggestions and query
2264
+ * behavior from becoming separate interpreters without inventing columns from
2265
+ * source identity alone.
2266
+ */
2267
+ export declare function resolveDashboardFilterAutomaticTarget(params: {
2268
+ logicalValueField: DashboardFilterLogicalValueField;
2269
+ candidates: DashboardFilterTarget[];
2270
+ }): DashboardFilterAutomaticTargetResolution;
2271
+
2272
+ /**
2273
+ * Resolves one accepted SQL-card target without inspecting authored SQL.
2274
+ * Authoring may provide the grounded candidate set to reject an unqualified
2275
+ * duplicate. Runtime can prove an unqualified identifier remains unique only
2276
+ * while the card has one pinned source, so source drift fails closed.
2277
+ */
2278
+ export declare function resolveDashboardSqlFilterTarget(params: {
2279
+ inventory: DashboardCardFilterSourceInventory;
2280
+ target: DashboardFilterTarget;
2281
+ candidateTargets?: DashboardFilterTarget[];
2282
+ }): DashboardSqlFilterTargetResolution;
2283
+
2051
2284
  /** Viewer preferences that affect temporal presentation without numeric currency policy. */
2052
2285
  declare type ResolvedTemporalValueFormatPreferences = Pick<ResolvedValueFormatPreferences, 'locale' | 'dateStyle' | 'dateTime'>;
2053
2286
 
@@ -2215,17 +2448,12 @@ declare type SemaphorInputBinding = {
2215
2448
 
2216
2449
  declare type SemaphorInputOperator = '=' | '!=' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'between' | 'not_between' | '>' | '>=' | '<' | '<=';
2217
2450
 
2218
- declare type SemaphorInputOptionsIntent = {
2451
+ declare type SemaphorInputOptionsIntent = SemaphorInputOptionSource & {
2219
2452
  kind: 'inputOptions';
2220
2453
  version?: SemaphorProtocolVersion;
2221
2454
  id?: string;
2222
2455
  label?: string;
2223
2456
  inputId: string;
2224
- source: SemaphorSourceRef;
2225
- labelField: SemaphorFieldRef;
2226
- valueField: SemaphorFieldRef;
2227
- searchField?: SemaphorFieldRef;
2228
- disambiguationFields?: SemaphorFieldRef[];
2229
2457
  population?: SemaphorOptionPopulation;
2230
2458
  dependencies?: SemaphorOptionDependencies;
2231
2459
  search?: string;
@@ -2234,6 +2462,16 @@ declare type SemaphorInputOptionsIntent = {
2234
2462
  derivedFields?: SemaphorDerivedFieldDefinition[];
2235
2463
  };
2236
2464
 
2465
+ declare type SemaphorInputOptionSource = {
2466
+ source: Extract<SemaphorSourceRef, {
2467
+ kind: 'semantic' | 'physical';
2468
+ }>;
2469
+ labelField: SemaphorFieldRef;
2470
+ valueField: SemaphorFieldRef;
2471
+ searchField?: SemaphorFieldRef;
2472
+ disambiguationFields?: SemaphorFieldRef[];
2473
+ };
2474
+
2237
2475
  declare type SemaphorInputScope = {
2238
2476
  level: 'dashboard';
2239
2477
  excludeViewIds?: string[];
@@ -3340,7 +3578,7 @@ declare type TFilter = {
3340
3578
  type?: 'single' | 'multiple';
3341
3579
  uiType?: 'radio' | 'dropdown' | 'tabs';
3342
3580
  dateSelectionMode?: DateSelectionMode;
3343
- defaultValues?: (string | number)[];
3581
+ defaultValues?: (string | number | boolean)[];
3344
3582
  defaultDateFilter?: DefaultDateFilter;
3345
3583
  sheetId?: string;
3346
3584
  location?: FilterLocation;
@@ -3501,11 +3739,11 @@ declare type TInlineFilter = {
3501
3739
  type?: 'single' | 'multiple';
3502
3740
  /** UI component for single-select filters */
3503
3741
  uiType?: 'radio' | 'dropdown' | 'tabs';
3504
- /** Date picker type: 'range' for full calendar, 'months' for month picker */
3742
+ /** Date picker type: 'range' for full calendar, 'months' for month picker, 'day' for single-day picker */
3505
3743
  dateSelectionMode?: DateSelectionMode;
3506
3744
  /** Default values applied when the dashboard first loads */
3507
- defaultValues?: (string | number)[];
3508
- /** Default date filter applied on dashboard load (relative or fixed month/year) */
3745
+ defaultValues?: (string | number | boolean)[];
3746
+ /** Default date filter applied on dashboard load (relative, fixed month/year, or fixed day) */
3509
3747
  defaultDateFilter?: DefaultDateFilter;
3510
3748
  /** Search mode for numeric filters: 'text' treats as text, 'numeric' enables operators (>, <, =) */
3511
3749
  searchMode?: 'text' | 'numeric' | 'auto';
@@ -704,6 +704,51 @@ export declare type DashboardEventHandlers = {
704
704
  onExportData?: (payload: ExportDataPayload) => void;
705
705
  };
706
706
 
707
+ export declare type DashboardFilterApplication = {
708
+ kind: 'cardMappings';
709
+ /**
710
+ * Sparse grounded bindings and explicit exclusions. A missing config card
711
+ * may reuse a proven Option Value target on an executable source; it is not
712
+ * an implicit exclusion, and source identity alone is not field evidence.
713
+ */
714
+ cards: DashboardFilterCardApplication[];
715
+ };
716
+
717
+ export declare type DashboardFilterBoundCardApplication = {
718
+ kind: 'bound';
719
+ cardId: string;
720
+ bindingId: string;
721
+ target: DashboardFilterTarget;
722
+ };
723
+
724
+ export declare type DashboardFilterCardApplication = DashboardFilterBoundCardApplication | DashboardFilterExcludedCardApplication;
725
+
726
+ export declare type DashboardFilterExcludedCardApplication = {
727
+ kind: 'excluded';
728
+ cardId: string;
729
+ };
730
+
731
+ /** Persisted label/value option definition for a mapped dashboard filter. */
732
+ export declare type DashboardFilterOptionSource = SemaphorInputOptionSource;
733
+
734
+ export declare type DashboardFilterTarget = {
735
+ kind: 'field';
736
+ field: DashboardFilterTargetField;
737
+ };
738
+
739
+ /** Persisted, source-qualified field that a mapped filter targets. */
740
+ export declare type DashboardFilterTargetField = {
741
+ name: string;
742
+ source: DashboardFilterTargetSource;
743
+ dataType: 'string' | 'number' | 'boolean' | 'date' | 'datetime';
744
+ /** Catalog-grounded physical column used when it differs from the semantic name. */
745
+ sourceField?: string;
746
+ };
747
+
748
+ export declare type DashboardFilterTargetSource = Extract<SemaphorSourceRef, {
749
+ kind: 'semantic' | 'physical';
750
+ }>;
751
+
707
752
  export declare type DashboardInput = FilterDashboardInput | ControlDashboardInput;
708
753
 
709
754
  export declare type DashboardInputBase = {
@@ -773,14 +818,14 @@ export declare type DashboardInputScope = {
773
818
  sectionIds: string[];
774
819
  };
775
820
 
776
- export declare type DashboardInputSlot = ({
821
+ export declare type DashboardInputSlot = {
777
822
  status: 'set';
778
823
  value: DashboardInputValue;
779
824
  comparisonSelection?: GlobalDateComparisonSelection;
780
- }) | ({
825
+ } | {
781
826
  status: 'cleared';
782
827
  comparisonSelection?: GlobalDateComparisonSelection;
783
- }) | {
828
+ } | {
784
829
  status?: never;
785
830
  value?: never;
786
831
  comparisonSelection: GlobalDateComparisonSelection;
@@ -990,11 +1035,11 @@ export declare type DateOptions = {
990
1035
  options: Intl.DateTimeFormatOptions;
991
1036
  };
992
1037
 
993
- declare type DateSelectionMode = 'range' | 'months';
1038
+ declare type DateSelectionMode = 'range' | 'months' | 'day';
994
1039
 
995
1040
  declare type DateUnit = 'day' | 'week' | 'month' | 'quarter' | 'year';
996
1041
 
997
- declare type DefaultDateFilter = RelativeDateFilter | FixedMonthDefaultDateFilter;
1042
+ declare type DefaultDateFilter = RelativeDateFilter | FixedMonthDefaultDateFilter | FixedDayDefaultDateFilter;
998
1043
 
999
1044
  /**
1000
1045
  * Field configuration for detail table columns.
@@ -1444,6 +1489,14 @@ export declare type EmailSettings = {
1444
1489
  senderTitle: string;
1445
1490
  };
1446
1491
 
1492
+ export declare type EmbeddedFilterDashboardInput = DashboardInputBase & {
1493
+ kind: 'filter';
1494
+ filter: TFilter;
1495
+ filterReference?: never;
1496
+ optionSource?: DashboardFilterOptionSource;
1497
+ application?: DashboardFilterApplication;
1498
+ };
1499
+
1447
1500
  export declare const EMPTY_SELECTION: SelectionState;
1448
1501
 
1449
1502
  declare type EntityType = 'table' | 'view' | 'materialized view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
@@ -1560,10 +1613,7 @@ declare interface FilterCondition {
1560
1613
  temporalBucket?: TemporalBucketMetadata;
1561
1614
  }
1562
1615
 
1563
- export declare type FilterDashboardInput = DashboardInputBase & {
1564
- kind: 'filter';
1565
- filter: TFilter;
1566
- };
1616
+ export declare type FilterDashboardInput = EmbeddedFilterDashboardInput | ReferencedFilterDashboardInput;
1567
1617
 
1568
1618
  /**
1569
1619
  * Display mode for individual filters
@@ -1671,6 +1721,17 @@ declare type FilterSemanticContext = {
1671
1721
 
1672
1722
  declare type FilterValue = string | number | boolean | Date | null | [number, number] | [string, string] | string[] | number[];
1673
1723
 
1724
+ /**
1725
+ * Absolute fixed calendar-day default used by Day Picker defaults.
1726
+ * - `date` is a timezone-agnostic calendar day (`YYYY-MM-DD`); it resolves to
1727
+ * that day's start/end in the dashboard timezone at load time.
1728
+ */
1729
+ declare type FixedDayDefaultDateFilter = {
1730
+ mode: 'fixed';
1731
+ unit: 'day';
1732
+ date: string;
1733
+ };
1734
+
1674
1735
  /**
1675
1736
  * Absolute fixed month/year default used by Month Picker defaults.
1676
1737
  * - `month` is 0-indexed (0=January, 11=December) to align with MonthPicker.
@@ -2067,6 +2128,17 @@ declare type MonthAlignedFiscalCalendar = {
2067
2128
 
2068
2129
  declare type NoneOptions = {};
2069
2130
 
2131
+ export declare type NormalizedDashboardInput = NormalizedFilterDashboardInput | ControlDashboardInput;
2132
+
2133
+ /** Runtime form after dashboard-filter references are resolved once. */
2134
+ export declare type NormalizedFilterDashboardInput = DashboardInputBase & {
2135
+ kind: 'filter';
2136
+ filter: TFilter;
2137
+ optionSource?: DashboardFilterOptionSource;
2138
+ application?: DashboardFilterApplication;
2139
+ definitionOrigin: 'embedded' | 'dashboardFilter';
2140
+ };
2141
+
2070
2142
  export declare type NumberAxisFormat = {
2071
2143
  decimalPlaces?: number;
2072
2144
  minimumFractionDigits?: number;
@@ -2224,6 +2296,17 @@ declare type RawTemporalPresentationTarget = {
2224
2296
  columnKey: string;
2225
2297
  };
2226
2298
 
2299
+ export declare type ReferencedFilterDashboardInput = DashboardInputBase & {
2300
+ kind: 'filter';
2301
+ filter?: never;
2302
+ filterReference: {
2303
+ kind: 'dashboardFilter';
2304
+ filterId: string;
2305
+ };
2306
+ optionSource?: DashboardFilterOptionSource;
2307
+ application?: DashboardFilterApplication;
2308
+ };
2309
+
2227
2310
  declare type RelativeDateFilter = {
2228
2311
  mode: 'last';
2229
2312
  n: number;
@@ -2296,6 +2379,8 @@ export declare type ResolvedDashboardInput = {
2296
2379
  exports: Partial<Record<DashboardInputExportKey, string | number | boolean | null>>;
2297
2380
  filter?: TFilter;
2298
2381
  filterValue?: TFilterValue;
2382
+ /** Present when a set filter slot cannot be used with its current definition. */
2383
+ invalidFilterSelection?: boolean;
2299
2384
  control?: ControlDefinition;
2300
2385
  controlValue?: unknown;
2301
2386
  missingRequiredValue?: boolean;
@@ -2303,7 +2388,7 @@ export declare type ResolvedDashboardInput = {
2303
2388
  };
2304
2389
 
2305
2390
  export declare type ResolvedDashboardInputContext = {
2306
- inputs: DashboardInput[];
2391
+ inputs: NormalizedDashboardInput[];
2307
2392
  resolvedInputs: ResolvedDashboardInput[];
2308
2393
  activeFilters: TFilterValue[];
2309
2394
  controlDefinitions: ControlDefinition[];
@@ -2551,6 +2636,16 @@ declare type SemaphorInputBinding = {
2551
2636
 
2552
2637
  declare type SemaphorInputOperator = '=' | '!=' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'between' | 'not_between' | '>' | '>=' | '<' | '<=';
2553
2638
 
2639
+ declare type SemaphorInputOptionSource = {
2640
+ source: Extract<SemaphorSourceRef, {
2641
+ kind: 'semantic' | 'physical';
2642
+ }>;
2643
+ labelField: SemaphorFieldRef;
2644
+ valueField: SemaphorFieldRef;
2645
+ searchField?: SemaphorFieldRef;
2646
+ disambiguationFields?: SemaphorFieldRef[];
2647
+ };
2648
+
2554
2649
  declare type SemaphorMatrixAxisExpansionOptions = {
2555
2650
  defaultDepth?: number;
2556
2651
  lazy?: boolean;
@@ -3584,7 +3679,7 @@ declare type TFilter = {
3584
3679
  type?: 'single' | 'multiple';
3585
3680
  uiType?: 'radio' | 'dropdown' | 'tabs';
3586
3681
  dateSelectionMode?: DateSelectionMode;
3587
- defaultValues?: (string | number)[];
3682
+ defaultValues?: (string | number | boolean)[];
3588
3683
  defaultDateFilter?: DefaultDateFilter;
3589
3684
  sheetId?: string;
3590
3685
  location?: FilterLocation;
@@ -3753,11 +3848,11 @@ export declare type TInlineFilter = {
3753
3848
  type?: 'single' | 'multiple';
3754
3849
  /** UI component for single-select filters */
3755
3850
  uiType?: 'radio' | 'dropdown' | 'tabs';
3756
- /** Date picker type: 'range' for full calendar, 'months' for month picker */
3851
+ /** Date picker type: 'range' for full calendar, 'months' for month picker, 'day' for single-day picker */
3757
3852
  dateSelectionMode?: DateSelectionMode;
3758
3853
  /** Default values applied when the dashboard first loads */
3759
- defaultValues?: (string | number)[];
3760
- /** Default date filter applied on dashboard load (relative or fixed month/year) */
3854
+ defaultValues?: (string | number | boolean)[];
3855
+ /** Default date filter applied on dashboard load (relative, fixed month/year, or fixed day) */
3761
3856
  defaultDateFilter?: DefaultDateFilter;
3762
3857
  /** Search mode for numeric filters: 'text' treats as text, 'numeric' enables operators (>, <, =) */
3763
3858
  searchMode?: 'text' | 'numeric' | 'auto';
@@ -646,17 +646,12 @@ declare type SemaphorInputBinding = {
646
646
 
647
647
  declare type SemaphorInputOperator = '=' | '!=' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'between' | 'not_between' | '>' | '>=' | '<' | '<=';
648
648
 
649
- declare type SemaphorInputOptionsIntent = {
649
+ declare type SemaphorInputOptionsIntent = SemaphorInputOptionSource & {
650
650
  kind: 'inputOptions';
651
651
  version?: SemaphorProtocolVersion;
652
652
  id?: string;
653
653
  label?: string;
654
654
  inputId: string;
655
- source: SemaphorSourceRef;
656
- labelField: SemaphorFieldRef;
657
- valueField: SemaphorFieldRef;
658
- searchField?: SemaphorFieldRef;
659
- disambiguationFields?: SemaphorFieldRef[];
660
655
  population?: SemaphorOptionPopulation;
661
656
  dependencies?: SemaphorOptionDependencies;
662
657
  search?: string;
@@ -665,6 +660,16 @@ declare type SemaphorInputOptionsIntent = {
665
660
  derivedFields?: SemaphorDerivedFieldDefinition[];
666
661
  };
667
662
 
663
+ declare type SemaphorInputOptionSource = {
664
+ source: Extract<SemaphorSourceRef, {
665
+ kind: 'semantic' | 'physical';
666
+ }>;
667
+ labelField: SemaphorFieldRef;
668
+ valueField: SemaphorFieldRef;
669
+ searchField?: SemaphorFieldRef;
670
+ disambiguationFields?: SemaphorFieldRef[];
671
+ };
672
+
668
673
  declare type SemaphorMatrixAxisExpansionOptions = {
669
674
  defaultDepth?: number;
670
675
  lazy?: boolean;