react-semaphor 0.1.371 → 0.1.373
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.
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +1 -1
- package/dist/chunks/{calendar-preferences-dialog-Dn6o2r2Y.js → calendar-preferences-dialog-BCO0I6Q2.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-ClBAkMmF.js → calendar-preferences-dialog-CAcqW83Q.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BO-kXtEd.js → dashboard-briefing-launcher-CxozwqgX.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D3Xfc_26.js → dashboard-briefing-launcher-DTp4KNI1.js} +104 -104
- package/dist/chunks/{dashboard-controls-B3sdy_Zx.js → dashboard-controls-Bc4E4Cky.js} +167 -167
- package/dist/chunks/{dashboard-controls-DcXMFgGR.js → dashboard-controls-Dkct7mpD.js} +1 -1
- package/dist/chunks/{dashboard-json-CFURS_OR.js → dashboard-json-BFB5jFmm.js} +1 -1
- package/dist/chunks/{dashboard-json-BWfkEy48.js → dashboard-json-BmCwILfI.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-BD2AJLiT.js → edit-dashboard-visual-BBlY9tKB.js} +37 -37
- package/dist/chunks/{edit-dashboard-visual-DjdhKiP2.js → edit-dashboard-visual-BXLuXKFc.js} +6592 -6565
- package/dist/chunks/{index-C0Qnfr_7.js → index-Clqr43Sr.js} +36742 -34869
- package/dist/chunks/index-D5Pp-5LR.js +1361 -0
- package/dist/chunks/{resource-management-panel-DytUMSGA.js → resource-management-panel-BbkbAlPo.js} +1 -1
- package/dist/chunks/{resource-management-panel-YvIfaphX.js → resource-management-panel-DJUr47Bb.js} +51 -51
- package/dist/chunks/{use-create-flow-overlay-state-CwIG1Ekp.js → use-create-flow-overlay-state-B4EAcL2v.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BETXykC9.js → use-create-flow-overlay-state-DZI7VYBs.js} +35 -35
- package/dist/chunks/{use-visual-utils-Bk135OgA.js → use-visual-utils-Bl3ltNL9.js} +12 -12
- package/dist/chunks/{use-visual-utils-BzFjIykb.js → use-visual-utils-djsPEgF1.js} +1 -1
- package/dist/chunks/{validation-D4Zz6WPD.js → validation-1V7bWmYw.js} +1 -1
- package/dist/chunks/{validation-CQFpcSSP.js → validation-DlrTIf1N.js} +1 -1
- package/dist/chunks/{validators-CuKnUZFO.js → validators-CtNmgsvG.js} +409 -314
- package/dist/chunks/validators-jpoYhpHh.js +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +1 -1
- package/dist/dashboard-authoring/index.js +1 -1
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +1 -1
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +32 -32
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +127 -126
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +102 -11
- package/dist/types/dashboard-assistant.d.ts +117 -103
- package/dist/types/dashboard-authoring.d.ts +63 -2
- package/dist/types/dashboard.d.ts +263 -2
- package/dist/types/data-app-builder.d.ts +40 -1
- package/dist/types/data-app-sdk-validation.d.ts +94 -102
- package/dist/types/data-app-sdk.d.ts +106 -11
- package/dist/types/main.d.ts +473 -2
- package/dist/types/shared.d.ts +263 -2
- package/dist/types/surfboard.d.ts +263 -2
- package/dist/types/types.d.ts +529 -2
- package/package.json +1 -1
- package/dist/chunks/index-DlLvzmJF.js +0 -1361
- package/dist/chunks/validators-DHee9kM2.js +0 -1
package/dist/surfboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-D5Pp-5LR.js"),e=require("../chunks/common-types-C73-Ud1-.js"),a=require("../chunks/calendar-preferences-dialog-BCO0I6Q2.js");exports.Surfboard=r.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
|
package/dist/surfboard/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as e } from "../chunks/index-
|
|
1
|
+
import { a as e } from "../chunks/index-Clqr43Sr.js";
|
|
2
2
|
import { C, E } from "../chunks/common-types-4bjoIgvm.js";
|
|
3
|
-
import { C as s } from "../chunks/calendar-preferences-dialog-
|
|
3
|
+
import { C as s } from "../chunks/calendar-preferences-dialog-CAcqW83Q.js";
|
|
4
4
|
export {
|
|
5
5
|
C as CONTROL_CARD_DEFAULT_VALUE,
|
|
6
6
|
s as CalendarPreferencesDialog,
|
|
@@ -91,6 +91,26 @@ export declare type MatrixAxisPayload = {
|
|
|
91
91
|
nodes: MatrixNode[];
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
+
export declare type MatrixAxisResultPayload = {
|
|
95
|
+
id: 'rows' | 'columns';
|
|
96
|
+
levels: MatrixAxisLevelDescriptor[];
|
|
97
|
+
nodeIds: string[];
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export declare type MatrixCalculationDescriptor = {
|
|
101
|
+
id: string;
|
|
102
|
+
measureId: string;
|
|
103
|
+
aggregate?: SemaphorAggregateFunction;
|
|
104
|
+
label?: string;
|
|
105
|
+
source: 'measureDefault' | 'rowSubtotal' | 'columnSubtotal' | 'subtotalIntersection' | 'rowGrandTotal' | 'columnGrandTotal' | 'matrixGrandTotal' | 'custom';
|
|
106
|
+
scope?: {
|
|
107
|
+
rowLevelId?: string;
|
|
108
|
+
columnLevelId?: string;
|
|
109
|
+
rowNodeId?: string;
|
|
110
|
+
columnNodeId?: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
|
|
94
114
|
export declare type MatrixCapability = 'rowHierarchy' | 'columnHierarchy' | 'rowSubtotals' | 'columnSubtotals' | 'grandTotals' | 'lazyRows' | 'lazyColumns' | 'conditionalFormatting' | 'visualExport' | (string & {});
|
|
95
115
|
|
|
96
116
|
export declare type MatrixCell = {
|
|
@@ -98,8 +118,6 @@ export declare type MatrixCell = {
|
|
|
98
118
|
rowNodeId: string;
|
|
99
119
|
columnNodeId?: string;
|
|
100
120
|
measureInstanceId: string;
|
|
101
|
-
rowPath: MatrixMemberPathSegment[];
|
|
102
|
-
columnPath: MatrixMemberPathSegment[];
|
|
103
121
|
rawValue: unknown;
|
|
104
122
|
presence: MatrixCellPresence;
|
|
105
123
|
formattedValue?: string;
|
|
@@ -120,8 +138,6 @@ export declare type MatrixCellFormattingScope = {
|
|
|
120
138
|
columnNodeId?: string;
|
|
121
139
|
measureInstanceId: string;
|
|
122
140
|
role: MatrixCellRole;
|
|
123
|
-
rowPath: MatrixMemberPathSegment[];
|
|
124
|
-
columnPath: MatrixMemberPathSegment[];
|
|
125
141
|
};
|
|
126
142
|
|
|
127
143
|
export declare type MatrixCellPresence = 'present' | 'presentNull' | 'missing' | 'densified';
|
|
@@ -184,8 +200,6 @@ export declare type MatrixGridCell = {
|
|
|
184
200
|
presence: MatrixCellPresence;
|
|
185
201
|
role: MatrixCellRole;
|
|
186
202
|
measureInstanceId: string;
|
|
187
|
-
rowPath: MatrixMemberPathSegment[];
|
|
188
|
-
columnPath: MatrixMemberPathSegment[];
|
|
189
203
|
};
|
|
190
204
|
|
|
191
205
|
export declare type MatrixGridColumn = {
|
|
@@ -239,15 +253,26 @@ export declare type MatrixGridRowHeaderLevel = {
|
|
|
239
253
|
fieldInstanceId: string;
|
|
240
254
|
};
|
|
241
255
|
|
|
256
|
+
export declare type MatrixLayoutProjection = {
|
|
257
|
+
rowHeaderLevels: MatrixGridRowHeaderLevel[];
|
|
258
|
+
columnHeaderRows: MatrixGridHeaderRow[];
|
|
259
|
+
columns: MatrixGridColumn[];
|
|
260
|
+
};
|
|
261
|
+
|
|
242
262
|
export declare type MatrixMeasureDescriptor = {
|
|
243
263
|
instanceId: string;
|
|
244
264
|
fieldKey: string;
|
|
245
265
|
label: string;
|
|
246
266
|
field: SemaphorFieldRef;
|
|
247
267
|
aggregate?: SemaphorAggregateFunction;
|
|
268
|
+
format?: SemaphorValueFormat;
|
|
248
269
|
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
249
270
|
};
|
|
250
271
|
|
|
272
|
+
export declare type MatrixMeasureResultDescriptor = MatrixMeasureDescriptor & {
|
|
273
|
+
semantics: MatrixMeasureSemantics;
|
|
274
|
+
};
|
|
275
|
+
|
|
251
276
|
export declare type MatrixMeasureSemantics = {
|
|
252
277
|
kind: 'additive';
|
|
253
278
|
aggregate?: SemaphorAggregateFunction;
|
|
@@ -341,6 +366,17 @@ export declare type MatrixResolvedSort = {
|
|
|
341
366
|
by: SemaphorMatrixSortRule['by'];
|
|
342
367
|
};
|
|
343
368
|
|
|
369
|
+
export declare type MatrixResultCell = {
|
|
370
|
+
rowId: string;
|
|
371
|
+
columnId?: string;
|
|
372
|
+
measureId: string;
|
|
373
|
+
value: unknown;
|
|
374
|
+
formattedValue?: string;
|
|
375
|
+
presence: MatrixCellPresence;
|
|
376
|
+
role: MatrixCellRole;
|
|
377
|
+
calculationId?: string;
|
|
378
|
+
};
|
|
379
|
+
|
|
344
380
|
export declare type MatrixShape = 'hierarchical' | 'pivot';
|
|
345
381
|
|
|
346
382
|
export declare type MatrixTotals = {
|
|
@@ -809,7 +845,7 @@ export declare type SemaphorDerivedFieldDefinition = {
|
|
|
809
845
|
defaultAggregate?: SemaphorAggregateFunction;
|
|
810
846
|
aggregationBehavior?: SemaphorDerivedFieldAggregationBehavior;
|
|
811
847
|
aggregationStrategy?: SemaphorDerivedFieldAggregationStrategy;
|
|
812
|
-
format?:
|
|
848
|
+
format?: SemaphorValueFormat;
|
|
813
849
|
tags?: string[];
|
|
814
850
|
};
|
|
815
851
|
|
|
@@ -994,9 +1030,25 @@ export declare type SemaphorMatrixMemberPathSegment = {
|
|
|
994
1030
|
|
|
995
1031
|
export declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
|
|
996
1032
|
kind: 'matrix';
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1033
|
+
schemaVersion: 1;
|
|
1034
|
+
intent?: SemaphorMatrixIntent;
|
|
1035
|
+
shape: MatrixShape;
|
|
1036
|
+
capabilities: MatrixCapability[];
|
|
1037
|
+
executionMetadata: MatrixExecutionMetadata;
|
|
1038
|
+
fieldsById: Record<string, MatrixFieldDescriptor>;
|
|
1039
|
+
measuresById: Record<string, MatrixMeasureResultDescriptor>;
|
|
1040
|
+
calculationsById?: Record<string, MatrixCalculationDescriptor>;
|
|
1041
|
+
axes: {
|
|
1042
|
+
rows: MatrixAxisResultPayload;
|
|
1043
|
+
columns: MatrixAxisResultPayload;
|
|
1044
|
+
};
|
|
1045
|
+
nodesById: Record<string, MatrixNode>;
|
|
1046
|
+
layout: MatrixLayoutProjection;
|
|
1047
|
+
cells: MatrixResultCell[];
|
|
1048
|
+
totals: MatrixTotals;
|
|
1049
|
+
sort: MatrixResolvedSort[];
|
|
1050
|
+
formattingContext: MatrixFormattingContext;
|
|
1051
|
+
pageInfo?: MatrixPageInfo;
|
|
1000
1052
|
expansion?: MatrixExpansionResponseHints;
|
|
1001
1053
|
};
|
|
1002
1054
|
|
|
@@ -1063,6 +1115,7 @@ export declare type SemaphorMatrixValueField = {
|
|
|
1063
1115
|
field: SemaphorFieldRef;
|
|
1064
1116
|
aggregate?: SemaphorAggregateFunction;
|
|
1065
1117
|
label?: string;
|
|
1118
|
+
format?: SemaphorValueFormat;
|
|
1066
1119
|
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
1067
1120
|
};
|
|
1068
1121
|
|
|
@@ -1257,7 +1310,7 @@ export declare type SemaphorResultCalculationOutput = {
|
|
|
1257
1310
|
key: string;
|
|
1258
1311
|
label?: string;
|
|
1259
1312
|
dataType?: SemaphorFieldRef['dataType'];
|
|
1260
|
-
format?:
|
|
1313
|
+
format?: SemaphorValueFormat;
|
|
1261
1314
|
};
|
|
1262
1315
|
|
|
1263
1316
|
export declare type SemaphorResultColumn = {
|
|
@@ -1370,6 +1423,44 @@ export declare type SemaphorValidationResult = {
|
|
|
1370
1423
|
warnings: SemaphorProtocolIssue[];
|
|
1371
1424
|
};
|
|
1372
1425
|
|
|
1426
|
+
export declare type SemaphorValueFormat = {
|
|
1427
|
+
type: 'number' | 'currency' | 'percent' | 'percentage' | 'scientific';
|
|
1428
|
+
locale?: string;
|
|
1429
|
+
minimumFractionDigits?: number;
|
|
1430
|
+
maximumFractionDigits?: number;
|
|
1431
|
+
useGrouping?: boolean;
|
|
1432
|
+
prefix?: string;
|
|
1433
|
+
suffix?: string;
|
|
1434
|
+
negativeStyle?: 'minus' | 'parentheses';
|
|
1435
|
+
compact?: boolean;
|
|
1436
|
+
scale?: number;
|
|
1437
|
+
currency?: string;
|
|
1438
|
+
percentValueMode?: 'fraction' | 'whole';
|
|
1439
|
+
} | {
|
|
1440
|
+
type: 'date' | 'datetime';
|
|
1441
|
+
locale?: string;
|
|
1442
|
+
pattern?: string;
|
|
1443
|
+
relative?: boolean;
|
|
1444
|
+
timezone?: string;
|
|
1445
|
+
sourceTimezone?: string;
|
|
1446
|
+
prefix?: string;
|
|
1447
|
+
suffix?: string;
|
|
1448
|
+
} | {
|
|
1449
|
+
type: 'duration';
|
|
1450
|
+
inputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
1451
|
+
outputStyle?: 'compact' | 'digital' | 'long';
|
|
1452
|
+
largestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
1453
|
+
smallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
1454
|
+
maxUnits?: number;
|
|
1455
|
+
prefix?: string;
|
|
1456
|
+
suffix?: string;
|
|
1457
|
+
negativeStyle?: 'minus' | 'parentheses';
|
|
1458
|
+
} | {
|
|
1459
|
+
type: 'string';
|
|
1460
|
+
prefix?: string;
|
|
1461
|
+
suffix?: string;
|
|
1462
|
+
};
|
|
1463
|
+
|
|
1373
1464
|
export declare type SemaphorViewPresentation = {
|
|
1374
1465
|
kind: 'kpi';
|
|
1375
1466
|
format?: 'number' | 'currency' | 'percent' | 'duration';
|
|
@@ -49,6 +49,28 @@ declare interface CalculatedFieldFormula {
|
|
|
49
49
|
declare type CalculatedFieldOperation = 'sum' | 'difference' | 'product' | 'ratio' | 'change' | 'percentage' | 'scale' | 'custom';
|
|
50
50
|
|
|
51
51
|
declare interface CardConfig {
|
|
52
|
+
/**
|
|
53
|
+
* Matrix table is the shared analytics-spine successor for pivot and
|
|
54
|
+
* hierarchical aggregate tables. Dashboard cards store the public matrix
|
|
55
|
+
* intent shape so Data Apps, MCP, and dashboard runtime consume one contract.
|
|
56
|
+
*/
|
|
57
|
+
matrixIntent?: SemaphorMatrixIntent;
|
|
58
|
+
/**
|
|
59
|
+
* Deprecated compatibility fields for older matrix table drafts. New
|
|
60
|
+
* dashboard-authored matrix cards should use `matrixIntent` so normal
|
|
61
|
+
* `filters` can remain the explorer/card-level `FilterGroup`.
|
|
62
|
+
*/
|
|
63
|
+
version?: SemaphorMatrixIntent['version'];
|
|
64
|
+
source?: SemaphorMatrixIntent['source'];
|
|
65
|
+
rows?: SemaphorMatrixIntent['rows'];
|
|
66
|
+
columns?: SemaphorMatrixIntent['columns'];
|
|
67
|
+
values?: SemaphorMatrixIntent['values'];
|
|
68
|
+
inputs?: SemaphorMatrixIntent['inputs'];
|
|
69
|
+
totals?: SemaphorMatrixIntent['totals'];
|
|
70
|
+
sort?: SemaphorMatrixIntent['sort'];
|
|
71
|
+
expansion?: SemaphorMatrixIntent['expansion'];
|
|
72
|
+
layout?: SemaphorMatrixIntent['layout'];
|
|
73
|
+
displayLimits?: SemaphorMatrixIntent['displayLimits'];
|
|
52
74
|
groupByColumns?: GroupByField[];
|
|
53
75
|
metricColumns?: MetricField[];
|
|
54
76
|
pivotByColumns?: PivotByField[];
|
|
@@ -558,44 +580,27 @@ declare type MatrixAxisLevelDescriptor = {
|
|
|
558
580
|
subtotal?: SemaphorMatrixSubtotalOptions;
|
|
559
581
|
};
|
|
560
582
|
|
|
561
|
-
declare type
|
|
583
|
+
declare type MatrixAxisResultPayload = {
|
|
562
584
|
id: 'rows' | 'columns';
|
|
563
585
|
levels: MatrixAxisLevelDescriptor[];
|
|
564
|
-
|
|
586
|
+
nodeIds: string[];
|
|
565
587
|
};
|
|
566
588
|
|
|
567
|
-
declare type
|
|
568
|
-
|
|
569
|
-
declare type MatrixCell = {
|
|
589
|
+
declare type MatrixCalculationDescriptor = {
|
|
570
590
|
id: string;
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
measureInstanceId: string;
|
|
574
|
-
rowPath: MatrixMemberPathSegment[];
|
|
575
|
-
columnPath: MatrixMemberPathSegment[];
|
|
576
|
-
rawValue: unknown;
|
|
577
|
-
presence: MatrixCellPresence;
|
|
578
|
-
formattedValue?: string;
|
|
579
|
-
role: MatrixCellRole;
|
|
580
|
-
aggregateFunction?: SemaphorAggregateFunction;
|
|
581
|
-
formattingScope: MatrixCellFormattingScope;
|
|
582
|
-
actions?: MatrixCellAction[];
|
|
583
|
-
};
|
|
584
|
-
|
|
585
|
-
declare type MatrixCellAction = {
|
|
586
|
-
kind: 'requestSubgoal' | 'filter' | 'copyValue' | 'explainCalculation' | 'inspectContributingRows' | 'drillThrough' | (string & {});
|
|
591
|
+
measureId: string;
|
|
592
|
+
aggregate?: SemaphorAggregateFunction;
|
|
587
593
|
label?: string;
|
|
588
|
-
|
|
594
|
+
source: 'measureDefault' | 'rowSubtotal' | 'columnSubtotal' | 'subtotalIntersection' | 'rowGrandTotal' | 'columnGrandTotal' | 'matrixGrandTotal' | 'custom';
|
|
595
|
+
scope?: {
|
|
596
|
+
rowLevelId?: string;
|
|
597
|
+
columnLevelId?: string;
|
|
598
|
+
rowNodeId?: string;
|
|
599
|
+
columnNodeId?: string;
|
|
600
|
+
};
|
|
589
601
|
};
|
|
590
602
|
|
|
591
|
-
declare type
|
|
592
|
-
rowNodeId: string;
|
|
593
|
-
columnNodeId?: string;
|
|
594
|
-
measureInstanceId: string;
|
|
595
|
-
role: MatrixCellRole;
|
|
596
|
-
rowPath: MatrixMemberPathSegment[];
|
|
597
|
-
columnPath: MatrixMemberPathSegment[];
|
|
598
|
-
};
|
|
603
|
+
declare type MatrixCapability = 'rowHierarchy' | 'columnHierarchy' | 'rowSubtotals' | 'columnSubtotals' | 'grandTotals' | 'lazyRows' | 'lazyColumns' | 'conditionalFormatting' | 'visualExport' | (string & {});
|
|
599
604
|
|
|
600
605
|
declare type MatrixCellPresence = 'present' | 'presentNull' | 'missing' | 'densified';
|
|
601
606
|
|
|
@@ -636,10 +641,6 @@ declare type MatrixFieldDescriptor = {
|
|
|
636
641
|
label?: string;
|
|
637
642
|
};
|
|
638
643
|
|
|
639
|
-
declare type MatrixFieldDirectory = {
|
|
640
|
-
fieldsByInstanceId: Record<string, MatrixFieldDescriptor>;
|
|
641
|
-
};
|
|
642
|
-
|
|
643
644
|
declare type MatrixFormattingContext = {
|
|
644
645
|
domains?: Record<string, {
|
|
645
646
|
min?: number;
|
|
@@ -648,19 +649,6 @@ declare type MatrixFormattingContext = {
|
|
|
648
649
|
rules?: Array<Record<string, unknown>>;
|
|
649
650
|
};
|
|
650
651
|
|
|
651
|
-
declare type MatrixGridCell = {
|
|
652
|
-
id: string;
|
|
653
|
-
columnId: string;
|
|
654
|
-
cellId?: string;
|
|
655
|
-
rawValue: unknown;
|
|
656
|
-
formattedValue?: string;
|
|
657
|
-
presence: MatrixCellPresence;
|
|
658
|
-
role: MatrixCellRole;
|
|
659
|
-
measureInstanceId: string;
|
|
660
|
-
rowPath: MatrixMemberPathSegment[];
|
|
661
|
-
columnPath: MatrixMemberPathSegment[];
|
|
662
|
-
};
|
|
663
|
-
|
|
664
652
|
declare type MatrixGridColumn = {
|
|
665
653
|
id: string;
|
|
666
654
|
label: string;
|
|
@@ -685,42 +673,32 @@ declare type MatrixGridHeaderRow = {
|
|
|
685
673
|
cells: MatrixGridHeaderCell[];
|
|
686
674
|
};
|
|
687
675
|
|
|
688
|
-
declare type MatrixGridProjection = {
|
|
689
|
-
schemaVersion: 1;
|
|
690
|
-
shape: MatrixShape;
|
|
691
|
-
rowHeaderLevels: MatrixGridRowHeaderLevel[];
|
|
692
|
-
columnHeaderRows: MatrixGridHeaderRow[];
|
|
693
|
-
columns: MatrixGridColumn[];
|
|
694
|
-
rows: MatrixGridRow[];
|
|
695
|
-
};
|
|
696
|
-
|
|
697
|
-
declare type MatrixGridRow = {
|
|
698
|
-
id: string;
|
|
699
|
-
rowNodeId: string;
|
|
700
|
-
rowPath: MatrixMemberPathSegment[];
|
|
701
|
-
depth: number;
|
|
702
|
-
label: string;
|
|
703
|
-
role: 'value' | 'rowSubtotal' | 'rowGrandTotal';
|
|
704
|
-
isExpanded?: boolean;
|
|
705
|
-
hasChildren?: boolean;
|
|
706
|
-
cells: MatrixGridCell[];
|
|
707
|
-
};
|
|
708
|
-
|
|
709
676
|
declare type MatrixGridRowHeaderLevel = {
|
|
710
677
|
id: string;
|
|
711
678
|
label: string;
|
|
712
679
|
fieldInstanceId: string;
|
|
713
680
|
};
|
|
714
681
|
|
|
682
|
+
declare type MatrixLayoutProjection = {
|
|
683
|
+
rowHeaderLevels: MatrixGridRowHeaderLevel[];
|
|
684
|
+
columnHeaderRows: MatrixGridHeaderRow[];
|
|
685
|
+
columns: MatrixGridColumn[];
|
|
686
|
+
};
|
|
687
|
+
|
|
715
688
|
declare type MatrixMeasureDescriptor = {
|
|
716
689
|
instanceId: string;
|
|
717
690
|
fieldKey: string;
|
|
718
691
|
label: string;
|
|
719
692
|
field: SemaphorFieldRef;
|
|
720
693
|
aggregate?: SemaphorAggregateFunction;
|
|
694
|
+
format?: SemaphorValueFormat;
|
|
721
695
|
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
722
696
|
};
|
|
723
697
|
|
|
698
|
+
declare type MatrixMeasureResultDescriptor = MatrixMeasureDescriptor & {
|
|
699
|
+
semantics: MatrixMeasureSemantics;
|
|
700
|
+
};
|
|
701
|
+
|
|
724
702
|
declare type MatrixMeasureSemantics = {
|
|
725
703
|
kind: 'additive';
|
|
726
704
|
aggregate?: SemaphorAggregateFunction;
|
|
@@ -779,29 +757,6 @@ declare type MatrixPageInfo = {
|
|
|
779
757
|
hasMoreColumns?: boolean;
|
|
780
758
|
};
|
|
781
759
|
|
|
782
|
-
declare type MatrixPayload = {
|
|
783
|
-
kind: 'matrixPayload';
|
|
784
|
-
schemaVersion: 1;
|
|
785
|
-
shape: MatrixShape;
|
|
786
|
-
capabilities: MatrixCapability[];
|
|
787
|
-
executionMetadata: MatrixExecutionMetadata;
|
|
788
|
-
axes: {
|
|
789
|
-
rows: MatrixAxisPayload;
|
|
790
|
-
columns: MatrixAxisPayload;
|
|
791
|
-
};
|
|
792
|
-
measures: MatrixMeasureDescriptor[];
|
|
793
|
-
measureSemantics: Record<string, MatrixMeasureSemantics>;
|
|
794
|
-
fieldDirectory: MatrixFieldDirectory;
|
|
795
|
-
rowNodes: MatrixNode[];
|
|
796
|
-
columnNodes: MatrixNode[];
|
|
797
|
-
cells: MatrixCell[];
|
|
798
|
-
totals: MatrixTotals;
|
|
799
|
-
sort: MatrixResolvedSort[];
|
|
800
|
-
formattingContext: MatrixFormattingContext;
|
|
801
|
-
pageInfo?: MatrixPageInfo;
|
|
802
|
-
warnings?: MatrixWarning[];
|
|
803
|
-
};
|
|
804
|
-
|
|
805
760
|
declare type MatrixQueryStrategy = 'tall' | 'wide' | 'lazy' | 'export';
|
|
806
761
|
|
|
807
762
|
declare type MatrixResolvedSort = {
|
|
@@ -814,6 +769,17 @@ declare type MatrixResolvedSort = {
|
|
|
814
769
|
by: SemaphorMatrixSortRule['by'];
|
|
815
770
|
};
|
|
816
771
|
|
|
772
|
+
declare type MatrixResultCell = {
|
|
773
|
+
rowId: string;
|
|
774
|
+
columnId?: string;
|
|
775
|
+
measureId: string;
|
|
776
|
+
value: unknown;
|
|
777
|
+
formattedValue?: string;
|
|
778
|
+
presence: MatrixCellPresence;
|
|
779
|
+
role: MatrixCellRole;
|
|
780
|
+
calculationId?: string;
|
|
781
|
+
};
|
|
782
|
+
|
|
817
783
|
declare type MatrixShape = 'hierarchical' | 'pivot';
|
|
818
784
|
|
|
819
785
|
declare type MatrixTotals = {
|
|
@@ -825,13 +791,6 @@ declare type MatrixTotals = {
|
|
|
825
791
|
};
|
|
826
792
|
};
|
|
827
793
|
|
|
828
|
-
declare type MatrixWarning = {
|
|
829
|
-
code: string;
|
|
830
|
-
message: string;
|
|
831
|
-
path?: string;
|
|
832
|
-
severity?: 'info' | 'warning' | 'error';
|
|
833
|
-
};
|
|
834
|
-
|
|
835
794
|
declare interface MetricField extends Field {
|
|
836
795
|
role: 'metric';
|
|
837
796
|
aggregate?: AggregateFunction;
|
|
@@ -1052,7 +1011,7 @@ declare type SemaphorDerivedFieldDefinition = {
|
|
|
1052
1011
|
defaultAggregate?: SemaphorAggregateFunction;
|
|
1053
1012
|
aggregationBehavior?: SemaphorDerivedFieldAggregationBehavior;
|
|
1054
1013
|
aggregationStrategy?: SemaphorDerivedFieldAggregationStrategy;
|
|
1055
|
-
format?:
|
|
1014
|
+
format?: SemaphorValueFormat;
|
|
1056
1015
|
tags?: string[];
|
|
1057
1016
|
};
|
|
1058
1017
|
|
|
@@ -1206,9 +1165,25 @@ declare type SemaphorMatrixMemberPathSegment = {
|
|
|
1206
1165
|
|
|
1207
1166
|
declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
|
|
1208
1167
|
kind: 'matrix';
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1168
|
+
schemaVersion: 1;
|
|
1169
|
+
intent?: SemaphorMatrixIntent;
|
|
1170
|
+
shape: MatrixShape;
|
|
1171
|
+
capabilities: MatrixCapability[];
|
|
1172
|
+
executionMetadata: MatrixExecutionMetadata;
|
|
1173
|
+
fieldsById: Record<string, MatrixFieldDescriptor>;
|
|
1174
|
+
measuresById: Record<string, MatrixMeasureResultDescriptor>;
|
|
1175
|
+
calculationsById?: Record<string, MatrixCalculationDescriptor>;
|
|
1176
|
+
axes: {
|
|
1177
|
+
rows: MatrixAxisResultPayload;
|
|
1178
|
+
columns: MatrixAxisResultPayload;
|
|
1179
|
+
};
|
|
1180
|
+
nodesById: Record<string, MatrixNode>;
|
|
1181
|
+
layout: MatrixLayoutProjection;
|
|
1182
|
+
cells: MatrixResultCell[];
|
|
1183
|
+
totals: MatrixTotals;
|
|
1184
|
+
sort: MatrixResolvedSort[];
|
|
1185
|
+
formattingContext: MatrixFormattingContext;
|
|
1186
|
+
pageInfo?: MatrixPageInfo;
|
|
1212
1187
|
expansion?: MatrixExpansionResponseHints;
|
|
1213
1188
|
};
|
|
1214
1189
|
|
|
@@ -1275,6 +1250,7 @@ declare type SemaphorMatrixValueField = {
|
|
|
1275
1250
|
field: SemaphorFieldRef;
|
|
1276
1251
|
aggregate?: SemaphorAggregateFunction;
|
|
1277
1252
|
label?: string;
|
|
1253
|
+
format?: SemaphorValueFormat;
|
|
1278
1254
|
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
1279
1255
|
};
|
|
1280
1256
|
|
|
@@ -1486,12 +1462,50 @@ declare type SemaphorTimeGrain = 'hour' | 'day' | 'week' | 'month' | 'quarter' |
|
|
|
1486
1462
|
|
|
1487
1463
|
declare type SemaphorTimeWindow = SemaphorRelativeTimeWindow | SemaphorAbsoluteTimeWindow;
|
|
1488
1464
|
|
|
1465
|
+
declare type SemaphorValueFormat = {
|
|
1466
|
+
type: 'number' | 'currency' | 'percent' | 'percentage' | 'scientific';
|
|
1467
|
+
locale?: string;
|
|
1468
|
+
minimumFractionDigits?: number;
|
|
1469
|
+
maximumFractionDigits?: number;
|
|
1470
|
+
useGrouping?: boolean;
|
|
1471
|
+
prefix?: string;
|
|
1472
|
+
suffix?: string;
|
|
1473
|
+
negativeStyle?: 'minus' | 'parentheses';
|
|
1474
|
+
compact?: boolean;
|
|
1475
|
+
scale?: number;
|
|
1476
|
+
currency?: string;
|
|
1477
|
+
percentValueMode?: 'fraction' | 'whole';
|
|
1478
|
+
} | {
|
|
1479
|
+
type: 'date' | 'datetime';
|
|
1480
|
+
locale?: string;
|
|
1481
|
+
pattern?: string;
|
|
1482
|
+
relative?: boolean;
|
|
1483
|
+
timezone?: string;
|
|
1484
|
+
sourceTimezone?: string;
|
|
1485
|
+
prefix?: string;
|
|
1486
|
+
suffix?: string;
|
|
1487
|
+
} | {
|
|
1488
|
+
type: 'duration';
|
|
1489
|
+
inputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
1490
|
+
outputStyle?: 'compact' | 'digital' | 'long';
|
|
1491
|
+
largestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
1492
|
+
smallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
1493
|
+
maxUnits?: number;
|
|
1494
|
+
prefix?: string;
|
|
1495
|
+
suffix?: string;
|
|
1496
|
+
negativeStyle?: 'minus' | 'parentheses';
|
|
1497
|
+
} | {
|
|
1498
|
+
type: 'string';
|
|
1499
|
+
prefix?: string;
|
|
1500
|
+
suffix?: string;
|
|
1501
|
+
};
|
|
1502
|
+
|
|
1489
1503
|
declare interface SortByField extends Field {
|
|
1490
1504
|
role: 'sortby';
|
|
1491
1505
|
direction: 'asc' | 'desc';
|
|
1492
1506
|
}
|
|
1493
1507
|
|
|
1494
|
-
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'area' | 'stackedArea' | 'combo' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'pivotTable' | 'aggregateTable' | 'detailTable' | 'tableBuilder' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'bullet' | 'heatmap' | 'treemap' | 'custom';
|
|
1508
|
+
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'area' | 'stackedArea' | 'combo' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'pivotTable' | 'aggregateTable' | 'matrixTable' | 'detailTable' | 'tableBuilder' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'bullet' | 'heatmap' | 'treemap' | 'custom';
|
|
1495
1509
|
|
|
1496
1510
|
declare type TDynamicCardPreferences = {
|
|
1497
1511
|
renderer: 'dynamic-visual';
|
|
@@ -128,6 +128,28 @@ declare interface CalculatedFieldFormula {
|
|
|
128
128
|
declare type CalculatedFieldOperation = 'sum' | 'difference' | 'product' | 'ratio' | 'change' | 'percentage' | 'scale' | 'custom';
|
|
129
129
|
|
|
130
130
|
declare interface CardConfig {
|
|
131
|
+
/**
|
|
132
|
+
* Matrix table is the shared analytics-spine successor for pivot and
|
|
133
|
+
* hierarchical aggregate tables. Dashboard cards store the public matrix
|
|
134
|
+
* intent shape so Data Apps, MCP, and dashboard runtime consume one contract.
|
|
135
|
+
*/
|
|
136
|
+
matrixIntent?: SemaphorMatrixIntent;
|
|
137
|
+
/**
|
|
138
|
+
* Deprecated compatibility fields for older matrix table drafts. New
|
|
139
|
+
* dashboard-authored matrix cards should use `matrixIntent` so normal
|
|
140
|
+
* `filters` can remain the explorer/card-level `FilterGroup`.
|
|
141
|
+
*/
|
|
142
|
+
version?: SemaphorMatrixIntent['version'];
|
|
143
|
+
source?: SemaphorMatrixIntent['source'];
|
|
144
|
+
rows?: SemaphorMatrixIntent['rows'];
|
|
145
|
+
columns?: SemaphorMatrixIntent['columns'];
|
|
146
|
+
values?: SemaphorMatrixIntent['values'];
|
|
147
|
+
inputs?: SemaphorMatrixIntent['inputs'];
|
|
148
|
+
totals?: SemaphorMatrixIntent['totals'];
|
|
149
|
+
sort?: SemaphorMatrixIntent['sort'];
|
|
150
|
+
expansion?: SemaphorMatrixIntent['expansion'];
|
|
151
|
+
layout?: SemaphorMatrixIntent['layout'];
|
|
152
|
+
displayLimits?: SemaphorMatrixIntent['displayLimits'];
|
|
131
153
|
groupByColumns?: GroupByField[];
|
|
132
154
|
metricColumns?: MetricField[];
|
|
133
155
|
pivotByColumns?: PivotByField[];
|
|
@@ -1904,7 +1926,7 @@ declare type SemaphorDerivedFieldDefinition = {
|
|
|
1904
1926
|
defaultAggregate?: SemaphorAggregateFunction;
|
|
1905
1927
|
aggregationBehavior?: SemaphorDerivedFieldAggregationBehavior;
|
|
1906
1928
|
aggregationStrategy?: SemaphorDerivedFieldAggregationStrategy;
|
|
1907
|
-
format?:
|
|
1929
|
+
format?: SemaphorValueFormat;
|
|
1908
1930
|
tags?: string[];
|
|
1909
1931
|
};
|
|
1910
1932
|
|
|
@@ -2130,6 +2152,7 @@ declare type SemaphorMatrixValueField = {
|
|
|
2130
2152
|
field: SemaphorFieldRef;
|
|
2131
2153
|
aggregate?: SemaphorAggregateFunction;
|
|
2132
2154
|
label?: string;
|
|
2155
|
+
format?: SemaphorValueFormat;
|
|
2133
2156
|
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
2134
2157
|
};
|
|
2135
2158
|
|
|
@@ -2252,6 +2275,44 @@ declare type SemaphorTimeGrain = 'hour' | 'day' | 'week' | 'month' | 'quarter' |
|
|
|
2252
2275
|
|
|
2253
2276
|
declare type SemaphorTimeWindow = SemaphorRelativeTimeWindow | SemaphorAbsoluteTimeWindow;
|
|
2254
2277
|
|
|
2278
|
+
declare type SemaphorValueFormat = {
|
|
2279
|
+
type: 'number' | 'currency' | 'percent' | 'percentage' | 'scientific';
|
|
2280
|
+
locale?: string;
|
|
2281
|
+
minimumFractionDigits?: number;
|
|
2282
|
+
maximumFractionDigits?: number;
|
|
2283
|
+
useGrouping?: boolean;
|
|
2284
|
+
prefix?: string;
|
|
2285
|
+
suffix?: string;
|
|
2286
|
+
negativeStyle?: 'minus' | 'parentheses';
|
|
2287
|
+
compact?: boolean;
|
|
2288
|
+
scale?: number;
|
|
2289
|
+
currency?: string;
|
|
2290
|
+
percentValueMode?: 'fraction' | 'whole';
|
|
2291
|
+
} | {
|
|
2292
|
+
type: 'date' | 'datetime';
|
|
2293
|
+
locale?: string;
|
|
2294
|
+
pattern?: string;
|
|
2295
|
+
relative?: boolean;
|
|
2296
|
+
timezone?: string;
|
|
2297
|
+
sourceTimezone?: string;
|
|
2298
|
+
prefix?: string;
|
|
2299
|
+
suffix?: string;
|
|
2300
|
+
} | {
|
|
2301
|
+
type: 'duration';
|
|
2302
|
+
inputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2303
|
+
outputStyle?: 'compact' | 'digital' | 'long';
|
|
2304
|
+
largestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2305
|
+
smallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2306
|
+
maxUnits?: number;
|
|
2307
|
+
prefix?: string;
|
|
2308
|
+
suffix?: string;
|
|
2309
|
+
negativeStyle?: 'minus' | 'parentheses';
|
|
2310
|
+
} | {
|
|
2311
|
+
type: 'string';
|
|
2312
|
+
prefix?: string;
|
|
2313
|
+
suffix?: string;
|
|
2314
|
+
};
|
|
2315
|
+
|
|
2255
2316
|
declare type SemaphorViewPresentation = {
|
|
2256
2317
|
kind: 'kpi';
|
|
2257
2318
|
format?: 'number' | 'currency' | 'percent' | 'duration';
|
|
@@ -2759,7 +2820,7 @@ declare type TChartOptions = {
|
|
|
2759
2820
|
treemapColorMode?: 'branch' | 'category';
|
|
2760
2821
|
};
|
|
2761
2822
|
|
|
2762
|
-
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'area' | 'stackedArea' | 'combo' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'pivotTable' | 'aggregateTable' | 'detailTable' | 'tableBuilder' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'bullet' | 'heatmap' | 'treemap' | 'custom';
|
|
2823
|
+
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'area' | 'stackedArea' | 'combo' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'pivotTable' | 'aggregateTable' | 'matrixTable' | 'detailTable' | 'tableBuilder' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'bullet' | 'heatmap' | 'treemap' | 'custom';
|
|
2763
2824
|
|
|
2764
2825
|
declare type TColumnSetting<T extends DisplayDataType> = {
|
|
2765
2826
|
columnIdx: number;
|