react-semaphor 0.1.555 → 0.1.556

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 (97) hide show
  1. package/dist/analytics-protocol/index.js +10 -10
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +438 -455
  5. package/dist/briefings/index.js +6 -6
  6. package/dist/chunks/{analytics-base-schemas-BKs3flFS.js → analytics-base-schemas-BUFUoO6G.js} +2 -2
  7. package/dist/chunks/{assistant-chat-8NZP6m-u.js → assistant-chat-C7Acww1T.js} +15 -15
  8. package/dist/chunks/{bookmark-state-BAeGKd3s.js → bookmark-state-7iZErWnR.js} +3 -3
  9. package/dist/chunks/comparison-window-caption-BseG5aOZ.js +1221 -0
  10. package/dist/chunks/{context-BerEBuFR.js → context-DVy4HOU0.js} +1 -1
  11. package/dist/chunks/{custom-visual-inputs-Gw-Ggg3O.js → custom-visual-inputs-ChuKjx27.js} +31 -33
  12. package/dist/chunks/{dashboard-Ds68ckO3.js → dashboard-BU6rE5kV.js} +1 -1
  13. package/dist/chunks/{dashboard-briefing-launcher-DlTr-VGc.js → dashboard-briefing-launcher-qrYd2zkN.js} +15 -15
  14. package/dist/chunks/{dashboard-controls-oNXJZN6x.js → dashboard-controls-BsapXI2H.js} +14 -14
  15. package/dist/chunks/{dashboard-json-CW7Q_efH.js → dashboard-json-CJqPqYnI.js} +5 -5
  16. package/dist/chunks/{document-dashboard-inputs-C21mL3ib.js → document-dashboard-inputs-BNSprf5_.js} +12 -12
  17. package/dist/chunks/{edit-dashboard-visual-BnnT_oKR.js → edit-dashboard-visual-CjAdV-WG.js} +4603 -4687
  18. package/dist/chunks/{filter-reach-copy-DlNPHbE-.js → filter-reach-copy-BTrqtFkh.js} +917 -987
  19. package/dist/chunks/{filter-value-text-DMrpj4h9.js → filter-value-text-CJTJDCym.js} +4 -4
  20. package/dist/chunks/{global-date-filter-utils-7OboTgrM.js → global-date-filter-utils-CTVf3dG3.js} +2904 -3102
  21. package/dist/chunks/{index-B2k6KtUN.js → index-B_vIRa-q.js} +12 -19
  22. package/dist/chunks/{index-CtoK1Lgu.js → index-dIV-Gdsb.js} +159 -161
  23. package/dist/chunks/{matrix-analytical-definition-DPVGg1mU.js → matrix-analytical-definition-Cg0ioFGQ.js} +21 -21
  24. package/dist/chunks/{matrix-card-D9bsdAye.js → matrix-card-yYibXSw1.js} +3 -3
  25. package/dist/chunks/{matrix-formatter-K2OVPJQI.js → matrix-formatter-C2kjsCDf.js} +44 -44
  26. package/dist/chunks/{matrix-member-presentation-DRWcJ8Mi.js → matrix-member-presentation-DEEauKXC.js} +1 -1
  27. package/dist/chunks/{matrix-operation-contract--lMaLlpV.js → matrix-operation-contract-C1G6AJNh.js} +33 -33
  28. package/dist/chunks/{metric-comparison-CYIt2F5X.js → metric-comparison-BfcmwxM1.js} +4 -4
  29. package/dist/chunks/{model-change-B0rAK-5w.js → model-change-CJEj3ZD6.js} +1 -1
  30. package/dist/chunks/pivot-result-contract-expectations-fKBHFPfz.js +56 -0
  31. package/dist/chunks/pivot-result-identity-CWi5WrrY.js +77 -0
  32. package/dist/chunks/{raw-temporal-contract-WuXA8jBP.js → raw-temporal-contract-CjHaUIsE.js} +1 -1
  33. package/dist/chunks/{raw-temporal-presentation-CivONfcO.js → raw-temporal-presentation-DWzLIHc3.js} +8 -8
  34. package/dist/chunks/{report-preferences-dialog-D_KyuEFx.js → report-preferences-dialog-D_wrbIQt.js} +17 -17
  35. package/dist/chunks/{report-runtime-context-BaIKSaja.js → report-runtime-context-BgM-iNWB.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-CIm9A8_j.js → resolve-dashboard-input-context-Df8V5QHW.js} +1415 -1567
  37. package/dist/chunks/{saved-dashboard-context-akb9JfOL.js → saved-dashboard-context-VvXI6r03.js} +9 -9
  38. package/dist/chunks/{selection-reducer-yw_JgICP.js → selection-reducer-By4CSmEF.js} +1 -1
  39. package/dist/chunks/{semaphor-ready-indicator-Ba7dwP5_.js → semaphor-ready-indicator-fejZmdq9.js} +49593 -56071
  40. package/dist/chunks/{shelf-drop-preview-context-5rg3pJHW.js → shelf-drop-preview-context-BuTCXe-S.js} +7 -7
  41. package/dist/chunks/{source-entity-resolution-CGymm5td.js → source-entity-resolution-B46EZIzX.js} +1 -1
  42. package/dist/chunks/{switch-B-UTI6v-.js → switch-Bq92UGId.js} +3 -3
  43. package/dist/chunks/{table-export-sheet-CgO6gaSM.js → table-export-sheet-noKl8-en.js} +1 -1
  44. package/dist/chunks/{table-settings-DOT_Bv1m.js → table-settings-PpINOzw8.js} +3 -3
  45. package/dist/chunks/{temporal-bucket-C4rqmwaQ.js → temporal-bucket-DzyadxVY.js} +53 -53
  46. package/dist/chunks/temporal-input-presentation-CJWS4d0L.js +879 -0
  47. package/dist/chunks/{token-types-DYECHYGH.js → token-types--0bgRCaO.js} +1 -1
  48. package/dist/chunks/{use-create-flow-overlay-state-BHNs0wl7.js → use-create-flow-overlay-state-Cz-ve64t.js} +7 -7
  49. package/dist/chunks/{validators-ClKLGDGZ.js → validators-CZo_H4E6.js} +305 -307
  50. package/dist/dashboard/index.js +2 -2
  51. package/dist/dashboard-authoring/index.js +60 -60
  52. package/dist/data-app-sdk/index.js +6 -6
  53. package/dist/data-app-sdk-adapters/index.js +3 -3
  54. package/dist/data-app-sdk-validation/index.js +6 -6
  55. package/dist/format-utils/index.js +207 -223
  56. package/dist/index.js +96 -97
  57. package/dist/layouts/index.js +1 -1
  58. package/dist/pdf-export-policy/index.js +9 -11
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/brand-studio/brand-studio-draft.d.ts +0 -3
  63. package/dist/types/brand-studio/index.d.ts +1 -1
  64. package/dist/types/components/visual/data-table/types/data-table.d.ts +0 -1
  65. package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -6
  66. package/dist/types/index.js +27 -28
  67. package/dist/types/lib/api/exports-api.d.ts +1 -1
  68. package/dist/types/lib/charts/table-chart-types.d.ts +1 -1
  69. package/dist/types/lib/charts/types.d.ts +2 -2
  70. package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +0 -3
  71. package/dist/types/lib/document/document-edits.d.ts +1 -1
  72. package/dist/types/lib/document/document-section-kinds.d.ts +2 -4
  73. package/dist/types/lib/document/document-table-data-policy.d.ts +1 -2
  74. package/dist/types/lib/formatters/grouped-temporal-activation.d.ts +3 -3
  75. package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +0 -6
  76. package/dist/types/lib/query-context/card-server-request.d.ts +0 -1
  77. package/dist/types/lib/table-formatting/table-formatting-types.d.ts +1 -1
  78. package/dist/types/lib/types/common-types.d.ts +0 -7
  79. package/dist/types/lib/types/explorer-types.d.ts +1 -14
  80. package/dist/types/lib/utils/card-config-utils.d.ts +11 -1
  81. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +1 -2
  82. package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +9 -4
  83. package/dist/types/shared/format-utils/grouped-table-presentation.d.ts +0 -14
  84. package/dist/types/shared/format-utils/index.d.ts +0 -2
  85. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +1 -1
  86. package/dist/types/shared/format-utils/pivot-result-contract-expectations.d.ts +2 -20
  87. package/dist/types/shared/format-utils/pivot-result-identity.d.ts +0 -20
  88. package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +0 -1
  89. package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +0 -4
  90. package/package.json +2 -2
  91. package/dist/chunks/comparison-window-caption-C2WNTlxK.js +0 -1433
  92. package/dist/chunks/pivot-header-presentation-CX4fkRuG.js +0 -42
  93. package/dist/chunks/pivot-result-identity-BHJGZwIc.js +0 -94
  94. package/dist/chunks/pivot-result-lifecycle-BygCpOhk.js +0 -1238
  95. package/dist/types/components/visual/pivot-table/types.d.ts +0 -80
  96. package/dist/types/shared/format-utils/aggregate-table-row-presentation.d.ts +0 -85
  97. package/dist/types/shared/format-utils/pivot-result-lifecycle.d.ts +0 -55
@@ -1,80 +0,0 @@
1
- import { AggregateFunction, GroupByField, QueryColumnKeyMap } from '../../../lib/types/explorer-types.js';
2
- import { ComparisonMetadataMap } from '../../../lib/types/query-types.js';
3
- import { SemaphorResultColumn } from '../../../shared/analytics-protocol/index.js';
4
- import { CanonicalPivotResultContract, CanonicalPivotResultState } from '../../../shared/format-utils/index.js';
5
- import { TemporalResultOwner } from '../../../shared/dashboard-authoring/index.js';
6
- export type { AggregateFunction } from '../../../lib/types/explorer-types.js';
7
- export declare enum PivotMarkerEnum {
8
- SUBTOTAL = "__SUBTOTAL__",
9
- TOTAL = "__TOTAL__"
10
- }
11
- export interface ColumnAggregate {
12
- function: AggregateFunction;
13
- pivotLevel: string | 'ALL';
14
- }
15
- export interface RowAggregate {
16
- function: AggregateFunction;
17
- groupLevel?: string;
18
- }
19
- export interface PivotCardConfig {
20
- columnAggregates?: ColumnAggregate[];
21
- rowAggregates?: RowAggregate[];
22
- }
23
- export interface PivotRowMetadata {
24
- isSubtotal?: boolean;
25
- isGrandTotal?: boolean;
26
- subtotalLevel?: string | 'grandTotal';
27
- aggregate?: AggregateFunction;
28
- subtotalContext?: {
29
- fieldAlias: string;
30
- value: string;
31
- groupByValues: Record<string, any>;
32
- };
33
- }
34
- export interface ColumnSubtotalMeta {
35
- columnName: string;
36
- isSubtotal: boolean;
37
- subtotalLevel: string;
38
- aggregate: AggregateFunction;
39
- pivotFieldId?: string | 'ALL';
40
- pivotFieldIds?: string[];
41
- pivotPath?: (string | null)[];
42
- subtotalScope?: 'pivot-value' | 'grand-total';
43
- }
44
- export interface PivotColumnSchema {
45
- alias: string;
46
- metricAlias?: string;
47
- metricId: string;
48
- metricName: string;
49
- metricLabel: string;
50
- pivotValues: (string | null)[];
51
- pivotFieldIds?: string[];
52
- pivotFields: string[];
53
- displayLabel?: string;
54
- isPivotColumn?: boolean;
55
- isMetricColumn?: boolean;
56
- }
57
- export interface ColumnMetadata {
58
- metricAlias: string;
59
- metricId: string;
60
- pivotValues: (string | null)[];
61
- pivotFieldIds?: string[];
62
- isSubtotal: boolean;
63
- aggregateFunction?: string;
64
- subtotalScope?: 'base' | 'pivot-value' | 'grand-total';
65
- }
66
- export interface PivotTableResponse {
67
- records: (Record<string, any> & PivotRowMetadata)[];
68
- resultOwner?: TemporalResultOwner;
69
- pivotResultState?: CanonicalPivotResultState;
70
- pivotResultContract?: CanonicalPivotResultContract;
71
- pivotSchema: PivotColumnSchema[];
72
- subtotalColumns: string[];
73
- columnSubtotalMeta?: ColumnSubtotalMeta[];
74
- groupByColumns?: GroupByField[];
75
- columnMetadata?: Record<string, ColumnMetadata>;
76
- comparisonMetadata?: ComparisonMetadataMap;
77
- columns?: SemaphorResultColumn[];
78
- columnKeyMap?: QueryColumnKeyMap;
79
- }
80
- export type PivotTableData = (Record<string, any> & PivotRowMetadata)[];
@@ -1,85 +0,0 @@
1
- /**
2
- * React-free aggregate-table row presentation policy shared by browser and
3
- * delivery adapters. Canonical tuple values and row metadata remain identity;
4
- * this module owns authoritative group keys and group-cell placement.
5
- */
6
- export { PDF_GROUP_CONTINUATION_CLASS as AGGREGATE_PDF_CONTINUATION_CLASS, } from './grouped-table-presentation.js';
7
- export interface AggregateSubtotalLabelInput {
8
- aggregateFunction: string;
9
- customLabel?: string;
10
- levelValue: unknown;
11
- formatValue?: (value: unknown) => string;
12
- }
13
- export declare const AGGREGATE_TOTAL_MEMBER_MARKER: "__TOTAL__";
14
- export interface AggregateTablePresentationContext {
15
- groupColumnKeys: string[];
16
- rowAggregates: Array<{
17
- function: string;
18
- groupLevel: string;
19
- label?: string;
20
- }>;
21
- }
22
- export type AggregateGroupCellPlacement = 'value' | 'label' | 'empty';
23
- export interface AggregateGroupCellPresentation<T = string> {
24
- columnKey: string;
25
- text: T | string;
26
- placement: AggregateGroupCellPlacement;
27
- colSpan: number;
28
- }
29
- export interface AggregateGroupRowPresentation<T = string> {
30
- kind: 'data' | 'subtotal' | 'grand-total';
31
- cells: AggregateGroupCellPresentation<T>[];
32
- }
33
- export interface AggregateTablePresentationColumnKeyMap {
34
- byRole: Readonly<{
35
- groupby?: Readonly<Record<string, {
36
- rawKey: string;
37
- outputKey?: string;
38
- }>>;
39
- }>;
40
- }
41
- export declare function isAggregateTotalMemberMarker(value: unknown): value is typeof AGGREGATE_TOTAL_MEMBER_MARKER;
42
- /**
43
- * Resolves saved field identity into the physical result keys used by rows.
44
- * Missing groupByColumns is a valid metric-only aggregate-table shape.
45
- */
46
- export declare function resolveAggregateTablePresentationContext(input: {
47
- groupByColumns?: readonly unknown[];
48
- rowAggregates?: readonly unknown[];
49
- columnKeyMap?: AggregateTablePresentationColumnKeyMap;
50
- }): AggregateTablePresentationContext;
51
- export declare function formatAggregateSubtotalLabel(input: AggregateSubtotalLabelInput): string;
52
- export declare function formatAggregateGrandTotalLabel(aggregateFunction: string, customLabel?: string): string;
53
- /**
54
- * Returns whether an aggregate group value starts a new visible group at its
55
- * hierarchy level. A nested value repeats only when its complete parent prefix
56
- * also repeats. Subtotals and grand totals are presentation boundaries.
57
- */
58
- export declare function shouldPresentAggregateGroupValue(input: {
59
- row: Record<string, unknown>;
60
- previousRow?: Record<string, unknown>;
61
- context: AggregateTablePresentationContext;
62
- columnKey: string;
63
- }): boolean;
64
- /**
65
- * Formats one physical aggregate group cell. Row metadata alone determines
66
- * subtotal/grand-total ownership; null is always passed to the value formatter
67
- * as a genuine blank member.
68
- */
69
- export declare function presentAggregateGroupRow<T = string>(input: {
70
- row: Record<string, unknown>;
71
- context: AggregateTablePresentationContext;
72
- formatValue: (value: unknown, columnKey: string) => T;
73
- formatLabelValue?: (value: unknown, columnKey: string) => string;
74
- }): AggregateGroupRowPresentation<T>;
75
- export declare function formatAggregateGroupCell(input: {
76
- row: Record<string, unknown>;
77
- context: AggregateTablePresentationContext;
78
- columnKey: string;
79
- formatValue: (value: unknown, columnKey: string) => string;
80
- }): string;
81
- export declare function formatAggregateGroupRow(input: {
82
- row: Record<string, unknown>;
83
- context: AggregateTablePresentationContext;
84
- formatValue: (value: unknown, columnKey: string) => string;
85
- }): string[];
@@ -1,55 +0,0 @@
1
- import { SemaphorResultColumn } from '../analytics-protocol/contracts.js';
2
- import { PivotResultColumnClassification, QueryColumnKeyMap, QueryColumnKeyRole } from './pivot-result-identity.js';
3
- export type CanonicalPivotResultState = 'loaded_empty' | 'loaded_valid';
4
- type CanonicalPivotResultBase = {
5
- columns: SemaphorResultColumn[];
6
- columnKeyMap: QueryColumnKeyMap;
7
- pivotResultContract: CanonicalPivotResultContract;
8
- };
9
- export type LoadedEmptyPivotResult = CanonicalPivotResultBase & {
10
- pivotResultState: 'loaded_empty';
11
- records: [];
12
- };
13
- export type LoadedValidPivotResult = CanonicalPivotResultBase & {
14
- pivotResultState: 'loaded_valid';
15
- records: [Record<string, unknown>, ...Record<string, unknown>[]];
16
- };
17
- export type CanonicalPivotResultTransport = LoadedEmptyPivotResult | LoadedValidPivotResult;
18
- export declare class PivotResultLifecycleError extends Error {
19
- readonly cause?: unknown | undefined;
20
- readonly code: "invalid_pivot_result_lifecycle";
21
- readonly deliveryBlocking = true;
22
- constructor(message: string, cause?: unknown | undefined);
23
- }
24
- type PivotResultLifecycleInput = {
25
- pivotResultState?: unknown;
26
- pivotResultContract?: unknown;
27
- records?: unknown;
28
- columns?: unknown;
29
- columnKeyMap?: unknown;
30
- };
31
- export type PivotResultExpectedRoleFieldIds = Readonly<Partial<Record<QueryColumnKeyRole, readonly string[]>>>;
32
- export type PivotResultColumnKind = 'row' | 'pivot_metric' | 'value';
33
- export type CanonicalPivotResultContract = {
34
- version: 1;
35
- expectedRoleFieldIds: PivotResultExpectedRoleFieldIds;
36
- expectedMetricAliases: readonly string[];
37
- columnKinds: Readonly<Record<string, PivotResultColumnKind>>;
38
- columnClassifications: Readonly<Record<string, PivotResultColumnClassification | undefined>>;
39
- };
40
- /**
41
- * Parses the canonical pivot wire shape once. Downstream presentation and
42
- * delivery consumers receive this discriminated result and do not infer
43
- * lifecycle or repeat physical-member validation.
44
- */
45
- export declare function parseCanonicalPivotResultTransport(input: PivotResultLifecycleInput): CanonicalPivotResultTransport;
46
- export declare function createCanonicalPivotResultTransport(input: {
47
- records: Record<string, unknown>[];
48
- columns: SemaphorResultColumn[];
49
- columnKeyMap: QueryColumnKeyMap;
50
- expectedRoleFieldIds: PivotResultExpectedRoleFieldIds;
51
- expectedMetricAliases?: readonly string[];
52
- physicalPivotColumnKeys: readonly string[];
53
- columnMetadata?: Readonly<Record<string, PivotResultColumnClassification | undefined>>;
54
- }): CanonicalPivotResultTransport;
55
- export {};