react-semaphor 0.1.259 → 0.1.261
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/chunks/dashboard-controls-0hbftZxY.js +42 -0
- package/dist/chunks/dashboard-controls-BYi_r2lH.js +1971 -0
- package/dist/chunks/dashboard-filter-controls-button-BPCw1GMh.js +1066 -0
- package/dist/chunks/dashboard-filter-controls-button-f4pDkDUL.js +11 -0
- package/dist/chunks/{dashboard-json-B43n1l6C.js → dashboard-json-2NJCXsDD.js} +1 -1
- package/dist/chunks/{dashboard-json-D0oSxmLa.js → dashboard-json-Dpy-zKf2.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-CxZAMb8B.js → dashboard-summary-settings-dialog-B9zRCvc-.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-DMWYgbwB.js → dashboard-summary-settings-dialog-Be3JilRI.js} +1 -1
- package/dist/chunks/edit-dashboard-visual-Bon08erH.js +188 -0
- package/dist/chunks/{edit-dashboard-visual-CCoz1oGX.js → edit-dashboard-visual-CqTlmuYL.js} +5970 -5492
- package/dist/chunks/index-BoJEr_9F.js +1114 -0
- package/dist/chunks/{index-DpSxZvI0.js → index-C2c-_lPE.js} +48682 -45193
- package/dist/chunks/{normalize-dashboard-for-dirty-check-Bn27S0PN.js → normalize-dashboard-for-dirty-check-5KpZN8xr.js} +20 -19
- package/dist/chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.js +1 -0
- package/dist/chunks/{resource-management-panel-L51m1i4h.js → resource-management-panel-BtLPW2b4.js} +1 -1
- package/dist/chunks/{resource-management-panel-B_bDGuq_.js → resource-management-panel-Bva2_0OU.js} +70 -70
- package/dist/chunks/use-create-flow-overlay-state-9X7GyUzl.js +21 -0
- package/dist/chunks/use-create-flow-overlay-state-Vyd5mSnf.js +1445 -0
- package/dist/chunks/{use-visual-utils-V6paZich.js → use-visual-utils-Jv4hWSLm.js} +1 -1
- package/dist/chunks/{use-visual-utils-Cp5KVbr6.js → use-visual-utils-OPk_1t4I.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +5 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +102 -99
- package/dist/shared/index.cjs +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +5 -4
- package/dist/types/dashboard.d.ts +105 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +4 -3
- package/dist/types/main.d.ts +175 -1
- package/dist/types/shared.d.ts +89 -0
- package/dist/types/surfboard.d.ts +105 -0
- package/dist/types/types.d.ts +113 -0
- package/package.json +1 -1
- package/dist/chunks/dashboard-controls-51P6aUVB.js +0 -1847
- package/dist/chunks/dashboard-controls-BC3hDGwD.js +0 -47
- package/dist/chunks/edit-dashboard-visual-D1mwhPGF.js +0 -193
- package/dist/chunks/editor-action-buttons-B6ElCCo2.js +0 -412
- package/dist/chunks/editor-action-buttons-Dbs6eczj.js +0 -21
- package/dist/chunks/index-DAhkssOV.js +0 -1109
- package/dist/chunks/normalize-dashboard-for-dirty-check-B7NQDI1H.js +0 -1
- package/dist/chunks/notification-bell-DoIAAZqX.js +0 -6
- package/dist/chunks/notification-bell-cYCkxEbp.js +0 -839
|
@@ -316,6 +316,78 @@ export declare type ConnectionPolicy = {
|
|
|
316
316
|
|
|
317
317
|
declare type ConnectionType = 'GoogleSheets' | 'FileUpload' | 'MySQL' | 'MSSQL' | 'PostgreSQL' | 'BigQuery' | 'Redshift' | 'Snowflake' | 'S3' | 'clickhouse' | 'S3Tables' | 'API' | 'none';
|
|
318
318
|
|
|
319
|
+
export declare const CONTROL_CARD_DEFAULT_VALUE: "__card_default__";
|
|
320
|
+
|
|
321
|
+
export declare type ControlBinding = {
|
|
322
|
+
controlId: string;
|
|
323
|
+
target: 'sql_param';
|
|
324
|
+
paramId: string;
|
|
325
|
+
} | {
|
|
326
|
+
controlId: string;
|
|
327
|
+
target: 'config_metric_selector';
|
|
328
|
+
mapping: Record<string, StructuralMetricSelectorTarget>;
|
|
329
|
+
} | {
|
|
330
|
+
controlId: string;
|
|
331
|
+
target: 'config_field_selector';
|
|
332
|
+
mapping: Record<string, StructuralFieldSelectorTarget>;
|
|
333
|
+
} | {
|
|
334
|
+
controlId: string;
|
|
335
|
+
target: 'config_aggregation';
|
|
336
|
+
mapping: Record<string, string>;
|
|
337
|
+
} | {
|
|
338
|
+
controlId: string;
|
|
339
|
+
target: 'config_grain';
|
|
340
|
+
mapping: Record<string, string>;
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
export declare type ControlDefinition = {
|
|
344
|
+
id: string;
|
|
345
|
+
label: string;
|
|
346
|
+
scope: ControlScope;
|
|
347
|
+
type: ControlType;
|
|
348
|
+
source: ControlSource;
|
|
349
|
+
initialValueStrategy: ControlInitialValueStrategy;
|
|
350
|
+
defaultValue?: unknown;
|
|
351
|
+
requiredAtExecution: boolean;
|
|
352
|
+
hidden?: boolean;
|
|
353
|
+
locked?: boolean;
|
|
354
|
+
helpText?: string;
|
|
355
|
+
placement?: 'toolbar' | 'card_header' | 'advanced';
|
|
356
|
+
showLabel?: boolean;
|
|
357
|
+
toolbarWidth?: number;
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
export declare type ControlInitialValueStrategy = 'saved_default' | 'builtin' | 'embed_required' | 'schedule_snapshot';
|
|
361
|
+
|
|
362
|
+
export declare type ControlOption = {
|
|
363
|
+
value: string;
|
|
364
|
+
label: string;
|
|
365
|
+
presentation?: {
|
|
366
|
+
granularity?: TimeGranularity;
|
|
367
|
+
dateFormat?: DateFormatValue;
|
|
368
|
+
customFormat?: string;
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
export declare type ControlScope = 'dashboard' | 'card';
|
|
373
|
+
|
|
374
|
+
export declare type ControlSource = {
|
|
375
|
+
kind: 'manual';
|
|
376
|
+
options: ControlOption[];
|
|
377
|
+
} | {
|
|
378
|
+
kind: 'dataset_values';
|
|
379
|
+
fieldId: string;
|
|
380
|
+
connectionId?: string;
|
|
381
|
+
} | {
|
|
382
|
+
kind: 'field_allowlist';
|
|
383
|
+
fieldIds: string[];
|
|
384
|
+
} | {
|
|
385
|
+
kind: 'metric_allowlist';
|
|
386
|
+
metricIds: string[];
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
export declare type ControlType = 'enum' | 'multi_enum' | 'text' | 'number' | 'boolean' | 'date' | 'field_selector' | 'metric_selector' | 'aggregation_selector' | 'grain_selector';
|
|
390
|
+
|
|
319
391
|
export declare type CustomCard = CardWithContent | CardWithFooter;
|
|
320
392
|
|
|
321
393
|
declare type DashboardAIContext = AIContext & {
|
|
@@ -370,6 +442,20 @@ export declare type DashboardProps = {
|
|
|
370
442
|
* Default filter values for the dashboard. The dashboard will be filtered by these values when the user loads the dashboard.
|
|
371
443
|
*/
|
|
372
444
|
defaultFilterValues?: TFilterValue[];
|
|
445
|
+
/**
|
|
446
|
+
* Default runtime control values for the dashboard. Used by print/render flows
|
|
447
|
+
* and other external entry points that need deterministic control state.
|
|
448
|
+
*/
|
|
449
|
+
defaultControlValues?: Record<string, unknown>;
|
|
450
|
+
/**
|
|
451
|
+
* Optional control contract override used by print/replay entry points that
|
|
452
|
+
* need to execute against a saved card/dashboard control contract snapshot.
|
|
453
|
+
*/
|
|
454
|
+
controlContractOverrides?: {
|
|
455
|
+
controlDefinitions?: ControlDefinition[];
|
|
456
|
+
cardControlDefinitions?: ControlDefinition[];
|
|
457
|
+
controlBindings?: ControlBinding[];
|
|
458
|
+
};
|
|
373
459
|
customStyle?: TStyle;
|
|
374
460
|
currentTheme?: Theme;
|
|
375
461
|
version?: string;
|
|
@@ -819,6 +905,11 @@ export declare type FilterLayoutSettings = {
|
|
|
819
905
|
* Useful when embedding Dashboard component without Surfboard's controls
|
|
820
906
|
*/
|
|
821
907
|
showDownloadButton?: boolean;
|
|
908
|
+
/**
|
|
909
|
+
* Mixed toolbar item order for dashboard-level filter and control chips.
|
|
910
|
+
* Values use prefixed ids like `filter:<id>` and `control:<id>`.
|
|
911
|
+
*/
|
|
912
|
+
toolbarItemOrder?: string[];
|
|
822
913
|
};
|
|
823
914
|
|
|
824
915
|
declare type FilterLocation = 'dashboard' | 'frame' | 'sheet' | undefined;
|
|
@@ -1225,6 +1316,10 @@ declare type StringOptions = {
|
|
|
1225
1316
|
maxLength?: number;
|
|
1226
1317
|
};
|
|
1227
1318
|
|
|
1319
|
+
export declare type StructuralFieldSelectorTarget = GroupByField;
|
|
1320
|
+
|
|
1321
|
+
export declare type StructuralMetricSelectorTarget = MetricField;
|
|
1322
|
+
|
|
1228
1323
|
/**
|
|
1229
1324
|
* Style propeerites for the dashboard
|
|
1230
1325
|
*/
|
|
@@ -1450,6 +1545,14 @@ export declare type TCard = {
|
|
|
1450
1545
|
* Configured by editors via the visual editor settings.
|
|
1451
1546
|
*/
|
|
1452
1547
|
inlineFilters?: TInlineFilter[];
|
|
1548
|
+
/**
|
|
1549
|
+
* Card-scoped control definitions for this card.
|
|
1550
|
+
*/
|
|
1551
|
+
controls?: ControlDefinition[];
|
|
1552
|
+
/**
|
|
1553
|
+
* Per-card bindings that connect dashboard or card controls to this card's runtime targets.
|
|
1554
|
+
*/
|
|
1555
|
+
controlBindings?: ControlBinding[];
|
|
1453
1556
|
};
|
|
1454
1557
|
|
|
1455
1558
|
export declare type TCardContext = {
|
|
@@ -1666,6 +1769,8 @@ export declare type TDashboard = {
|
|
|
1666
1769
|
globalCacheConfig?: CacheConfig;
|
|
1667
1770
|
emailSettings?: EmailSettings;
|
|
1668
1771
|
defaultFilterValues?: TFilterValue[];
|
|
1772
|
+
controls?: ControlDefinition[];
|
|
1773
|
+
defaultControlValues?: Record<string, unknown>;
|
|
1669
1774
|
filterLayout?: FilterLayoutSettings;
|
|
1670
1775
|
};
|
|
1671
1776
|
|
package/dist/types/types.d.ts
CHANGED
|
@@ -72,6 +72,10 @@ export declare interface AlertDeliverablePreview {
|
|
|
72
72
|
|
|
73
73
|
export declare type AlertDeliveryChannel = 'EMAIL' | 'WEBHOOK' | 'SLACK' | 'IN_APP' | 'TELEGRAM';
|
|
74
74
|
|
|
75
|
+
export declare type AlertExecutionControlContext = {
|
|
76
|
+
values: Record<string, unknown>;
|
|
77
|
+
};
|
|
78
|
+
|
|
75
79
|
export declare type AlertExecutionFilterContext = {
|
|
76
80
|
active_filters: TFilterValue[];
|
|
77
81
|
};
|
|
@@ -182,6 +186,10 @@ export declare type AlertSource = {
|
|
|
182
186
|
executionSnapshot: {
|
|
183
187
|
queryConfig: AlertExecutionQueryConfig;
|
|
184
188
|
filterContext: AlertExecutionFilterContext;
|
|
189
|
+
controlContext?: AlertExecutionControlContext;
|
|
190
|
+
controlDefinitions?: ControlDefinition[];
|
|
191
|
+
cardControlDefinitions?: ControlDefinition[];
|
|
192
|
+
controlBindings?: ControlBinding[];
|
|
185
193
|
connectionId: string;
|
|
186
194
|
calendarContext?: {
|
|
187
195
|
tz: string;
|
|
@@ -545,6 +553,78 @@ export declare type ContextSource = {
|
|
|
545
553
|
outputAs?: string;
|
|
546
554
|
};
|
|
547
555
|
|
|
556
|
+
export declare const CONTROL_CARD_DEFAULT_VALUE: "__card_default__";
|
|
557
|
+
|
|
558
|
+
export declare type ControlBinding = {
|
|
559
|
+
controlId: string;
|
|
560
|
+
target: 'sql_param';
|
|
561
|
+
paramId: string;
|
|
562
|
+
} | {
|
|
563
|
+
controlId: string;
|
|
564
|
+
target: 'config_metric_selector';
|
|
565
|
+
mapping: Record<string, StructuralMetricSelectorTarget>;
|
|
566
|
+
} | {
|
|
567
|
+
controlId: string;
|
|
568
|
+
target: 'config_field_selector';
|
|
569
|
+
mapping: Record<string, StructuralFieldSelectorTarget>;
|
|
570
|
+
} | {
|
|
571
|
+
controlId: string;
|
|
572
|
+
target: 'config_aggregation';
|
|
573
|
+
mapping: Record<string, string>;
|
|
574
|
+
} | {
|
|
575
|
+
controlId: string;
|
|
576
|
+
target: 'config_grain';
|
|
577
|
+
mapping: Record<string, string>;
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
export declare type ControlDefinition = {
|
|
581
|
+
id: string;
|
|
582
|
+
label: string;
|
|
583
|
+
scope: ControlScope;
|
|
584
|
+
type: ControlType;
|
|
585
|
+
source: ControlSource;
|
|
586
|
+
initialValueStrategy: ControlInitialValueStrategy;
|
|
587
|
+
defaultValue?: unknown;
|
|
588
|
+
requiredAtExecution: boolean;
|
|
589
|
+
hidden?: boolean;
|
|
590
|
+
locked?: boolean;
|
|
591
|
+
helpText?: string;
|
|
592
|
+
placement?: 'toolbar' | 'card_header' | 'advanced';
|
|
593
|
+
showLabel?: boolean;
|
|
594
|
+
toolbarWidth?: number;
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
export declare type ControlInitialValueStrategy = 'saved_default' | 'builtin' | 'embed_required' | 'schedule_snapshot';
|
|
598
|
+
|
|
599
|
+
export declare type ControlOption = {
|
|
600
|
+
value: string;
|
|
601
|
+
label: string;
|
|
602
|
+
presentation?: {
|
|
603
|
+
granularity?: TimeGranularity;
|
|
604
|
+
dateFormat?: DateFormatValue;
|
|
605
|
+
customFormat?: string;
|
|
606
|
+
};
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
export declare type ControlScope = 'dashboard' | 'card';
|
|
610
|
+
|
|
611
|
+
export declare type ControlSource = {
|
|
612
|
+
kind: 'manual';
|
|
613
|
+
options: ControlOption[];
|
|
614
|
+
} | {
|
|
615
|
+
kind: 'dataset_values';
|
|
616
|
+
fieldId: string;
|
|
617
|
+
connectionId?: string;
|
|
618
|
+
} | {
|
|
619
|
+
kind: 'field_allowlist';
|
|
620
|
+
fieldIds: string[];
|
|
621
|
+
} | {
|
|
622
|
+
kind: 'metric_allowlist';
|
|
623
|
+
metricIds: string[];
|
|
624
|
+
};
|
|
625
|
+
|
|
626
|
+
export declare type ControlType = 'enum' | 'multi_enum' | 'text' | 'number' | 'boolean' | 'date' | 'field_selector' | 'metric_selector' | 'aggregation_selector' | 'grain_selector';
|
|
627
|
+
|
|
548
628
|
export declare interface CreateAlertRequest {
|
|
549
629
|
kind?: 'ALERT';
|
|
550
630
|
name: string;
|
|
@@ -614,6 +694,20 @@ export declare type DashboardProps = {
|
|
|
614
694
|
* Default filter values for the dashboard. The dashboard will be filtered by these values when the user loads the dashboard.
|
|
615
695
|
*/
|
|
616
696
|
defaultFilterValues?: TFilterValue[];
|
|
697
|
+
/**
|
|
698
|
+
* Default runtime control values for the dashboard. Used by print/render flows
|
|
699
|
+
* and other external entry points that need deterministic control state.
|
|
700
|
+
*/
|
|
701
|
+
defaultControlValues?: Record<string, unknown>;
|
|
702
|
+
/**
|
|
703
|
+
* Optional control contract override used by print/replay entry points that
|
|
704
|
+
* need to execute against a saved card/dashboard control contract snapshot.
|
|
705
|
+
*/
|
|
706
|
+
controlContractOverrides?: {
|
|
707
|
+
controlDefinitions?: ControlDefinition[];
|
|
708
|
+
cardControlDefinitions?: ControlDefinition[];
|
|
709
|
+
controlBindings?: ControlBinding[];
|
|
710
|
+
};
|
|
617
711
|
customStyle?: TStyle;
|
|
618
712
|
currentTheme?: Theme;
|
|
619
713
|
version?: string;
|
|
@@ -1080,6 +1174,11 @@ export declare type FilterLayoutSettings = {
|
|
|
1080
1174
|
* Useful when embedding Dashboard component without Surfboard's controls
|
|
1081
1175
|
*/
|
|
1082
1176
|
showDownloadButton?: boolean;
|
|
1177
|
+
/**
|
|
1178
|
+
* Mixed toolbar item order for dashboard-level filter and control chips.
|
|
1179
|
+
* Values use prefixed ids like `filter:<id>` and `control:<id>`.
|
|
1180
|
+
*/
|
|
1181
|
+
toolbarItemOrder?: string[];
|
|
1083
1182
|
};
|
|
1084
1183
|
|
|
1085
1184
|
declare type FilterLocation = 'dashboard' | 'frame' | 'sheet' | undefined;
|
|
@@ -1547,6 +1646,10 @@ declare type StringOptions = {
|
|
|
1547
1646
|
maxLength?: number;
|
|
1548
1647
|
};
|
|
1549
1648
|
|
|
1649
|
+
export declare type StructuralFieldSelectorTarget = GroupByField;
|
|
1650
|
+
|
|
1651
|
+
export declare type StructuralMetricSelectorTarget = MetricField;
|
|
1652
|
+
|
|
1550
1653
|
/**
|
|
1551
1654
|
* Style propeerites for the dashboard
|
|
1552
1655
|
*/
|
|
@@ -1770,6 +1873,14 @@ export declare type TCard = {
|
|
|
1770
1873
|
* Configured by editors via the visual editor settings.
|
|
1771
1874
|
*/
|
|
1772
1875
|
inlineFilters?: TInlineFilter[];
|
|
1876
|
+
/**
|
|
1877
|
+
* Card-scoped control definitions for this card.
|
|
1878
|
+
*/
|
|
1879
|
+
controls?: ControlDefinition[];
|
|
1880
|
+
/**
|
|
1881
|
+
* Per-card bindings that connect dashboard or card controls to this card's runtime targets.
|
|
1882
|
+
*/
|
|
1883
|
+
controlBindings?: ControlBinding[];
|
|
1773
1884
|
};
|
|
1774
1885
|
|
|
1775
1886
|
export declare type TCardContext = {
|
|
@@ -1986,6 +2097,8 @@ export declare type TDashboard = {
|
|
|
1986
2097
|
globalCacheConfig?: CacheConfig;
|
|
1987
2098
|
emailSettings?: EmailSettings;
|
|
1988
2099
|
defaultFilterValues?: TFilterValue[];
|
|
2100
|
+
controls?: ControlDefinition[];
|
|
2101
|
+
defaultControlValues?: Record<string, unknown>;
|
|
1989
2102
|
filterLayout?: FilterLayoutSettings;
|
|
1990
2103
|
};
|
|
1991
2104
|
|