react-semaphor 0.1.444 → 0.1.445

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 (133) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/analytics-protocol/index.cjs +1 -1
  3. package/dist/analytics-protocol/index.js +123 -107
  4. package/dist/appearance/index.cjs +1 -1
  5. package/dist/brand-studio/index.cjs +2 -2
  6. package/dist/brand-studio/index.js +5 -4
  7. package/dist/briefings/index.cjs +1 -1
  8. package/dist/briefings/index.js +526 -457
  9. package/dist/chunks/analyze-result-contract-BHb7sUUW.cjs +1 -0
  10. package/dist/chunks/analyze-result-contract-DUv3QnMl.js +29 -0
  11. package/dist/chunks/{braces-CbO-aIwH.js → braces-BKimshER.cjs} +1 -1
  12. package/dist/chunks/{code-editor-BpADiIlq.js → code-editor-B4gTfvc5.js} +6800 -6560
  13. package/dist/chunks/code-editor-BYVorgOf.cjs +138 -0
  14. package/dist/chunks/common-types-CQ6SHfLk.cjs +1 -0
  15. package/dist/chunks/{common-types-ClkOI-3O.js → common-types-DFsDdpH7.js} +22 -21
  16. package/dist/chunks/dashboard-CAiwJW3L.cjs +1397 -0
  17. package/dist/chunks/{dashboard-briefing-launcher-Bg_SeBV8.js → dashboard-briefing-launcher-2SLNOaTg.js} +26 -24
  18. package/dist/chunks/{dashboard-briefing-launcher-Do6ZcOj4.js → dashboard-briefing-launcher-CHwjpUYz.cjs} +2 -2
  19. package/dist/chunks/{dashboard-controls-Da9MkPaf.js → dashboard-controls-BfL14aqO.js} +11 -9
  20. package/dist/chunks/{dashboard-controls-CYBi_mes.js → dashboard-controls-BgGTg4yw.cjs} +2 -2
  21. package/dist/chunks/dashboard-date-comparison-definition-DZq0htjG.cjs +1 -0
  22. package/dist/chunks/dashboard-json-BOv8tCa9.cjs +1 -0
  23. package/dist/chunks/{dashboard-json-BtrdGo1U.js → dashboard-json-BZwq3EcS.js} +14 -12
  24. package/dist/chunks/{dashboard-CJNVq8XI.js → dashboard-u61yfU6u.js} +50081 -47351
  25. package/dist/chunks/edit-dashboard-visual-BdVCH0DJ.cjs +182 -0
  26. package/dist/chunks/{edit-dashboard-visual-kE6_3R3j.js → edit-dashboard-visual-njLPYip3.js} +6799 -6652
  27. package/dist/chunks/{editor-action-buttons-DROkx4PS.js → editor-action-buttons-BhLX5Q6m.js} +24 -23
  28. package/dist/chunks/{editor-action-buttons-8_CQa8Hb.js → editor-action-buttons-CBVMFipA.cjs} +1 -1
  29. package/dist/chunks/{index-D7KJindZ.js → format-types-CSv0V7mm.cjs} +1 -1
  30. package/dist/chunks/{index-CnujJ3fa.js → format-types-CZH5w1lo.js} +23 -17
  31. package/dist/chunks/{layout-grid-B08pP7v6.js → layout-grid-3-HWzEwU.cjs} +1 -1
  32. package/dist/chunks/{metric-comparison-CPoDx56y.js → metric-comparison-BJ_Qu1ZF.js} +1 -1
  33. package/dist/chunks/metric-comparison-CUAJ8n4y.cjs +1 -0
  34. package/dist/chunks/{palette-C0yjT5Tv.js → palette-DW_l7Jr0.cjs} +1 -1
  35. package/dist/chunks/pivot-result-identity-B6QCWOSi.js +94 -0
  36. package/dist/chunks/pivot-result-identity-CDLRT-YG.cjs +1 -0
  37. package/dist/chunks/pivot-result-lifecycle-BM3Pl-D1.js +914 -0
  38. package/dist/chunks/pivot-result-lifecycle-DPc0ANwk.cjs +4 -0
  39. package/dist/chunks/presentation-execution-BTV-Q43g.cjs +1 -0
  40. package/dist/chunks/presentation-execution-CGlb7YZ6.js +637 -0
  41. package/dist/chunks/{report-preferences-dialog-Dq7rmN93.js → report-preferences-dialog-D_NJu2wU.js} +7 -6
  42. package/dist/chunks/report-preferences-dialog-r8QzOSFb.cjs +1 -0
  43. package/dist/chunks/report-runtime-context-C8LZFsqV.cjs +1 -0
  44. package/dist/chunks/report-runtime-context-Qzn11HQe.js +387 -0
  45. package/dist/chunks/{save-Xdc4pnys.js → save-4_uMnE6s.cjs} +1 -1
  46. package/dist/chunks/{search-Dcud9ajy.js → search-6ZmeMq55.cjs} +1 -1
  47. package/dist/chunks/temporal-bucket-BnPxGrAi.js +446 -0
  48. package/dist/chunks/temporal-bucket-authoring-BUZMuVca.js +205 -0
  49. package/dist/chunks/temporal-bucket-authoring-CPTwHzvs.cjs +1 -0
  50. package/dist/chunks/temporal-bucket-contract-B2bJ1oe4.js +108 -0
  51. package/dist/chunks/temporal-bucket-contract-ChDBWX8I.cjs +1 -0
  52. package/dist/chunks/temporal-bucket-pMnV-4Nj.cjs +1 -0
  53. package/dist/chunks/{comparison-document-migration-Dj6xZMCb.js → temporal-result-owner-Cb27SSG9.js} +152 -123
  54. package/dist/chunks/temporal-result-owner-f6-i65Fb.cjs +1 -0
  55. package/dist/chunks/token-types-BdQ8kHBm.cjs +1 -0
  56. package/dist/chunks/token-types-DLo91nOf.js +8 -0
  57. package/dist/chunks/{update-policy-DnF_74zC.js → update-policy-BxvYMYz0.cjs} +1 -1
  58. package/dist/chunks/{update-policy-De2NswtM.js → update-policy-eg59mQqv.js} +1 -1
  59. package/dist/chunks/validators-9D4KBqKD.cjs +1 -0
  60. package/dist/chunks/validators-wZ2WlNHc.js +4640 -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 +136 -126
  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 +2 -2
  72. package/dist/data-app-sdk/index.js +34 -35
  73. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  74. package/dist/data-app-sdk-adapters/index.js +5 -5
  75. package/dist/data-app-sdk-validation/index.cjs +1 -1
  76. package/dist/data-app-sdk-validation/index.js +9 -10
  77. package/dist/format-utils/index.cjs +3 -3
  78. package/dist/format-utils/index.js +155 -176
  79. package/dist/index.cjs +1 -1
  80. package/dist/index.js +180 -174
  81. package/dist/report-runtime-context/index.cjs +1 -1
  82. package/dist/report-runtime-context/index.js +7 -392
  83. package/dist/shared/index.cjs +1 -1
  84. package/dist/style.css +1 -1
  85. package/dist/surfboard/index.cjs +1 -1
  86. package/dist/surfboard/index.js +3 -3
  87. package/dist/types/analytics-protocol.d.ts +257 -48
  88. package/dist/types/briefings.d.ts +138 -50
  89. package/dist/types/dashboard-assistant.d.ts +207 -52
  90. package/dist/types/dashboard-authoring.d.ts +182 -50
  91. package/dist/types/dashboard.d.ts +290 -48
  92. package/dist/types/data-app-builder.d.ts +48 -42
  93. package/dist/types/data-app-codegen-node.d.ts +50 -44
  94. package/dist/types/data-app-codegen.d.ts +50 -44
  95. package/dist/types/data-app-sdk-adapters.d.ts +48 -42
  96. package/dist/types/data-app-sdk-validation.d.ts +81 -43
  97. package/dist/types/data-app-sdk.d.ts +83 -45
  98. package/dist/types/format-utils.d.ts +645 -67
  99. package/dist/types/index.cjs +1 -1
  100. package/dist/types/index.js +19 -19
  101. package/dist/types/main.d.ts +298 -94
  102. package/dist/types/report-runtime-context.d.ts +3 -0
  103. package/dist/types/shared.d.ts +116 -41
  104. package/dist/types/surfboard.d.ts +290 -48
  105. package/dist/types/types.d.ts +455 -65
  106. package/package.json +3 -1
  107. package/dist/chunks/analyze-result-contract-BswhsmWT.js +0 -1
  108. package/dist/chunks/analyze-result-contract-CfOBEwaC.js +0 -1998
  109. package/dist/chunks/code-editor-M7HTUhdF.js +0 -138
  110. package/dist/chunks/common-types-C73-Ud1-.js +0 -1
  111. package/dist/chunks/comparison-document-migration-DbU_BTxR.js +0 -1
  112. package/dist/chunks/csv-utils-BZDvO2Fw.js +0 -376
  113. package/dist/chunks/csv-utils-Co0WxHke.js +0 -4
  114. package/dist/chunks/dashboard-DxZuqe8t.js +0 -1402
  115. package/dist/chunks/dashboard-date-comparison-definition-DGZr3m-b.js +0 -1
  116. package/dist/chunks/dashboard-json-ezLyW7AK.js +0 -1
  117. package/dist/chunks/edit-dashboard-visual-DEb9MeSM.js +0 -182
  118. package/dist/chunks/metric-comparison-DVy3fll_.js +0 -1
  119. package/dist/chunks/numeric-presentation-BJs5lSar.js +0 -517
  120. package/dist/chunks/numeric-presentation-Dlb-Dk4c.js +0 -1
  121. package/dist/chunks/report-preferences-dialog-D5sIaFnb.js +0 -1
  122. package/dist/chunks/source-identity-5OPV4gvg.js +0 -92
  123. package/dist/chunks/source-identity-Cbo2LOHQ.js +0 -1
  124. package/dist/chunks/validators-B2vUAqTf.js +0 -1
  125. package/dist/chunks/validators-Bce_J7Vd.js +0 -2448
  126. /package/dist/chunks/{card-config-utils-15sRtebL.js → card-config-utils-15sRtebL.cjs} +0 -0
  127. /package/dist/chunks/{catalog-field-grounding-Bnx-3tE0.js → catalog-field-grounding-Bnx-3tE0.cjs} +0 -0
  128. /package/dist/chunks/{dashboard-input-contract-DV3cshjz.js → dashboard-input-contract-DV3cshjz.cjs} +0 -0
  129. /package/dist/chunks/{index-Dpm_VET4.js → index-Dpm_VET4.cjs} +0 -0
  130. /package/dist/chunks/{index-jSrCwPQz.js → index-jSrCwPQz.cjs} +0 -0
  131. /package/dist/chunks/{normalize-dashboard-for-dirty-check-BXRUMVb2.js → normalize-dashboard-for-dirty-check-BXRUMVb2.cjs} +0 -0
  132. /package/dist/chunks/{operators-DrTQsJXv.js → operators-DrTQsJXv.cjs} +0 -0
  133. /package/dist/chunks/{use-debounced-dirty-check-XHSwAefL.js → use-debounced-dirty-check-XHSwAefL.cjs} +0 -0
@@ -25,7 +25,7 @@ declare type MatrixAxisLevelDescriptor = {
25
25
  fieldKey: string;
26
26
  label: string;
27
27
  field: SemaphorFieldRef;
28
- grain?: SemaphorTimeGrain;
28
+ grain?: SemaphorMatrixTimeGrain;
29
29
  subtotal?: SemaphorMatrixSubtotalOptions;
30
30
  };
31
31
 
@@ -207,7 +207,7 @@ declare type MatrixMeasureDescriptor = {
207
207
  label: string;
208
208
  field: SemaphorFieldRef;
209
209
  aggregate?: SemaphorAggregateFunction;
210
- format?: SemaphorValueFormat;
210
+ format?: SemaphorScalarValueFormat;
211
211
  totalBehavior?: SemaphorMatrixTotalCalculation;
212
212
  };
213
213
 
@@ -221,7 +221,7 @@ declare type MatrixMeasureSemantics = {
221
221
  } | {
222
222
  kind: 'semiAdditive';
223
223
  aggregate?: SemaphorAggregateFunction;
224
- grain?: SemaphorTimeGrain;
224
+ grain?: SemaphorMatrixTimeGrain;
225
225
  } | {
226
226
  kind: 'nonAdditive';
227
227
  aggregate?: SemaphorAggregateFunction;
@@ -367,6 +367,10 @@ export declare const semaphor: {
367
367
  matrix(spec: SemaphorMatrixQuerySpec): SemaphorMatrixQueryDefinition;
368
368
  };
369
369
 
370
+ declare const SEMAPHOR_MATRIX_TIME_GRAINS: ["hour", "day", "week", "month", "quarter", "year"];
371
+
372
+ declare const SEMAPHOR_TIME_GRAINS: readonly ["second", "minute", "hour", "day", "week", "month", "quarter", "year"];
373
+
370
374
  declare type SemaphorAbsoluteTimeWindow = {
371
375
  kind: 'absolute';
372
376
  start: string;
@@ -861,7 +865,7 @@ export declare type SemaphorDerivedFieldDefinition = {
861
865
  defaultAggregate?: SemaphorAggregateFunction;
862
866
  aggregationBehavior?: SemaphorDerivedFieldAggregationBehavior;
863
867
  aggregationStrategy?: SemaphorDerivedFieldAggregationStrategy;
864
- format?: SemaphorValueFormat;
868
+ format?: SemaphorScalarValueFormat;
865
869
  tags?: string[];
866
870
  };
867
871
 
@@ -1054,7 +1058,7 @@ declare type SemaphorMatrixAxisExpansionOptions = {
1054
1058
  export declare type SemaphorMatrixAxisLevel = {
1055
1059
  id?: string;
1056
1060
  field: SemaphorFieldRef;
1057
- grain?: SemaphorTimeGrain;
1061
+ grain?: SemaphorMatrixTimeGrain;
1058
1062
  label?: string;
1059
1063
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
1060
1064
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -1205,6 +1209,8 @@ declare type SemaphorMatrixSubtotalOptions = {
1205
1209
  label?: string;
1206
1210
  };
1207
1211
 
1212
+ declare type SemaphorMatrixTimeGrain = (typeof SEMAPHOR_MATRIX_TIME_GRAINS)[number];
1213
+
1208
1214
  declare type SemaphorMatrixTotalCalculation = {
1209
1215
  kind: 'defaultAggregate';
1210
1216
  } | {
@@ -1240,7 +1246,7 @@ export declare type SemaphorMatrixValueField = {
1240
1246
  field: SemaphorFieldRef;
1241
1247
  aggregate?: SemaphorAggregateFunction;
1242
1248
  label?: string;
1243
- format?: SemaphorValueFormat;
1249
+ format?: SemaphorScalarValueFormat;
1244
1250
  totalBehavior?: SemaphorMatrixTotalCalculation;
1245
1251
  };
1246
1252
 
@@ -1373,6 +1379,30 @@ export declare type SemaphorPaginationRequest = {
1373
1379
  pageSize: number;
1374
1380
  };
1375
1381
 
1382
+ declare type SemaphorPivotResultColumnIdentity = {
1383
+ metricId: string;
1384
+ /** Collision-safe identity for this configured metric instance. */
1385
+ metricAlias: string;
1386
+ /**
1387
+ * Sole transported tuple identity in configured pivot-axis order. A leaf
1388
+ * carries the complete tuple, a subtotal carries its explicit prefix, and a
1389
+ * metric-only or grand-total column carries an empty tuple.
1390
+ */
1391
+ members: SemaphorPivotResultMember[];
1392
+ };
1393
+
1394
+ declare type SemaphorPivotResultMember = {
1395
+ /** Stable identity of the configured pivot field. */
1396
+ fieldId: string;
1397
+ /** Canonical pivot member value; labels are resolved only at presentation. */
1398
+ value: SemaphorPivotValue;
1399
+ /** Present when this member is an activated governed temporal bucket. */
1400
+ temporalBucket?: TemporalBucketMetadata;
1401
+ };
1402
+
1403
+ /** Stable canonical scalar transported for one physical pivot member. */
1404
+ declare type SemaphorPivotValue = string | null;
1405
+
1376
1406
  declare type SemaphorProtocolIssue = {
1377
1407
  code: string;
1378
1408
  message: string;
@@ -1568,7 +1598,7 @@ declare type SemaphorRelationshipHint = {
1568
1598
 
1569
1599
  declare type SemaphorRelativeTimeWindow = {
1570
1600
  kind?: 'relative';
1571
- unit: 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
1601
+ unit: SemaphorTimeGrain;
1572
1602
  value: number;
1573
1603
  anchor?: 'now' | 'latest_available';
1574
1604
  completeness?: 'include_partial' | 'complete_periods';
@@ -1593,12 +1623,51 @@ export declare type SemaphorResultColumn = {
1593
1623
  aggregate?: SemaphorFieldRef['aggregate'];
1594
1624
  source?: SemaphorFieldRef['source'];
1595
1625
  derivedField?: SemaphorDerivedFieldDefinition;
1626
+ temporalBucket?: TemporalBucketMetadata;
1627
+ pivotIdentity?: SemaphorPivotResultColumnIdentity;
1596
1628
  };
1597
1629
 
1598
1630
  export declare type SemaphorRowsQueryResult<TRecord extends Record<string, unknown> = Record<string, unknown>> = SemaphorRecordsQueryResult<TRecord> | SemaphorSqlQueryResult<TRecord>;
1599
1631
 
1600
1632
  export declare type SemaphorScalar = string | number | boolean | null;
1601
1633
 
1634
+ declare type SemaphorScalarValueFormat = {
1635
+ type: 'number' | 'currency' | 'percent' | 'percentage' | 'scientific';
1636
+ minimumFractionDigits?: number;
1637
+ maximumFractionDigits?: number;
1638
+ useGrouping?: boolean;
1639
+ prefix?: string;
1640
+ suffix?: string;
1641
+ negativeStyle?: 'minus' | 'parentheses';
1642
+ compact?: boolean;
1643
+ scale?: number;
1644
+ currency?: string;
1645
+ percentValueMode?: 'fraction' | 'whole';
1646
+ } | {
1647
+ type: 'date' | 'datetime';
1648
+ locale?: string;
1649
+ pattern?: string;
1650
+ relative?: boolean;
1651
+ timezone?: string;
1652
+ sourceTimezone?: string;
1653
+ prefix?: string;
1654
+ suffix?: string;
1655
+ } | {
1656
+ type: 'duration';
1657
+ inputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
1658
+ outputStyle?: 'compact' | 'digital' | 'long';
1659
+ largestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
1660
+ smallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
1661
+ maxUnits?: number;
1662
+ prefix?: string;
1663
+ suffix?: string;
1664
+ negativeStyle?: 'minus' | 'parentheses';
1665
+ } | {
1666
+ type: 'string';
1667
+ prefix?: string;
1668
+ suffix?: string;
1669
+ };
1670
+
1602
1671
  export declare type SemaphorSemanticSourceBuilderSpec = {
1603
1672
  domainId: string;
1604
1673
  datasetName: string;
@@ -1711,53 +1780,22 @@ export declare type SemaphorSqlSourceSpec = {
1711
1780
  }>;
1712
1781
  };
1713
1782
 
1714
- declare type SemaphorTimeGrain = 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
1783
+ declare type SemaphorTimeGrain = (typeof SEMAPHOR_TIME_GRAINS)[number];
1715
1784
 
1716
1785
  export declare type SemaphorTimeWindow = SemaphorRelativeTimeWindow | SemaphorAbsoluteTimeWindow;
1717
1786
 
1718
- declare type SemaphorValueFormat = {
1719
- type: 'number' | 'currency' | 'percent' | 'percentage' | 'scientific';
1720
- minimumFractionDigits?: number;
1721
- maximumFractionDigits?: number;
1722
- useGrouping?: boolean;
1723
- prefix?: string;
1724
- suffix?: string;
1725
- negativeStyle?: 'minus' | 'parentheses';
1726
- compact?: boolean;
1727
- scale?: number;
1728
- currency?: string;
1729
- percentValueMode?: 'fraction' | 'whole';
1730
- } | {
1731
- type: 'date' | 'datetime';
1732
- locale?: string;
1733
- pattern?: string;
1734
- relative?: boolean;
1735
- timezone?: string;
1736
- sourceTimezone?: string;
1737
- prefix?: string;
1738
- suffix?: string;
1739
- } | {
1740
- type: 'duration';
1741
- inputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
1742
- outputStyle?: 'compact' | 'digital' | 'long';
1743
- largestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
1744
- smallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
1745
- maxUnits?: number;
1746
- prefix?: string;
1747
- suffix?: string;
1748
- negativeStyle?: 'minus' | 'parentheses';
1749
- } | {
1750
- type: 'string';
1751
- prefix?: string;
1752
- suffix?: string;
1753
- };
1754
-
1755
1787
  export declare function SemaphorViewBoundary({ id, title, children, }: {
1756
1788
  id: string;
1757
1789
  title?: string;
1758
1790
  children: ReactNode;
1759
1791
  }): ReactElement;
1760
1792
 
1793
+ declare type TemporalBucketMetadata = {
1794
+ kind: 'temporal_bucket';
1795
+ granularity: SemaphorTimeGrain;
1796
+ calendar: Pick<CalendarContext, 'tz' | 'weekStart' | 'fiscalCalendar'>;
1797
+ };
1798
+
1761
1799
  export declare function useClearInvalidSemaphorInputValue(input: SemaphorInputHandle, optionsResult: Pick<SemaphorInputOptionsQueryResult, 'options' | 'status'> | undefined): void;
1762
1800
 
1763
1801
  export declare function useSemaphorDevtools(): SemaphorDataAppDevtoolsState;