react-semaphor 0.1.302 → 0.1.304
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/appearance/index.cjs +1 -1
- package/dist/appearance/index.js +1 -1
- package/dist/brand-studio/index.cjs +5 -5
- package/dist/brand-studio/index.js +334 -385
- package/dist/chunks/common-types-C6cAQgyh.js +9 -0
- package/dist/chunks/common-types-nBuCd3u2.js +1 -0
- package/dist/chunks/{dashboard-controls-CZuC_QjN.js → dashboard-controls-CyFZfGaN.js} +800 -776
- package/dist/chunks/dashboard-controls-DCZnUFI0.js +47 -0
- package/dist/chunks/{dashboard-filter-controls-button-kfb_T18o.js → dashboard-filter-controls-button-DI7XUgZK.js} +142 -142
- package/dist/chunks/{dashboard-filter-controls-button-2I1ltWQ9.js → dashboard-filter-controls-button-YQZ-oeN5.js} +3 -3
- package/dist/chunks/{dashboard-json-Df6v2Jem.js → dashboard-json-C6R2qixD.js} +3 -3
- package/dist/chunks/{dashboard-json-C3v6rBdp.js → dashboard-json-Z8jz16Yj.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-DKAaWq-G.js → dashboard-summary-settings-dialog-BlD77h63.js} +2 -2
- package/dist/chunks/{dashboard-summary-settings-dialog-BBALEHJQ.js → dashboard-summary-settings-dialog-DJyY-PB9.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-CGBYahAK.js → edit-dashboard-visual-CNGc1zcN.js} +33 -33
- package/dist/chunks/{edit-dashboard-visual-D8L0cl_U.js → edit-dashboard-visual-CfRJXwDR.js} +167 -168
- package/dist/chunks/{index-uRJmUpof.js → index-CJdxSyQq.js} +679 -656
- package/dist/chunks/index-D2vz3gvd.js +1360 -0
- package/dist/chunks/index-DRlMUglg.js +4 -0
- package/dist/chunks/{index-BmoR3VQT.js → index-GHhvGdF9.js} +42745 -40322
- package/dist/chunks/{palette-326-dgn0.js → palette-BqJlrRto.js} +7 -2
- package/dist/chunks/{palette-jd7xiGTg.js → palette-DD-i7bNS.js} +23 -3
- package/dist/chunks/{resource-management-panel-C_c-BwrC.js → resource-management-panel-7Y4ITzGH.js} +65 -65
- package/dist/chunks/{resource-management-panel-DrcEEARD.js → resource-management-panel-Bdus73Iu.js} +1 -1
- package/dist/chunks/{rotate-ccw-BugHcM1w.js → rotate-ccw-CdGW8Rxm.js} +1 -1
- package/dist/chunks/{rotate-ccw-yFwqBFJZ.js → rotate-ccw-X8MbX_hF.js} +1 -1
- package/dist/chunks/{save-CaybXtdd.js → save-CFBIhbHD.js} +1 -1
- package/dist/chunks/{save-DU0FXUlM.js → save-j-clxFtx.js} +1 -1
- package/dist/chunks/{switch-CZtMtqEj.js → switch-BFhVVwh9.js} +4285 -3275
- package/dist/chunks/switch-BH17qlxH.js +163 -0
- package/dist/chunks/use-create-flow-overlay-state-CSytlf2H.js +16 -0
- package/dist/chunks/{use-create-flow-overlay-state-84Xe8VrP.js → use-create-flow-overlay-state-CllZvyvE.js} +318 -316
- package/dist/chunks/{use-visual-utils-lp5DfmvL.js → use-visual-utils-CDO4kVX5.js} +1 -1
- package/dist/chunks/{use-visual-utils-z3ifg6Fd.js → use-visual-utils-CyjLzcDG.js} +2 -2
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +5 -5
- package/dist/index.cjs +1 -1
- package/dist/index.js +61 -60
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +6 -6
- package/dist/types/dashboard.d.ts +168 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +8 -11
- package/dist/types/main.d.ts +195 -2
- package/dist/types/shared.d.ts +120 -0
- package/dist/types/surfboard.d.ts +168 -0
- package/dist/types/types.d.ts +168 -0
- package/package.json +1 -1
- package/dist/chunks/braces-CpOcaBNm.js +0 -6
- package/dist/chunks/braces-TYclg8Hl.js +0 -23
- package/dist/chunks/dashboard-controls-BkuB9TQX.js +0 -47
- package/dist/chunks/index-Cxb9UUro.js +0 -4
- package/dist/chunks/index-eM6MU4q_.js +0 -1361
- package/dist/chunks/switch-AmoR1YIA.js +0 -163
- package/dist/chunks/use-create-flow-overlay-state-CiKVJGWF.js +0 -16
package/dist/types/shared.d.ts
CHANGED
|
@@ -326,6 +326,11 @@ declare type ControlBinding = {
|
|
|
326
326
|
mapping: Record<string, string>;
|
|
327
327
|
};
|
|
328
328
|
|
|
329
|
+
declare type ControlDashboardInput = DashboardInputBase & {
|
|
330
|
+
kind: 'control';
|
|
331
|
+
control: ControlDefinition;
|
|
332
|
+
};
|
|
333
|
+
|
|
329
334
|
declare type ControlDefinition = {
|
|
330
335
|
id: string;
|
|
331
336
|
label: string;
|
|
@@ -382,6 +387,109 @@ declare type DashboardAIContext = AIContext & {
|
|
|
382
387
|
|
|
383
388
|
declare type DashboardAIContextMode = 'auto' | 'fixed';
|
|
384
389
|
|
|
390
|
+
declare type DashboardInput = FilterDashboardInput | ControlDashboardInput;
|
|
391
|
+
|
|
392
|
+
declare type DashboardInputBase = {
|
|
393
|
+
id: string;
|
|
394
|
+
label: string;
|
|
395
|
+
variableName: string;
|
|
396
|
+
description?: string;
|
|
397
|
+
requiredAtExecution?: boolean;
|
|
398
|
+
scope: DashboardInputScope;
|
|
399
|
+
runtimeScope: DashboardInputRuntimeScope;
|
|
400
|
+
presentation?: DashboardInputPresentation;
|
|
401
|
+
exports?: DashboardInputExportKey[];
|
|
402
|
+
compatibility?: DashboardInputCompatibilityMetadata;
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
declare type DashboardInputCompatibilityMetadata = {
|
|
406
|
+
source: 'dashboardFilter';
|
|
407
|
+
filterId: string;
|
|
408
|
+
} | {
|
|
409
|
+
source: 'dashboardControl';
|
|
410
|
+
controlId: string;
|
|
411
|
+
} | {
|
|
412
|
+
source: 'cardInlineFilter';
|
|
413
|
+
cardId: string;
|
|
414
|
+
filterId: string;
|
|
415
|
+
} | {
|
|
416
|
+
source: 'cardControl';
|
|
417
|
+
cardId: string;
|
|
418
|
+
controlId: string;
|
|
419
|
+
} | {
|
|
420
|
+
source: 'documentInput';
|
|
421
|
+
sheetId: string;
|
|
422
|
+
inputId: string;
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
declare type DashboardInputExportKey = 'label' | 'value' | 'start' | 'end' | 'range';
|
|
426
|
+
|
|
427
|
+
declare type DashboardInputPresentation = {
|
|
428
|
+
placement?: 'toolbar' | 'card_header' | 'advanced' | 'hidden';
|
|
429
|
+
widthPx?: number;
|
|
430
|
+
order?: number;
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
declare type DashboardInputRuntimeScope = 'shared' | 'perSheet' | 'perCard' | 'perDocumentSection';
|
|
434
|
+
|
|
435
|
+
declare type DashboardInputScope = {
|
|
436
|
+
kind: 'allSheets';
|
|
437
|
+
sheetKinds?: Array<'dashboard' | 'document'>;
|
|
438
|
+
} | {
|
|
439
|
+
kind: 'sheets';
|
|
440
|
+
sheetIds: string[];
|
|
441
|
+
} | {
|
|
442
|
+
kind: 'cards';
|
|
443
|
+
cardIds: string[];
|
|
444
|
+
} | {
|
|
445
|
+
kind: 'documentSections';
|
|
446
|
+
sheetId: string;
|
|
447
|
+
sectionIds: string[];
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
declare type DashboardInputSlot = {
|
|
451
|
+
status: 'set';
|
|
452
|
+
value: DashboardInputValue;
|
|
453
|
+
} | {
|
|
454
|
+
status: 'cleared';
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
declare type DashboardInputTextContent = Array<{
|
|
458
|
+
type: 'text';
|
|
459
|
+
value: string;
|
|
460
|
+
} | {
|
|
461
|
+
type: 'variable';
|
|
462
|
+
ref: DashboardInputVariableRef;
|
|
463
|
+
}>;
|
|
464
|
+
|
|
465
|
+
declare type DashboardInputValue = {
|
|
466
|
+
kind: 'filter';
|
|
467
|
+
filterValue: TFilterValue;
|
|
468
|
+
} | {
|
|
469
|
+
kind: 'control';
|
|
470
|
+
value: unknown;
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
declare type DashboardInputValues = {
|
|
474
|
+
shared?: Record<string, DashboardInputSlot>;
|
|
475
|
+
bySheetId?: Record<string, Record<string, DashboardInputSlot>>;
|
|
476
|
+
byCardId?: Record<string, Record<string, DashboardInputSlot>>;
|
|
477
|
+
byDocumentSectionId?: Record<string, Record<string, DashboardInputSlot>>;
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
declare type DashboardInputVariableRef = {
|
|
481
|
+
source: 'dashboardInput';
|
|
482
|
+
inputId: string;
|
|
483
|
+
export: DashboardInputExportKey;
|
|
484
|
+
} | {
|
|
485
|
+
source: 'dashboardInputAlias';
|
|
486
|
+
variableName: string;
|
|
487
|
+
export?: DashboardInputExportKey;
|
|
488
|
+
} | {
|
|
489
|
+
source: 'documentMeta';
|
|
490
|
+
key: 'generatedAt' | 'pageNumber' | 'pageCount';
|
|
491
|
+
};
|
|
492
|
+
|
|
385
493
|
declare interface DatabaseEntityReference {
|
|
386
494
|
connectionId: string;
|
|
387
495
|
connectionType: ConnectionType;
|
|
@@ -920,6 +1028,11 @@ declare interface FilterCondition {
|
|
|
920
1028
|
value: FilterValue;
|
|
921
1029
|
}
|
|
922
1030
|
|
|
1031
|
+
declare type FilterDashboardInput = DashboardInputBase & {
|
|
1032
|
+
kind: 'filter';
|
|
1033
|
+
filter: TFilter;
|
|
1034
|
+
};
|
|
1035
|
+
|
|
923
1036
|
/**
|
|
924
1037
|
* Display mode for individual filters
|
|
925
1038
|
* - 'canvas': Filter displayed as a draggable card on the dashboard canvas
|
|
@@ -1683,6 +1796,7 @@ declare type TCardPreferences = {
|
|
|
1683
1796
|
customVisualCode?: string;
|
|
1684
1797
|
textVisualOptions?: {
|
|
1685
1798
|
isDynamicText?: boolean;
|
|
1799
|
+
content?: DashboardInputTextContent;
|
|
1686
1800
|
};
|
|
1687
1801
|
mapVisualOptions?: {
|
|
1688
1802
|
topoJsonUrl?: string;
|
|
@@ -1846,6 +1960,8 @@ declare type TDashboard = {
|
|
|
1846
1960
|
defaultFilterValues?: TFilterValue[];
|
|
1847
1961
|
controls?: ControlDefinition[];
|
|
1848
1962
|
defaultControlValues?: Record<string, unknown>;
|
|
1963
|
+
inputs?: DashboardInput[];
|
|
1964
|
+
defaultInputValues?: DashboardInputValues;
|
|
1849
1965
|
filterLayout?: FilterLayoutSettings;
|
|
1850
1966
|
};
|
|
1851
1967
|
|
|
@@ -1950,6 +2066,8 @@ declare type TFilter = {
|
|
|
1950
2066
|
location?: FilterLocation;
|
|
1951
2067
|
hide?: boolean;
|
|
1952
2068
|
id: string;
|
|
2069
|
+
/** Alias exposed to document/text variables, for example {{region}}. */
|
|
2070
|
+
variableName?: string;
|
|
1953
2071
|
connectionId: string;
|
|
1954
2072
|
title: string;
|
|
1955
2073
|
column: string;
|
|
@@ -2081,6 +2199,8 @@ declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year' | '
|
|
|
2081
2199
|
*/
|
|
2082
2200
|
declare type TInlineFilter = {
|
|
2083
2201
|
id: string;
|
|
2202
|
+
/** Alias exposed to document/text variables, for example {{region}}. */
|
|
2203
|
+
variableName?: string;
|
|
2084
2204
|
column: string;
|
|
2085
2205
|
title: string;
|
|
2086
2206
|
dataType: string;
|
|
@@ -434,6 +434,11 @@ export declare type ControlBinding = {
|
|
|
434
434
|
mapping: Record<string, string>;
|
|
435
435
|
};
|
|
436
436
|
|
|
437
|
+
export declare type ControlDashboardInput = DashboardInputBase & {
|
|
438
|
+
kind: 'control';
|
|
439
|
+
control: ControlDefinition;
|
|
440
|
+
};
|
|
441
|
+
|
|
437
442
|
export declare type ControlDefinition = {
|
|
438
443
|
id: string;
|
|
439
444
|
label: string;
|
|
@@ -494,6 +499,118 @@ export declare type DashboardEventHandlers = {
|
|
|
494
499
|
onExportData?: (payload: ExportDataPayload) => void;
|
|
495
500
|
};
|
|
496
501
|
|
|
502
|
+
export declare type DashboardInput = FilterDashboardInput | ControlDashboardInput;
|
|
503
|
+
|
|
504
|
+
export declare type DashboardInputBase = {
|
|
505
|
+
id: string;
|
|
506
|
+
label: string;
|
|
507
|
+
variableName: string;
|
|
508
|
+
description?: string;
|
|
509
|
+
requiredAtExecution?: boolean;
|
|
510
|
+
scope: DashboardInputScope;
|
|
511
|
+
runtimeScope: DashboardInputRuntimeScope;
|
|
512
|
+
presentation?: DashboardInputPresentation;
|
|
513
|
+
exports?: DashboardInputExportKey[];
|
|
514
|
+
compatibility?: DashboardInputCompatibilityMetadata;
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
export declare type DashboardInputCompatibilityMetadata = {
|
|
518
|
+
source: 'dashboardFilter';
|
|
519
|
+
filterId: string;
|
|
520
|
+
} | {
|
|
521
|
+
source: 'dashboardControl';
|
|
522
|
+
controlId: string;
|
|
523
|
+
} | {
|
|
524
|
+
source: 'cardInlineFilter';
|
|
525
|
+
cardId: string;
|
|
526
|
+
filterId: string;
|
|
527
|
+
} | {
|
|
528
|
+
source: 'cardControl';
|
|
529
|
+
cardId: string;
|
|
530
|
+
controlId: string;
|
|
531
|
+
} | {
|
|
532
|
+
source: 'documentInput';
|
|
533
|
+
sheetId: string;
|
|
534
|
+
inputId: string;
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
export declare type DashboardInputExecutionSnapshot = {
|
|
538
|
+
sheetId?: string;
|
|
539
|
+
cardId?: string;
|
|
540
|
+
mode: 'dashboard' | 'document' | 'visual';
|
|
541
|
+
dashboardInputValues: DashboardInputValues;
|
|
542
|
+
generatedAt?: string;
|
|
543
|
+
timezone?: string;
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
export declare type DashboardInputExportKey = 'label' | 'value' | 'start' | 'end' | 'range';
|
|
547
|
+
|
|
548
|
+
export declare type DashboardInputPresentation = {
|
|
549
|
+
placement?: 'toolbar' | 'card_header' | 'advanced' | 'hidden';
|
|
550
|
+
widthPx?: number;
|
|
551
|
+
order?: number;
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
export declare type DashboardInputRuntimeScope = 'shared' | 'perSheet' | 'perCard' | 'perDocumentSection';
|
|
555
|
+
|
|
556
|
+
export declare type DashboardInputScope = {
|
|
557
|
+
kind: 'allSheets';
|
|
558
|
+
sheetKinds?: Array<'dashboard' | 'document'>;
|
|
559
|
+
} | {
|
|
560
|
+
kind: 'sheets';
|
|
561
|
+
sheetIds: string[];
|
|
562
|
+
} | {
|
|
563
|
+
kind: 'cards';
|
|
564
|
+
cardIds: string[];
|
|
565
|
+
} | {
|
|
566
|
+
kind: 'documentSections';
|
|
567
|
+
sheetId: string;
|
|
568
|
+
sectionIds: string[];
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
export declare type DashboardInputSlot = {
|
|
572
|
+
status: 'set';
|
|
573
|
+
value: DashboardInputValue;
|
|
574
|
+
} | {
|
|
575
|
+
status: 'cleared';
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
export declare type DashboardInputTextContent = Array<{
|
|
579
|
+
type: 'text';
|
|
580
|
+
value: string;
|
|
581
|
+
} | {
|
|
582
|
+
type: 'variable';
|
|
583
|
+
ref: DashboardInputVariableRef;
|
|
584
|
+
}>;
|
|
585
|
+
|
|
586
|
+
export declare type DashboardInputValue = {
|
|
587
|
+
kind: 'filter';
|
|
588
|
+
filterValue: TFilterValue;
|
|
589
|
+
} | {
|
|
590
|
+
kind: 'control';
|
|
591
|
+
value: unknown;
|
|
592
|
+
};
|
|
593
|
+
|
|
594
|
+
export declare type DashboardInputValues = {
|
|
595
|
+
shared?: Record<string, DashboardInputSlot>;
|
|
596
|
+
bySheetId?: Record<string, Record<string, DashboardInputSlot>>;
|
|
597
|
+
byCardId?: Record<string, Record<string, DashboardInputSlot>>;
|
|
598
|
+
byDocumentSectionId?: Record<string, Record<string, DashboardInputSlot>>;
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
export declare type DashboardInputVariableRef = {
|
|
602
|
+
source: 'dashboardInput';
|
|
603
|
+
inputId: string;
|
|
604
|
+
export: DashboardInputExportKey;
|
|
605
|
+
} | {
|
|
606
|
+
source: 'dashboardInputAlias';
|
|
607
|
+
variableName: string;
|
|
608
|
+
export?: DashboardInputExportKey;
|
|
609
|
+
} | {
|
|
610
|
+
source: 'documentMeta';
|
|
611
|
+
key: 'generatedAt' | 'pageNumber' | 'pageCount';
|
|
612
|
+
};
|
|
613
|
+
|
|
497
614
|
declare type DashboardPlusProps = {
|
|
498
615
|
showControls?: boolean;
|
|
499
616
|
showFooter?: boolean;
|
|
@@ -554,8 +671,17 @@ export declare type DashboardProps = {
|
|
|
554
671
|
* Document-local runtime values for print/render entry points. Values are
|
|
555
672
|
* keyed by document input id and are intentionally separate from dashboard
|
|
556
673
|
* filters/controls.
|
|
674
|
+
*
|
|
675
|
+
* @deprecated Use dashboardInputExecutionSnapshot for document print/export
|
|
676
|
+
* entry points backed by DashboardInput.
|
|
557
677
|
*/
|
|
558
678
|
documentInputValues?: DocumentInputRuntimeValues;
|
|
679
|
+
/**
|
|
680
|
+
* Authoritative dashboard input runtime snapshot for print/render entry
|
|
681
|
+
* points. Document print/export should use this for DashboardInput-backed
|
|
682
|
+
* inputs instead of documentInputValues.
|
|
683
|
+
*/
|
|
684
|
+
dashboardInputExecutionSnapshot?: DashboardInputExecutionSnapshot;
|
|
559
685
|
/**
|
|
560
686
|
* Render target for print entry points. Generic dashboard PDF exports also
|
|
561
687
|
* use cardDisplay.mode="print"; document-specific print handling must only
|
|
@@ -1162,6 +1288,11 @@ declare interface FilterCondition {
|
|
|
1162
1288
|
value: FilterValue;
|
|
1163
1289
|
}
|
|
1164
1290
|
|
|
1291
|
+
export declare type FilterDashboardInput = DashboardInputBase & {
|
|
1292
|
+
kind: 'filter';
|
|
1293
|
+
filter: TFilter;
|
|
1294
|
+
};
|
|
1295
|
+
|
|
1165
1296
|
/**
|
|
1166
1297
|
* Display mode for individual filters
|
|
1167
1298
|
* - 'canvas': Filter displayed as a draggable card on the dashboard canvas
|
|
@@ -1640,6 +1771,36 @@ declare type RelativeDateFilter = {
|
|
|
1640
1771
|
to: number;
|
|
1641
1772
|
};
|
|
1642
1773
|
|
|
1774
|
+
export declare type ResolvedDashboardInput = {
|
|
1775
|
+
id: string;
|
|
1776
|
+
kind: 'filter' | 'control';
|
|
1777
|
+
label: string;
|
|
1778
|
+
variableName: string;
|
|
1779
|
+
requiredAtExecution: boolean;
|
|
1780
|
+
slot?: DashboardInputSlot;
|
|
1781
|
+
rawValue?: unknown;
|
|
1782
|
+
displayValue: string;
|
|
1783
|
+
exports: Partial<Record<DashboardInputExportKey, string | number | boolean | null>>;
|
|
1784
|
+
filter?: TFilter;
|
|
1785
|
+
filterValue?: TFilterValue;
|
|
1786
|
+
control?: ControlDefinition;
|
|
1787
|
+
controlValue?: unknown;
|
|
1788
|
+
missingRequiredValue?: boolean;
|
|
1789
|
+
};
|
|
1790
|
+
|
|
1791
|
+
export declare type ResolvedDashboardInputContext = {
|
|
1792
|
+
inputs: DashboardInput[];
|
|
1793
|
+
resolvedInputs: ResolvedDashboardInput[];
|
|
1794
|
+
activeFilters: TFilterValue[];
|
|
1795
|
+
controlDefinitions: ControlDefinition[];
|
|
1796
|
+
cardControlDefinitions: ControlDefinition[];
|
|
1797
|
+
controlBindings: ControlBinding[];
|
|
1798
|
+
controlValues: Record<string, unknown>;
|
|
1799
|
+
variablesByName: Record<string, ResolvedDashboardInput>;
|
|
1800
|
+
variablesById: Record<string, ResolvedDashboardInput>;
|
|
1801
|
+
missingRequiredInputs: ResolvedDashboardInput[];
|
|
1802
|
+
};
|
|
1803
|
+
|
|
1643
1804
|
export declare type ResolvedDocumentInput = {
|
|
1644
1805
|
inputId: string;
|
|
1645
1806
|
variableName: string;
|
|
@@ -2060,6 +2221,7 @@ export declare type TCardPreferences = {
|
|
|
2060
2221
|
customVisualCode?: string;
|
|
2061
2222
|
textVisualOptions?: {
|
|
2062
2223
|
isDynamicText?: boolean;
|
|
2224
|
+
content?: DashboardInputTextContent;
|
|
2063
2225
|
};
|
|
2064
2226
|
mapVisualOptions?: {
|
|
2065
2227
|
topoJsonUrl?: string;
|
|
@@ -2223,6 +2385,8 @@ export declare type TDashboard = {
|
|
|
2223
2385
|
defaultFilterValues?: TFilterValue[];
|
|
2224
2386
|
controls?: ControlDefinition[];
|
|
2225
2387
|
defaultControlValues?: Record<string, unknown>;
|
|
2388
|
+
inputs?: DashboardInput[];
|
|
2389
|
+
defaultInputValues?: DashboardInputValues;
|
|
2226
2390
|
filterLayout?: FilterLayoutSettings;
|
|
2227
2391
|
};
|
|
2228
2392
|
|
|
@@ -2354,6 +2518,8 @@ declare type TFilter = {
|
|
|
2354
2518
|
location?: FilterLocation;
|
|
2355
2519
|
hide?: boolean;
|
|
2356
2520
|
id: string;
|
|
2521
|
+
/** Alias exposed to document/text variables, for example {{region}}. */
|
|
2522
|
+
variableName?: string;
|
|
2357
2523
|
connectionId: string;
|
|
2358
2524
|
title: string;
|
|
2359
2525
|
column: string;
|
|
@@ -2487,6 +2653,8 @@ declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year' | '
|
|
|
2487
2653
|
*/
|
|
2488
2654
|
export declare type TInlineFilter = {
|
|
2489
2655
|
id: string;
|
|
2656
|
+
/** Alias exposed to document/text variables, for example {{region}}. */
|
|
2657
|
+
variableName?: string;
|
|
2490
2658
|
column: string;
|
|
2491
2659
|
title: string;
|
|
2492
2660
|
dataType: string;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -671,6 +671,11 @@ export declare type ControlBinding = {
|
|
|
671
671
|
mapping: Record<string, string>;
|
|
672
672
|
};
|
|
673
673
|
|
|
674
|
+
export declare type ControlDashboardInput = DashboardInputBase & {
|
|
675
|
+
kind: 'control';
|
|
676
|
+
control: ControlDefinition;
|
|
677
|
+
};
|
|
678
|
+
|
|
674
679
|
export declare type ControlDefinition = {
|
|
675
680
|
id: string;
|
|
676
681
|
label: string;
|
|
@@ -751,6 +756,118 @@ export declare type DashboardEventHandlers = {
|
|
|
751
756
|
onExportData?: (payload: ExportDataPayload) => void;
|
|
752
757
|
};
|
|
753
758
|
|
|
759
|
+
export declare type DashboardInput = FilterDashboardInput | ControlDashboardInput;
|
|
760
|
+
|
|
761
|
+
export declare type DashboardInputBase = {
|
|
762
|
+
id: string;
|
|
763
|
+
label: string;
|
|
764
|
+
variableName: string;
|
|
765
|
+
description?: string;
|
|
766
|
+
requiredAtExecution?: boolean;
|
|
767
|
+
scope: DashboardInputScope;
|
|
768
|
+
runtimeScope: DashboardInputRuntimeScope;
|
|
769
|
+
presentation?: DashboardInputPresentation;
|
|
770
|
+
exports?: DashboardInputExportKey[];
|
|
771
|
+
compatibility?: DashboardInputCompatibilityMetadata;
|
|
772
|
+
};
|
|
773
|
+
|
|
774
|
+
export declare type DashboardInputCompatibilityMetadata = {
|
|
775
|
+
source: 'dashboardFilter';
|
|
776
|
+
filterId: string;
|
|
777
|
+
} | {
|
|
778
|
+
source: 'dashboardControl';
|
|
779
|
+
controlId: string;
|
|
780
|
+
} | {
|
|
781
|
+
source: 'cardInlineFilter';
|
|
782
|
+
cardId: string;
|
|
783
|
+
filterId: string;
|
|
784
|
+
} | {
|
|
785
|
+
source: 'cardControl';
|
|
786
|
+
cardId: string;
|
|
787
|
+
controlId: string;
|
|
788
|
+
} | {
|
|
789
|
+
source: 'documentInput';
|
|
790
|
+
sheetId: string;
|
|
791
|
+
inputId: string;
|
|
792
|
+
};
|
|
793
|
+
|
|
794
|
+
export declare type DashboardInputExecutionSnapshot = {
|
|
795
|
+
sheetId?: string;
|
|
796
|
+
cardId?: string;
|
|
797
|
+
mode: 'dashboard' | 'document' | 'visual';
|
|
798
|
+
dashboardInputValues: DashboardInputValues;
|
|
799
|
+
generatedAt?: string;
|
|
800
|
+
timezone?: string;
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
export declare type DashboardInputExportKey = 'label' | 'value' | 'start' | 'end' | 'range';
|
|
804
|
+
|
|
805
|
+
export declare type DashboardInputPresentation = {
|
|
806
|
+
placement?: 'toolbar' | 'card_header' | 'advanced' | 'hidden';
|
|
807
|
+
widthPx?: number;
|
|
808
|
+
order?: number;
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
export declare type DashboardInputRuntimeScope = 'shared' | 'perSheet' | 'perCard' | 'perDocumentSection';
|
|
812
|
+
|
|
813
|
+
export declare type DashboardInputScope = {
|
|
814
|
+
kind: 'allSheets';
|
|
815
|
+
sheetKinds?: Array<'dashboard' | 'document'>;
|
|
816
|
+
} | {
|
|
817
|
+
kind: 'sheets';
|
|
818
|
+
sheetIds: string[];
|
|
819
|
+
} | {
|
|
820
|
+
kind: 'cards';
|
|
821
|
+
cardIds: string[];
|
|
822
|
+
} | {
|
|
823
|
+
kind: 'documentSections';
|
|
824
|
+
sheetId: string;
|
|
825
|
+
sectionIds: string[];
|
|
826
|
+
};
|
|
827
|
+
|
|
828
|
+
export declare type DashboardInputSlot = {
|
|
829
|
+
status: 'set';
|
|
830
|
+
value: DashboardInputValue;
|
|
831
|
+
} | {
|
|
832
|
+
status: 'cleared';
|
|
833
|
+
};
|
|
834
|
+
|
|
835
|
+
export declare type DashboardInputTextContent = Array<{
|
|
836
|
+
type: 'text';
|
|
837
|
+
value: string;
|
|
838
|
+
} | {
|
|
839
|
+
type: 'variable';
|
|
840
|
+
ref: DashboardInputVariableRef;
|
|
841
|
+
}>;
|
|
842
|
+
|
|
843
|
+
export declare type DashboardInputValue = {
|
|
844
|
+
kind: 'filter';
|
|
845
|
+
filterValue: TFilterValue;
|
|
846
|
+
} | {
|
|
847
|
+
kind: 'control';
|
|
848
|
+
value: unknown;
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
export declare type DashboardInputValues = {
|
|
852
|
+
shared?: Record<string, DashboardInputSlot>;
|
|
853
|
+
bySheetId?: Record<string, Record<string, DashboardInputSlot>>;
|
|
854
|
+
byCardId?: Record<string, Record<string, DashboardInputSlot>>;
|
|
855
|
+
byDocumentSectionId?: Record<string, Record<string, DashboardInputSlot>>;
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
export declare type DashboardInputVariableRef = {
|
|
859
|
+
source: 'dashboardInput';
|
|
860
|
+
inputId: string;
|
|
861
|
+
export: DashboardInputExportKey;
|
|
862
|
+
} | {
|
|
863
|
+
source: 'dashboardInputAlias';
|
|
864
|
+
variableName: string;
|
|
865
|
+
export?: DashboardInputExportKey;
|
|
866
|
+
} | {
|
|
867
|
+
source: 'documentMeta';
|
|
868
|
+
key: 'generatedAt' | 'pageNumber' | 'pageCount';
|
|
869
|
+
};
|
|
870
|
+
|
|
754
871
|
/**
|
|
755
872
|
* Unified dashboard preferences for both card display and UI modes
|
|
756
873
|
*/
|
|
@@ -806,8 +923,17 @@ export declare type DashboardProps = {
|
|
|
806
923
|
* Document-local runtime values for print/render entry points. Values are
|
|
807
924
|
* keyed by document input id and are intentionally separate from dashboard
|
|
808
925
|
* filters/controls.
|
|
926
|
+
*
|
|
927
|
+
* @deprecated Use dashboardInputExecutionSnapshot for document print/export
|
|
928
|
+
* entry points backed by DashboardInput.
|
|
809
929
|
*/
|
|
810
930
|
documentInputValues?: DocumentInputRuntimeValues;
|
|
931
|
+
/**
|
|
932
|
+
* Authoritative dashboard input runtime snapshot for print/render entry
|
|
933
|
+
* points. Document print/export should use this for DashboardInput-backed
|
|
934
|
+
* inputs instead of documentInputValues.
|
|
935
|
+
*/
|
|
936
|
+
dashboardInputExecutionSnapshot?: DashboardInputExecutionSnapshot;
|
|
811
937
|
/**
|
|
812
938
|
* Render target for print entry points. Generic dashboard PDF exports also
|
|
813
939
|
* use cardDisplay.mode="print"; document-specific print handling must only
|
|
@@ -1431,6 +1557,11 @@ declare interface FilterCondition {
|
|
|
1431
1557
|
value: FilterValue;
|
|
1432
1558
|
}
|
|
1433
1559
|
|
|
1560
|
+
export declare type FilterDashboardInput = DashboardInputBase & {
|
|
1561
|
+
kind: 'filter';
|
|
1562
|
+
filter: TFilter;
|
|
1563
|
+
};
|
|
1564
|
+
|
|
1434
1565
|
/**
|
|
1435
1566
|
* Display mode for individual filters
|
|
1436
1567
|
* - 'canvas': Filter displayed as a draggable card on the dashboard canvas
|
|
@@ -1926,6 +2057,36 @@ declare type RelativeDateFilter = {
|
|
|
1926
2057
|
to: number;
|
|
1927
2058
|
};
|
|
1928
2059
|
|
|
2060
|
+
export declare type ResolvedDashboardInput = {
|
|
2061
|
+
id: string;
|
|
2062
|
+
kind: 'filter' | 'control';
|
|
2063
|
+
label: string;
|
|
2064
|
+
variableName: string;
|
|
2065
|
+
requiredAtExecution: boolean;
|
|
2066
|
+
slot?: DashboardInputSlot;
|
|
2067
|
+
rawValue?: unknown;
|
|
2068
|
+
displayValue: string;
|
|
2069
|
+
exports: Partial<Record<DashboardInputExportKey, string | number | boolean | null>>;
|
|
2070
|
+
filter?: TFilter;
|
|
2071
|
+
filterValue?: TFilterValue;
|
|
2072
|
+
control?: ControlDefinition;
|
|
2073
|
+
controlValue?: unknown;
|
|
2074
|
+
missingRequiredValue?: boolean;
|
|
2075
|
+
};
|
|
2076
|
+
|
|
2077
|
+
export declare type ResolvedDashboardInputContext = {
|
|
2078
|
+
inputs: DashboardInput[];
|
|
2079
|
+
resolvedInputs: ResolvedDashboardInput[];
|
|
2080
|
+
activeFilters: TFilterValue[];
|
|
2081
|
+
controlDefinitions: ControlDefinition[];
|
|
2082
|
+
cardControlDefinitions: ControlDefinition[];
|
|
2083
|
+
controlBindings: ControlBinding[];
|
|
2084
|
+
controlValues: Record<string, unknown>;
|
|
2085
|
+
variablesByName: Record<string, ResolvedDashboardInput>;
|
|
2086
|
+
variablesById: Record<string, ResolvedDashboardInput>;
|
|
2087
|
+
missingRequiredInputs: ResolvedDashboardInput[];
|
|
2088
|
+
};
|
|
2089
|
+
|
|
1929
2090
|
export declare type ResolvedDocumentInput = {
|
|
1930
2091
|
inputId: string;
|
|
1931
2092
|
variableName: string;
|
|
@@ -2388,6 +2549,7 @@ export declare type TCardPreferences = {
|
|
|
2388
2549
|
customVisualCode?: string;
|
|
2389
2550
|
textVisualOptions?: {
|
|
2390
2551
|
isDynamicText?: boolean;
|
|
2552
|
+
content?: DashboardInputTextContent;
|
|
2391
2553
|
};
|
|
2392
2554
|
mapVisualOptions?: {
|
|
2393
2555
|
topoJsonUrl?: string;
|
|
@@ -2551,6 +2713,8 @@ export declare type TDashboard = {
|
|
|
2551
2713
|
defaultFilterValues?: TFilterValue[];
|
|
2552
2714
|
controls?: ControlDefinition[];
|
|
2553
2715
|
defaultControlValues?: Record<string, unknown>;
|
|
2716
|
+
inputs?: DashboardInput[];
|
|
2717
|
+
defaultInputValues?: DashboardInputValues;
|
|
2554
2718
|
filterLayout?: FilterLayoutSettings;
|
|
2555
2719
|
};
|
|
2556
2720
|
|
|
@@ -2682,6 +2846,8 @@ declare type TFilter = {
|
|
|
2682
2846
|
location?: FilterLocation;
|
|
2683
2847
|
hide?: boolean;
|
|
2684
2848
|
id: string;
|
|
2849
|
+
/** Alias exposed to document/text variables, for example {{region}}. */
|
|
2850
|
+
variableName?: string;
|
|
2685
2851
|
connectionId: string;
|
|
2686
2852
|
title: string;
|
|
2687
2853
|
column: string;
|
|
@@ -2815,6 +2981,8 @@ declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year' | '
|
|
|
2815
2981
|
*/
|
|
2816
2982
|
export declare type TInlineFilter = {
|
|
2817
2983
|
id: string;
|
|
2984
|
+
/** Alias exposed to document/text variables, for example {{region}}. */
|
|
2985
|
+
variableName?: string;
|
|
2818
2986
|
column: string;
|
|
2819
2987
|
title: string;
|
|
2820
2988
|
dataType: string;
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./switch-AmoR1YIA.js");/**
|
|
2
|
-
* @license lucide-react v0.453.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const a=e.createLucideIcon("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);exports.Braces=a;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { c as a } from "./switch-CZtMtqEj.js";
|
|
2
|
-
/**
|
|
3
|
-
* @license lucide-react v0.453.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
const c = a("Braces", [
|
|
9
|
-
[
|
|
10
|
-
"path",
|
|
11
|
-
{ d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1", key: "ezmyqa" }
|
|
12
|
-
],
|
|
13
|
-
[
|
|
14
|
-
"path",
|
|
15
|
-
{
|
|
16
|
-
d: "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",
|
|
17
|
-
key: "e1hn23"
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
]);
|
|
21
|
-
export {
|
|
22
|
-
c as B
|
|
23
|
-
};
|