react-semaphor 0.1.423 → 0.1.425
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 +243 -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-BLaSWhLl.js +1 -0
- package/dist/chunks/{calendar-preferences-dialog-t5ET6MON.js → calendar-preferences-dialog-DJwV0aqn.js} +4 -4
- package/dist/chunks/{catalog-field-grounding-CJKAqtiC.js → catalog-field-grounding-DcxPLns0.js} +10 -10
- package/dist/chunks/{switch-2bh3Hka1.js → code-editor-Bkk7s8hI.js} +7382 -6809
- package/dist/chunks/code-editor-CkXyNgYc.js +138 -0
- package/dist/chunks/{common-types-4bjoIgvm.js → common-types-ClkOI-3O.js} +4 -4
- package/dist/chunks/comparison-document-migration-CQJ0DZlL.js +414 -0
- package/dist/chunks/comparison-document-migration-Db64RWYD.js +1 -0
- package/dist/chunks/{index-yHe0SeLO.js → dashboard-5agU0G_D.js} +56752 -55440
- package/dist/chunks/dashboard-MKIqgGDp.js +1402 -0
- package/dist/chunks/{dashboard-briefing-launcher-S2akO-ub.js → dashboard-briefing-launcher-CII8-4qo.js} +11 -6
- package/dist/chunks/{dashboard-briefing-launcher-Cavd0QJb.js → dashboard-briefing-launcher-qyEVfuOm.js} +226 -209
- package/dist/chunks/dashboard-controls-PJpeYZHw.js +36 -0
- package/dist/chunks/dashboard-controls-aJY0FNPP.js +2196 -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-Do2-pdPZ.js → dashboard-json-CzHSP6Fa.js} +16 -15
- package/dist/chunks/dashboard-json-DtmR5yCf.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-Cw6bq4_w.js → edit-dashboard-visual-AkZzwBCV.js} +8892 -8996
- package/dist/chunks/edit-dashboard-visual-Cif6uDqN.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-4oA4ouU9.js +354 -0
- package/dist/chunks/metric-comparison-nQKquVnx.js +1 -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-5MDbZcs1.js → use-create-flow-overlay-state-ByOKVV2K.js} +62 -62
- package/dist/chunks/{use-create-flow-overlay-state-BNczg9Gj.js → use-create-flow-overlay-state-DmuReEnk.js} +2 -2
- 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 +299 -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 +97 -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 +229 -95
- package/dist/types/shared.d.ts +84 -43
- package/dist/types/surfboard.d.ts +99 -49
- package/dist/types/types.d.ts +110 -50
- package/package.json +2 -1
- package/dist/chunks/analyze-result-contract-DpDcImgk.js +0 -1
- package/dist/chunks/calendar-preferences-dialog-CTmeASaM.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-BJLrErjW.js +0 -2322
- package/dist/chunks/dashboard-controls-DzbP8AXA.js +0 -52
- package/dist/chunks/dashboard-json-5tWb5KD6.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-Yh5YFgMF.js +0 -178
- package/dist/chunks/index-BPM3gDRw.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';
|
|
@@ -1719,6 +1761,30 @@ declare interface MetricColumn extends BaseColumn {
|
|
|
1719
1761
|
aliasTemplate?: string;
|
|
1720
1762
|
}
|
|
1721
1763
|
|
|
1764
|
+
declare type MetricComparisonConfig = {
|
|
1765
|
+
mode: 'off';
|
|
1766
|
+
} | {
|
|
1767
|
+
mode: 'explicit';
|
|
1768
|
+
spec: MetricComparisonSpec;
|
|
1769
|
+
};
|
|
1770
|
+
|
|
1771
|
+
declare type MetricComparisonPolarity = 'higher_is_better' | 'lower_is_better' | 'neutral';
|
|
1772
|
+
|
|
1773
|
+
declare type MetricComparisonSpec = {
|
|
1774
|
+
kind: 'previous_period';
|
|
1775
|
+
offsetPeriods?: number;
|
|
1776
|
+
alignment?: 'calendar' | 'weekday';
|
|
1777
|
+
toDate?: boolean;
|
|
1778
|
+
} | {
|
|
1779
|
+
kind: 'previous_year';
|
|
1780
|
+
offsetYears?: number;
|
|
1781
|
+
alignment?: 'calendar' | 'weekday';
|
|
1782
|
+
toDate?: boolean;
|
|
1783
|
+
} | {
|
|
1784
|
+
kind: 'target';
|
|
1785
|
+
targetValue: number;
|
|
1786
|
+
};
|
|
1787
|
+
|
|
1722
1788
|
declare interface MetricField extends Field {
|
|
1723
1789
|
role: 'metric';
|
|
1724
1790
|
aggregate?: AggregateFunction;
|
|
@@ -1767,9 +1833,10 @@ declare interface MetricField extends Field {
|
|
|
1767
1833
|
* pre-aggregated metric input.
|
|
1768
1834
|
*/
|
|
1769
1835
|
isPreAggregated?: boolean;
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1836
|
+
comparison?: MetricComparisonConfig;
|
|
1837
|
+
comparisonPolarity?: MetricComparisonPolarity;
|
|
1838
|
+
/** Governed runtime annotation. When present, authoring polarity is read-only. */
|
|
1839
|
+
semanticComparisonPolarity?: MetricComparisonPolarity;
|
|
1773
1840
|
}
|
|
1774
1841
|
|
|
1775
1842
|
declare type NoneOptions = {};
|
|
@@ -1905,6 +1972,7 @@ export declare type ResolvedDashboardInput = {
|
|
|
1905
1972
|
control?: ControlDefinition;
|
|
1906
1973
|
controlValue?: unknown;
|
|
1907
1974
|
missingRequiredValue?: boolean;
|
|
1975
|
+
comparisonSelection?: GlobalDateComparisonSelection;
|
|
1908
1976
|
};
|
|
1909
1977
|
|
|
1910
1978
|
export declare type ResolvedDashboardInputContext = {
|
|
@@ -1916,6 +1984,7 @@ export declare type ResolvedDashboardInputContext = {
|
|
|
1916
1984
|
controlBindings: ControlBinding[];
|
|
1917
1985
|
controlValues: Record<string, unknown>;
|
|
1918
1986
|
variablesByName: Record<string, ResolvedDashboardInput>;
|
|
1987
|
+
globalDateComparisonSelection?: GlobalDateComparisonSelection;
|
|
1919
1988
|
variablesById: Record<string, ResolvedDashboardInput>;
|
|
1920
1989
|
missingRequiredInputs: ResolvedDashboardInput[];
|
|
1921
1990
|
};
|
|
@@ -2663,6 +2732,11 @@ export declare type TCardContext = {
|
|
|
2663
2732
|
};
|
|
2664
2733
|
|
|
2665
2734
|
export declare type TCardPreferences = {
|
|
2735
|
+
comparisonPresentation?: ComparisonPresentationSpec;
|
|
2736
|
+
/** Absence means eligible metrics inherit the Global Date comparison. */
|
|
2737
|
+
inheritGlobalComparison?: false;
|
|
2738
|
+
/** Separate two-metric KPI feature; defaults to false. */
|
|
2739
|
+
metricPairComparisonEnabled?: boolean;
|
|
2666
2740
|
onClickFilter?: FilterOnClick[];
|
|
2667
2741
|
filterOnClick?: boolean;
|
|
2668
2742
|
filterOnClickField?: string;
|
|
@@ -2735,43 +2809,14 @@ export declare type TCardPreferences = {
|
|
|
2735
2809
|
colorScale?: string;
|
|
2736
2810
|
};
|
|
2737
2811
|
kpiVisualOptions?: {
|
|
2738
|
-
lowerIsBetter?: boolean;
|
|
2739
2812
|
countryLogoId?: string;
|
|
2740
2813
|
valueAlignment?: 'left' | 'center';
|
|
2741
2814
|
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
|
-
};
|
|
2815
|
+
/**
|
|
2816
|
+
* Presentation-only polarity for a query-backed KPI's manually returned
|
|
2817
|
+
* current/prior value pair. Governed KPIs use per-metric polarity instead.
|
|
2818
|
+
*/
|
|
2819
|
+
queryComparisonPolarity?: MetricComparisonPolarity;
|
|
2775
2820
|
};
|
|
2776
2821
|
pivotTableOptions?: {
|
|
2777
2822
|
showRowTotals?: boolean;
|
|
@@ -3260,7 +3305,8 @@ export declare type TLens = {
|
|
|
3260
3305
|
id: string;
|
|
3261
3306
|
name: string;
|
|
3262
3307
|
template?: string;
|
|
3263
|
-
filterValues?: TFilterValue[];
|
|
3308
|
+
filterValues?: TFilterValue[] | null;
|
|
3309
|
+
inputValues?: LensInputValuesSnapshot | null;
|
|
3264
3310
|
isDefault?: boolean;
|
|
3265
3311
|
shared?: boolean;
|
|
3266
3312
|
};
|
|
@@ -3350,6 +3396,10 @@ export declare interface UserPreference {
|
|
|
3350
3396
|
updatedAt: string;
|
|
3351
3397
|
}
|
|
3352
3398
|
|
|
3399
|
+
declare type ViewerPeriodComparisonSpec = Extract<MetricComparisonSpec, {
|
|
3400
|
+
kind: 'previous_period' | 'previous_year';
|
|
3401
|
+
}>;
|
|
3402
|
+
|
|
3353
3403
|
/**
|
|
3354
3404
|
* Display mode for visual components - controls which UI elements are shown
|
|
3355
3405
|
*/
|