react-semaphor 0.1.427 → 0.1.429

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 (96) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +72 -71
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +5 -4
  5. package/dist/briefings/index.cjs +1 -1
  6. package/dist/briefings/index.js +1031 -622
  7. package/dist/chunks/analyze-result-contract-BswhsmWT.js +1 -0
  8. package/dist/chunks/{analyze-result-contract-DnfF8kBb.js → analyze-result-contract-CfOBEwaC.js} +681 -759
  9. package/dist/chunks/{code-editor-CojfM3qp.js → code-editor-C65eEYyU.js} +2980 -2960
  10. package/dist/chunks/code-editor-DOh3aYEh.js +138 -0
  11. package/dist/chunks/{comparison-document-migration-b6c3xiWh.js → comparison-document-migration-DbU_BTxR.js} +1 -1
  12. package/dist/chunks/{comparison-document-migration-BJH1idOd.js → comparison-document-migration-Dj6xZMCb.js} +2 -2
  13. package/dist/chunks/csv-utils-Co0WxHke.js +4 -0
  14. package/dist/chunks/csv-utils-suxSkJGj.js +376 -0
  15. package/dist/chunks/dashboard-CQfAvRYI.js +1401 -0
  16. package/dist/chunks/{dashboard-DSxho2LN.js → dashboard-agBXhvKo.js} +45651 -42951
  17. package/dist/chunks/{dashboard-briefing-launcher-CguxcHIl.js → dashboard-briefing-launcher-CkH_pthg.js} +1 -1
  18. package/dist/chunks/{dashboard-briefing-launcher-BFIw5BOf.js → dashboard-briefing-launcher-gBNNKqoH.js} +100 -99
  19. package/dist/chunks/{dashboard-controls-Cl0LagTr.js → dashboard-controls-CAZnIGfT.js} +2 -2
  20. package/dist/chunks/{dashboard-controls-jD-HpCNK.js → dashboard-controls-CoIxUTvH.js} +207 -202
  21. package/dist/chunks/{dashboard-json-BovTt0uu.js → dashboard-json-BMcPjL8-.js} +18 -17
  22. package/dist/chunks/dashboard-json-D4hFrMkX.js +1 -0
  23. package/dist/chunks/{edit-dashboard-visual-dlm8F_Qu.js → edit-dashboard-visual-Bc8qNfSr.js} +8721 -8481
  24. package/dist/chunks/edit-dashboard-visual-onhUUXlw.js +182 -0
  25. package/dist/chunks/{metric-comparison-CWweq9RG.js → metric-comparison-CPoDx56y.js} +1 -1
  26. package/dist/chunks/{metric-comparison-BKgkMy9r.js → metric-comparison-DVy3fll_.js} +1 -1
  27. package/dist/chunks/numeric-presentation-CGTcqocU.js +517 -0
  28. package/dist/chunks/numeric-presentation-Dlb-Dk4c.js +1 -0
  29. package/dist/chunks/report-preferences-dialog-CPptr_V9.js +690 -0
  30. package/dist/chunks/report-preferences-dialog-DV_5aHrS.js +1 -0
  31. package/dist/chunks/source-identity-5OPV4gvg.js +92 -0
  32. package/dist/chunks/source-identity-Cbo2LOHQ.js +1 -0
  33. package/dist/chunks/{update-policy-CY2k-pJP.js → update-policy-De2NswtM.js} +1 -1
  34. package/dist/chunks/{update-policy-BgONreNd.js → update-policy-DnF_74zC.js} +1 -1
  35. package/dist/chunks/{use-create-flow-overlay-state-kbl6avDY.js → use-create-flow-overlay-state-Bs6gqgjo.js} +1 -1
  36. package/dist/chunks/{use-create-flow-overlay-state-BU0ROMSm.js → use-create-flow-overlay-state-CgQbCrni.js} +97 -96
  37. package/dist/chunks/validators-B2vUAqTf.js +1 -0
  38. package/dist/chunks/{validators-Cz-XuORM.js → validators-Bce_J7Vd.js} +19 -13
  39. package/dist/dashboard/index.cjs +1 -1
  40. package/dist/dashboard/index.js +1 -1
  41. package/dist/dashboard-authoring/index.cjs +3 -3
  42. package/dist/dashboard-authoring/index.js +20 -19
  43. package/dist/data-app-builder/index.cjs +1 -1
  44. package/dist/data-app-builder/index.js +50 -50
  45. package/dist/data-app-codegen/index.cjs +1 -1
  46. package/dist/data-app-codegen/index.js +2 -2
  47. package/dist/data-app-codegen-node/index.cjs +1 -1
  48. package/dist/data-app-codegen-node/index.js +3 -3
  49. package/dist/data-app-sdk/index.cjs +2 -2
  50. package/dist/data-app-sdk/index.js +27 -26
  51. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  52. package/dist/data-app-sdk-adapters/index.js +25 -24
  53. package/dist/data-app-sdk-validation/index.cjs +1 -1
  54. package/dist/data-app-sdk-validation/index.js +57 -55
  55. package/dist/format-utils/index.cjs +2 -5
  56. package/dist/format-utils/index.js +136 -161
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.js +158 -155
  59. package/dist/report-runtime-context/index.cjs +1 -0
  60. package/dist/report-runtime-context/index.js +394 -0
  61. package/dist/style.css +1 -1
  62. package/dist/surfboard/index.cjs +1 -1
  63. package/dist/surfboard/index.js +7 -6
  64. package/dist/types/analytics-protocol.d.ts +0 -4
  65. package/dist/types/briefings.d.ts +216 -19
  66. package/dist/types/dashboard-assistant.d.ts +0 -2
  67. package/dist/types/dashboard-authoring.d.ts +34 -9
  68. package/dist/types/dashboard.d.ts +93 -9
  69. package/dist/types/data-app-builder.d.ts +0 -1
  70. package/dist/types/data-app-codegen-node.d.ts +6 -28
  71. package/dist/types/data-app-codegen.d.ts +6 -28
  72. package/dist/types/data-app-sdk-adapters.d.ts +6 -28
  73. package/dist/types/data-app-sdk-validation.d.ts +6 -29
  74. package/dist/types/data-app-sdk.d.ts +6 -31
  75. package/dist/types/format-utils.d.ts +128 -4
  76. package/dist/types/index.cjs +1 -1
  77. package/dist/types/index.js +10 -13
  78. package/dist/types/main.d.ts +249 -89
  79. package/dist/types/report-runtime-context.d.ts +99 -0
  80. package/dist/types/shared.d.ts +34 -9
  81. package/dist/types/surfboard.d.ts +119 -16
  82. package/dist/types/types.d.ts +156 -73
  83. package/dist/types/value-format-preferences.d.ts +126 -0
  84. package/dist/value-format-preferences/index.cjs +1 -0
  85. package/dist/value-format-preferences/index.js +635 -0
  86. package/package.json +11 -1
  87. package/dist/chunks/analyze-result-contract-ege_u6Nl.js +0 -1
  88. package/dist/chunks/calendar-preferences-dialog-DE4tk3t3.js +0 -457
  89. package/dist/chunks/calendar-preferences-dialog-DuGX1NPV.js +0 -1
  90. package/dist/chunks/code-editor-BoowcKU0.js +0 -138
  91. package/dist/chunks/dashboard-json-7mpQsizF.js +0 -1
  92. package/dist/chunks/dashboard-ogxedhSY.js +0 -1402
  93. package/dist/chunks/date-formatter-BTTYdAik.js +0 -1
  94. package/dist/chunks/date-formatter-D-89jTjG.js +0 -514
  95. package/dist/chunks/edit-dashboard-visual-B7wLrHeF.js +0 -182
  96. package/dist/chunks/validators-B4VMLX3_.js +0 -1
@@ -26,6 +26,15 @@ export declare function arrayToCSV(rows: (string | number | null | undefined)[][
26
26
  */
27
27
  export declare function arrayToCSVRow(values: (string | number | null | undefined)[], delimiter?: string): string;
28
28
 
29
+ declare type CalendarContext = {
30
+ tz: string;
31
+ weekStart: WeekStart;
32
+ anchor: 'now' | {
33
+ iso: string;
34
+ };
35
+ fiscalCalendar?: MonthAlignedFiscalCalendar;
36
+ };
37
+
29
38
  export declare type CanonicalDurationUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
30
39
 
31
40
  export declare type CanonicalFormatSpec = NumericCanonicalFormat | DateCanonicalFormat | DurationCanonicalFormat | StringCanonicalFormat;
@@ -51,10 +60,10 @@ export declare interface ColumnSettings {
51
60
  width?: number;
52
61
  numberFormat?: {
53
62
  style: 'decimal' | 'currency' | 'percent' | 'scientific';
54
- currency: string;
55
- locale: string;
56
- minimumFractionDigits: number;
57
- maximumFractionDigits: number;
63
+ currency?: string;
64
+ locale?: string;
65
+ minimumFractionDigits?: number;
66
+ maximumFractionDigits?: number;
58
67
  useGrouping?: boolean;
59
68
  percentValueMode?: 'fraction' | 'whole';
60
69
  showDataBar?: boolean;
@@ -265,8 +274,15 @@ export declare function formatNumberWithColumnSettings(value: number | null | un
265
274
  maximumFractionDigits?: number;
266
275
  useGrouping?: boolean;
267
276
  percentValueMode?: 'fraction' | 'whole';
277
+ scale?: number;
278
+ compact?: boolean;
279
+ negativeStyle?: 'minus' | 'parentheses';
280
+ prefix?: string;
281
+ suffix?: string;
268
282
  } | undefined, defaultLocale?: string): string;
269
283
 
284
+ export declare function formatNumericCanonical(value: number | null | undefined, format: NumericCanonicalFormat): string;
285
+
270
286
  export declare interface FormatOptions {
271
287
  decimalPlaces?: number;
272
288
  useSuffix?: boolean;
@@ -367,6 +383,8 @@ export declare interface GroupByField {
367
383
  label?: string;
368
384
  }
369
385
 
386
+ declare type LocaleStyle = 'short' | 'medium' | 'long';
387
+
370
388
  declare type MetricComparisonDirection = 'increase' | 'decrease' | 'no_change' | 'unknown';
371
389
 
372
390
  export declare type MetricComparisonDisplayMode = 'difference' | 'percent_change' | 'both' | 'ratio';
@@ -384,6 +402,11 @@ declare type MetricComparisonEvaluation = {
384
402
 
385
403
  declare type MetricComparisonSentiment = 'favorable' | 'unfavorable' | 'neutral';
386
404
 
405
+ declare type MonthAlignedFiscalCalendar = {
406
+ kind: 'month_aligned';
407
+ yearStartMonth: number;
408
+ };
409
+
387
410
  export declare interface NumberFormatOptions {
388
411
  style: 'decimal' | 'currency' | 'percent' | 'scientific';
389
412
  locale?: string;
@@ -428,6 +451,43 @@ export declare type NumericCanonicalFormat = {
428
451
  percentValueMode?: 'fraction' | 'whole';
429
452
  };
430
453
 
454
+ export declare type NumericCanonicalFormatParseResult = {
455
+ ok: true;
456
+ value: NumericCanonicalFormat;
457
+ } | {
458
+ ok: false;
459
+ issues: Array<{
460
+ path: string;
461
+ message: string;
462
+ }>;
463
+ };
464
+
465
+ export declare type NumericPresentationExecutionSnapshot = {
466
+ reportContext: ReportRuntimeContext;
467
+ resolvedNumericFormats: NumericPresentationSnapshotEntry[];
468
+ };
469
+
470
+ export declare type NumericPresentationSnapshotEntry = {
471
+ scope: {
472
+ dashboardId: string;
473
+ cardId?: string;
474
+ attachmentIndex?: number;
475
+ };
476
+ target: NumericPresentationTarget;
477
+ format: NumericCanonicalFormat;
478
+ };
479
+
480
+ export declare type NumericPresentationTarget = {
481
+ kind: 'metric';
482
+ metricId: string;
483
+ } | {
484
+ kind: 'column';
485
+ columnKey: string;
486
+ } | {
487
+ kind: 'matrix_measure';
488
+ measureId: string;
489
+ };
490
+
431
491
  /**
432
492
  * Convert an array of objects to CSV string
433
493
  */
@@ -435,6 +495,14 @@ export declare function objectsToCSV(data: Record<string, unknown>[], options?:
435
495
  columns?: string[];
436
496
  }): string;
437
497
 
498
+ export declare function parseNumericCanonicalFormat(input: unknown): NumericCanonicalFormatParseResult;
499
+
500
+ export declare function parseNumericPresentationExecutionSnapshot(input: unknown): NumericPresentationExecutionSnapshot;
501
+
502
+ export declare function parseNumericPresentationSnapshotEntries(input: unknown): NumericPresentationSnapshotEntry[];
503
+
504
+ export declare function parseResolvedNumericCanonicalFormat(input: unknown): NumericCanonicalFormatParseResult;
505
+
438
506
  /**
439
507
  * Parse a date string with source timezone interpretation
440
508
  *
@@ -483,6 +551,50 @@ export declare interface PivotRowData {
483
551
  isGrandTotal?: boolean;
484
552
  }
485
553
 
554
+ declare const REPORT_PREFERENCE_SOURCES: readonly ["viewer_user", "viewer_tenant_user", "session_initial", "viewer_tenant", "viewer_organization", "system_default"];
555
+
556
+ declare type ReportPreferenceSource = (typeof REPORT_PREFERENCE_SOURCES)[number];
557
+
558
+ declare type ReportPreferenceSources = {
559
+ calendar: ResolvedCalendarPreferenceSources;
560
+ valueFormat: ResolvedValueFormatPreferenceSources;
561
+ };
562
+
563
+ declare type ReportRuntimeContext = {
564
+ calendar: CalendarContext;
565
+ valueFormat: ResolvedValueFormatPreferences;
566
+ preferenceSources: ReportPreferenceSources;
567
+ };
568
+
569
+ export declare function resolveCurrencyFractionDigits(locale: string, currency: string): Pick<NumericCanonicalFormat, 'minimumFractionDigits' | 'maximumFractionDigits'>;
570
+
571
+ declare type ResolvedCalendarPreferenceSources = {
572
+ tz: ReportPreferenceSource;
573
+ weekStart: ReportPreferenceSource;
574
+ };
575
+
576
+ declare type ResolvedValueFormatPreferences = {
577
+ locale: string;
578
+ dateStyle: LocaleStyle;
579
+ dateTime: {
580
+ dateStyle: LocaleStyle;
581
+ timeStyle: LocaleStyle;
582
+ };
583
+ defaultCurrency: string;
584
+ };
585
+
586
+ declare type ResolvedValueFormatPreferenceSources = {
587
+ locale: ReportPreferenceSource;
588
+ dateStyle: ReportPreferenceSource;
589
+ dateTime: {
590
+ dateStyle: ReportPreferenceSource;
591
+ timeStyle: ReportPreferenceSource;
592
+ };
593
+ defaultCurrency: ReportPreferenceSource;
594
+ };
595
+
596
+ export declare function resolveNumericPresentation(authored: NumericCanonicalFormat, preferences: ResolvedValueFormatPreferences, boundCurrency?: string): NumericCanonicalFormat;
597
+
486
598
  /**
487
599
  * Date formatting utilities with timezone support
488
600
  * IMPORTANT: No React imports allowed in this file
@@ -513,4 +625,16 @@ export declare type StringCanonicalFormat = {
513
625
  suffix?: string;
514
626
  };
515
627
 
628
+ export declare function validateCardExportNumericPresentationSnapshot(input: {
629
+ entries: NumericPresentationSnapshotEntry[];
630
+ expectedScope: {
631
+ dashboardId: string;
632
+ cardId: string;
633
+ };
634
+ visibleColumns?: string[];
635
+ useFormattedValues: boolean;
636
+ }): void;
637
+
638
+ declare type WeekStart = 0 | 1 | 2 | 3 | 4 | 5 | 6;
639
+
516
640
  export { }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/common-types-C73-Ud1-.js"),a={mode:"all"},E={tz:"UTC",weekStart:1,anchor:"now"};exports.CALCULATED_FIELD_ENTITY_MARKER=e.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=e.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.PivotMarkerEnum=e.PivotMarkerEnum;exports.getFieldRuntimeColumnName=e.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=e.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=e.hasCalculatedFormulaInputs;exports.isCalculatedDimension=e.isCalculatedDimension;exports.isCalculatedField=e.isCalculatedField;exports.isCalculatedMetric=e.isCalculatedMetric;exports.DEFAULT_CALENDAR_CONTEXT=E;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/common-types-C73-Ud1-.js");require("../value-format-preferences/index.cjs");const E=require("../report-runtime-context/index.cjs"),a={mode:"all"};exports.CALCULATED_FIELD_ENTITY_MARKER=e.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=e.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.PivotMarkerEnum=e.PivotMarkerEnum;exports.getFieldRuntimeColumnName=e.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=e.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=e.hasCalculatedFormulaInputs;exports.isCalculatedDimension=e.isCalculatedDimension;exports.isCalculatedField=e.isCalculatedField;exports.isCalculatedMetric=e.isCalculatedMetric;exports.DEFAULT_CALENDAR_CONTEXT=E.DEFAULT_CALENDAR_CONTEXT;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=a;
@@ -1,19 +1,16 @@
1
- import { a as C, C as l, D as t, E as A, P as T, g as _, h as i, b as o, i as r, c as D, d as L } from "../chunks/common-types-ClkOI-3O.js";
2
- const a = {
1
+ import { a as l, C, D as A, E as t, P as T, g as _, h as i, b as o, i as r, c as D, d as L } from "../chunks/common-types-ClkOI-3O.js";
2
+ import "../value-format-preferences/index.js";
3
+ import { DEFAULT_CALENDAR_CONTEXT as m } from "../report-runtime-context/index.js";
4
+ const e = {
3
5
  mode: "all"
4
- }, e = {
5
- tz: "UTC",
6
- weekStart: 1,
7
- // Monday (ISO standard)
8
- anchor: "now"
9
6
  };
10
7
  export {
11
- C as CALCULATED_FIELD_ENTITY_MARKER,
12
- l as CONTROL_CARD_DEFAULT_VALUE,
13
- t as DATE_FORMAT_VALUES,
14
- e as DEFAULT_CALENDAR_CONTEXT,
15
- a as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
16
- A as EMPTY_SELECTION,
8
+ l as CALCULATED_FIELD_ENTITY_MARKER,
9
+ C as CONTROL_CARD_DEFAULT_VALUE,
10
+ A as DATE_FORMAT_VALUES,
11
+ m as DEFAULT_CALENDAR_CONTEXT,
12
+ e as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
13
+ t as EMPTY_SELECTION,
17
14
  T as PivotMarkerEnum,
18
15
  _ as getFieldRuntimeColumnName,
19
16
  i as hasCalculatedFieldMarker,