react-semaphor 0.1.294 → 0.1.296
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/{braces-DfDQiR3J.js → braces-BNXseceK.js} +1 -1
- package/dist/chunks/{braces-DR-GdaLC.js → braces-DVrX_3Q_.js} +1 -1
- package/dist/chunks/dashboard-controls-CKKZcVA5.js +2219 -0
- package/dist/chunks/dashboard-controls-DS2xJxHU.js +47 -0
- package/dist/chunks/dashboard-filter-controls-button-nqfmscB7.js +11 -0
- package/dist/chunks/{dashboard-filter-controls-button-DxgGUl00.js → dashboard-filter-controls-button-xPaIlNHP.js} +501 -495
- package/dist/chunks/{dashboard-json-BvTeHePu.js → dashboard-json-cuj9vYY9.js} +1 -1
- package/dist/chunks/{dashboard-json-DQW8TN0I.js → dashboard-json-ovQyHWw6.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-BsmKiGud.js → dashboard-summary-settings-dialog-BUg3Qyhh.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-q7fx3YAK.js → dashboard-summary-settings-dialog-DF076HeJ.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-RVl9nbDZ.js → edit-dashboard-visual-32TAM00c.js} +5373 -5302
- package/dist/chunks/edit-dashboard-visual-BtiMcO-L.js +183 -0
- package/dist/chunks/{index-DerPpfv0.js → index-BDeJH9hO.js} +103982 -88259
- package/dist/chunks/index-Dbrs96G8.js +1533 -0
- package/dist/chunks/{resource-management-panel-epydPwyM.js → resource-management-panel-2qcXsKwg.js} +2 -2
- package/dist/chunks/{resource-management-panel-DnZ1rw1A.js → resource-management-panel-C4qoxy_g.js} +31 -30
- package/dist/chunks/use-create-flow-overlay-state-BMD3YRzU.js +21 -0
- package/dist/chunks/{use-create-flow-overlay-state-C5vdfXhM.js → use-create-flow-overlay-state-CHeppRNE.js} +572 -568
- package/dist/chunks/{use-visual-utils-D9Kknvjl.js → use-visual-utils-BIHLaVwh.js} +70 -68
- package/dist/chunks/use-visual-utils-dOYWf6nM.js +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +113 -112
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/dashboard.d.ts +271 -0
- package/dist/types/main.d.ts +324 -0
- package/dist/types/shared.d.ts +240 -0
- package/dist/types/surfboard.d.ts +271 -0
- package/dist/types/types.d.ts +271 -0
- package/package.json +7 -1
- package/dist/chunks/dashboard-controls-C3Z9bpYE.js +0 -2014
- package/dist/chunks/dashboard-controls-DGEVXgP5.js +0 -47
- package/dist/chunks/dashboard-filter-controls-button-BIYT1ucX.js +0 -11
- package/dist/chunks/edit-dashboard-visual-ChKj-Lzr.js +0 -183
- package/dist/chunks/index-BlspGR07.js +0 -1435
- package/dist/chunks/use-create-flow-overlay-state-Bcg4EgoD.js +0 -21
- package/dist/chunks/use-visual-utils-Dw_yw9zU.js +0 -1
package/dist/types/types.d.ts
CHANGED
|
@@ -510,6 +510,12 @@ declare interface ColumnSettings {
|
|
|
510
510
|
maxWidth?: number;
|
|
511
511
|
textOverflow?: 'ellipsis' | 'wrap' | 'clip';
|
|
512
512
|
textWrap: 'wrap' | 'nowrap';
|
|
513
|
+
/**
|
|
514
|
+
* Totals-row behavior for this column. Undefined = 'none'. The footer
|
|
515
|
+
* renders only when at least one visible column has a non-'none' behavior.
|
|
516
|
+
*/
|
|
517
|
+
totalsBehavior?: TotalsBehavior;
|
|
518
|
+
totalsLabel?: string;
|
|
513
519
|
numberFormat: {
|
|
514
520
|
style: 'decimal' | 'currency' | 'percent' | 'scientific';
|
|
515
521
|
currency: string;
|
|
@@ -522,6 +528,14 @@ declare interface ColumnSettings {
|
|
|
522
528
|
dataBarColor: string;
|
|
523
529
|
dataBarMinValue?: number;
|
|
524
530
|
dataBarMaxValue?: number;
|
|
531
|
+
/**
|
|
532
|
+
* When true, render the cell bg with a heatmap intensity tint scaled
|
|
533
|
+
* across the column's value range. Composes with the existing text
|
|
534
|
+
* color/color-range logic (tint is bg only). `showDataBar` takes
|
|
535
|
+
* precedence when both are set — per the canonical design, a cell is
|
|
536
|
+
* either a data-bar or a heatmap, never both.
|
|
537
|
+
*/
|
|
538
|
+
showHeatmap?: boolean;
|
|
525
539
|
};
|
|
526
540
|
dateFormat: {
|
|
527
541
|
format: string;
|
|
@@ -708,6 +722,18 @@ export declare type DashboardProps = {
|
|
|
708
722
|
cardControlDefinitions?: ControlDefinition[];
|
|
709
723
|
controlBindings?: ControlBinding[];
|
|
710
724
|
};
|
|
725
|
+
/**
|
|
726
|
+
* Document-local runtime values for print/render entry points. Values are
|
|
727
|
+
* keyed by document input id and are intentionally separate from dashboard
|
|
728
|
+
* filters/controls.
|
|
729
|
+
*/
|
|
730
|
+
documentInputValues?: DocumentInputRuntimeValues;
|
|
731
|
+
/**
|
|
732
|
+
* Render target for print entry points. Generic dashboard PDF exports also
|
|
733
|
+
* use cardDisplay.mode="print"; document-specific print handling must only
|
|
734
|
+
* run when this is explicitly "document".
|
|
735
|
+
*/
|
|
736
|
+
renderMode?: 'dashboard' | 'document';
|
|
711
737
|
customStyle?: TStyle;
|
|
712
738
|
currentTheme?: Theme;
|
|
713
739
|
version?: string;
|
|
@@ -863,6 +889,215 @@ declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowfla
|
|
|
863
889
|
|
|
864
890
|
export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
|
|
865
891
|
|
|
892
|
+
export declare type DocumentChartSection = {
|
|
893
|
+
id: string;
|
|
894
|
+
type: 'chart';
|
|
895
|
+
title?: string;
|
|
896
|
+
card: TCard;
|
|
897
|
+
heightPx: number;
|
|
898
|
+
};
|
|
899
|
+
|
|
900
|
+
export declare type DocumentControlInputDefinition = DocumentInputBase & {
|
|
901
|
+
kind: 'control';
|
|
902
|
+
control: ControlDefinition;
|
|
903
|
+
exports?: DocumentInputExportKey[];
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
export declare type DocumentDefinition = {
|
|
907
|
+
version: 1;
|
|
908
|
+
page: DocumentPageSetup;
|
|
909
|
+
runtime?: DocumentRuntimeSettings;
|
|
910
|
+
inputs?: DocumentInputDefinition[];
|
|
911
|
+
defaultInputValues?: Record<string, unknown>;
|
|
912
|
+
header?: DocumentHeaderRegion;
|
|
913
|
+
footer?: DocumentFooterRegion;
|
|
914
|
+
sections: DocumentSection[];
|
|
915
|
+
theme?: DocumentTheme;
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
export declare type DocumentFilterInputDefinition = DocumentInputBase & {
|
|
919
|
+
kind: 'filter';
|
|
920
|
+
filter: TFilter;
|
|
921
|
+
exports?: DocumentInputExportKey[];
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
export declare type DocumentFooterRegion = DocumentRegionBase & {
|
|
925
|
+
region: 'footer';
|
|
926
|
+
layout: {
|
|
927
|
+
type: 'preset';
|
|
928
|
+
preset: 'mvp_footer';
|
|
929
|
+
};
|
|
930
|
+
};
|
|
931
|
+
|
|
932
|
+
export declare type DocumentHeaderRegion = DocumentRegionBase & {
|
|
933
|
+
region: 'header';
|
|
934
|
+
layout: {
|
|
935
|
+
type: 'preset';
|
|
936
|
+
preset: 'mvp_header';
|
|
937
|
+
};
|
|
938
|
+
};
|
|
939
|
+
|
|
940
|
+
export declare type DocumentImageRegionBlock = DocumentRegionBlockBase & {
|
|
941
|
+
type: 'image';
|
|
942
|
+
role?: 'logo';
|
|
943
|
+
src: string;
|
|
944
|
+
alt?: string;
|
|
945
|
+
widthPx?: number;
|
|
946
|
+
};
|
|
947
|
+
|
|
948
|
+
export declare type DocumentInputBase = {
|
|
949
|
+
id: string;
|
|
950
|
+
label: string;
|
|
951
|
+
variableName: string;
|
|
952
|
+
requiredAtExecution: boolean;
|
|
953
|
+
documentPlacement?: 'input_bar';
|
|
954
|
+
description?: string;
|
|
955
|
+
};
|
|
956
|
+
|
|
957
|
+
export declare type DocumentInputDefinition = DocumentFilterInputDefinition | DocumentControlInputDefinition;
|
|
958
|
+
|
|
959
|
+
export declare type DocumentInputExportKey = 'label' | 'value' | 'start' | 'end' | 'range';
|
|
960
|
+
|
|
961
|
+
export declare type DocumentInputRuntimeValues = {
|
|
962
|
+
sheetId?: string;
|
|
963
|
+
filterValuesByInputId?: Record<string, TFilterValue | undefined>;
|
|
964
|
+
controlValuesByInputId?: Record<string, unknown>;
|
|
965
|
+
generatedAt?: string;
|
|
966
|
+
};
|
|
967
|
+
|
|
968
|
+
export declare type DocumentPageBreakSection = {
|
|
969
|
+
id: string;
|
|
970
|
+
type: 'page_break';
|
|
971
|
+
};
|
|
972
|
+
|
|
973
|
+
export declare type DocumentPageSetup = {
|
|
974
|
+
size: 'letter' | 'a4';
|
|
975
|
+
orientation: 'portrait' | 'landscape';
|
|
976
|
+
margins: {
|
|
977
|
+
top: number;
|
|
978
|
+
right: number;
|
|
979
|
+
bottom: number;
|
|
980
|
+
left: number;
|
|
981
|
+
unit: 'in' | 'mm';
|
|
982
|
+
};
|
|
983
|
+
};
|
|
984
|
+
|
|
985
|
+
export declare type DocumentRegion = DocumentHeaderRegion | DocumentFooterRegion;
|
|
986
|
+
|
|
987
|
+
export declare type DocumentRegionBase = {
|
|
988
|
+
enabled: boolean;
|
|
989
|
+
heightPx?: number;
|
|
990
|
+
layout: DocumentRegionLayout;
|
|
991
|
+
blocks: DocumentRegionBlock[];
|
|
992
|
+
};
|
|
993
|
+
|
|
994
|
+
export declare type DocumentRegionBlock = DocumentTextRegionBlock | DocumentImageRegionBlock;
|
|
995
|
+
|
|
996
|
+
export declare type DocumentRegionBlockBase = {
|
|
997
|
+
id: string;
|
|
998
|
+
area?: 'left' | 'center' | 'right' | 'title' | 'metadata' | 'note' | 'pageInfo';
|
|
999
|
+
};
|
|
1000
|
+
|
|
1001
|
+
export declare type DocumentRegionLayout = {
|
|
1002
|
+
type: 'preset';
|
|
1003
|
+
preset: 'mvp_header' | 'mvp_footer';
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
export declare type DocumentRuntimeSettings = {
|
|
1007
|
+
generatedAtFormat?: string;
|
|
1008
|
+
};
|
|
1009
|
+
|
|
1010
|
+
export declare type DocumentSection = DocumentTextSection | DocumentTableSection | DocumentChartSection | DocumentSpacerSection | DocumentPageBreakSection;
|
|
1011
|
+
|
|
1012
|
+
export declare type DocumentSpacerSection = {
|
|
1013
|
+
id: string;
|
|
1014
|
+
type: 'spacer';
|
|
1015
|
+
heightPx: number;
|
|
1016
|
+
};
|
|
1017
|
+
|
|
1018
|
+
export declare type DocumentTableDensity = 'comfortable' | 'standard' | 'compact' | 'dense';
|
|
1019
|
+
|
|
1020
|
+
export declare type DocumentTableGridLines = 'none' | 'outer' | 'inner' | 'horizontal' | 'vertical' | 'top' | 'right' | 'bottom' | 'left' | 'full';
|
|
1021
|
+
|
|
1022
|
+
export declare type DocumentTableHeaderStyle = 'plain' | 'filled' | 'accent';
|
|
1023
|
+
|
|
1024
|
+
export declare type DocumentTableSection = {
|
|
1025
|
+
id: string;
|
|
1026
|
+
type: 'table';
|
|
1027
|
+
title?: string;
|
|
1028
|
+
card: TCard;
|
|
1029
|
+
table: {
|
|
1030
|
+
totalsRow?: boolean;
|
|
1031
|
+
columnFormatting?: Record<string, unknown>;
|
|
1032
|
+
repeatHeaderOnPageBreak?: boolean;
|
|
1033
|
+
rowHeightPx?: number;
|
|
1034
|
+
style?: DocumentTableStyle;
|
|
1035
|
+
};
|
|
1036
|
+
};
|
|
1037
|
+
|
|
1038
|
+
export declare type DocumentTableStyle = {
|
|
1039
|
+
density?: DocumentTableDensity;
|
|
1040
|
+
headerStyle?: DocumentTableHeaderStyle;
|
|
1041
|
+
headerBackgroundColor?: string;
|
|
1042
|
+
headerTextColor?: string;
|
|
1043
|
+
stripedRows?: boolean;
|
|
1044
|
+
gridLines?: DocumentTableGridLines;
|
|
1045
|
+
wrapText?: boolean;
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
export declare type DocumentTextContent = DocumentTextNode[];
|
|
1049
|
+
|
|
1050
|
+
export declare type DocumentTextInlineFormat = {
|
|
1051
|
+
bold?: boolean;
|
|
1052
|
+
italic?: boolean;
|
|
1053
|
+
underline?: boolean;
|
|
1054
|
+
};
|
|
1055
|
+
|
|
1056
|
+
export declare type DocumentTextNode = {
|
|
1057
|
+
type: 'text';
|
|
1058
|
+
value: string;
|
|
1059
|
+
format?: DocumentTextInlineFormat;
|
|
1060
|
+
} | {
|
|
1061
|
+
type: 'variable';
|
|
1062
|
+
ref: DocumentVariableRef;
|
|
1063
|
+
format?: DocumentTextInlineFormat;
|
|
1064
|
+
};
|
|
1065
|
+
|
|
1066
|
+
export declare type DocumentTextRegionBlock = DocumentRegionBlockBase & {
|
|
1067
|
+
type: 'text';
|
|
1068
|
+
role?: 'title' | 'metadata' | 'note' | 'pageInfo';
|
|
1069
|
+
content: DocumentTextContent;
|
|
1070
|
+
style?: DocumentTextStyle;
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1073
|
+
export declare type DocumentTextSection = {
|
|
1074
|
+
id: string;
|
|
1075
|
+
type: 'text';
|
|
1076
|
+
content: DocumentTextContent;
|
|
1077
|
+
style?: DocumentTextStyle;
|
|
1078
|
+
};
|
|
1079
|
+
|
|
1080
|
+
export declare type DocumentTextStyle = {
|
|
1081
|
+
fontSize?: number;
|
|
1082
|
+
fontWeight?: 'normal' | 'medium' | 'semibold' | 'bold';
|
|
1083
|
+
color?: string;
|
|
1084
|
+
align?: 'left' | 'center' | 'right';
|
|
1085
|
+
};
|
|
1086
|
+
|
|
1087
|
+
export declare type DocumentTheme = {
|
|
1088
|
+
fontFamily?: string;
|
|
1089
|
+
primaryColor?: string;
|
|
1090
|
+
};
|
|
1091
|
+
|
|
1092
|
+
export declare type DocumentVariableRef = {
|
|
1093
|
+
source: 'input';
|
|
1094
|
+
inputId: string;
|
|
1095
|
+
export: DocumentInputExportKey;
|
|
1096
|
+
} | {
|
|
1097
|
+
source: 'documentMeta';
|
|
1098
|
+
key: 'generatedAt' | 'pageNumber' | 'pageCount';
|
|
1099
|
+
};
|
|
1100
|
+
|
|
866
1101
|
declare interface DrillDownInteraction {
|
|
867
1102
|
mode: 'drillDown';
|
|
868
1103
|
/**
|
|
@@ -1595,6 +1830,16 @@ declare type RelativeDateFilter = {
|
|
|
1595
1830
|
to: number;
|
|
1596
1831
|
};
|
|
1597
1832
|
|
|
1833
|
+
export declare type ResolvedDocumentInput = {
|
|
1834
|
+
inputId: string;
|
|
1835
|
+
variableName: string;
|
|
1836
|
+
rawValue: unknown;
|
|
1837
|
+
displayValue: string;
|
|
1838
|
+
filterValues?: TFilterValue[];
|
|
1839
|
+
controlValue?: unknown;
|
|
1840
|
+
exports: Record<string, string | number | boolean | null>;
|
|
1841
|
+
};
|
|
1842
|
+
|
|
1598
1843
|
declare type ResolvedPrimaryDateField = {
|
|
1599
1844
|
sourceDataset: string;
|
|
1600
1845
|
sourceField: string;
|
|
@@ -1737,6 +1982,14 @@ export declare type StyleProps = {
|
|
|
1737
1982
|
};
|
|
1738
1983
|
};
|
|
1739
1984
|
|
|
1985
|
+
/**
|
|
1986
|
+
* Row rhythm for the whole table. Authors pick one per card; undefined
|
|
1987
|
+
* falls back to 'compact' (the canonical default — dense scanning, matches
|
|
1988
|
+
* the Linear-style spec). Drives row padding, cell font size, and header
|
|
1989
|
+
* font size via a shared density spec in DataTable.
|
|
1990
|
+
*/
|
|
1991
|
+
declare type TableDensity = 'dense' | 'compact' | 'standard' | 'comfortable' | 'spacious';
|
|
1992
|
+
|
|
1740
1993
|
declare type TablePreferences = {
|
|
1741
1994
|
columnSettingsMap?: ColumnSettingsMap;
|
|
1742
1995
|
selectColumnVisible?: boolean;
|
|
@@ -1745,6 +1998,8 @@ declare type TablePreferences = {
|
|
|
1745
1998
|
pageSize?: number;
|
|
1746
1999
|
enableDevModePagination?: boolean;
|
|
1747
2000
|
forceClientPagination?: boolean;
|
|
2001
|
+
density?: TableDensity;
|
|
2002
|
+
documentWrapText?: boolean;
|
|
1748
2003
|
};
|
|
1749
2004
|
|
|
1750
2005
|
/**
|
|
@@ -2698,11 +2953,26 @@ export declare type TokenSecurityPolicy = {
|
|
|
2698
2953
|
};
|
|
2699
2954
|
};
|
|
2700
2955
|
|
|
2956
|
+
/**
|
|
2957
|
+
* Per-column contribution to the table-level totals row (`<tfoot>`).
|
|
2958
|
+
* Additive and optional — omitting it keeps the cell empty in the footer,
|
|
2959
|
+
* matching existing behavior when a totals row is not needed.
|
|
2960
|
+
*
|
|
2961
|
+
* - 'sum' → aggregate the column across the full dataset
|
|
2962
|
+
* - 'avg' → arithmetic mean across the full dataset
|
|
2963
|
+
* - 'count' → non-null count across the full dataset
|
|
2964
|
+
* - 'label' → render `totalsLabel` (or 'Total') as static text — typically
|
|
2965
|
+
* on the first column so the footer reads as a labeled row
|
|
2966
|
+
* - 'none' → blank cell in the footer
|
|
2967
|
+
*/
|
|
2968
|
+
declare type TotalsBehavior = 'sum' | 'avg' | 'count' | 'label' | 'none';
|
|
2969
|
+
|
|
2701
2970
|
/** Point style options supported by Chart.js */
|
|
2702
2971
|
export declare type TPointStyle = 'circle' | 'cross' | 'crossRot' | 'dash' | 'line' | 'rect' | 'rectRounded' | 'rectRot' | 'star' | 'triangle';
|
|
2703
2972
|
|
|
2704
2973
|
export declare type TSheet = {
|
|
2705
2974
|
id: string;
|
|
2975
|
+
kind?: 'dashboard' | 'document';
|
|
2706
2976
|
title?: string;
|
|
2707
2977
|
description?: string;
|
|
2708
2978
|
layout?: ReactGridLayout.Layout[];
|
|
@@ -2710,6 +2980,7 @@ export declare type TSheet = {
|
|
|
2710
2980
|
cards?: TCard[];
|
|
2711
2981
|
frames?: TFrame[];
|
|
2712
2982
|
calculatedFields?: Field[];
|
|
2983
|
+
document?: DocumentDefinition;
|
|
2713
2984
|
};
|
|
2714
2985
|
|
|
2715
2986
|
/**
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"email": "support@semaphor.cloud"
|
|
6
6
|
},
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"version": "0.1.
|
|
8
|
+
"version": "0.1.296",
|
|
9
9
|
"description": "Fully interactive and customizable dashboards for your apps.",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"react",
|
|
@@ -84,6 +84,11 @@
|
|
|
84
84
|
"@dnd-kit/sortable": "^10.0.0",
|
|
85
85
|
"@dnd-kit/utilities": "^3.2.2",
|
|
86
86
|
"@headlessui/react": "^2.2.0",
|
|
87
|
+
"@lexical/history": "^0.43.0",
|
|
88
|
+
"@lexical/react": "^0.43.0",
|
|
89
|
+
"@lexical/rich-text": "^0.43.0",
|
|
90
|
+
"@lexical/selection": "^0.43.0",
|
|
91
|
+
"@lexical/utils": "^0.43.0",
|
|
87
92
|
"@r2wc/react-to-web-component": "^2.0.4",
|
|
88
93
|
"@radix-ui/react-accordion": "^1.2.2",
|
|
89
94
|
"@radix-ui/react-alert-dialog": "^1.1.4",
|
|
@@ -128,6 +133,7 @@
|
|
|
128
133
|
"fast-deep-equal": "^3.1.3",
|
|
129
134
|
"immer": "^10.0.3",
|
|
130
135
|
"jwt-decode": "^4.0.0",
|
|
136
|
+
"lexical": "^0.43.0",
|
|
131
137
|
"lodash.merge": "^4.6.2",
|
|
132
138
|
"lucide-react": "^0.453.0",
|
|
133
139
|
"ms": "^2.1.3",
|