react-semaphor 0.1.424 → 0.1.426
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 +246 -91
- package/dist/appearance/index.cjs +1 -1
- package/dist/appearance/index.js +1 -1
- package/dist/brand-studio/index.cjs +2 -2
- package/dist/brand-studio/index.js +8 -8
- package/dist/chunks/{analyze-result-contract-D7pjjYPy.js → analyze-result-contract-DnfF8kBb.js} +434 -427
- package/dist/chunks/analyze-result-contract-ege_u6Nl.js +1 -0
- package/dist/chunks/{braces-8TRlDwDw.js → braces-BdbUk_r9.js} +1 -1
- package/dist/chunks/{braces-D2tStQjF.js → braces-CbO-aIwH.js} +1 -1
- package/dist/chunks/calendar-preferences-dialog-C-gN-vlq.js +1 -0
- package/dist/chunks/{calendar-preferences-dialog-D5mABNDT.js → calendar-preferences-dialog-tBSngRN-.js} +4 -4
- package/dist/chunks/{catalog-field-grounding-CJKAqtiC.js → catalog-field-grounding-AOGwWu0K.js} +11 -11
- package/dist/chunks/{switch-2bh3Hka1.js → code-editor-Pod1s6SK.js} +9927 -9098
- package/dist/chunks/code-editor-tfzm8LWW.js +138 -0
- package/dist/chunks/{common-types-4bjoIgvm.js → common-types-ClkOI-3O.js} +4 -4
- package/dist/chunks/comparison-document-migration-BJH1idOd.js +414 -0
- package/dist/chunks/comparison-document-migration-b6c3xiWh.js +1 -0
- package/dist/chunks/dashboard-JNK2ly_e.js +1402 -0
- package/dist/chunks/{index-Dzz6jXSY.js → dashboard-ZoKNg47G.js} +67158 -65267
- package/dist/chunks/{dashboard-briefing-launcher-DuWgwtxX.js → dashboard-briefing-launcher-0kR-QThz.js} +11 -6
- package/dist/chunks/{dashboard-briefing-launcher-BNDzMjjt.js → dashboard-briefing-launcher-BE-sNAzW.js} +226 -209
- package/dist/chunks/dashboard-controls-BUYTVauu.js +36 -0
- package/dist/chunks/dashboard-controls-Ce_Bps8f.js +2196 -0
- package/dist/chunks/dashboard-date-comparison-definition-BaYxjLi5.js +167 -0
- package/dist/chunks/dashboard-date-comparison-definition-DGZr3m-b.js +1 -0
- package/dist/chunks/dashboard-input-contract-BFpERluO.js +18 -0
- package/dist/chunks/dashboard-input-contract-DV3cshjz.js +1 -0
- package/dist/chunks/{dashboard-json-CkTEDNtH.js → dashboard-json-4quaFoSw.js} +16 -15
- package/dist/chunks/dashboard-json-81uc8aVR.js +1 -0
- package/dist/chunks/date-formatter-BTTYdAik.js +1 -0
- package/dist/chunks/date-formatter-D-89jTjG.js +514 -0
- package/dist/chunks/{edit-dashboard-visual-CRjVRZLk.js → edit-dashboard-visual-DqQsH7rN.js} +8470 -8520
- package/dist/chunks/edit-dashboard-visual-nVRXv1Lq.js +182 -0
- package/dist/chunks/{index-CjzRe2su.js → index-CnujJ3fa.js} +3 -3
- package/dist/chunks/{index-DRlMUglg.js → index-Dpm_VET4.js} +2 -2
- package/dist/chunks/{index-CJdxSyQq.js → index-If0wlXGi.js} +308 -308
- package/dist/chunks/index-jSrCwPQz.js +31 -0
- package/dist/chunks/{x-CXDkqdur.js → index-xHCrHprY.js} +59 -59
- package/dist/chunks/{layout-grid-C0OI-MRn.js → layout-grid-B08pP7v6.js} +1 -1
- package/dist/chunks/{layout-grid-CiubineE.js → layout-grid-D5tYJg1-.js} +1 -1
- package/dist/chunks/metric-comparison-BKgkMy9r.js +1 -0
- package/dist/chunks/metric-comparison-CWweq9RG.js +387 -0
- package/dist/chunks/{palette-C4KTXOug.js → palette-C0yjT5Tv.js} +1 -1
- package/dist/chunks/{palette-Cp1hqZtm.js → palette-jqaAcwiQ.js} +1 -1
- package/dist/chunks/{save-DgMfP0j8.js → save-HCJjjzdX.js} +1 -1
- package/dist/chunks/{save-C__QggEE.js → save-Xdc4pnys.js} +1 -1
- package/dist/chunks/{search-BHsQIWBV.js → search-DHZCro8B.js} +1 -1
- package/dist/chunks/{search-DNCejM7Z.js → search-Dcud9ajy.js} +1 -1
- package/dist/chunks/{update-policy-C1pmhLz9.js → update-policy-BgONreNd.js} +1 -1
- package/dist/chunks/{update-policy-BCJc0oI5.js → update-policy-CY2k-pJP.js} +9 -9
- package/dist/chunks/{use-create-flow-overlay-state-B-bYbtix.js → use-create-flow-overlay-state-CoANTEXS.js} +2 -2
- package/dist/chunks/{use-create-flow-overlay-state-B9vArrvr.js → use-create-flow-overlay-state-DUVIsF0y.js} +62 -62
- package/dist/chunks/validators-B4VMLX3_.js +1 -0
- package/dist/chunks/{validators-PXkij33j.js → validators-Cz-XuORM.js} +123 -119
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.cjs +2 -2
- package/dist/dashboard-authoring/index.js +6 -4
- package/dist/data-app-builder/index.cjs +6 -6
- package/dist/data-app-builder/index.js +5 -5
- 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 +1 -1
- package/dist/data-app-sdk/index.js +6 -6
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +1 -1
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +65 -68
- package/dist/format-utils/index.cjs +2 -2
- package/dist/format-utils/index.js +59 -58
- package/dist/index.cjs +1 -1
- package/dist/index.js +19 -19
- 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 +337 -3
- package/dist/types/brand-studio.d.ts +2 -2
- package/dist/types/briefings.d.ts +65 -41
- package/dist/types/dashboard-assistant.d.ts +28 -7
- package/dist/types/dashboard-authoring.d.ts +123 -43
- package/dist/types/dashboard.d.ts +122 -48
- package/dist/types/data-app-builder.d.ts +2 -2
- package/dist/types/data-app-sdk.d.ts +1 -1
- package/dist/types/format-utils.d.ts +98 -10
- package/dist/types/index.js +1 -1
- package/dist/types/main.d.ts +264 -100
- package/dist/types/shared.d.ts +84 -43
- package/dist/types/surfboard.d.ts +124 -49
- package/dist/types/types.d.ts +135 -50
- package/package.json +2 -1
- package/dist/chunks/analyze-result-contract-DpDcImgk.js +0 -1
- package/dist/chunks/calendar-preferences-dialog-iokD3HbE.js +0 -1
- package/dist/chunks/contracts-CoCOpd_i.js +0 -11
- package/dist/chunks/contracts-CtB2VONT.js +0 -1
- package/dist/chunks/dashboard-controls-bbEF-AbK.js +0 -52
- package/dist/chunks/dashboard-controls-id39vb7G.js +0 -2322
- package/dist/chunks/dashboard-json-DVoqS1ks.js +0 -1
- package/dist/chunks/date-formatter-B4EBSe9C.js +0 -1
- package/dist/chunks/date-formatter-BlhBftA9.js +0 -416
- package/dist/chunks/edit-dashboard-visual-CkrxZCcp.js +0 -178
- package/dist/chunks/index-S1CGUcSz.js +0 -1406
- package/dist/chunks/switch-DMT7qf_R.js +0 -138
- package/dist/chunks/validators-DMlVbd1p.js +0 -1
- package/dist/chunks/x-B6ghREd2.js +0 -31
package/dist/types/shared.d.ts
CHANGED
|
@@ -180,9 +180,6 @@ declare interface CardConfig {
|
|
|
180
180
|
* Configuration for on-click dashboard filters triggered by this card.
|
|
181
181
|
*/
|
|
182
182
|
clickFilterInteractions?: ClickFilterInteraction[];
|
|
183
|
-
comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target' | 'start_vs_end';
|
|
184
|
-
targetValue?: number;
|
|
185
|
-
showComparisonInLegend?: boolean;
|
|
186
183
|
showTrendline?: boolean;
|
|
187
184
|
trendlineWindow?: number;
|
|
188
185
|
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
@@ -337,6 +334,33 @@ declare type ColumnType = 'string' | 'number' | 'date';
|
|
|
337
334
|
|
|
338
335
|
declare type ComparisonOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
339
336
|
|
|
337
|
+
declare type ComparisonPresentationSpec = {
|
|
338
|
+
/** Defaults to difference. */
|
|
339
|
+
displayMode?: 'difference' | 'percent_change' | 'both' | 'ratio';
|
|
340
|
+
/** Defaults to true. This controls display, not baseline selection. */
|
|
341
|
+
showComparison?: boolean;
|
|
342
|
+
/** Percent/ratio precision. Defaults to the surface formatter; valid range is 0..6. */
|
|
343
|
+
precision?: number;
|
|
344
|
+
/** Defaults to arrow_badge. */
|
|
345
|
+
indicatorStyle?: 'arrow_badge' | 'arrow' | 'badge' | 'none';
|
|
346
|
+
/** Defaults to true. */
|
|
347
|
+
showColor?: boolean;
|
|
348
|
+
position?: 'left' | 'right' | 'top';
|
|
349
|
+
/** Defaults to false. */
|
|
350
|
+
conditionalLabel?: boolean;
|
|
351
|
+
labelName?: string;
|
|
352
|
+
conditionalLabels?: {
|
|
353
|
+
increase?: string;
|
|
354
|
+
decrease?: string;
|
|
355
|
+
neutral?: string;
|
|
356
|
+
};
|
|
357
|
+
colors?: {
|
|
358
|
+
increase?: string;
|
|
359
|
+
decrease?: string;
|
|
360
|
+
neutral?: string;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
|
|
340
364
|
declare type ConditionalFormatCondition = {
|
|
341
365
|
kind: 'comparison';
|
|
342
366
|
columnId: string;
|
|
@@ -564,11 +588,17 @@ declare type DashboardInputScope = {
|
|
|
564
588
|
sectionIds: string[];
|
|
565
589
|
};
|
|
566
590
|
|
|
567
|
-
declare type DashboardInputSlot = {
|
|
591
|
+
declare type DashboardInputSlot = ({
|
|
568
592
|
status: 'set';
|
|
569
593
|
value: DashboardInputValue;
|
|
570
|
-
|
|
594
|
+
comparisonSelection?: GlobalDateComparisonSelection;
|
|
595
|
+
}) | ({
|
|
571
596
|
status: 'cleared';
|
|
597
|
+
comparisonSelection?: GlobalDateComparisonSelection;
|
|
598
|
+
}) | {
|
|
599
|
+
status?: never;
|
|
600
|
+
value?: never;
|
|
601
|
+
comparisonSelection: GlobalDateComparisonSelection;
|
|
572
602
|
};
|
|
573
603
|
|
|
574
604
|
declare type DashboardInputTextContent = Array<{
|
|
@@ -702,7 +732,6 @@ declare interface DetailTableBackupConfig {
|
|
|
702
732
|
function: AggregateFunction;
|
|
703
733
|
pivotLevel: string | 'ALL';
|
|
704
734
|
}>;
|
|
705
|
-
comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target' | 'start_vs_end';
|
|
706
735
|
}
|
|
707
736
|
|
|
708
737
|
declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb' | 'mssql';
|
|
@@ -1290,6 +1319,13 @@ declare type FormatSpec = {
|
|
|
1290
1319
|
suffix?: string;
|
|
1291
1320
|
};
|
|
1292
1321
|
|
|
1322
|
+
declare type GlobalDateComparisonSelection = {
|
|
1323
|
+
mode: 'off';
|
|
1324
|
+
} | {
|
|
1325
|
+
mode: 'period';
|
|
1326
|
+
spec: ViewerPeriodComparisonSpec;
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1293
1329
|
declare type Granularity = 'day' | 'week' | 'month' | 'quarter' | 'year' | 'hour' | 'minute' | 'second';
|
|
1294
1330
|
|
|
1295
1331
|
declare interface GroupByColumn extends BaseColumn {
|
|
@@ -1434,6 +1470,30 @@ declare interface MetricColumn extends BaseColumn {
|
|
|
1434
1470
|
aliasTemplate?: string;
|
|
1435
1471
|
}
|
|
1436
1472
|
|
|
1473
|
+
declare type MetricComparisonConfig = {
|
|
1474
|
+
mode: 'off';
|
|
1475
|
+
} | {
|
|
1476
|
+
mode: 'explicit';
|
|
1477
|
+
spec: MetricComparisonSpec;
|
|
1478
|
+
};
|
|
1479
|
+
|
|
1480
|
+
declare type MetricComparisonPolarity = 'higher_is_better' | 'lower_is_better' | 'neutral';
|
|
1481
|
+
|
|
1482
|
+
declare type MetricComparisonSpec = {
|
|
1483
|
+
kind: 'previous_period';
|
|
1484
|
+
offsetPeriods?: number;
|
|
1485
|
+
alignment?: 'calendar' | 'weekday';
|
|
1486
|
+
toDate?: boolean;
|
|
1487
|
+
} | {
|
|
1488
|
+
kind: 'previous_year';
|
|
1489
|
+
offsetYears?: number;
|
|
1490
|
+
alignment?: 'calendar' | 'weekday';
|
|
1491
|
+
toDate?: boolean;
|
|
1492
|
+
} | {
|
|
1493
|
+
kind: 'target';
|
|
1494
|
+
targetValue: number;
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1437
1497
|
declare interface MetricField extends Field {
|
|
1438
1498
|
role: 'metric';
|
|
1439
1499
|
aggregate?: AggregateFunction;
|
|
@@ -1482,9 +1542,10 @@ declare interface MetricField extends Field {
|
|
|
1482
1542
|
* pre-aggregated metric input.
|
|
1483
1543
|
*/
|
|
1484
1544
|
isPreAggregated?: boolean;
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1545
|
+
comparison?: MetricComparisonConfig;
|
|
1546
|
+
comparisonPolarity?: MetricComparisonPolarity;
|
|
1547
|
+
/** Governed runtime annotation. When present, authoring polarity is read-only. */
|
|
1548
|
+
semanticComparisonPolarity?: MetricComparisonPolarity;
|
|
1488
1549
|
}
|
|
1489
1550
|
|
|
1490
1551
|
declare type NoneOptions = {};
|
|
@@ -2247,6 +2308,11 @@ declare type TCard = {
|
|
|
2247
2308
|
};
|
|
2248
2309
|
|
|
2249
2310
|
declare type TCardPreferences = {
|
|
2311
|
+
comparisonPresentation?: ComparisonPresentationSpec;
|
|
2312
|
+
/** Absence means eligible metrics inherit the Global Date comparison. */
|
|
2313
|
+
inheritGlobalComparison?: false;
|
|
2314
|
+
/** Separate two-metric KPI feature; defaults to false. */
|
|
2315
|
+
metricPairComparisonEnabled?: boolean;
|
|
2250
2316
|
onClickFilter?: FilterOnClick[];
|
|
2251
2317
|
filterOnClick?: boolean;
|
|
2252
2318
|
filterOnClickField?: string;
|
|
@@ -2319,43 +2385,14 @@ declare type TCardPreferences = {
|
|
|
2319
2385
|
colorScale?: string;
|
|
2320
2386
|
};
|
|
2321
2387
|
kpiVisualOptions?: {
|
|
2322
|
-
lowerIsBetter?: boolean;
|
|
2323
2388
|
countryLogoId?: string;
|
|
2324
2389
|
valueAlignment?: 'left' | 'center';
|
|
2325
2390
|
formatOptions?: TFormatOptions;
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
showColor?: boolean;
|
|
2332
|
-
conditionalLabel?: boolean;
|
|
2333
|
-
labelName?: string;
|
|
2334
|
-
position?: 'left' | 'right' | 'top';
|
|
2335
|
-
conditionalLabels?: {
|
|
2336
|
-
increase?: string;
|
|
2337
|
-
decrease?: string;
|
|
2338
|
-
noChange?: string;
|
|
2339
|
-
};
|
|
2340
|
-
colorConfig?: {
|
|
2341
|
-
increase?: 'green' | 'red' | 'neutral' | string;
|
|
2342
|
-
decrease?: 'green' | 'red' | 'neutral' | string;
|
|
2343
|
-
noChange?: 'green' | 'red' | 'neutral' | string;
|
|
2344
|
-
};
|
|
2345
|
-
};
|
|
2346
|
-
};
|
|
2347
|
-
tableVisualOptions?: {
|
|
2348
|
-
metricComparison?: {
|
|
2349
|
-
calculatedAs?: 'difference' | 'change' | 'change_difference' | 'ratio';
|
|
2350
|
-
indicatorStyle?: 'arrow_badge' | 'arrow' | 'badge' | 'none';
|
|
2351
|
-
formatOptions?: TFormatOptions;
|
|
2352
|
-
colors?: {
|
|
2353
|
-
increase?: 'green' | 'red' | 'neutral' | string;
|
|
2354
|
-
decrease?: 'green' | 'red' | 'neutral' | string;
|
|
2355
|
-
neutral?: 'green' | 'red' | 'neutral' | string;
|
|
2356
|
-
};
|
|
2357
|
-
lowerIsBetter?: boolean;
|
|
2358
|
-
};
|
|
2391
|
+
/**
|
|
2392
|
+
* Presentation-only polarity for a query-backed KPI's manually returned
|
|
2393
|
+
* current/prior value pair. Governed KPIs use per-metric polarity instead.
|
|
2394
|
+
*/
|
|
2395
|
+
queryComparisonPolarity?: MetricComparisonPolarity;
|
|
2359
2396
|
};
|
|
2360
2397
|
pivotTableOptions?: {
|
|
2361
2398
|
showRowTotals?: boolean;
|
|
@@ -2887,6 +2924,10 @@ export declare function useDebouncedDirtyCheck<T>(currentState: T, pristineState
|
|
|
2887
2924
|
resetDirty: () => void;
|
|
2888
2925
|
};
|
|
2889
2926
|
|
|
2927
|
+
declare type ViewerPeriodComparisonSpec = Extract<MetricComparisonSpec, {
|
|
2928
|
+
kind: 'previous_period' | 'previous_year';
|
|
2929
|
+
}>;
|
|
2930
|
+
|
|
2890
2931
|
/**
|
|
2891
2932
|
* Display mode for visual components - controls which UI elements are shown
|
|
2892
2933
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnSizingState } from '@tanstack/react-table';
|
|
2
|
+
import { default as default_2 } from 'react';
|
|
2
3
|
import { FontSpec } from 'chart.js';
|
|
3
|
-
import { JSX } from 'react
|
|
4
|
-
import { JSX as JSX_2 } from 'react';
|
|
4
|
+
import { JSX } from 'react';
|
|
5
5
|
|
|
6
6
|
export declare type AggregateCalc = 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'COUNT' | 'COUNT_DISTINCT';
|
|
7
7
|
|
|
@@ -204,7 +204,7 @@ declare interface CalculatedFieldFormula {
|
|
|
204
204
|
*/
|
|
205
205
|
declare type CalculatedFieldOperation = 'sum' | 'difference' | 'product' | 'ratio' | 'change' | 'percentage' | 'scale' | 'custom';
|
|
206
206
|
|
|
207
|
-
export declare function CalendarPreferencesDialog({ open, onOpenChange, }: CalendarPreferencesDialogProps): JSX.Element;
|
|
207
|
+
export declare function CalendarPreferencesDialog({ open, onOpenChange, }: CalendarPreferencesDialogProps): default_2.JSX.Element;
|
|
208
208
|
|
|
209
209
|
declare interface CalendarPreferencesDialogProps {
|
|
210
210
|
open: boolean;
|
|
@@ -272,9 +272,6 @@ declare interface CardConfig {
|
|
|
272
272
|
* Configuration for on-click dashboard filters triggered by this card.
|
|
273
273
|
*/
|
|
274
274
|
clickFilterInteractions?: ClickFilterInteraction[];
|
|
275
|
-
comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target' | 'start_vs_end';
|
|
276
|
-
targetValue?: number;
|
|
277
|
-
showComparisonInLegend?: boolean;
|
|
278
275
|
showTrendline?: boolean;
|
|
279
276
|
trendlineWindow?: number;
|
|
280
277
|
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
@@ -437,6 +434,33 @@ declare type ColumnType = 'string' | 'number' | 'date';
|
|
|
437
434
|
|
|
438
435
|
declare type ComparisonOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
439
436
|
|
|
437
|
+
declare type ComparisonPresentationSpec = {
|
|
438
|
+
/** Defaults to difference. */
|
|
439
|
+
displayMode?: 'difference' | 'percent_change' | 'both' | 'ratio';
|
|
440
|
+
/** Defaults to true. This controls display, not baseline selection. */
|
|
441
|
+
showComparison?: boolean;
|
|
442
|
+
/** Percent/ratio precision. Defaults to the surface formatter; valid range is 0..6. */
|
|
443
|
+
precision?: number;
|
|
444
|
+
/** Defaults to arrow_badge. */
|
|
445
|
+
indicatorStyle?: 'arrow_badge' | 'arrow' | 'badge' | 'none';
|
|
446
|
+
/** Defaults to true. */
|
|
447
|
+
showColor?: boolean;
|
|
448
|
+
position?: 'left' | 'right' | 'top';
|
|
449
|
+
/** Defaults to false. */
|
|
450
|
+
conditionalLabel?: boolean;
|
|
451
|
+
labelName?: string;
|
|
452
|
+
conditionalLabels?: {
|
|
453
|
+
increase?: string;
|
|
454
|
+
decrease?: string;
|
|
455
|
+
neutral?: string;
|
|
456
|
+
};
|
|
457
|
+
colors?: {
|
|
458
|
+
increase?: string;
|
|
459
|
+
decrease?: string;
|
|
460
|
+
neutral?: string;
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
|
|
440
464
|
declare type ConditionalFormatCondition = {
|
|
441
465
|
kind: 'comparison';
|
|
442
466
|
columnId: string;
|
|
@@ -685,11 +709,17 @@ export declare type DashboardInputScope = {
|
|
|
685
709
|
sectionIds: string[];
|
|
686
710
|
};
|
|
687
711
|
|
|
688
|
-
export declare type DashboardInputSlot = {
|
|
712
|
+
export declare type DashboardInputSlot = ({
|
|
689
713
|
status: 'set';
|
|
690
714
|
value: DashboardInputValue;
|
|
691
|
-
|
|
715
|
+
comparisonSelection?: GlobalDateComparisonSelection;
|
|
716
|
+
}) | ({
|
|
692
717
|
status: 'cleared';
|
|
718
|
+
comparisonSelection?: GlobalDateComparisonSelection;
|
|
719
|
+
}) | {
|
|
720
|
+
status?: never;
|
|
721
|
+
value?: never;
|
|
722
|
+
comparisonSelection: GlobalDateComparisonSelection;
|
|
693
723
|
};
|
|
694
724
|
|
|
695
725
|
export declare type DashboardInputTextContent = Array<{
|
|
@@ -929,7 +959,6 @@ declare interface DetailTableBackupConfig {
|
|
|
929
959
|
function: AggregateFunction;
|
|
930
960
|
pivotLevel: string | 'ALL';
|
|
931
961
|
}>;
|
|
932
|
-
comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target' | 'start_vs_end';
|
|
933
962
|
}
|
|
934
963
|
|
|
935
964
|
declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb' | 'mssql';
|
|
@@ -1544,7 +1573,8 @@ declare type FormatSpec = {
|
|
|
1544
1573
|
export declare type GetDashboardResponse = {
|
|
1545
1574
|
dashboard: TDashboard;
|
|
1546
1575
|
lenses: TLens[];
|
|
1547
|
-
filterValues?: TFilterValue[];
|
|
1576
|
+
filterValues?: TFilterValue[] | null;
|
|
1577
|
+
inputValues?: LensInputValuesSnapshot | null;
|
|
1548
1578
|
defaultLensId?: string;
|
|
1549
1579
|
assistantProfileId?: string;
|
|
1550
1580
|
semanticExecutionPayload: SemanticExecutionPayload;
|
|
@@ -1559,6 +1589,13 @@ export declare type GetPluginsResponse = {
|
|
|
1559
1589
|
}[];
|
|
1560
1590
|
};
|
|
1561
1591
|
|
|
1592
|
+
declare type GlobalDateComparisonSelection = {
|
|
1593
|
+
mode: 'off';
|
|
1594
|
+
} | {
|
|
1595
|
+
mode: 'period';
|
|
1596
|
+
spec: ViewerPeriodComparisonSpec;
|
|
1597
|
+
};
|
|
1598
|
+
|
|
1562
1599
|
declare type Granularity = 'day' | 'week' | 'month' | 'quarter' | 'year' | 'hour' | 'minute' | 'second';
|
|
1563
1600
|
|
|
1564
1601
|
declare interface GroupByColumn extends BaseColumn {
|
|
@@ -1694,7 +1731,12 @@ declare interface JoinPlan {
|
|
|
1694
1731
|
export declare type KPICardProps = {
|
|
1695
1732
|
card: TCard;
|
|
1696
1733
|
isLoading?: boolean;
|
|
1697
|
-
renderFilterInfo?: () =>
|
|
1734
|
+
renderFilterInfo?: () => JSX.Element | null;
|
|
1735
|
+
};
|
|
1736
|
+
|
|
1737
|
+
export declare type LensInputValuesSnapshot = {
|
|
1738
|
+
generatedAt: string;
|
|
1739
|
+
dashboardInputValues: DashboardInputValues;
|
|
1698
1740
|
};
|
|
1699
1741
|
|
|
1700
1742
|
export declare type Level = 'database' | 'schema' | 'table';
|
|
@@ -1713,12 +1755,44 @@ export declare type LoadingProps = {
|
|
|
1713
1755
|
|
|
1714
1756
|
declare type LogicalOperator = 'AND' | 'OR';
|
|
1715
1757
|
|
|
1758
|
+
/**
|
|
1759
|
+
* A comparison input proven to be present in the card's executed filter set.
|
|
1760
|
+
* Ownership and UI coverage must consume this stage, never source inputs.
|
|
1761
|
+
*/
|
|
1762
|
+
export declare type MaterializedDashboardDateComparisonInput = ResolvedDashboardDateComparisonInput & {
|
|
1763
|
+
effectiveFilterValue: TFilterValue;
|
|
1764
|
+
};
|
|
1765
|
+
|
|
1716
1766
|
declare interface MetricColumn extends BaseColumn {
|
|
1717
1767
|
role: 'metric';
|
|
1718
1768
|
aggregate: AggregateFunction;
|
|
1719
1769
|
aliasTemplate?: string;
|
|
1720
1770
|
}
|
|
1721
1771
|
|
|
1772
|
+
declare type MetricComparisonConfig = {
|
|
1773
|
+
mode: 'off';
|
|
1774
|
+
} | {
|
|
1775
|
+
mode: 'explicit';
|
|
1776
|
+
spec: MetricComparisonSpec;
|
|
1777
|
+
};
|
|
1778
|
+
|
|
1779
|
+
declare type MetricComparisonPolarity = 'higher_is_better' | 'lower_is_better' | 'neutral';
|
|
1780
|
+
|
|
1781
|
+
declare type MetricComparisonSpec = {
|
|
1782
|
+
kind: 'previous_period';
|
|
1783
|
+
offsetPeriods?: number;
|
|
1784
|
+
alignment?: 'calendar' | 'weekday';
|
|
1785
|
+
toDate?: boolean;
|
|
1786
|
+
} | {
|
|
1787
|
+
kind: 'previous_year';
|
|
1788
|
+
offsetYears?: number;
|
|
1789
|
+
alignment?: 'calendar' | 'weekday';
|
|
1790
|
+
toDate?: boolean;
|
|
1791
|
+
} | {
|
|
1792
|
+
kind: 'target';
|
|
1793
|
+
targetValue: number;
|
|
1794
|
+
};
|
|
1795
|
+
|
|
1722
1796
|
declare interface MetricField extends Field {
|
|
1723
1797
|
role: 'metric';
|
|
1724
1798
|
aggregate?: AggregateFunction;
|
|
@@ -1767,9 +1841,10 @@ declare interface MetricField extends Field {
|
|
|
1767
1841
|
* pre-aggregated metric input.
|
|
1768
1842
|
*/
|
|
1769
1843
|
isPreAggregated?: boolean;
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1844
|
+
comparison?: MetricComparisonConfig;
|
|
1845
|
+
comparisonPolarity?: MetricComparisonPolarity;
|
|
1846
|
+
/** Governed runtime annotation. When present, authoring polarity is read-only. */
|
|
1847
|
+
semanticComparisonPolarity?: MetricComparisonPolarity;
|
|
1773
1848
|
}
|
|
1774
1849
|
|
|
1775
1850
|
declare type NoneOptions = {};
|
|
@@ -1890,6 +1965,20 @@ declare type RelativeDateFilter = {
|
|
|
1890
1965
|
to: number;
|
|
1891
1966
|
};
|
|
1892
1967
|
|
|
1968
|
+
export declare type ResolvedDashboardDateComparisonInput = {
|
|
1969
|
+
inputId: string;
|
|
1970
|
+
filterId: string;
|
|
1971
|
+
label: string;
|
|
1972
|
+
filter: TFilter;
|
|
1973
|
+
/**
|
|
1974
|
+
* The active value before execution-only canonicalization. Comparison
|
|
1975
|
+
* ownership uses this value as provenance evidence and must fail closed
|
|
1976
|
+
* when its filter or field identity does not match the definition.
|
|
1977
|
+
*/
|
|
1978
|
+
filterValue?: TFilterValue;
|
|
1979
|
+
selection: GlobalDateComparisonSelection;
|
|
1980
|
+
};
|
|
1981
|
+
|
|
1893
1982
|
export declare type ResolvedDashboardInput = {
|
|
1894
1983
|
id: string;
|
|
1895
1984
|
kind: 'filter' | 'control';
|
|
@@ -1905,6 +1994,7 @@ export declare type ResolvedDashboardInput = {
|
|
|
1905
1994
|
control?: ControlDefinition;
|
|
1906
1995
|
controlValue?: unknown;
|
|
1907
1996
|
missingRequiredValue?: boolean;
|
|
1997
|
+
comparisonSelection?: GlobalDateComparisonSelection;
|
|
1908
1998
|
};
|
|
1909
1999
|
|
|
1910
2000
|
export declare type ResolvedDashboardInputContext = {
|
|
@@ -1916,6 +2006,8 @@ export declare type ResolvedDashboardInputContext = {
|
|
|
1916
2006
|
controlBindings: ControlBinding[];
|
|
1917
2007
|
controlValues: Record<string, unknown>;
|
|
1918
2008
|
variablesByName: Record<string, ResolvedDashboardInput>;
|
|
2009
|
+
globalDateComparisonSelection?: GlobalDateComparisonSelection;
|
|
2010
|
+
dateComparisonInputs?: ResolvedDashboardDateComparisonInput[];
|
|
1919
2011
|
variablesById: Record<string, ResolvedDashboardInput>;
|
|
1920
2012
|
missingRequiredInputs: ResolvedDashboardInput[];
|
|
1921
2013
|
};
|
|
@@ -1940,6 +2032,8 @@ declare type ResolvedPrimaryDateField = {
|
|
|
1940
2032
|
entityName: string;
|
|
1941
2033
|
entityType: string;
|
|
1942
2034
|
dataType: string;
|
|
2035
|
+
/** Canonical dataset coordinates stamped by the temporal grounding boundary. */
|
|
2036
|
+
source?: SemaphorSourceRef;
|
|
1943
2037
|
dateFormat?: string;
|
|
1944
2038
|
customFormat?: string;
|
|
1945
2039
|
defaultGranularity?: TimeGranularity;
|
|
@@ -2663,6 +2757,11 @@ export declare type TCardContext = {
|
|
|
2663
2757
|
};
|
|
2664
2758
|
|
|
2665
2759
|
export declare type TCardPreferences = {
|
|
2760
|
+
comparisonPresentation?: ComparisonPresentationSpec;
|
|
2761
|
+
/** Absence means eligible metrics inherit the Global Date comparison. */
|
|
2762
|
+
inheritGlobalComparison?: false;
|
|
2763
|
+
/** Separate two-metric KPI feature; defaults to false. */
|
|
2764
|
+
metricPairComparisonEnabled?: boolean;
|
|
2666
2765
|
onClickFilter?: FilterOnClick[];
|
|
2667
2766
|
filterOnClick?: boolean;
|
|
2668
2767
|
filterOnClickField?: string;
|
|
@@ -2735,43 +2834,14 @@ export declare type TCardPreferences = {
|
|
|
2735
2834
|
colorScale?: string;
|
|
2736
2835
|
};
|
|
2737
2836
|
kpiVisualOptions?: {
|
|
2738
|
-
lowerIsBetter?: boolean;
|
|
2739
2837
|
countryLogoId?: string;
|
|
2740
2838
|
valueAlignment?: 'left' | 'center';
|
|
2741
2839
|
formatOptions?: TFormatOptions;
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
showColor?: boolean;
|
|
2748
|
-
conditionalLabel?: boolean;
|
|
2749
|
-
labelName?: string;
|
|
2750
|
-
position?: 'left' | 'right' | 'top';
|
|
2751
|
-
conditionalLabels?: {
|
|
2752
|
-
increase?: string;
|
|
2753
|
-
decrease?: string;
|
|
2754
|
-
noChange?: string;
|
|
2755
|
-
};
|
|
2756
|
-
colorConfig?: {
|
|
2757
|
-
increase?: 'green' | 'red' | 'neutral' | string;
|
|
2758
|
-
decrease?: 'green' | 'red' | 'neutral' | string;
|
|
2759
|
-
noChange?: 'green' | 'red' | 'neutral' | string;
|
|
2760
|
-
};
|
|
2761
|
-
};
|
|
2762
|
-
};
|
|
2763
|
-
tableVisualOptions?: {
|
|
2764
|
-
metricComparison?: {
|
|
2765
|
-
calculatedAs?: 'difference' | 'change' | 'change_difference' | 'ratio';
|
|
2766
|
-
indicatorStyle?: 'arrow_badge' | 'arrow' | 'badge' | 'none';
|
|
2767
|
-
formatOptions?: TFormatOptions;
|
|
2768
|
-
colors?: {
|
|
2769
|
-
increase?: 'green' | 'red' | 'neutral' | string;
|
|
2770
|
-
decrease?: 'green' | 'red' | 'neutral' | string;
|
|
2771
|
-
neutral?: 'green' | 'red' | 'neutral' | string;
|
|
2772
|
-
};
|
|
2773
|
-
lowerIsBetter?: boolean;
|
|
2774
|
-
};
|
|
2840
|
+
/**
|
|
2841
|
+
* Presentation-only polarity for a query-backed KPI's manually returned
|
|
2842
|
+
* current/prior value pair. Governed KPIs use per-metric polarity instead.
|
|
2843
|
+
*/
|
|
2844
|
+
queryComparisonPolarity?: MetricComparisonPolarity;
|
|
2775
2845
|
};
|
|
2776
2846
|
pivotTableOptions?: {
|
|
2777
2847
|
showRowTotals?: boolean;
|
|
@@ -3260,7 +3330,8 @@ export declare type TLens = {
|
|
|
3260
3330
|
id: string;
|
|
3261
3331
|
name: string;
|
|
3262
3332
|
template?: string;
|
|
3263
|
-
filterValues?: TFilterValue[];
|
|
3333
|
+
filterValues?: TFilterValue[] | null;
|
|
3334
|
+
inputValues?: LensInputValuesSnapshot | null;
|
|
3264
3335
|
isDefault?: boolean;
|
|
3265
3336
|
shared?: boolean;
|
|
3266
3337
|
};
|
|
@@ -3350,6 +3421,10 @@ export declare interface UserPreference {
|
|
|
3350
3421
|
updatedAt: string;
|
|
3351
3422
|
}
|
|
3352
3423
|
|
|
3424
|
+
declare type ViewerPeriodComparisonSpec = Extract<MetricComparisonSpec, {
|
|
3425
|
+
kind: 'previous_period' | 'previous_year';
|
|
3426
|
+
}>;
|
|
3427
|
+
|
|
3353
3428
|
/**
|
|
3354
3429
|
* Display mode for visual components - controls which UI elements are shown
|
|
3355
3430
|
*/
|