react-semaphor 0.1.443 → 0.1.445
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +123 -107
- package/dist/appearance/index.cjs +1 -1
- package/dist/brand-studio/index.cjs +2 -2
- package/dist/brand-studio/index.js +5 -4
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +526 -457
- package/dist/chunks/analyze-result-contract-BHb7sUUW.cjs +1 -0
- package/dist/chunks/analyze-result-contract-DUv3QnMl.js +29 -0
- package/dist/chunks/{braces-CbO-aIwH.js → braces-BKimshER.cjs} +1 -1
- package/dist/chunks/{code-editor-BpADiIlq.js → code-editor-B4gTfvc5.js} +6800 -6560
- package/dist/chunks/code-editor-BYVorgOf.cjs +138 -0
- package/dist/chunks/common-types-CQ6SHfLk.cjs +1 -0
- package/dist/chunks/{common-types-ClkOI-3O.js → common-types-DFsDdpH7.js} +22 -21
- package/dist/chunks/dashboard-CAiwJW3L.cjs +1397 -0
- package/dist/chunks/{dashboard-briefing-launcher-C60n8LqW.js → dashboard-briefing-launcher-2SLNOaTg.js} +26 -24
- package/dist/chunks/{dashboard-briefing-launcher-BYMLjZxG.js → dashboard-briefing-launcher-CHwjpUYz.cjs} +2 -2
- package/dist/chunks/{dashboard-controls-ti9Rcel2.js → dashboard-controls-BfL14aqO.js} +11 -9
- package/dist/chunks/{dashboard-controls-BH_fZYDU.js → dashboard-controls-BgGTg4yw.cjs} +2 -2
- package/dist/chunks/dashboard-date-comparison-definition-DZq0htjG.cjs +1 -0
- package/dist/chunks/dashboard-json-BOv8tCa9.cjs +1 -0
- package/dist/chunks/{dashboard-json-Bturr634.js → dashboard-json-BZwq3EcS.js} +14 -12
- package/dist/chunks/{dashboard-Bd1Quco-.js → dashboard-u61yfU6u.js} +50081 -47351
- package/dist/chunks/edit-dashboard-visual-BdVCH0DJ.cjs +182 -0
- package/dist/chunks/{edit-dashboard-visual-DglMds57.js → edit-dashboard-visual-njLPYip3.js} +6825 -6656
- package/dist/chunks/{editor-action-buttons-CRi0fhVW.js → editor-action-buttons-BhLX5Q6m.js} +24 -23
- package/dist/chunks/{editor-action-buttons-Cxo7_tNG.js → editor-action-buttons-CBVMFipA.cjs} +1 -1
- package/dist/chunks/{index-D7KJindZ.js → format-types-CSv0V7mm.cjs} +1 -1
- package/dist/chunks/{index-CnujJ3fa.js → format-types-CZH5w1lo.js} +23 -17
- package/dist/chunks/{layout-grid-B08pP7v6.js → layout-grid-3-HWzEwU.cjs} +1 -1
- package/dist/chunks/{metric-comparison-CPoDx56y.js → metric-comparison-BJ_Qu1ZF.js} +1 -1
- package/dist/chunks/metric-comparison-CUAJ8n4y.cjs +1 -0
- package/dist/chunks/{palette-C0yjT5Tv.js → palette-DW_l7Jr0.cjs} +1 -1
- package/dist/chunks/pivot-result-identity-B6QCWOSi.js +94 -0
- package/dist/chunks/pivot-result-identity-CDLRT-YG.cjs +1 -0
- package/dist/chunks/pivot-result-lifecycle-BM3Pl-D1.js +914 -0
- package/dist/chunks/pivot-result-lifecycle-DPc0ANwk.cjs +4 -0
- package/dist/chunks/presentation-execution-BTV-Q43g.cjs +1 -0
- package/dist/chunks/presentation-execution-CGlb7YZ6.js +637 -0
- package/dist/chunks/{report-preferences-dialog-TtwdAuNn.js → report-preferences-dialog-D_NJu2wU.js} +7 -6
- package/dist/chunks/report-preferences-dialog-r8QzOSFb.cjs +1 -0
- package/dist/chunks/report-runtime-context-C8LZFsqV.cjs +1 -0
- package/dist/chunks/report-runtime-context-Qzn11HQe.js +387 -0
- package/dist/chunks/{save-Xdc4pnys.js → save-4_uMnE6s.cjs} +1 -1
- package/dist/chunks/{search-Dcud9ajy.js → search-6ZmeMq55.cjs} +1 -1
- package/dist/chunks/temporal-bucket-BnPxGrAi.js +446 -0
- package/dist/chunks/temporal-bucket-authoring-BUZMuVca.js +205 -0
- package/dist/chunks/temporal-bucket-authoring-CPTwHzvs.cjs +1 -0
- package/dist/chunks/temporal-bucket-contract-B2bJ1oe4.js +108 -0
- package/dist/chunks/temporal-bucket-contract-ChDBWX8I.cjs +1 -0
- package/dist/chunks/temporal-bucket-pMnV-4Nj.cjs +1 -0
- package/dist/chunks/{comparison-document-migration-Dj6xZMCb.js → temporal-result-owner-Cb27SSG9.js} +152 -123
- package/dist/chunks/temporal-result-owner-f6-i65Fb.cjs +1 -0
- package/dist/chunks/token-types-BdQ8kHBm.cjs +1 -0
- package/dist/chunks/token-types-DLo91nOf.js +8 -0
- package/dist/chunks/{update-policy-DnF_74zC.js → update-policy-BxvYMYz0.cjs} +1 -1
- package/dist/chunks/{update-policy-De2NswtM.js → update-policy-eg59mQqv.js} +1 -1
- package/dist/chunks/validators-9D4KBqKD.cjs +1 -0
- package/dist/chunks/validators-wZ2WlNHc.js +4640 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +136 -126
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +1 -1
- package/dist/data-app-codegen-node/index.js +3 -3
- package/dist/data-app-sdk/index.cjs +2 -2
- package/dist/data-app-sdk/index.js +34 -35
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +5 -5
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +9 -10
- package/dist/format-utils/index.cjs +3 -3
- package/dist/format-utils/index.js +155 -176
- package/dist/index.cjs +1 -1
- package/dist/index.js +180 -174
- package/dist/report-runtime-context/index.cjs +1 -1
- package/dist/report-runtime-context/index.js +7 -392
- package/dist/shared/index.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +3 -3
- package/dist/types/analytics-protocol.d.ts +257 -48
- package/dist/types/briefings.d.ts +138 -50
- package/dist/types/dashboard-assistant.d.ts +207 -52
- package/dist/types/dashboard-authoring.d.ts +182 -50
- package/dist/types/dashboard.d.ts +290 -48
- package/dist/types/data-app-builder.d.ts +48 -42
- package/dist/types/data-app-codegen-node.d.ts +50 -44
- package/dist/types/data-app-codegen.d.ts +50 -44
- package/dist/types/data-app-sdk-adapters.d.ts +48 -42
- package/dist/types/data-app-sdk-validation.d.ts +81 -43
- package/dist/types/data-app-sdk.d.ts +83 -45
- package/dist/types/format-utils.d.ts +645 -67
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +19 -19
- package/dist/types/main.d.ts +298 -94
- package/dist/types/report-runtime-context.d.ts +3 -0
- package/dist/types/shared.d.ts +116 -41
- package/dist/types/surfboard.d.ts +290 -48
- package/dist/types/types.d.ts +455 -65
- package/package.json +3 -1
- package/dist/chunks/analyze-result-contract-BswhsmWT.js +0 -1
- package/dist/chunks/analyze-result-contract-CfOBEwaC.js +0 -1998
- package/dist/chunks/code-editor-M7HTUhdF.js +0 -138
- package/dist/chunks/common-types-C73-Ud1-.js +0 -1
- package/dist/chunks/comparison-document-migration-DbU_BTxR.js +0 -1
- package/dist/chunks/csv-utils-BZDvO2Fw.js +0 -376
- package/dist/chunks/csv-utils-Co0WxHke.js +0 -4
- package/dist/chunks/dashboard-cB3xmTNn.js +0 -1402
- package/dist/chunks/dashboard-date-comparison-definition-DGZr3m-b.js +0 -1
- package/dist/chunks/dashboard-json-Dw_55vSZ.js +0 -1
- package/dist/chunks/edit-dashboard-visual-BUc3NBQ4.js +0 -182
- package/dist/chunks/metric-comparison-DVy3fll_.js +0 -1
- package/dist/chunks/numeric-presentation-BJs5lSar.js +0 -517
- package/dist/chunks/numeric-presentation-Dlb-Dk4c.js +0 -1
- package/dist/chunks/report-preferences-dialog-CCvFqH4Q.js +0 -1
- package/dist/chunks/source-identity-5OPV4gvg.js +0 -92
- package/dist/chunks/source-identity-Cbo2LOHQ.js +0 -1
- package/dist/chunks/validators-B2vUAqTf.js +0 -1
- package/dist/chunks/validators-Bce_J7Vd.js +0 -2448
- /package/dist/chunks/{card-config-utils-15sRtebL.js → card-config-utils-15sRtebL.cjs} +0 -0
- /package/dist/chunks/{catalog-field-grounding-Bnx-3tE0.js → catalog-field-grounding-Bnx-3tE0.cjs} +0 -0
- /package/dist/chunks/{dashboard-input-contract-DV3cshjz.js → dashboard-input-contract-DV3cshjz.cjs} +0 -0
- /package/dist/chunks/{index-Dpm_VET4.js → index-Dpm_VET4.cjs} +0 -0
- /package/dist/chunks/{index-jSrCwPQz.js → index-jSrCwPQz.cjs} +0 -0
- /package/dist/chunks/{normalize-dashboard-for-dirty-check-BXRUMVb2.js → normalize-dashboard-for-dirty-check-BXRUMVb2.cjs} +0 -0
- /package/dist/chunks/{operators-DrTQsJXv.js → operators-DrTQsJXv.cjs} +0 -0
- /package/dist/chunks/{use-debounced-dirty-check-XHSwAefL.js → use-debounced-dirty-check-XHSwAefL.cjs} +0 -0
|
@@ -137,8 +137,16 @@ declare type BaseFilter = {
|
|
|
137
137
|
dataType?: string;
|
|
138
138
|
fieldMeta?: FilterFieldMeta;
|
|
139
139
|
semanticContext?: FilterSemanticContext;
|
|
140
|
+
/** Governed meaning for canonical grouped-temporal filter values. */
|
|
141
|
+
temporalBucket?: TemporalBucketMetadata;
|
|
140
142
|
};
|
|
141
143
|
|
|
144
|
+
declare interface BaseInteractionEvent {
|
|
145
|
+
sourceCardId: string;
|
|
146
|
+
filterGroups: ClickFilterConditionGroup[];
|
|
147
|
+
metric?: ClickedMetricValue;
|
|
148
|
+
}
|
|
149
|
+
|
|
142
150
|
declare type BaseSurfaceAppearance = {
|
|
143
151
|
background?: string;
|
|
144
152
|
foreground?: string;
|
|
@@ -273,9 +281,6 @@ declare interface CardConfig {
|
|
|
273
281
|
* Configuration for on-click dashboard filters triggered by this card.
|
|
274
282
|
*/
|
|
275
283
|
clickFilterInteractions?: ClickFilterInteraction[];
|
|
276
|
-
showTrendline?: boolean;
|
|
277
|
-
trendlineWindow?: number;
|
|
278
|
-
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
279
284
|
summary?: {
|
|
280
285
|
enabled?: boolean;
|
|
281
286
|
showOnCard?: boolean;
|
|
@@ -330,6 +335,38 @@ declare type ChartAppearance = {
|
|
|
330
335
|
axisColor?: string;
|
|
331
336
|
};
|
|
332
337
|
|
|
338
|
+
declare interface ClickedMetricValue {
|
|
339
|
+
field: Field;
|
|
340
|
+
value: number;
|
|
341
|
+
formattedValue?: string;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
declare interface ClickFilterCondition {
|
|
345
|
+
field: Field;
|
|
346
|
+
operator: Operator;
|
|
347
|
+
value: string | number | null;
|
|
348
|
+
label?: string;
|
|
349
|
+
/** Governed meaning for a canonical grouped-temporal scalar. */
|
|
350
|
+
temporalBucket?: TemporalBucketMetadata;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
declare interface ClickFilterConditionGroup {
|
|
354
|
+
filters: ClickFilterCondition[];
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
declare interface ClickFilterEvent extends BaseInteractionEvent {
|
|
358
|
+
interactionMode: 'clickFilter';
|
|
359
|
+
applyToCardIds?: string[];
|
|
360
|
+
excludeCardIds?: string[];
|
|
361
|
+
/**
|
|
362
|
+
* Whether the source card should receive its own filter.
|
|
363
|
+
* When true, the source card will be filtered (not just blurred).
|
|
364
|
+
* Used when user selects from multiple interactions popup.
|
|
365
|
+
* @default false
|
|
366
|
+
*/
|
|
367
|
+
filterSourceCard?: boolean;
|
|
368
|
+
}
|
|
369
|
+
|
|
333
370
|
declare interface ClickFilterInteraction {
|
|
334
371
|
mode: 'clickFilter';
|
|
335
372
|
/**
|
|
@@ -608,7 +645,10 @@ export declare type ControlOption = {
|
|
|
608
645
|
label: string;
|
|
609
646
|
presentation?: {
|
|
610
647
|
granularity?: TimeGranularity;
|
|
648
|
+
format?: TemporalBucketFormat;
|
|
649
|
+
/** Saved-dashboard compatibility only. New authoring writes `format`. */
|
|
611
650
|
dateFormat?: DateFormatValue;
|
|
651
|
+
/** Saved-dashboard compatibility only. New authoring writes `format`. */
|
|
612
652
|
customFormat?: string;
|
|
613
653
|
};
|
|
614
654
|
};
|
|
@@ -855,6 +895,11 @@ export declare type DashboardProps = {
|
|
|
855
895
|
* inputs instead of documentInputValues.
|
|
856
896
|
*/
|
|
857
897
|
dashboardInputExecutionSnapshot?: DashboardInputExecutionSnapshot;
|
|
898
|
+
/**
|
|
899
|
+
* Runtime interaction state captured for deterministic print/replay entry
|
|
900
|
+
* points. Ordinary dashboard consumers should leave this unset.
|
|
901
|
+
*/
|
|
902
|
+
interactionExecutionSnapshot?: Record<string, InteractionState>;
|
|
858
903
|
/**
|
|
859
904
|
* Render target for print entry points. Generic dashboard PDF exports also
|
|
860
905
|
* use cardDisplay.mode="print"; document-specific print handling must only
|
|
@@ -1193,6 +1238,43 @@ export declare type DocumentVariableRef = {
|
|
|
1193
1238
|
key: 'generatedAt' | 'pageNumber' | 'pageCount';
|
|
1194
1239
|
};
|
|
1195
1240
|
|
|
1241
|
+
declare interface DrillBreadcrumb {
|
|
1242
|
+
/**
|
|
1243
|
+
* The user clicked one or more segments. Each group of filters represents
|
|
1244
|
+
* a single segment (i.e., a single click interaction).
|
|
1245
|
+
*
|
|
1246
|
+
* - Filters within a group are AND-ed (e.g., state = 'NY' AND ship_mode = 'Standard').
|
|
1247
|
+
* - Across groups, they are OR-ed (e.g., ... OR state = 'CA' AND ship_mode = 'First Class').
|
|
1248
|
+
*/
|
|
1249
|
+
sourceFilterGroups: ClickFilterConditionGroup[];
|
|
1250
|
+
/**
|
|
1251
|
+
* The next (group by) field the user is drilling into (e.g., 'city' after 'state').
|
|
1252
|
+
*/
|
|
1253
|
+
toField?: Field;
|
|
1254
|
+
/**
|
|
1255
|
+
* Optional: If the drill target is a time field, this describes the granularity (e.g., month, year).
|
|
1256
|
+
*/
|
|
1257
|
+
granularity?: TimeGranularity;
|
|
1258
|
+
/**
|
|
1259
|
+
* Optional: Indicates whether the drill is for time comparison (e.g., YoY).
|
|
1260
|
+
*/
|
|
1261
|
+
timeComparison?: TimeComparison;
|
|
1262
|
+
/**
|
|
1263
|
+
* Optional: The metric the user clicked (e.g., '123 Orders'), used for display only.
|
|
1264
|
+
*/
|
|
1265
|
+
metric?: ClickedMetricValue;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
declare interface DrillDownEvent extends BaseInteractionEvent {
|
|
1269
|
+
interactionMode: 'drillDown';
|
|
1270
|
+
hierarchyId: string;
|
|
1271
|
+
filterGroups: ClickFilterConditionGroup[];
|
|
1272
|
+
metric?: ClickedMetricValue;
|
|
1273
|
+
toField: Field;
|
|
1274
|
+
granularity?: TimeGranularity;
|
|
1275
|
+
timeComparison?: TimeComparison;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1196
1278
|
declare interface DrillDownInteraction {
|
|
1197
1279
|
mode: 'drillDown';
|
|
1198
1280
|
/**
|
|
@@ -1224,6 +1306,12 @@ declare interface DrillHierarchyStep {
|
|
|
1224
1306
|
linkedInsightId?: string;
|
|
1225
1307
|
}
|
|
1226
1308
|
|
|
1309
|
+
declare interface DrillThroughEvent extends BaseInteractionEvent {
|
|
1310
|
+
interactionMode: 'drillThrough';
|
|
1311
|
+
targetDashboardId: string;
|
|
1312
|
+
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1227
1315
|
declare interface DrillThroughInteraction {
|
|
1228
1316
|
mode: 'drillThrough';
|
|
1229
1317
|
/**
|
|
@@ -1241,6 +1329,17 @@ declare interface DrillThroughInteraction {
|
|
|
1241
1329
|
label?: string;
|
|
1242
1330
|
}
|
|
1243
1331
|
|
|
1332
|
+
declare interface DrillToDetailEvent extends BaseInteractionEvent {
|
|
1333
|
+
interactionMode: 'drillToDetail';
|
|
1334
|
+
detailFields: Field[];
|
|
1335
|
+
sortBy?: SortByField[];
|
|
1336
|
+
limit?: number;
|
|
1337
|
+
detailTitle?: string;
|
|
1338
|
+
targetInsightId?: string;
|
|
1339
|
+
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
1340
|
+
displayMode?: 'modal' | 'replace-card';
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1244
1343
|
declare interface DrillToDetailInteraction {
|
|
1245
1344
|
mode: 'drillToDetail';
|
|
1246
1345
|
/**
|
|
@@ -1270,6 +1369,11 @@ declare interface DrillToDetailInteraction {
|
|
|
1270
1369
|
label?: string;
|
|
1271
1370
|
}
|
|
1272
1371
|
|
|
1372
|
+
declare interface DrillToURLEvent extends BaseInteractionEvent {
|
|
1373
|
+
interactionMode: 'drillToURL';
|
|
1374
|
+
url: string;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1273
1377
|
declare interface DrillToURLInteraction {
|
|
1274
1378
|
mode: 'drillToURL';
|
|
1275
1379
|
/**
|
|
@@ -1313,6 +1417,15 @@ declare interface DrillUpInteraction {
|
|
|
1313
1417
|
|
|
1314
1418
|
export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
|
|
1315
1419
|
|
|
1420
|
+
declare interface DynamicDrillEvent extends BaseInteractionEvent {
|
|
1421
|
+
interactionMode: 'dynamicDrill';
|
|
1422
|
+
filterGroups: ClickFilterConditionGroup[];
|
|
1423
|
+
metric?: ClickedMetricValue;
|
|
1424
|
+
toField: Field;
|
|
1425
|
+
granularity?: TimeGranularity;
|
|
1426
|
+
timeComparison?: TimeComparison;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1316
1429
|
declare interface DynamicDrillInteraction {
|
|
1317
1430
|
mode: 'dynamicDrill';
|
|
1318
1431
|
/**
|
|
@@ -1358,8 +1471,9 @@ export declare type ExportDataPayload = {
|
|
|
1358
1471
|
|
|
1359
1472
|
declare interface Field {
|
|
1360
1473
|
/**
|
|
1361
|
-
*
|
|
1362
|
-
*
|
|
1474
|
+
* Stable authored/semantic field identifier (for joins, UI state, etc.).
|
|
1475
|
+
* It is normally unique within a role, but one saved query may reuse it in
|
|
1476
|
+
* different roles; result bindings must therefore include the role.
|
|
1363
1477
|
* Example: 'orders.customer_id', 'expr_12345', etc.
|
|
1364
1478
|
*/
|
|
1365
1479
|
id: string;
|
|
@@ -1401,6 +1515,12 @@ declare interface Field {
|
|
|
1401
1515
|
*/
|
|
1402
1516
|
derivedField?: SemaphorDerivedFieldDefinition;
|
|
1403
1517
|
format?: FormatSpec;
|
|
1518
|
+
/**
|
|
1519
|
+
* Source-level temporal presentation keeps the semantic grain that authored
|
|
1520
|
+
* the format. The card's mutable `granularity` remains the active query
|
|
1521
|
+
* grain, so changing it cannot accidentally retarget a semantic default.
|
|
1522
|
+
*/
|
|
1523
|
+
semanticTemporalPresentation?: SemanticTemporalPresentation;
|
|
1404
1524
|
aggregate?: AggregateFunction;
|
|
1405
1525
|
fieldScope?: FieldScope;
|
|
1406
1526
|
}
|
|
@@ -1444,6 +1564,10 @@ declare interface FilterCondition {
|
|
|
1444
1564
|
field: Field;
|
|
1445
1565
|
operator: Operator;
|
|
1446
1566
|
value: FilterValue;
|
|
1567
|
+
/** Display-only label for canonical grouped-temporal values. */
|
|
1568
|
+
label?: string;
|
|
1569
|
+
/** Governed meaning for a canonical grouped-temporal scalar. */
|
|
1570
|
+
temporalBucket?: TemporalBucketMetadata;
|
|
1447
1571
|
}
|
|
1448
1572
|
|
|
1449
1573
|
export declare type FilterDashboardInput = DashboardInputBase & {
|
|
@@ -1604,7 +1728,7 @@ declare type FormatSpec = {
|
|
|
1604
1728
|
type: 'string';
|
|
1605
1729
|
prefix?: string;
|
|
1606
1730
|
suffix?: string;
|
|
1607
|
-
};
|
|
1731
|
+
} | TemporalBucketFormat;
|
|
1608
1732
|
|
|
1609
1733
|
export declare type GetDashboardResponse = {
|
|
1610
1734
|
dashboard: TDashboard;
|
|
@@ -1633,7 +1757,7 @@ declare type GlobalDateComparisonSelection = {
|
|
|
1633
1757
|
spec: ViewerPeriodComparisonSpec;
|
|
1634
1758
|
};
|
|
1635
1759
|
|
|
1636
|
-
declare type Granularity =
|
|
1760
|
+
declare type Granularity = SemaphorTimeGrain;
|
|
1637
1761
|
|
|
1638
1762
|
declare interface GroupByColumn extends BaseColumn {
|
|
1639
1763
|
role: 'groupby';
|
|
@@ -1644,6 +1768,11 @@ declare interface GroupByColumn extends BaseColumn {
|
|
|
1644
1768
|
declare interface GroupByField extends Field {
|
|
1645
1769
|
role: 'groupby';
|
|
1646
1770
|
granularity?: TimeGranularity;
|
|
1771
|
+
/**
|
|
1772
|
+
* Query transport policy for grouped temporal values. This is projected
|
|
1773
|
+
* into executable card config and is not persisted authoring state.
|
|
1774
|
+
*/
|
|
1775
|
+
dateValueMode?: 'canonical' | 'formatted';
|
|
1647
1776
|
/**
|
|
1648
1777
|
* Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
|
|
1649
1778
|
* If present, used in SELECT and GROUP BY instead of just the column name.
|
|
@@ -1657,6 +1786,12 @@ export declare type HtmlOptions = {
|
|
|
1657
1786
|
html: string;
|
|
1658
1787
|
};
|
|
1659
1788
|
|
|
1789
|
+
declare interface InlineDrillEvent extends BaseInteractionEvent {
|
|
1790
|
+
interactionMode: 'inlineDrill';
|
|
1791
|
+
fetchMode?: 'lazy' | 'preloaded';
|
|
1792
|
+
inlineLimit?: number;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1660
1795
|
declare interface InlineDrillInteraction {
|
|
1661
1796
|
mode: 'inlineDrill';
|
|
1662
1797
|
/**
|
|
@@ -1699,6 +1834,60 @@ declare interface InlineDrillInteraction {
|
|
|
1699
1834
|
*/
|
|
1700
1835
|
declare type Interaction = ClickFilterInteraction | DrillDownInteraction | DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction | DrillUpInteraction | DynamicDrillInteraction;
|
|
1701
1836
|
|
|
1837
|
+
declare type InteractionEvent = DrillDownEvent | DynamicDrillEvent | DrillToURLEvent | DrillThroughEvent | DrillToDetailEvent | InlineDrillEvent | ClickFilterEvent;
|
|
1838
|
+
|
|
1839
|
+
declare interface InteractionState {
|
|
1840
|
+
/**
|
|
1841
|
+
* If user is in a drill hierarchy (static or dynamic), this tracks which one.
|
|
1842
|
+
* Undefined if not currently in a drill path.
|
|
1843
|
+
*/
|
|
1844
|
+
hierarchyId?: string;
|
|
1845
|
+
/**
|
|
1846
|
+
* Breadcrumb trail representing the user's drill path.
|
|
1847
|
+
* Empty if no drill-down steps have occurred.
|
|
1848
|
+
*/
|
|
1849
|
+
breadcrumbs: DrillBreadcrumb[];
|
|
1850
|
+
/**
|
|
1851
|
+
* All click filters applied from this card
|
|
1852
|
+
*/
|
|
1853
|
+
appliedClickFilters?: ClickFilterEvent[];
|
|
1854
|
+
/**
|
|
1855
|
+
* (Optional) Track last one-off interaction (e.g., drillToDetail, drillToURL).
|
|
1856
|
+
* Useful for things like modals or redirection handling.
|
|
1857
|
+
*/
|
|
1858
|
+
lastInteractionEvent?: InteractionEvent;
|
|
1859
|
+
/**
|
|
1860
|
+
* Context mode for drill-to-insight filtering.
|
|
1861
|
+
* Controls whether dashboard filters are applied alongside interaction filters.
|
|
1862
|
+
*
|
|
1863
|
+
* - 'interactionFilters': Only filters from the interaction event (no dashboard filters)
|
|
1864
|
+
* - 'full': Dashboard filters + interaction filters
|
|
1865
|
+
* - 'none': No filters applied
|
|
1866
|
+
*
|
|
1867
|
+
* Undefined for regular cards (not insights).
|
|
1868
|
+
*/
|
|
1869
|
+
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
1870
|
+
/**
|
|
1871
|
+
* Source dashboard ID for drill-through navigation.
|
|
1872
|
+
* Used for "Back" button navigation.
|
|
1873
|
+
* Only set for global drill context (interactionStates['__DRILL_CONTEXT__']).
|
|
1874
|
+
*/
|
|
1875
|
+
sourceDashboardId?: string;
|
|
1876
|
+
/**
|
|
1877
|
+
* Source dashboard title for drill-through navigation.
|
|
1878
|
+
* Used for "Back to [X]" UI display.
|
|
1879
|
+
* Only set for global drill context (interactionStates['__DRILL_CONTEXT__']).
|
|
1880
|
+
*/
|
|
1881
|
+
sourceDashboardTitle?: string;
|
|
1882
|
+
/**
|
|
1883
|
+
* Target dashboard ID for drill-through navigation.
|
|
1884
|
+
* Filters only apply when current dashboard matches this ID.
|
|
1885
|
+
* Prevents filters from applying to source dashboard during navigation.
|
|
1886
|
+
* Only set for global drill context (interactionStates['__DRILL_CONTEXT__']).
|
|
1887
|
+
*/
|
|
1888
|
+
targetDashboardId?: string;
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1702
1891
|
declare interface InteractionTargetOverride {
|
|
1703
1892
|
applyToCardIds?: string[] | null;
|
|
1704
1893
|
excludeCardIds?: string[] | null;
|
|
@@ -1954,6 +2143,11 @@ declare type PersistedInteraction = Interaction & {
|
|
|
1954
2143
|
|
|
1955
2144
|
declare interface PivotByField extends Field {
|
|
1956
2145
|
role: 'pivotby';
|
|
2146
|
+
/**
|
|
2147
|
+
* Query transport policy for grouped temporal pivot members. This is
|
|
2148
|
+
* projected into executable config and is never persisted authoring state.
|
|
2149
|
+
*/
|
|
2150
|
+
dateValueMode?: 'canonical' | 'formatted';
|
|
1957
2151
|
}
|
|
1958
2152
|
|
|
1959
2153
|
export declare type Placeholders = {
|
|
@@ -2099,7 +2293,15 @@ export declare type ResolvedDocumentInput = {
|
|
|
2099
2293
|
exports: Record<string, string | number | boolean | null>;
|
|
2100
2294
|
};
|
|
2101
2295
|
|
|
2102
|
-
declare type ResolvedPrimaryDateField = {
|
|
2296
|
+
declare type ResolvedPrimaryDateField = (ResolvedPrimaryDateFieldBase & ({
|
|
2297
|
+
defaultGranularity?: SemaphorTimeGrain;
|
|
2298
|
+
format?: undefined;
|
|
2299
|
+
} | {
|
|
2300
|
+
defaultGranularity: SemaphorTimeGrain;
|
|
2301
|
+
format: TemporalBucketFormat;
|
|
2302
|
+
})) | null;
|
|
2303
|
+
|
|
2304
|
+
declare type ResolvedPrimaryDateFieldBase = {
|
|
2103
2305
|
sourceDataset: string;
|
|
2104
2306
|
sourceField: string;
|
|
2105
2307
|
name: string;
|
|
@@ -2109,13 +2311,10 @@ declare type ResolvedPrimaryDateField = {
|
|
|
2109
2311
|
entityName: string;
|
|
2110
2312
|
entityType: string;
|
|
2111
2313
|
dataType: string;
|
|
2112
|
-
/** Canonical dataset coordinates stamped by the
|
|
2314
|
+
/** Canonical dataset coordinates stamped by the semantic grounding boundary. */
|
|
2113
2315
|
source?: SemaphorSourceRef;
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
defaultGranularity?: TimeGranularity;
|
|
2117
|
-
supportedGranularities?: TimeGranularity[];
|
|
2118
|
-
} | null;
|
|
2316
|
+
supportedGranularities?: SemaphorTimeGrain[];
|
|
2317
|
+
};
|
|
2119
2318
|
|
|
2120
2319
|
declare type ResolvedValueFormatPreferences = {
|
|
2121
2320
|
locale: string;
|
|
@@ -2151,6 +2350,15 @@ declare type SemanticExecutionPayload = {
|
|
|
2151
2350
|
}>;
|
|
2152
2351
|
};
|
|
2153
2352
|
|
|
2353
|
+
declare type SemanticTemporalPresentation = {
|
|
2354
|
+
granularity: SemaphorTimeGrain;
|
|
2355
|
+
format: TemporalBucketFormat;
|
|
2356
|
+
};
|
|
2357
|
+
|
|
2358
|
+
declare const SEMAPHOR_MATRIX_TIME_GRAINS: ["hour", "day", "week", "month", "quarter", "year"];
|
|
2359
|
+
|
|
2360
|
+
declare const SEMAPHOR_TIME_GRAINS: readonly ["second", "minute", "hour", "day", "week", "month", "quarter", "year"];
|
|
2361
|
+
|
|
2154
2362
|
declare type SemaphorAggregateFunction = 'SUM' | 'COUNT' | 'AVG' | 'MIN' | 'MAX' | 'MEDIAN' | 'DISTINCT';
|
|
2155
2363
|
|
|
2156
2364
|
declare type SemaphorAnalyticsFilter = SemaphorAnalyticsValueFilter | SemaphorAnalyticsNullFilter;
|
|
@@ -2204,7 +2412,7 @@ declare type SemaphorDerivedFieldDefinition = {
|
|
|
2204
2412
|
defaultAggregate?: SemaphorAggregateFunction;
|
|
2205
2413
|
aggregationBehavior?: SemaphorDerivedFieldAggregationBehavior;
|
|
2206
2414
|
aggregationStrategy?: SemaphorDerivedFieldAggregationStrategy;
|
|
2207
|
-
format?:
|
|
2415
|
+
format?: SemaphorScalarValueFormat;
|
|
2208
2416
|
tags?: string[];
|
|
2209
2417
|
};
|
|
2210
2418
|
|
|
@@ -2255,7 +2463,7 @@ declare type SemaphorMatrixAxisExpansionOptions = {
|
|
|
2255
2463
|
declare type SemaphorMatrixAxisLevel = {
|
|
2256
2464
|
id?: string;
|
|
2257
2465
|
field: SemaphorFieldRef;
|
|
2258
|
-
grain?:
|
|
2466
|
+
grain?: SemaphorMatrixTimeGrain;
|
|
2259
2467
|
label?: string;
|
|
2260
2468
|
subtotal?: boolean | SemaphorMatrixSubtotalOptions;
|
|
2261
2469
|
sortBy?: SemaphorMatrixAxisSortRule;
|
|
@@ -2347,6 +2555,8 @@ declare type SemaphorMatrixSubtotalOptions = {
|
|
|
2347
2555
|
label?: string;
|
|
2348
2556
|
};
|
|
2349
2557
|
|
|
2558
|
+
declare type SemaphorMatrixTimeGrain = (typeof SEMAPHOR_MATRIX_TIME_GRAINS)[number];
|
|
2559
|
+
|
|
2350
2560
|
declare type SemaphorMatrixTotalCalculation = {
|
|
2351
2561
|
kind: 'defaultAggregate';
|
|
2352
2562
|
} | {
|
|
@@ -2382,7 +2592,7 @@ declare type SemaphorMatrixValueField = {
|
|
|
2382
2592
|
field: SemaphorFieldRef;
|
|
2383
2593
|
aggregate?: SemaphorAggregateFunction;
|
|
2384
2594
|
label?: string;
|
|
2385
|
-
format?:
|
|
2595
|
+
format?: SemaphorScalarValueFormat;
|
|
2386
2596
|
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
2387
2597
|
};
|
|
2388
2598
|
|
|
@@ -2392,36 +2602,7 @@ declare type SemaphorRelationshipHint = {
|
|
|
2392
2602
|
relationshipIds?: string[];
|
|
2393
2603
|
};
|
|
2394
2604
|
|
|
2395
|
-
declare type
|
|
2396
|
-
kind: 'semantic';
|
|
2397
|
-
}>;
|
|
2398
|
-
|
|
2399
|
-
declare type SemaphorSourceRef = {
|
|
2400
|
-
kind: 'semantic';
|
|
2401
|
-
domainId: string;
|
|
2402
|
-
datasetName: string;
|
|
2403
|
-
datasetId?: string;
|
|
2404
|
-
label?: string;
|
|
2405
|
-
connectionId?: string;
|
|
2406
|
-
} | {
|
|
2407
|
-
kind: 'physical';
|
|
2408
|
-
connectionId: string;
|
|
2409
|
-
connectionType?: string;
|
|
2410
|
-
tableName: string;
|
|
2411
|
-
databaseName?: string;
|
|
2412
|
-
schemaName?: string;
|
|
2413
|
-
label?: string;
|
|
2414
|
-
dialect?: SemaphorDialect;
|
|
2415
|
-
} | {
|
|
2416
|
-
kind: 'sql';
|
|
2417
|
-
connectionId: string;
|
|
2418
|
-
dialect?: SemaphorDialect;
|
|
2419
|
-
label?: string;
|
|
2420
|
-
};
|
|
2421
|
-
|
|
2422
|
-
declare type SemaphorTimeGrain = 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
2423
|
-
|
|
2424
|
-
declare type SemaphorValueFormat = {
|
|
2605
|
+
declare type SemaphorScalarValueFormat = {
|
|
2425
2606
|
type: 'number' | 'currency' | 'percent' | 'percentage' | 'scientific';
|
|
2426
2607
|
minimumFractionDigits?: number;
|
|
2427
2608
|
maximumFractionDigits?: number;
|
|
@@ -2458,6 +2639,35 @@ declare type SemaphorValueFormat = {
|
|
|
2458
2639
|
suffix?: string;
|
|
2459
2640
|
};
|
|
2460
2641
|
|
|
2642
|
+
declare type SemaphorSemanticSourceRef = Extract<SemaphorSourceRef, {
|
|
2643
|
+
kind: 'semantic';
|
|
2644
|
+
}>;
|
|
2645
|
+
|
|
2646
|
+
declare type SemaphorSourceRef = {
|
|
2647
|
+
kind: 'semantic';
|
|
2648
|
+
domainId: string;
|
|
2649
|
+
datasetName: string;
|
|
2650
|
+
datasetId?: string;
|
|
2651
|
+
label?: string;
|
|
2652
|
+
connectionId?: string;
|
|
2653
|
+
} | {
|
|
2654
|
+
kind: 'physical';
|
|
2655
|
+
connectionId: string;
|
|
2656
|
+
connectionType?: string;
|
|
2657
|
+
tableName: string;
|
|
2658
|
+
databaseName?: string;
|
|
2659
|
+
schemaName?: string;
|
|
2660
|
+
label?: string;
|
|
2661
|
+
dialect?: SemaphorDialect;
|
|
2662
|
+
} | {
|
|
2663
|
+
kind: 'sql';
|
|
2664
|
+
connectionId: string;
|
|
2665
|
+
dialect?: SemaphorDialect;
|
|
2666
|
+
label?: string;
|
|
2667
|
+
};
|
|
2668
|
+
|
|
2669
|
+
declare type SemaphorTimeGrain = (typeof SEMAPHOR_TIME_GRAINS)[number];
|
|
2670
|
+
|
|
2461
2671
|
declare interface SortByField extends Field {
|
|
2462
2672
|
role: 'sortby';
|
|
2463
2673
|
direction: 'asc' | 'desc';
|
|
@@ -3074,6 +3284,7 @@ export declare type TDataColumn = {
|
|
|
3074
3284
|
calculatedFormula?: CalculatedFieldFormula;
|
|
3075
3285
|
derivedField?: SemaphorDerivedFieldDefinition;
|
|
3076
3286
|
format?: FormatSpec;
|
|
3287
|
+
granularity?: TimeGranularity;
|
|
3077
3288
|
sourceField?: string;
|
|
3078
3289
|
aggregate?: AggregateFunction;
|
|
3079
3290
|
};
|
|
@@ -3176,6 +3387,31 @@ export declare type TDynamicVisualIntent = {
|
|
|
3176
3387
|
includesKpis: boolean;
|
|
3177
3388
|
};
|
|
3178
3389
|
|
|
3390
|
+
declare const TEMPORAL_BUCKET_PRESETS: readonly ["week_of_short", "week_of_long", "quarter_short", "quarter_long", "fiscal_quarter_short", "fiscal_year"];
|
|
3391
|
+
|
|
3392
|
+
declare type TemporalBucketFormat = {
|
|
3393
|
+
type: 'temporal_bucket';
|
|
3394
|
+
presentation: TemporalBucketPresentation;
|
|
3395
|
+
};
|
|
3396
|
+
|
|
3397
|
+
declare type TemporalBucketMetadata = {
|
|
3398
|
+
kind: 'temporal_bucket';
|
|
3399
|
+
granularity: SemaphorTimeGrain;
|
|
3400
|
+
calendar: Pick<CalendarContext, 'tz' | 'weekStart' | 'fiscalCalendar'>;
|
|
3401
|
+
};
|
|
3402
|
+
|
|
3403
|
+
declare type TemporalBucketPresentation = {
|
|
3404
|
+
mode: 'auto';
|
|
3405
|
+
} | {
|
|
3406
|
+
mode: 'preset';
|
|
3407
|
+
preset: TemporalBucketPreset;
|
|
3408
|
+
} | {
|
|
3409
|
+
mode: 'pattern';
|
|
3410
|
+
pattern: string;
|
|
3411
|
+
};
|
|
3412
|
+
|
|
3413
|
+
declare type TemporalBucketPreset = (typeof TEMPORAL_BUCKET_PRESETS)[number];
|
|
3414
|
+
|
|
3179
3415
|
declare type TemporalPrecision = 'minute';
|
|
3180
3416
|
|
|
3181
3417
|
export declare type TEvent = {
|
|
@@ -3363,6 +3599,12 @@ export declare type THeatmapConfig = {
|
|
|
3363
3599
|
|
|
3364
3600
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
3365
3601
|
|
|
3602
|
+
declare interface TimeComparison {
|
|
3603
|
+
type: 'previous_year' | 'previous_period';
|
|
3604
|
+
offset: number;
|
|
3605
|
+
granularity: TimeGranularity;
|
|
3606
|
+
}
|
|
3607
|
+
|
|
3366
3608
|
declare interface TimeDrillStep {
|
|
3367
3609
|
granularity: TimeGranularity;
|
|
3368
3610
|
next?: TimeGranularity;
|
|
@@ -3370,7 +3612,7 @@ declare interface TimeDrillStep {
|
|
|
3370
3612
|
rollingWindow?: number;
|
|
3371
3613
|
}
|
|
3372
3614
|
|
|
3373
|
-
declare type TimeGranularity =
|
|
3615
|
+
declare type TimeGranularity = SemaphorTimeGrain;
|
|
3374
3616
|
|
|
3375
3617
|
/**
|
|
3376
3618
|
* Inline filter definition stored on a card.
|