react-semaphor 0.1.444 → 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-Bg_SeBV8.js → dashboard-briefing-launcher-2SLNOaTg.js} +26 -24
- package/dist/chunks/{dashboard-briefing-launcher-Do6ZcOj4.js → dashboard-briefing-launcher-CHwjpUYz.cjs} +2 -2
- package/dist/chunks/{dashboard-controls-Da9MkPaf.js → dashboard-controls-BfL14aqO.js} +11 -9
- package/dist/chunks/{dashboard-controls-CYBi_mes.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-BtrdGo1U.js → dashboard-json-BZwq3EcS.js} +14 -12
- package/dist/chunks/{dashboard-CJNVq8XI.js → dashboard-u61yfU6u.js} +50081 -47351
- package/dist/chunks/edit-dashboard-visual-BdVCH0DJ.cjs +182 -0
- package/dist/chunks/{edit-dashboard-visual-kE6_3R3j.js → edit-dashboard-visual-njLPYip3.js} +6799 -6652
- package/dist/chunks/{editor-action-buttons-DROkx4PS.js → editor-action-buttons-BhLX5Q6m.js} +24 -23
- package/dist/chunks/{editor-action-buttons-8_CQa8Hb.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-Dq7rmN93.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-DxZuqe8t.js +0 -1402
- package/dist/chunks/dashboard-date-comparison-definition-DGZr3m-b.js +0 -1
- package/dist/chunks/dashboard-json-ezLyW7AK.js +0 -1
- package/dist/chunks/edit-dashboard-visual-DEb9MeSM.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-D5sIaFnb.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
|
@@ -24,6 +24,8 @@ export declare function applyDashboardChangePlan(input: {
|
|
|
24
24
|
cardArtifacts: GeneratedDashboardCardArtifact[];
|
|
25
25
|
}): DashboardChangeCompileResult;
|
|
26
26
|
|
|
27
|
+
export declare const AUTOMATIC_TEMPORAL_BUCKET_FORMAT: TemporalBucketFormat;
|
|
28
|
+
|
|
27
29
|
declare type AxisConfig = {
|
|
28
30
|
enabled?: boolean;
|
|
29
31
|
name?: {
|
|
@@ -70,6 +72,8 @@ declare type BaseFilter = {
|
|
|
70
72
|
dataType?: string;
|
|
71
73
|
fieldMeta?: FilterFieldMeta;
|
|
72
74
|
semanticContext?: FilterSemanticContext;
|
|
75
|
+
/** Governed meaning for canonical grouped-temporal filter values. */
|
|
76
|
+
temporalBucket?: TemporalBucketMetadata;
|
|
73
77
|
};
|
|
74
78
|
|
|
75
79
|
declare type Breakpoint = 'lg' | 'md' | 'sm' | 'xs' | 'xxs';
|
|
@@ -127,6 +131,15 @@ declare interface CalculatedFieldFormula {
|
|
|
127
131
|
*/
|
|
128
132
|
declare type CalculatedFieldOperation = 'sum' | 'difference' | 'product' | 'ratio' | 'change' | 'percentage' | 'scale' | 'custom';
|
|
129
133
|
|
|
134
|
+
declare type CalendarContext = {
|
|
135
|
+
tz: string;
|
|
136
|
+
weekStart: WeekStart;
|
|
137
|
+
anchor: 'now' | {
|
|
138
|
+
iso: string;
|
|
139
|
+
};
|
|
140
|
+
fiscalCalendar?: MonthAlignedFiscalCalendar;
|
|
141
|
+
};
|
|
142
|
+
|
|
130
143
|
declare interface CardConfig {
|
|
131
144
|
/**
|
|
132
145
|
* Matrix table is the shared analytics-spine successor for pivot and
|
|
@@ -188,9 +201,6 @@ declare interface CardConfig {
|
|
|
188
201
|
* Configuration for on-click dashboard filters triggered by this card.
|
|
189
202
|
*/
|
|
190
203
|
clickFilterInteractions?: ClickFilterInteraction[];
|
|
191
|
-
showTrendline?: boolean;
|
|
192
|
-
trendlineWindow?: number;
|
|
193
|
-
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
194
204
|
summary?: {
|
|
195
205
|
enabled?: boolean;
|
|
196
206
|
showOnCard?: boolean;
|
|
@@ -552,7 +562,10 @@ declare type ControlOption = {
|
|
|
552
562
|
label: string;
|
|
553
563
|
presentation?: {
|
|
554
564
|
granularity?: TimeGranularity;
|
|
565
|
+
format?: TemporalBucketFormat;
|
|
566
|
+
/** Saved-dashboard compatibility only. New authoring writes `format`. */
|
|
555
567
|
dateFormat?: DateFormatValue;
|
|
568
|
+
/** Saved-dashboard compatibility only. New authoring writes `format`. */
|
|
556
569
|
customFormat?: string;
|
|
557
570
|
};
|
|
558
571
|
};
|
|
@@ -1327,8 +1340,9 @@ declare type EntityType = 'table' | 'view' | 'materialized view' | 'model' | 'fi
|
|
|
1327
1340
|
|
|
1328
1341
|
declare interface Field {
|
|
1329
1342
|
/**
|
|
1330
|
-
*
|
|
1331
|
-
*
|
|
1343
|
+
* Stable authored/semantic field identifier (for joins, UI state, etc.).
|
|
1344
|
+
* It is normally unique within a role, but one saved query may reuse it in
|
|
1345
|
+
* different roles; result bindings must therefore include the role.
|
|
1332
1346
|
* Example: 'orders.customer_id', 'expr_12345', etc.
|
|
1333
1347
|
*/
|
|
1334
1348
|
id: string;
|
|
@@ -1370,6 +1384,12 @@ declare interface Field {
|
|
|
1370
1384
|
*/
|
|
1371
1385
|
derivedField?: SemaphorDerivedFieldDefinition;
|
|
1372
1386
|
format?: FormatSpec;
|
|
1387
|
+
/**
|
|
1388
|
+
* Source-level temporal presentation keeps the semantic grain that authored
|
|
1389
|
+
* the format. The card's mutable `granularity` remains the active query
|
|
1390
|
+
* grain, so changing it cannot accidentally retarget a semantic default.
|
|
1391
|
+
*/
|
|
1392
|
+
semanticTemporalPresentation?: SemanticTemporalPresentation;
|
|
1373
1393
|
aggregate?: AggregateFunction;
|
|
1374
1394
|
fieldScope?: FieldScope;
|
|
1375
1395
|
}
|
|
@@ -1413,6 +1433,10 @@ declare interface FilterCondition {
|
|
|
1413
1433
|
field: Field;
|
|
1414
1434
|
operator: Operator;
|
|
1415
1435
|
value: FilterValue;
|
|
1436
|
+
/** Display-only label for canonical grouped-temporal values. */
|
|
1437
|
+
label?: string;
|
|
1438
|
+
/** Governed meaning for a canonical grouped-temporal scalar. */
|
|
1439
|
+
temporalBucket?: TemporalBucketMetadata;
|
|
1416
1440
|
}
|
|
1417
1441
|
|
|
1418
1442
|
declare type FilterDashboardInput = DashboardInputBase & {
|
|
@@ -1575,7 +1599,7 @@ declare type FormatSpec = {
|
|
|
1575
1599
|
type: 'string';
|
|
1576
1600
|
prefix?: string;
|
|
1577
1601
|
suffix?: string;
|
|
1578
|
-
};
|
|
1602
|
+
} | TemporalBucketFormat;
|
|
1579
1603
|
|
|
1580
1604
|
export declare type GeneratedDashboardCardArtifact = {
|
|
1581
1605
|
planCardId: string;
|
|
@@ -1587,6 +1611,10 @@ export declare type GeneratedDashboardCardArtifact = {
|
|
|
1587
1611
|
|
|
1588
1612
|
export declare function getDashboardAuthoringCardSource(card: Pick<DashboardPlanCard, 'analyticsIntent'>): SemaphorSourceRef | undefined;
|
|
1589
1613
|
|
|
1614
|
+
export declare function getTemporalBucketAuthoringOptions(granularity: SemaphorTimeGrain, preservedFormat?: TemporalBucketFormat): readonly TemporalBucketAuthoringOption[];
|
|
1615
|
+
|
|
1616
|
+
export declare function getTemporalBucketAuthoringSelection(format: TemporalBucketFormat, granularity: SemaphorTimeGrain): TemporalBucketAuthoringSelection;
|
|
1617
|
+
|
|
1590
1618
|
declare type GlobalDateComparisonSelection = {
|
|
1591
1619
|
mode: 'off';
|
|
1592
1620
|
} | {
|
|
@@ -1594,7 +1622,7 @@ declare type GlobalDateComparisonSelection = {
|
|
|
1594
1622
|
spec: ViewerPeriodComparisonSpec;
|
|
1595
1623
|
};
|
|
1596
1624
|
|
|
1597
|
-
declare type Granularity =
|
|
1625
|
+
declare type Granularity = SemaphorTimeGrain;
|
|
1598
1626
|
|
|
1599
1627
|
declare interface GroupByColumn extends BaseColumn {
|
|
1600
1628
|
role: 'groupby';
|
|
@@ -1605,6 +1633,11 @@ declare interface GroupByColumn extends BaseColumn {
|
|
|
1605
1633
|
declare interface GroupByField extends Field {
|
|
1606
1634
|
role: 'groupby';
|
|
1607
1635
|
granularity?: TimeGranularity;
|
|
1636
|
+
/**
|
|
1637
|
+
* Query transport policy for grouped temporal values. This is projected
|
|
1638
|
+
* into executable card config and is not persisted authoring state.
|
|
1639
|
+
*/
|
|
1640
|
+
dateValueMode?: 'canonical' | 'formatted';
|
|
1608
1641
|
/**
|
|
1609
1642
|
* Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
|
|
1610
1643
|
* If present, used in SELECT and GROUP BY instead of just the column name.
|
|
@@ -1693,6 +1726,8 @@ declare interface InteractionTrigger {
|
|
|
1693
1726
|
|
|
1694
1727
|
export declare function isMaterializableDashboardAuthoringSource(value: unknown): value is MaterializableDashboardAuthoringSource;
|
|
1695
1728
|
|
|
1729
|
+
export declare function isSemaphorCartesianChartType(value: string | null | undefined): value is SemaphorCartesianChartType;
|
|
1730
|
+
|
|
1696
1731
|
export declare function isSemaphorSourceRef(value: unknown): value is SemaphorSourceRef;
|
|
1697
1732
|
|
|
1698
1733
|
declare interface Join {
|
|
@@ -1826,6 +1861,11 @@ declare interface MetricField extends Field {
|
|
|
1826
1861
|
semanticComparisonPolarity?: MetricComparisonPolarity;
|
|
1827
1862
|
}
|
|
1828
1863
|
|
|
1864
|
+
declare type MonthAlignedFiscalCalendar = {
|
|
1865
|
+
kind: 'month_aligned';
|
|
1866
|
+
yearStartMonth: number;
|
|
1867
|
+
};
|
|
1868
|
+
|
|
1829
1869
|
declare type NoneOptions = {};
|
|
1830
1870
|
|
|
1831
1871
|
declare type NumberAxisFormat = {
|
|
@@ -1902,12 +1942,19 @@ declare type PersistedInteraction = Interaction & {
|
|
|
1902
1942
|
|
|
1903
1943
|
declare interface PivotByField extends Field {
|
|
1904
1944
|
role: 'pivotby';
|
|
1945
|
+
/**
|
|
1946
|
+
* Query transport policy for grouped temporal pivot members. This is
|
|
1947
|
+
* projected into executable config and is never persisted authoring state.
|
|
1948
|
+
*/
|
|
1949
|
+
dateValueMode?: 'canonical' | 'formatted';
|
|
1905
1950
|
}
|
|
1906
1951
|
|
|
1907
1952
|
export declare function preferDashboardAuthoringSourceMetadata(current: SemaphorSourceRef, next: SemaphorSourceRef): SemaphorSourceRef;
|
|
1908
1953
|
|
|
1909
1954
|
export declare function preferredDashboardAuthoringSource(sources: readonly SemaphorSourceRef[]): SemaphorSourceRef | undefined;
|
|
1910
1955
|
|
|
1956
|
+
export declare function previewTemporalBucketAuthoringFormat(format: TemporalBucketFormat, granularity: SemaphorTimeGrain): string;
|
|
1957
|
+
|
|
1911
1958
|
declare interface QueryConfig {
|
|
1912
1959
|
groupByColumns?: GroupByColumn[];
|
|
1913
1960
|
pivotColumns?: GroupByColumn[];
|
|
@@ -1930,6 +1977,8 @@ declare type RangeValue = {
|
|
|
1930
1977
|
gt?: string | number;
|
|
1931
1978
|
};
|
|
1932
1979
|
|
|
1980
|
+
export declare function reconcileTemporalBucketAuthoringFormat(format: TemporalBucketFormat, granularity: SemaphorTimeGrain): TemporalBucketFormat;
|
|
1981
|
+
|
|
1933
1982
|
declare type RelativeDateFilter = {
|
|
1934
1983
|
mode: 'last';
|
|
1935
1984
|
n: number;
|
|
@@ -1961,10 +2010,30 @@ export declare function resolveDashboardAuthoringSource({ explicitSource, field,
|
|
|
1961
2010
|
fallbackSources?: readonly SemaphorSourceRef[];
|
|
1962
2011
|
}): MaterializableDashboardAuthoringSource | undefined;
|
|
1963
2012
|
|
|
2013
|
+
export declare function resolveTemporalBucketAuthoringFormat(granularity: SemaphorTimeGrain, value: string, customPattern?: string): TemporalBucketFormat;
|
|
2014
|
+
|
|
2015
|
+
/**
|
|
2016
|
+
* Selects the only result owner eligible for canonical temporal metadata.
|
|
2017
|
+
* Active SQL or normalized Python always owns the result, even when a card
|
|
2018
|
+
* retains config from a prior authoring mode.
|
|
2019
|
+
*/
|
|
2020
|
+
export declare function resolveTemporalResultOwner(input: TemporalResultOwnerInput): TemporalResultOwner;
|
|
2021
|
+
|
|
1964
2022
|
declare type SelectedEntities = SelectedEntity[];
|
|
1965
2023
|
|
|
1966
2024
|
declare type SelectedEntity = DatabaseEntityReference | DataModelEntityReference | DatasetEntityReference | FileEntityReference;
|
|
1967
2025
|
|
|
2026
|
+
declare type SemanticTemporalPresentation = {
|
|
2027
|
+
granularity: SemaphorTimeGrain;
|
|
2028
|
+
format: TemporalBucketFormat;
|
|
2029
|
+
};
|
|
2030
|
+
|
|
2031
|
+
export declare const SEMAPHOR_CARTESIAN_CHART_TYPES: readonly ["bar", "horizontalBar", "line", "area", "stackedArea", "combo", "stackedBar", "stackedLine"];
|
|
2032
|
+
|
|
2033
|
+
declare const SEMAPHOR_MATRIX_TIME_GRAINS: ["hour", "day", "week", "month", "quarter", "year"];
|
|
2034
|
+
|
|
2035
|
+
declare const SEMAPHOR_TIME_GRAINS: readonly ["second", "minute", "hour", "day", "week", "month", "quarter", "year"];
|
|
2036
|
+
|
|
1968
2037
|
declare type SemaphorAbsoluteTimeWindow = {
|
|
1969
2038
|
kind: 'absolute';
|
|
1970
2039
|
start: string;
|
|
@@ -2006,6 +2075,8 @@ declare type SemaphorAnalyticsValueFilter = SemaphorAnalyticsFilterBase & {
|
|
|
2006
2075
|
|
|
2007
2076
|
declare type SemaphorAnalyticsValueFilterOperator = Exclude<SemaphorAnalyticsFilterOperator, 'is_null' | 'is_not_null'>;
|
|
2008
2077
|
|
|
2078
|
+
export declare type SemaphorCartesianChartType = (typeof SEMAPHOR_CARTESIAN_CHART_TYPES)[number];
|
|
2079
|
+
|
|
2009
2080
|
declare type SemaphorDashboardIntent = {
|
|
2010
2081
|
version: SemaphorProtocolVersion;
|
|
2011
2082
|
kind: 'dashboard';
|
|
@@ -2051,7 +2122,7 @@ declare type SemaphorDerivedFieldDefinition = {
|
|
|
2051
2122
|
defaultAggregate?: SemaphorAggregateFunction;
|
|
2052
2123
|
aggregationBehavior?: SemaphorDerivedFieldAggregationBehavior;
|
|
2053
2124
|
aggregationStrategy?: SemaphorDerivedFieldAggregationStrategy;
|
|
2054
|
-
format?:
|
|
2125
|
+
format?: SemaphorScalarValueFormat;
|
|
2055
2126
|
tags?: string[];
|
|
2056
2127
|
};
|
|
2057
2128
|
|
|
@@ -2144,7 +2215,7 @@ declare type SemaphorMatrixAxisExpansionOptions = {
|
|
|
2144
2215
|
declare type SemaphorMatrixAxisLevel = {
|
|
2145
2216
|
id?: string;
|
|
2146
2217
|
field: SemaphorFieldRef;
|
|
2147
|
-
grain?:
|
|
2218
|
+
grain?: SemaphorMatrixTimeGrain;
|
|
2148
2219
|
label?: string;
|
|
2149
2220
|
subtotal?: boolean | SemaphorMatrixSubtotalOptions;
|
|
2150
2221
|
sortBy?: SemaphorMatrixAxisSortRule;
|
|
@@ -2236,6 +2307,8 @@ declare type SemaphorMatrixSubtotalOptions = {
|
|
|
2236
2307
|
label?: string;
|
|
2237
2308
|
};
|
|
2238
2309
|
|
|
2310
|
+
declare type SemaphorMatrixTimeGrain = (typeof SEMAPHOR_MATRIX_TIME_GRAINS)[number];
|
|
2311
|
+
|
|
2239
2312
|
declare type SemaphorMatrixTotalCalculation = {
|
|
2240
2313
|
kind: 'defaultAggregate';
|
|
2241
2314
|
} | {
|
|
@@ -2271,7 +2344,7 @@ declare type SemaphorMatrixValueField = {
|
|
|
2271
2344
|
field: SemaphorFieldRef;
|
|
2272
2345
|
aggregate?: SemaphorAggregateFunction;
|
|
2273
2346
|
label?: string;
|
|
2274
|
-
format?:
|
|
2347
|
+
format?: SemaphorScalarValueFormat;
|
|
2275
2348
|
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
2276
2349
|
};
|
|
2277
2350
|
|
|
@@ -2366,12 +2439,49 @@ declare type SemaphorRelationshipHint = {
|
|
|
2366
2439
|
|
|
2367
2440
|
declare type SemaphorRelativeTimeWindow = {
|
|
2368
2441
|
kind?: 'relative';
|
|
2369
|
-
unit:
|
|
2442
|
+
unit: SemaphorTimeGrain;
|
|
2370
2443
|
value: number;
|
|
2371
2444
|
anchor?: 'now' | 'latest_available';
|
|
2372
2445
|
completeness?: 'include_partial' | 'complete_periods';
|
|
2373
2446
|
};
|
|
2374
2447
|
|
|
2448
|
+
declare type SemaphorScalarValueFormat = {
|
|
2449
|
+
type: 'number' | 'currency' | 'percent' | 'percentage' | 'scientific';
|
|
2450
|
+
minimumFractionDigits?: number;
|
|
2451
|
+
maximumFractionDigits?: number;
|
|
2452
|
+
useGrouping?: boolean;
|
|
2453
|
+
prefix?: string;
|
|
2454
|
+
suffix?: string;
|
|
2455
|
+
negativeStyle?: 'minus' | 'parentheses';
|
|
2456
|
+
compact?: boolean;
|
|
2457
|
+
scale?: number;
|
|
2458
|
+
currency?: string;
|
|
2459
|
+
percentValueMode?: 'fraction' | 'whole';
|
|
2460
|
+
} | {
|
|
2461
|
+
type: 'date' | 'datetime';
|
|
2462
|
+
locale?: string;
|
|
2463
|
+
pattern?: string;
|
|
2464
|
+
relative?: boolean;
|
|
2465
|
+
timezone?: string;
|
|
2466
|
+
sourceTimezone?: string;
|
|
2467
|
+
prefix?: string;
|
|
2468
|
+
suffix?: string;
|
|
2469
|
+
} | {
|
|
2470
|
+
type: 'duration';
|
|
2471
|
+
inputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2472
|
+
outputStyle?: 'compact' | 'digital' | 'long';
|
|
2473
|
+
largestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2474
|
+
smallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2475
|
+
maxUnits?: number;
|
|
2476
|
+
prefix?: string;
|
|
2477
|
+
suffix?: string;
|
|
2478
|
+
negativeStyle?: 'minus' | 'parentheses';
|
|
2479
|
+
} | {
|
|
2480
|
+
type: 'string';
|
|
2481
|
+
prefix?: string;
|
|
2482
|
+
suffix?: string;
|
|
2483
|
+
};
|
|
2484
|
+
|
|
2375
2485
|
declare type SemaphorSemanticSourceRef = Extract<SemaphorSourceRef, {
|
|
2376
2486
|
kind: 'semantic';
|
|
2377
2487
|
}>;
|
|
@@ -2417,47 +2527,10 @@ declare type SemaphorSqlIntent = {
|
|
|
2417
2527
|
inputs?: SemaphorInputBinding[];
|
|
2418
2528
|
};
|
|
2419
2529
|
|
|
2420
|
-
declare type SemaphorTimeGrain =
|
|
2530
|
+
declare type SemaphorTimeGrain = (typeof SEMAPHOR_TIME_GRAINS)[number];
|
|
2421
2531
|
|
|
2422
2532
|
declare type SemaphorTimeWindow = SemaphorRelativeTimeWindow | SemaphorAbsoluteTimeWindow;
|
|
2423
2533
|
|
|
2424
|
-
declare type SemaphorValueFormat = {
|
|
2425
|
-
type: 'number' | 'currency' | 'percent' | 'percentage' | 'scientific';
|
|
2426
|
-
minimumFractionDigits?: number;
|
|
2427
|
-
maximumFractionDigits?: number;
|
|
2428
|
-
useGrouping?: boolean;
|
|
2429
|
-
prefix?: string;
|
|
2430
|
-
suffix?: string;
|
|
2431
|
-
negativeStyle?: 'minus' | 'parentheses';
|
|
2432
|
-
compact?: boolean;
|
|
2433
|
-
scale?: number;
|
|
2434
|
-
currency?: string;
|
|
2435
|
-
percentValueMode?: 'fraction' | 'whole';
|
|
2436
|
-
} | {
|
|
2437
|
-
type: 'date' | 'datetime';
|
|
2438
|
-
locale?: string;
|
|
2439
|
-
pattern?: string;
|
|
2440
|
-
relative?: boolean;
|
|
2441
|
-
timezone?: string;
|
|
2442
|
-
sourceTimezone?: string;
|
|
2443
|
-
prefix?: string;
|
|
2444
|
-
suffix?: string;
|
|
2445
|
-
} | {
|
|
2446
|
-
type: 'duration';
|
|
2447
|
-
inputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2448
|
-
outputStyle?: 'compact' | 'digital' | 'long';
|
|
2449
|
-
largestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2450
|
-
smallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2451
|
-
maxUnits?: number;
|
|
2452
|
-
prefix?: string;
|
|
2453
|
-
suffix?: string;
|
|
2454
|
-
negativeStyle?: 'minus' | 'parentheses';
|
|
2455
|
-
} | {
|
|
2456
|
-
type: 'string';
|
|
2457
|
-
prefix?: string;
|
|
2458
|
-
suffix?: string;
|
|
2459
|
-
};
|
|
2460
|
-
|
|
2461
2534
|
declare type SemaphorViewPresentation = {
|
|
2462
2535
|
kind: 'kpi';
|
|
2463
2536
|
format?: 'number' | 'currency' | 'percent' | 'duration';
|
|
@@ -2539,6 +2612,8 @@ declare type StyleProps = {
|
|
|
2539
2612
|
|
|
2540
2613
|
declare type SubDayDateUnit = 'minute' | 'hour';
|
|
2541
2614
|
|
|
2615
|
+
export declare function supportsCanonicalDashboardTemporalResult(value: string | null | undefined): boolean;
|
|
2616
|
+
|
|
2542
2617
|
declare type TableBaseFormatting = {
|
|
2543
2618
|
version: TableFormattingVersion;
|
|
2544
2619
|
tableParts?: Partial<Record<TablePart, TableBaseStyle>>;
|
|
@@ -3100,8 +3175,63 @@ declare type TDynamicVisualIntent = {
|
|
|
3100
3175
|
includesKpis: boolean;
|
|
3101
3176
|
};
|
|
3102
3177
|
|
|
3178
|
+
declare const TEMPORAL_BUCKET_PRESETS: readonly ["week_of_short", "week_of_long", "quarter_short", "quarter_long", "fiscal_quarter_short", "fiscal_year"];
|
|
3179
|
+
|
|
3180
|
+
export declare type TemporalBucketAuthoringOption = {
|
|
3181
|
+
value: string;
|
|
3182
|
+
label: string;
|
|
3183
|
+
format?: TemporalBucketFormat;
|
|
3184
|
+
custom?: true;
|
|
3185
|
+
};
|
|
3186
|
+
|
|
3187
|
+
export declare type TemporalBucketAuthoringSelection = {
|
|
3188
|
+
value: string;
|
|
3189
|
+
customPattern: string;
|
|
3190
|
+
format: TemporalBucketFormat;
|
|
3191
|
+
};
|
|
3192
|
+
|
|
3193
|
+
declare type TemporalBucketFormat = {
|
|
3194
|
+
type: 'temporal_bucket';
|
|
3195
|
+
presentation: TemporalBucketPresentation;
|
|
3196
|
+
};
|
|
3197
|
+
|
|
3198
|
+
declare type TemporalBucketMetadata = {
|
|
3199
|
+
kind: 'temporal_bucket';
|
|
3200
|
+
granularity: SemaphorTimeGrain;
|
|
3201
|
+
calendar: Pick<CalendarContext, 'tz' | 'weekStart' | 'fiscalCalendar'>;
|
|
3202
|
+
};
|
|
3203
|
+
|
|
3204
|
+
declare type TemporalBucketPresentation = {
|
|
3205
|
+
mode: 'auto';
|
|
3206
|
+
} | {
|
|
3207
|
+
mode: 'preset';
|
|
3208
|
+
preset: TemporalBucketPreset;
|
|
3209
|
+
} | {
|
|
3210
|
+
mode: 'pattern';
|
|
3211
|
+
pattern: string;
|
|
3212
|
+
};
|
|
3213
|
+
|
|
3214
|
+
declare type TemporalBucketPreset = (typeof TEMPORAL_BUCKET_PRESETS)[number];
|
|
3215
|
+
|
|
3103
3216
|
declare type TemporalPrecision = 'minute';
|
|
3104
3217
|
|
|
3218
|
+
export declare type TemporalResultOwner = 'config' | 'freeform' | 'none';
|
|
3219
|
+
|
|
3220
|
+
export declare type TemporalResultOwnerInput = {
|
|
3221
|
+
/**
|
|
3222
|
+
* Result of the runtime's executable-config validation. The ownership
|
|
3223
|
+
* module deliberately does not reinterpret card-config structure.
|
|
3224
|
+
*/
|
|
3225
|
+
hasExecutableConfig: boolean;
|
|
3226
|
+
sql?: string | null;
|
|
3227
|
+
/**
|
|
3228
|
+
* Python after the existing execution normalizer has converted the inert
|
|
3229
|
+
* editor template to an empty string. This module treats non-empty Python as
|
|
3230
|
+
* opaque free-form execution and never parses its contents.
|
|
3231
|
+
*/
|
|
3232
|
+
normalizedPython?: string | null;
|
|
3233
|
+
};
|
|
3234
|
+
|
|
3105
3235
|
declare type TextCardInlineFormat = {
|
|
3106
3236
|
bold?: boolean;
|
|
3107
3237
|
italic?: boolean;
|
|
@@ -3287,7 +3417,7 @@ declare interface TimeDrillStep {
|
|
|
3287
3417
|
rollingWindow?: number;
|
|
3288
3418
|
}
|
|
3289
3419
|
|
|
3290
|
-
declare type TimeGranularity =
|
|
3420
|
+
declare type TimeGranularity = SemaphorTimeGrain;
|
|
3291
3421
|
|
|
3292
3422
|
/**
|
|
3293
3423
|
* Inline filter definition stored on a card.
|
|
@@ -3461,6 +3591,8 @@ declare type VisualDisplayPreferences = {
|
|
|
3461
3591
|
};
|
|
3462
3592
|
};
|
|
3463
3593
|
|
|
3594
|
+
declare type WeekStart = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
3595
|
+
|
|
3464
3596
|
declare type WindowFunction = 'running_total' | 'moving_average' | 'previous_period_delta' | 'percent_of_total';
|
|
3465
3597
|
|
|
3466
3598
|
declare interface WindowTransform {
|