react-semaphor 0.1.449 → 0.1.454

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 (147) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +119 -112
  3. package/dist/appearance/index.cjs +1 -1
  4. package/dist/appearance/index.js +1 -1
  5. package/dist/brand-studio/index.cjs +4 -4
  6. package/dist/brand-studio/index.js +15 -13
  7. package/dist/briefings/index.cjs +1 -1
  8. package/dist/briefings/index.js +39 -2131
  9. package/dist/chunks/{analyze-result-contract-T-0Ntzys.js → analyze-result-contract-BbRJ-C06.js} +1 -1
  10. package/dist/chunks/{analyze-result-contract-BHb7sUUW.cjs → analyze-result-contract-LPDNldic.cjs} +1 -1
  11. package/dist/chunks/canonical-result-keys-BA0HCP4e.cjs +1 -0
  12. package/dist/chunks/canonical-result-keys-D6avdjpA.js +467 -0
  13. package/dist/chunks/color-CJvdlFM_.js +2162 -0
  14. package/dist/chunks/color-CyB5o13F.cjs +4 -0
  15. package/dist/chunks/{common-types-CQ6SHfLk.cjs → common-types-C57kJ59w.cjs} +1 -1
  16. package/dist/chunks/{common-types-B7Jk3Rtj.js → common-types-H51FLKB7.js} +1 -1
  17. package/dist/chunks/contracts-CoCOpd_i.js +11 -0
  18. package/dist/chunks/contracts-CtB2VONT.cjs +1 -0
  19. package/dist/chunks/dashboard-briefing-launcher-Dwj1i7lr.cjs +26 -0
  20. package/dist/chunks/{dashboard-briefing-launcher-DCHiEkLE.js → dashboard-briefing-launcher-SYroFdae.js} +86 -84
  21. package/dist/chunks/{dashboard-controls-DwRFCcHV.js → dashboard-controls-1LpeU2sz.js} +15 -13
  22. package/dist/chunks/{dashboard-controls-CaFioayc.cjs → dashboard-controls-CpFoh7-A.cjs} +1 -1
  23. package/dist/chunks/dashboard-date-comparison-definition-Ces4alFm.cjs +1 -0
  24. package/dist/chunks/{dashboard-date-comparison-definition-Ba-clViK.js → dashboard-date-comparison-definition-DC3ekV2S.js} +1 -1
  25. package/dist/chunks/{dashboard-json-WoILbfTe.js → dashboard-json-D-T-sQxU.js} +25 -23
  26. package/dist/chunks/dashboard-json-DwSQopc_.cjs +1 -0
  27. package/dist/chunks/edit-dashboard-visual-BEmoQAET.cjs +172 -0
  28. package/dist/chunks/{edit-dashboard-visual-ciFhxqaI.js → edit-dashboard-visual-DqxUq4Bs.js} +6925 -6947
  29. package/dist/chunks/editor-action-buttons-18r2xwei.cjs +16 -0
  30. package/dist/chunks/{editor-action-buttons-BPo_45pM.js → editor-action-buttons-B2l3WIRC.js} +41 -39
  31. package/dist/chunks/format-types-CFHQoIuk.js +1350 -0
  32. package/dist/chunks/format-types-PSZZ7hG8.cjs +1 -0
  33. package/dist/chunks/index-Bn5wlkHt.cjs +4 -0
  34. package/dist/chunks/index-ByFbacH7.cjs +1 -0
  35. package/dist/chunks/index-CACdoqu3.js +318 -0
  36. package/dist/chunks/index-CLB_NGZ8.cjs +1392 -0
  37. package/dist/chunks/index-Ca784dpx.js +3714 -0
  38. package/dist/chunks/{index-CPuawpXJ.js → index-DAoS4BNU.js} +48514 -48484
  39. package/dist/chunks/index-DSKR3nKn.js +421 -0
  40. package/dist/chunks/index-F25jnH0p.cjs +1 -0
  41. package/dist/chunks/matrix-result-contract-CofATICL.js +437 -0
  42. package/dist/chunks/matrix-result-contract-zamd9euI.cjs +1 -0
  43. package/dist/chunks/pivot-header-presentation-DhyQXxKq.cjs +4 -0
  44. package/dist/chunks/pivot-header-presentation-ckYOQ4aZ.js +557 -0
  45. package/dist/chunks/{pivot-result-identity-CDLRT-YG.cjs → pivot-result-identity-Bb4EixVN.cjs} +1 -1
  46. package/dist/chunks/{pivot-result-identity-CwJWpKI7.js → pivot-result-identity-DU1v-5Xk.js} +1 -1
  47. package/dist/chunks/pivot-result-lifecycle-DmcF1ris.cjs +1 -0
  48. package/dist/chunks/pivot-result-lifecycle-sjzIOpvp.js +1641 -0
  49. package/dist/chunks/raw-temporal-contract-BtjH_G-d.cjs +1 -0
  50. package/dist/chunks/raw-temporal-contract-CxncLze5.js +64 -0
  51. package/dist/chunks/report-preferences-dialog-BgSvlDXa.cjs +1 -0
  52. package/dist/chunks/report-preferences-dialog-DDc2WUa0.js +723 -0
  53. package/dist/chunks/{report-runtime-context-C8LZFsqV.cjs → report-runtime-context-DqxS4wbi.cjs} +1 -1
  54. package/dist/chunks/{report-runtime-context-bCy3CVzK.js → report-runtime-context-SM6YO61_.js} +5 -5
  55. package/dist/chunks/saved-temporal-bucket-format-CFfWXRl9.cjs +1 -0
  56. package/dist/chunks/saved-temporal-bucket-format-SGAV0ivR.js +922 -0
  57. package/dist/chunks/{switch-BXet-Sno.js → switch-BeZW-HnS.js} +4350 -5249
  58. package/dist/chunks/switch-D-CCcfhc.cjs +138 -0
  59. package/dist/chunks/temporal-bucket-5UYEotyQ.js +810 -0
  60. package/dist/chunks/temporal-bucket-DHY1y9lq.cjs +1 -0
  61. package/dist/chunks/temporal-bucket-authoring-K1kE6R_z.js +222 -0
  62. package/dist/chunks/temporal-bucket-authoring-o3Emn05L.cjs +1 -0
  63. package/dist/chunks/{temporal-bucket-contract-ChDBWX8I.cjs → temporal-bucket-contract-D2-93DGr.cjs} +1 -1
  64. package/dist/chunks/{temporal-bucket-contract-_F6vNhhH.js → temporal-bucket-contract-D5d-xEl3.js} +1 -1
  65. package/dist/chunks/{token-types-BdQ8kHBm.cjs → token-types-D7CaaI80.cjs} +1 -1
  66. package/dist/chunks/{token-types-BHR58aTy.js → token-types-GbxRUozo.js} +1 -1
  67. package/dist/chunks/{update-policy-BxvYMYz0.cjs → update-policy-BmiOd0PB.cjs} +1 -1
  68. package/dist/chunks/{update-policy-g0rCQ9BM.js → update-policy-hednMF-0.js} +1 -1
  69. package/dist/chunks/validators-BDYprKI9.cjs +1 -0
  70. package/dist/chunks/{validators-Cs74WVie.js → validators-DEmd8Sin.js} +1561 -1197
  71. package/dist/dashboard/index.cjs +1 -1
  72. package/dist/dashboard/index.js +2 -2
  73. package/dist/dashboard-authoring/index.cjs +3 -3
  74. package/dist/dashboard-authoring/index.js +35 -32
  75. package/dist/data-app-builder/index.cjs +1 -1
  76. package/dist/data-app-builder/index.js +2 -2
  77. package/dist/data-app-codegen/index.cjs +1 -1
  78. package/dist/data-app-codegen/index.js +2 -2
  79. package/dist/data-app-codegen-node/index.cjs +1 -1
  80. package/dist/data-app-codegen-node/index.js +3 -3
  81. package/dist/data-app-sdk/index.cjs +1 -1
  82. package/dist/data-app-sdk/index.js +78 -77
  83. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  84. package/dist/data-app-sdk-adapters/index.js +29 -30
  85. package/dist/data-app-sdk-validation/index.cjs +1 -1
  86. package/dist/data-app-sdk-validation/index.js +21 -21
  87. package/dist/format-utils/index.cjs +3 -3
  88. package/dist/format-utils/index.js +156 -140
  89. package/dist/index.cjs +1 -1
  90. package/dist/index.js +157 -155
  91. package/dist/report-runtime-context/index.cjs +1 -1
  92. package/dist/report-runtime-context/index.js +2 -2
  93. package/dist/style.css +1 -1
  94. package/dist/surfboard/index.cjs +1 -1
  95. package/dist/surfboard/index.js +3 -3
  96. package/dist/types/analytics-protocol.d.ts +81 -11
  97. package/dist/types/briefings.d.ts +727 -19
  98. package/dist/types/dashboard-assistant.d.ts +37 -17
  99. package/dist/types/dashboard-authoring.d.ts +61 -14
  100. package/dist/types/dashboard.d.ts +137 -12
  101. package/dist/types/data-app-builder.d.ts +28 -2
  102. package/dist/types/data-app-codegen-node.d.ts +29 -3
  103. package/dist/types/data-app-codegen.d.ts +29 -3
  104. package/dist/types/data-app-sdk-adapters.d.ts +28 -2
  105. package/dist/types/data-app-sdk-validation.d.ts +51 -7
  106. package/dist/types/data-app-sdk.d.ts +55 -10
  107. package/dist/types/format-utils.d.ts +190 -3
  108. package/dist/types/index.cjs +1 -1
  109. package/dist/types/index.js +4 -4
  110. package/dist/types/main.d.ts +128 -33
  111. package/dist/types/shared.d.ts +14 -12
  112. package/dist/types/surfboard.d.ts +138 -13
  113. package/dist/types/types.d.ts +117 -23
  114. package/dist/types/value-format-preferences.d.ts +3 -0
  115. package/package.json +2 -1
  116. package/dist/chunks/card-config-utils-15sRtebL.cjs +0 -1
  117. package/dist/chunks/card-config-utils-BYZ5MJOh.js +0 -16
  118. package/dist/chunks/catalog-field-grounding-Bnx-3tE0.cjs +0 -1
  119. package/dist/chunks/catalog-field-grounding-S2jKwKGD.js +0 -100
  120. package/dist/chunks/dashboard-briefing-launcher-DDgDr2s3.cjs +0 -26
  121. package/dist/chunks/dashboard-date-comparison-definition-DZq0htjG.cjs +0 -1
  122. package/dist/chunks/dashboard-input-contract-DSt8dGzP.js +0 -18
  123. package/dist/chunks/dashboard-input-contract-DV3cshjz.cjs +0 -1
  124. package/dist/chunks/dashboard-json-CYtvwtvj.cjs +0 -1
  125. package/dist/chunks/edit-dashboard-visual-DwKcvlsF.cjs +0 -177
  126. package/dist/chunks/editor-action-buttons-BVmsk0Aj.cjs +0 -16
  127. package/dist/chunks/format-types-CSv0V7mm.cjs +0 -1
  128. package/dist/chunks/format-types-DZGgYj39.js +0 -1663
  129. package/dist/chunks/index-CJdxSyQq.js +0 -2578
  130. package/dist/chunks/index-DPv8_Ild.cjs +0 -1395
  131. package/dist/chunks/index-DRlMUglg.cjs +0 -4
  132. package/dist/chunks/metric-comparison-97zHGEx5.js +0 -387
  133. package/dist/chunks/metric-comparison-CUAJ8n4y.cjs +0 -1
  134. package/dist/chunks/pivot-result-lifecycle-BBabQ_da.js +0 -914
  135. package/dist/chunks/pivot-result-lifecycle-DPc0ANwk.cjs +0 -4
  136. package/dist/chunks/presentation-execution-BLfPTGX_.js +0 -637
  137. package/dist/chunks/presentation-execution-BTV-Q43g.cjs +0 -1
  138. package/dist/chunks/report-preferences-dialog-D9ZCGh9l.js +0 -691
  139. package/dist/chunks/report-preferences-dialog-DaqTEcac.cjs +0 -1
  140. package/dist/chunks/switch-Cjk6G06r.cjs +0 -138
  141. package/dist/chunks/temporal-bucket-BnPxGrAi.js +0 -446
  142. package/dist/chunks/temporal-bucket-authoring-CPTwHzvs.cjs +0 -1
  143. package/dist/chunks/temporal-bucket-authoring-CgOuakGW.js +0 -205
  144. package/dist/chunks/temporal-bucket-pMnV-4Nj.cjs +0 -1
  145. package/dist/chunks/temporal-result-owner-6peubmhU.js +0 -443
  146. package/dist/chunks/temporal-result-owner-f6-i65Fb.cjs +0 -1
  147. package/dist/chunks/validators-9D4KBqKD.cjs +0 -1
@@ -346,8 +346,7 @@ declare type BriefingFragments = {
346
346
 
347
347
  export declare type BriefingJobConfig = {
348
348
  kind: BriefingKind;
349
- reportContext: ReportRuntimeContext;
350
- resolvedFormats?: ResolvedPresentationEntry[];
349
+ presentationExecutionSnapshot: PresentationExecutionSnapshot;
351
350
  source: BriefingSource;
352
351
  body: BriefingBody;
353
352
  attachments: BriefingAttachment[];
@@ -702,7 +701,7 @@ export declare type CancelBriefingRunResponse = {
702
701
 
703
702
  declare type CanonicalDurationUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
704
703
 
705
- export declare type CanonicalFormatSpec = NumericCanonicalFormat | DateCanonicalFormat | DurationCanonicalFormat | StringCanonicalFormat | TemporalBucketFormat;
704
+ export declare type CanonicalFormatSpec = NumericCanonicalFormat | DateCanonicalFormat | RawTemporalFormat | DurationCanonicalFormat | StringCanonicalFormat | TemporalBucketFormat;
706
705
 
707
706
  declare type CanonicalPivotResultContract = {
708
707
  version: 1;
@@ -1182,7 +1181,6 @@ export declare type CreateBriefingRequest = {
1182
1181
  presentation: BriefingPresentation;
1183
1182
  limits?: BriefingLimits;
1184
1183
  deliveryConfig: BriefingDeliveryConfig | null;
1185
- resolvedFormats?: ResolvedPresentationEntry[];
1186
1184
  };
1187
1185
 
1188
1186
  export declare type CurrencyPresentationBinding = {
@@ -1408,6 +1406,8 @@ export declare type DashboardProps = {
1408
1406
  * points. Ordinary dashboard consumers should leave this unset.
1409
1407
  */
1410
1408
  interactionExecutionSnapshot?: Record<string, InteractionState>;
1409
+ /** Server-resolved immutable presentation snapshot for internal print views. */
1410
+ presentationExecutionSnapshot?: PresentationExecutionSnapshot;
1411
1411
  /**
1412
1412
  * Render target for print entry points. Generic dashboard PDF exports also
1413
1413
  * use cardDisplay.mode="print"; document-specific print handling must only
@@ -1544,6 +1544,11 @@ export declare type DeleteBriefingRunResponse = {
1544
1544
  */
1545
1545
  export declare interface DetailField extends Omit<Field, 'role' | 'granularity'> {
1546
1546
  role: 'detail';
1547
+ /**
1548
+ * Query transport policy for ungrouped temporal values. This marker is
1549
+ * projected into executable config and is never persisted authoring state.
1550
+ */
1551
+ dateValueMode?: 'canonical' | 'formatted';
1547
1552
  dateFormat?: DateFormatValue;
1548
1553
  customFormat?: string;
1549
1554
  /**
@@ -2371,11 +2376,6 @@ declare interface GroupByColumn extends BaseColumn {
2371
2376
  export declare interface GroupByField extends Field {
2372
2377
  role: 'groupby';
2373
2378
  granularity?: TimeGranularity;
2374
- /**
2375
- * Query transport policy for grouped temporal values. This is projected
2376
- * into executable card config and is not persisted authoring state.
2377
- */
2378
- dateValueMode?: 'canonical' | 'formatted';
2379
2379
  /**
2380
2380
  * Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
2381
2381
  * If present, used in SELECT and GROUP BY instead of just the column name.
@@ -2656,6 +2656,7 @@ declare type MatrixAxisLevelDescriptor = {
2656
2656
  label: string;
2657
2657
  field: SemaphorFieldRef;
2658
2658
  grain?: SemaphorMatrixTimeGrain;
2659
+ temporalBucket?: TemporalBucketMetadata;
2659
2660
  subtotal?: SemaphorMatrixSubtotalOptions;
2660
2661
  };
2661
2662
 
@@ -2730,7 +2731,8 @@ declare type MatrixFormattingContext = {
2730
2731
 
2731
2732
  declare type MatrixGridColumn = {
2732
2733
  id: string;
2733
- label: string;
2734
+ /** Present only for measure and explicit total headings. */
2735
+ label?: string;
2734
2736
  columnNodeId?: string;
2735
2737
  columnPath: MatrixMemberPathSegment[];
2736
2738
  measureInstanceId: string;
@@ -2739,7 +2741,8 @@ declare type MatrixGridColumn = {
2739
2741
 
2740
2742
  declare type MatrixGridHeaderCell = {
2741
2743
  id: string;
2742
- label: string;
2744
+ /** Present only for non-member headings and explicit total labels. */
2745
+ label?: string;
2743
2746
  role: 'rowHeader' | 'columnHeader' | 'measureHeader' | 'subtotal' | 'grandTotal';
2744
2747
  colSpan: number;
2745
2748
  rowSpan: number;
@@ -2801,7 +2804,8 @@ declare type MatrixMemberPathSegment = {
2801
2804
  instanceId: string;
2802
2805
  fieldKey: string;
2803
2806
  value: unknown;
2804
- label: string;
2807
+ /** Display-only source label for non-temporal members. */
2808
+ label?: string;
2805
2809
  };
2806
2810
 
2807
2811
  declare type MatrixNode = {
@@ -2809,7 +2813,8 @@ declare type MatrixNode = {
2809
2813
  axis: 'row' | 'column';
2810
2814
  path: MatrixMemberPathSegment[];
2811
2815
  level: number;
2812
- label: string;
2816
+ /** Present only for non-temporal members and explicit total labels. */
2817
+ label?: string;
2813
2818
  value: unknown;
2814
2819
  parentId?: string;
2815
2820
  hasChildren: boolean;
@@ -3064,11 +3069,6 @@ export declare interface PivotByField extends Field {
3064
3069
  * so existing cards need no migration.
3065
3070
  */
3066
3071
  memberOrder?: PivotMemberOrder;
3067
- /**
3068
- * Query transport policy for grouped temporal pivot members. This is
3069
- * projected into executable config and is never persisted authoring state.
3070
- */
3071
- dateValueMode?: 'canonical' | 'formatted';
3072
3072
  }
3073
3073
 
3074
3074
  export declare interface PivotColumnSchema {
@@ -3143,6 +3143,12 @@ export declare type Placeholders = {
3143
3143
 
3144
3144
  export declare type PluginType = 'custom' | 'standard';
3145
3145
 
3146
+ declare type PresentationExecutionSnapshot = {
3147
+ version: 1;
3148
+ reportContext: ReportRuntimeContext;
3149
+ resolvedFormats: ResolvedPresentationEntry[];
3150
+ };
3151
+
3146
3152
  declare type PresentationScope = {
3147
3153
  dashboardId: string;
3148
3154
  cardId?: string;
@@ -3220,6 +3226,41 @@ declare type RangeValue = {
3220
3226
  gt?: string | number;
3221
3227
  };
3222
3228
 
3229
+ /** Normalized authored input for an ungrouped temporal result column. */
3230
+ declare type RawTemporalFormat = {
3231
+ type: 'raw_temporal';
3232
+ /** Authored display timezone; `auto` uses the resolved calendar timezone. */
3233
+ timezone?: string;
3234
+ /** Authored source timezone; `auto` means UTC for timezone-less values. */
3235
+ sourceTimezone?: string;
3236
+ presentation: {
3237
+ mode: 'auto';
3238
+ } | {
3239
+ mode: 'pattern';
3240
+ dialect: RawTemporalPatternDialect;
3241
+ pattern: string;
3242
+ };
3243
+ };
3244
+
3245
+ declare type RawTemporalPatternDialect = 'semaphor_tokens' | 'date_fns';
3246
+
3247
+ declare type RawTemporalPresentationTarget = {
3248
+ kind: 'column';
3249
+ columnKey: string;
3250
+ };
3251
+
3252
+ /** Authoritative meaning of one ungrouped temporal result column. */
3253
+ declare type RawTemporalValueKind = 'date' | 'wall_datetime' | 'instant';
3254
+
3255
+ /**
3256
+ * Result-column metadata for an ungrouped temporal value. This descriptor is
3257
+ * mutually exclusive with grouped `temporalBucket` metadata.
3258
+ */
3259
+ declare type RawTemporalValueMetadata = {
3260
+ kind: 'raw_temporal';
3261
+ valueKind: RawTemporalValueKind;
3262
+ };
3263
+
3223
3264
  export declare type RelativeDateFilter = {
3224
3265
  mode: 'last';
3225
3266
  n: number;
@@ -3329,7 +3370,7 @@ declare type ResolvedNumericPresentationEntry = {
3329
3370
  format: NumericCanonicalFormat;
3330
3371
  };
3331
3372
 
3332
- declare type ResolvedPresentationEntry = ResolvedNumericPresentationEntry | ResolvedTemporalBucketPresentationEntry;
3373
+ declare type ResolvedPresentationEntry = ResolvedNumericPresentationEntry | ResolvedTemporalBucketPresentationEntry | ResolvedRawTemporalPresentationEntry;
3333
3374
 
3334
3375
  declare type ResolvedPrimaryDateField = (ResolvedPrimaryDateFieldBase & ({
3335
3376
  defaultGranularity?: SemaphorTimeGrain;
@@ -3354,8 +3395,45 @@ declare type ResolvedPrimaryDateFieldBase = {
3354
3395
  supportedGranularities?: SemaphorTimeGrain[];
3355
3396
  };
3356
3397
 
3357
- declare type ResolvedTemporalBucketFormat = TemporalBucketFormat & {
3398
+ declare type ResolvedRawTemporalFormat = {
3399
+ type: 'raw_temporal';
3400
+ locale: string;
3401
+ calendarTimezone: string;
3402
+ /** Resolved source timezone for timezone-less wall datetimes, when authored. */
3403
+ sourceTimezone?: string;
3404
+ presentation: {
3405
+ mode: 'auto';
3406
+ styles: ResolvedTemporalStyleSet;
3407
+ } | {
3408
+ mode: 'pattern';
3409
+ dialect: RawTemporalPatternDialect;
3410
+ pattern: string;
3411
+ };
3412
+ };
3413
+
3414
+ declare type ResolvedRawTemporalPresentationEntry = {
3415
+ scope: PresentationScope;
3416
+ target: RawTemporalPresentationTarget;
3417
+ format: ResolvedRawTemporalFormat;
3418
+ };
3419
+
3420
+ declare type ResolvedTemporalBucketFormat = {
3421
+ type: 'temporal_bucket';
3358
3422
  locale: string;
3423
+ presentation: {
3424
+ mode: 'auto';
3425
+ styles: ResolvedTemporalStyleSet;
3426
+ };
3427
+ } | {
3428
+ type: 'temporal_bucket';
3429
+ locale: string;
3430
+ presentation: {
3431
+ mode: 'preset';
3432
+ preset: TemporalBucketPreset;
3433
+ } | {
3434
+ mode: 'pattern';
3435
+ pattern: string;
3436
+ };
3359
3437
  };
3360
3438
 
3361
3439
  declare type ResolvedTemporalBucketPresentationEntry = {
@@ -3364,6 +3442,14 @@ declare type ResolvedTemporalBucketPresentationEntry = {
3364
3442
  format: ResolvedTemporalBucketFormat;
3365
3443
  };
3366
3444
 
3445
+ declare type ResolvedTemporalStyleSet = {
3446
+ dateStyle: LocaleStyle;
3447
+ dateTime: {
3448
+ dateStyle: LocaleStyle;
3449
+ timeStyle: LocaleStyle;
3450
+ };
3451
+ };
3452
+
3367
3453
  declare type ResolvedValueFormatPreferences = {
3368
3454
  locale: string;
3369
3455
  dateStyle: LocaleStyle;
@@ -3580,6 +3666,8 @@ declare type SemaphorMatrixAxisLevel = {
3580
3666
  id?: string;
3581
3667
  field: SemaphorFieldRef;
3582
3668
  grain?: SemaphorMatrixTimeGrain;
3669
+ format?: TemporalBucketFormat;
3670
+ semanticTemporalPresentation?: SemaphorMatrixSemanticTemporalPresentation;
3583
3671
  label?: string;
3584
3672
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
3585
3673
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -3588,7 +3676,7 @@ declare type SemaphorMatrixAxisLevel = {
3588
3676
  declare type SemaphorMatrixAxisSortRule = {
3589
3677
  direction: 'asc' | 'desc';
3590
3678
  by: {
3591
- kind: 'label';
3679
+ kind: 'member';
3592
3680
  } | {
3593
3681
  kind: 'field';
3594
3682
  field: SemaphorFieldRef;
@@ -3645,7 +3733,7 @@ declare type SemaphorMatrixMemberPathSegment = {
3645
3733
 
3646
3734
  declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
3647
3735
  kind: 'matrix';
3648
- schemaVersion: 1;
3736
+ schemaVersion: 2;
3649
3737
  intent?: SemaphorMatrixIntent;
3650
3738
  shape: MatrixShape;
3651
3739
  capabilities: MatrixCapability[];
@@ -3667,12 +3755,17 @@ declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
3667
3755
  expansion?: MatrixExpansionResponseHints;
3668
3756
  };
3669
3757
 
3758
+ declare type SemaphorMatrixSemanticTemporalPresentation = {
3759
+ granularity: SemaphorMatrixTimeGrain;
3760
+ format: TemporalBucketFormat;
3761
+ };
3762
+
3670
3763
  declare type SemaphorMatrixSortRule = {
3671
3764
  axis: 'row' | 'column';
3672
3765
  targetId?: string;
3673
3766
  direction: 'asc' | 'desc';
3674
3767
  by: {
3675
- kind: 'label';
3768
+ kind: 'member';
3676
3769
  } | {
3677
3770
  kind: 'field';
3678
3771
  field: SemaphorFieldRef;
@@ -3797,6 +3890,7 @@ declare type SemaphorResultColumn = {
3797
3890
  source?: SemaphorFieldRef['source'];
3798
3891
  derivedField?: SemaphorDerivedFieldDefinition;
3799
3892
  temporalBucket?: TemporalBucketMetadata;
3893
+ rawTemporal?: RawTemporalValueMetadata;
3800
3894
  pivotIdentity?: SemaphorPivotResultColumnIdentity;
3801
3895
  };
3802
3896
 
@@ -41,6 +41,9 @@ export declare const REPORT_PREFERENCE_SOURCES: readonly ["viewer_user", "viewer
41
41
 
42
42
  export declare type ReportPreferenceSource = (typeof REPORT_PREFERENCE_SOURCES)[number];
43
43
 
44
+ /** Viewer preferences that affect temporal presentation without numeric currency policy. */
45
+ export declare type ResolvedTemporalValueFormatPreferences = Pick<ResolvedValueFormatPreferences, 'locale' | 'dateStyle' | 'dateTime'>;
46
+
44
47
  export declare type ResolvedValueFormatPreferences = {
45
48
  locale: string;
46
49
  dateStyle: LocaleStyle;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.449",
8
+ "version": "0.1.454",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -147,6 +147,7 @@
147
147
  "verify:release-artifacts": "npm run verify:metric-comparison-artifact && npm run verify:temporal-bucket-artifact",
148
148
  "verify:metric-comparison-artifact": "node scripts/verify-metric-comparison-artifact.mjs",
149
149
  "verify:temporal-bucket-artifact": "node scripts/verify-temporal-bucket-artifact.mjs",
150
+ "verify:temporal-browser": "node scripts/verify-temporal-browser.mjs",
150
151
  "deploy": "./scripts/deploy.sh",
151
152
  "deploy:patch": "./scripts/deploy.sh patch",
152
153
  "deploy:minor": "./scripts/deploy.sh minor",
@@ -1 +0,0 @@
1
- "use strict";function a(e){if(!e)return!1;const t=e.groupByColumns&&e.groupByColumns.length>0,n=e.metricColumns&&e.metricColumns.length>0,s=e.pivotByColumns&&e.pivotByColumns.length>0,r=e.detailColumns&&e.detailColumns.length>0;return!!(t||n||s||r)}function i(e,t){var u,l,o;if(t!=null&&t.skipSetupCheck||e.type==="text"||(u=e.customCardPreferences)!=null&&u.url)return!1;const n=!!(e.connectionId||(l=e.dataSource)!=null&&l.connectionId),s=!!((o=e.sql)!=null&&o.trim()),r=a(e.config);return!n||!r&&!s}exports.hasValidCardConfig=a;exports.isCardUnconfigured=i;
@@ -1,16 +0,0 @@
1
- function a(e) {
2
- if (!e) return !1;
3
- const t = e.groupByColumns && e.groupByColumns.length > 0, n = e.metricColumns && e.metricColumns.length > 0, s = e.pivotByColumns && e.pivotByColumns.length > 0, r = e.detailColumns && e.detailColumns.length > 0;
4
- return !!(t || n || s || r);
5
- }
6
- function i(e, t) {
7
- var l, u, o;
8
- if (t != null && t.skipSetupCheck || e.type === "text" || (l = e.customCardPreferences) != null && l.url)
9
- return !1;
10
- const n = !!(e.connectionId || (u = e.dataSource) != null && u.connectionId), s = !!((o = e.sql) != null && o.trim()), r = a(e.config);
11
- return !n || !r && !s;
12
- }
13
- export {
14
- a as h,
15
- i
16
- };
@@ -1 +0,0 @@
1
- "use strict";function l(t){return typeof t=="string"?t.trim().toLowerCase():""}function f(t){return String(t.column_name||t.name||t.qualifiedFieldName||"")}function g(t){return Array.from(new Set([t.column_name,t.name,t.qualifiedFieldName,t.alias].filter(e=>typeof e=="string"&&e.trim().length>0).map(e=>e.trim())))}function d(t){const e=p(t);return e?e.includes("int")||e.includes("uint")||e.includes("bigint")||e.includes("smallint")||e.includes("tinyint")||e.includes("numeric")||e.includes("decimal")||e.includes("double")||e.includes("float")||e.includes("number")||e.includes("real")||e.includes("money")||e.includes("currency")||e.includes("percent")?"number":e.includes("timestamp")||e.includes("datetime")||e.startsWith("time")?"datetime":e.includes("date")?"date":e.includes("bool")?"boolean":"string":"unknown"}function p(t){let e=l(t),i="";for(;e&&e!==i;)i=e,e=y(e,"nullable"),e=y(e,"lowcardinality");return e}function y(t,e){const i=`${e}(`;return!t.startsWith(i)||!t.endsWith(")")?t:t.slice(i.length,-1).trim()}function A(t){const e=d(t);return e==="date"||e==="datetime"}function o(t){return A(t.dataType||t.data_type)}function u(t){const e=C(t);return e==="id"||e==="row_id"}function c(t){const e=C(t);return u(t)||e.endsWith("_id")||e.endsWith("_key")||e.endsWith("_number")}function C(t){return l(f(t)||t.name||t.alias).replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")}function m(t,e={}){const i=l(t.role);return i==="metric"||i==="measure"?!e.excludeIdentifiers||!c(t):i==="groupby"||i==="dimension"||i==="date"||i==="id"?!1:d(t.dataType||t.data_type)==="number"&&(!e.excludeIdentifiers||!c(t))}function D(t){return!m(t)&&!o(t)}function F(t){const e=new Set,i=new Set,s=new Set;for(const a of t){if(u(a))continue;const r=g(a);if(r.length!==0){if(o(a)){r.forEach(n=>i.add(n));continue}if(m(a,{excludeIdentifiers:!0})){r.forEach(n=>e.add(n));continue}r.forEach(n=>s.add(n))}}return{validMeasureCandidates:Array.from(e).sort(),validDateCandidates:Array.from(i).sort(),validDimensionCandidates:Array.from(s).sort()}}exports.buildAnalyticsCatalogFieldSummary=F;exports.getAnalyticsCatalogFieldCandidates=g;exports.getAnalyticsCatalogFieldName=f;exports.isAnalyticsCatalogDateField=o;exports.isAnalyticsCatalogDimensionField=D;exports.isAnalyticsCatalogMetricField=m;exports.isAnalyticsDateLikeDataType=A;exports.isAnalyticsMetricIdentifierField=c;exports.isAnalyticsTechnicalIdentifierField=u;exports.normalizeAnalyticsCatalogDataType=d;exports.normalizeAnalyticsCatalogName=l;
@@ -1,100 +0,0 @@
1
- function c(n) {
2
- return typeof n == "string" ? n.trim().toLowerCase() : "";
3
- }
4
- function g(n) {
5
- return String(n.column_name || n.name || n.qualifiedFieldName || "");
6
- }
7
- function p(n) {
8
- return Array.from(
9
- new Set(
10
- [
11
- n.column_name,
12
- n.name,
13
- n.qualifiedFieldName,
14
- n.alias
15
- ].filter(
16
- (e) => typeof e == "string" && e.trim().length > 0
17
- ).map((e) => e.trim())
18
- )
19
- );
20
- }
21
- function o(n) {
22
- const e = C(n);
23
- return e ? e.includes("int") || e.includes("uint") || e.includes("bigint") || e.includes("smallint") || e.includes("tinyint") || e.includes("numeric") || e.includes("decimal") || e.includes("double") || e.includes("float") || e.includes("number") || e.includes("real") || e.includes("money") || e.includes("currency") || e.includes("percent") ? "number" : e.includes("timestamp") || e.includes("datetime") || e.startsWith("time") ? "datetime" : e.includes("date") ? "date" : e.includes("bool") ? "boolean" : "string" : "unknown";
24
- }
25
- function C(n) {
26
- let e = c(n), t = "";
27
- for (; e && e !== t; )
28
- t = e, e = d(e, "nullable"), e = d(e, "lowcardinality");
29
- return e;
30
- }
31
- function d(n, e) {
32
- const t = `${e}(`;
33
- return !n.startsWith(t) || !n.endsWith(")") ? n : n.slice(t.length, -1).trim();
34
- }
35
- function A(n) {
36
- const e = o(n);
37
- return e === "date" || e === "datetime";
38
- }
39
- function u(n) {
40
- return A(n.dataType || n.data_type);
41
- }
42
- function m(n) {
43
- const e = f(n);
44
- return e === "id" || e === "row_id";
45
- }
46
- function l(n) {
47
- const e = f(n);
48
- return m(n) || e.endsWith("_id") || e.endsWith("_key") || e.endsWith("_number");
49
- }
50
- function f(n) {
51
- return c(
52
- g(n) || n.name || n.alias
53
- ).replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
54
- }
55
- function y(n, e = {}) {
56
- const t = c(n.role);
57
- return t === "metric" || t === "measure" ? !e.excludeIdentifiers || !l(n) : t === "groupby" || t === "dimension" || t === "date" || t === "id" ? !1 : o(
58
- n.dataType || n.data_type
59
- ) === "number" && (!e.excludeIdentifiers || !l(n));
60
- }
61
- function h(n) {
62
- return !y(n) && !u(n);
63
- }
64
- function D(n) {
65
- const e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
66
- for (const a of n) {
67
- if (m(a))
68
- continue;
69
- const r = p(a);
70
- if (r.length !== 0) {
71
- if (u(a)) {
72
- r.forEach((i) => t.add(i));
73
- continue;
74
- }
75
- if (y(a, { excludeIdentifiers: !0 })) {
76
- r.forEach((i) => e.add(i));
77
- continue;
78
- }
79
- r.forEach((i) => s.add(i));
80
- }
81
- }
82
- return {
83
- validMeasureCandidates: Array.from(e).sort(),
84
- validDateCandidates: Array.from(t).sort(),
85
- validDimensionCandidates: Array.from(s).sort()
86
- };
87
- }
88
- export {
89
- c as a,
90
- p as b,
91
- u as c,
92
- m as d,
93
- l as e,
94
- y as f,
95
- g,
96
- h,
97
- A as i,
98
- D as j,
99
- o as n
100
- };