react-semaphor 0.1.295 → 0.1.297
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-DWldEFn5.js → braces-BT-cB4J_.js} +1 -1
- package/dist/chunks/{braces-BdoTYzuj.js → braces-CSunPeAg.js} +1 -1
- package/dist/chunks/dashboard-controls-C6254Ugx.js +2219 -0
- package/dist/chunks/dashboard-controls-Za3WPtTh.js +47 -0
- package/dist/chunks/{dashboard-filter-controls-button-XwenlcXw.js → dashboard-filter-controls-button-DZnR5IgP.js} +487 -513
- package/dist/chunks/dashboard-filter-controls-button-dYWccDmw.js +11 -0
- package/dist/chunks/{dashboard-json-CU55qPXj.js → dashboard-json-CuI5gkwY.js} +1 -1
- package/dist/chunks/{dashboard-json-V6m6lJ_c.js → dashboard-json-DjpkfbSZ.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-DRLPzp1P.js → dashboard-summary-settings-dialog-C6FUhXQy.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-0CIiWsKc.js → dashboard-summary-settings-dialog-vC2shhM-.js} +1 -1
- package/dist/chunks/edit-dashboard-visual-CoG-tE_T.js +188 -0
- package/dist/chunks/{edit-dashboard-visual-8ha6EM_g.js → edit-dashboard-visual-TBI9_Pyh.js} +6351 -6452
- package/dist/chunks/index--CoasbAE.js +1523 -0
- package/dist/chunks/{index-14M0TnH6.js → index-D0iNspb-.js} +102960 -87712
- package/dist/chunks/{resource-management-panel-CcDAn86l.js → resource-management-panel-Cf4FTR33.js} +2 -2
- package/dist/chunks/{resource-management-panel-BL5-5ouC.js → resource-management-panel-HOWOJUap.js} +31 -30
- package/dist/chunks/{use-create-flow-overlay-state-D3PxfjYv.js → use-create-flow-overlay-state-B7bE6z5B.js} +572 -568
- package/dist/chunks/use-create-flow-overlay-state-BqiJrgeK.js +21 -0
- package/dist/chunks/use-visual-utils-DP6ty2_T.js +1 -0
- package/dist/chunks/{use-visual-utils-CdIOq4nt.js → use-visual-utils-DyvrB6Zh.js} +70 -68
- 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 +245 -1
- package/dist/types/main.d.ts +317 -12
- package/dist/types/shared.d.ts +214 -1
- package/dist/types/surfboard.d.ts +245 -1
- package/dist/types/types.d.ts +245 -1
- package/package.json +7 -1
- package/dist/chunks/dashboard-controls-B3lrnI_r.js +0 -47
- package/dist/chunks/dashboard-controls-D7U6E1sB.js +0 -2014
- package/dist/chunks/dashboard-filter-controls-button-D0AsV28-.js +0 -11
- package/dist/chunks/edit-dashboard-visual-sSLAkmgf.js +0 -183
- package/dist/chunks/index-Ze8VskG1.js +0 -1435
- package/dist/chunks/use-create-flow-overlay-state-BbQVNDCj.js +0 -21
- package/dist/chunks/use-visual-utils-kh8p2QFm.js +0 -1
package/dist/types/main.d.ts
CHANGED
|
@@ -76,6 +76,20 @@ declare type Actions_2 = {
|
|
|
76
76
|
addSheet: (sheet: TSheet) => void;
|
|
77
77
|
deleteSheet: (sheetId: string) => void;
|
|
78
78
|
setSheetTitle: (sheetId: string, title: string) => void;
|
|
79
|
+
updateSheetDocument: (sheetId: string, updater: (document: DocumentDefinition) => DocumentDefinition) => void;
|
|
80
|
+
updateDocumentSectionCard: (sheetId: string, sectionId: string, card: TCard, options?: {
|
|
81
|
+
calculatedFields?: Field[];
|
|
82
|
+
}) => void;
|
|
83
|
+
setSelectedDocumentSectionId: (sheetId: string, sectionId: string | null) => void;
|
|
84
|
+
setDocumentInspectorTab: (sheetId: string, tab: DocumentInspectorTab) => void;
|
|
85
|
+
setDocumentInputFilterValues: (sheetId: string, valuesByInputId: Record<string, TFilterValue | undefined>) => void;
|
|
86
|
+
setDocumentInputFilterValue: (sheetId: string, inputId: string, filterValue: TFilterValue) => void;
|
|
87
|
+
removeDocumentInputFilterValue: (sheetId: string, inputId: string) => void;
|
|
88
|
+
setDocumentInputFilterModes: (sheetId: string, modesByInputId: Record<string, DocumentFilterMode>) => void;
|
|
89
|
+
setDocumentInputFilterMode: (sheetId: string, inputId: string, filterMode: DocumentFilterMode) => void;
|
|
90
|
+
setDocumentInputControlValues: (sheetId: string, valuesByInputId: Record<string, unknown>) => void;
|
|
91
|
+
setDocumentInputControlValue: (sheetId: string, inputId: string, value: unknown) => void;
|
|
92
|
+
clearDocumentInputRuntime: (sheetId?: string) => void;
|
|
79
93
|
setSelectedSheetId: (sheetId: string | null) => void;
|
|
80
94
|
setSheetLayout: (sheetId: string, layout: default_2.Layout[]) => void;
|
|
81
95
|
setSheetLayouts: (sheetId: string, layouts: default_2.Layouts) => void;
|
|
@@ -284,6 +298,8 @@ declare type Actions_3 = TableActions & ExplorerActions & DrillActions & {
|
|
|
284
298
|
setOnTableChange: (onTableChange: (tableNmae: string) => void) => void;
|
|
285
299
|
setOnSave: (onSave: (card: TFrame) => void) => void;
|
|
286
300
|
setOnClose: (onClose: () => void) => void;
|
|
301
|
+
setEditorContext: (context: EditorContext) => void;
|
|
302
|
+
clearEditorContext: () => void;
|
|
287
303
|
};
|
|
288
304
|
|
|
289
305
|
/**
|
|
@@ -314,21 +330,16 @@ declare type AddFrameOptions = {
|
|
|
314
330
|
};
|
|
315
331
|
|
|
316
332
|
/**
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
* Layout matches the Filter split-button: a bordered shell with two
|
|
323
|
-
* ghost-button segments inside. The active segment gets a muted fill;
|
|
324
|
-
* the inactive segment is transparent so the surface behind shows
|
|
325
|
-
* through.
|
|
333
|
+
* Single-button mode toggle (action pattern). The label reflects where
|
|
334
|
+
* a click will take you, not where you currently are — e.g. while in
|
|
335
|
+
* drag-and-drop mode the button shows `</> SQL`. Compact, matches the
|
|
336
|
+
* "Edit / Done" toggle convention.
|
|
326
337
|
*/
|
|
327
338
|
export declare function AdvancedModeToggle({ className }: AdvancedModeToggleProps): JSX.Element | null;
|
|
328
339
|
|
|
329
340
|
declare interface AdvancedModeToggleProps {
|
|
330
|
-
/** @deprecated Kept for API compatibility; the
|
|
331
|
-
*
|
|
341
|
+
/** @deprecated Kept for API compatibility; the toggle handles its
|
|
342
|
+
* own layout. */
|
|
332
343
|
className?: string;
|
|
333
344
|
/** @deprecated The old DevModeSwitch prop has no analogue here. */
|
|
334
345
|
labelClassName?: string;
|
|
@@ -1448,6 +1459,18 @@ export declare type DashboardProps = {
|
|
|
1448
1459
|
cardControlDefinitions?: ControlDefinition[];
|
|
1449
1460
|
controlBindings?: ControlBinding[];
|
|
1450
1461
|
};
|
|
1462
|
+
/**
|
|
1463
|
+
* Document-local runtime values for print/render entry points. Values are
|
|
1464
|
+
* keyed by document input id and are intentionally separate from dashboard
|
|
1465
|
+
* filters/controls.
|
|
1466
|
+
*/
|
|
1467
|
+
documentInputValues?: DocumentInputRuntimeValues;
|
|
1468
|
+
/**
|
|
1469
|
+
* Render target for print entry points. Generic dashboard PDF exports also
|
|
1470
|
+
* use cardDisplay.mode="print"; document-specific print handling must only
|
|
1471
|
+
* run when this is explicitly "document".
|
|
1472
|
+
*/
|
|
1473
|
+
renderMode?: 'dashboard' | 'document';
|
|
1451
1474
|
customStyle?: TStyle;
|
|
1452
1475
|
currentTheme?: Theme;
|
|
1453
1476
|
version?: string;
|
|
@@ -1493,6 +1516,9 @@ export declare type DashboardStore = {
|
|
|
1493
1516
|
selectedFrameId?: string | null;
|
|
1494
1517
|
selectedCardId?: string | null;
|
|
1495
1518
|
selectedCard?: TCard | null;
|
|
1519
|
+
selectedDocumentSectionIdsBySheetId: Record<string, string | null>;
|
|
1520
|
+
documentInspectorTabsBySheetId: Record<string, DocumentInspectorTab>;
|
|
1521
|
+
documentInputRuntimeBySheetId: Record<string, DocumentInputRuntimeState>;
|
|
1496
1522
|
/**
|
|
1497
1523
|
* Pending sheet-wide frame rewrites produced while visual editing. These stay
|
|
1498
1524
|
* draft-only until the editor Save path applies the current frame.
|
|
@@ -1705,6 +1731,235 @@ export declare type DimensionInputReference = {
|
|
|
1705
1731
|
|
|
1706
1732
|
export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
|
|
1707
1733
|
|
|
1734
|
+
export declare type DocumentChartSection = {
|
|
1735
|
+
id: string;
|
|
1736
|
+
type: 'chart';
|
|
1737
|
+
title?: string;
|
|
1738
|
+
card: TCard;
|
|
1739
|
+
heightPx: number;
|
|
1740
|
+
};
|
|
1741
|
+
|
|
1742
|
+
export declare type DocumentControlInputDefinition = DocumentInputBase & {
|
|
1743
|
+
kind: 'control';
|
|
1744
|
+
control: ControlDefinition;
|
|
1745
|
+
exports?: DocumentInputExportKey[];
|
|
1746
|
+
};
|
|
1747
|
+
|
|
1748
|
+
export declare type DocumentDefinition = {
|
|
1749
|
+
version: 1;
|
|
1750
|
+
page: DocumentPageSetup;
|
|
1751
|
+
runtime?: DocumentRuntimeSettings;
|
|
1752
|
+
inputs?: DocumentInputDefinition[];
|
|
1753
|
+
defaultInputValues?: Record<string, unknown>;
|
|
1754
|
+
header?: DocumentHeaderRegion;
|
|
1755
|
+
footer?: DocumentFooterRegion;
|
|
1756
|
+
sections: DocumentSection[];
|
|
1757
|
+
theme?: DocumentTheme;
|
|
1758
|
+
};
|
|
1759
|
+
|
|
1760
|
+
export declare type DocumentFilterInputDefinition = DocumentInputBase & {
|
|
1761
|
+
kind: 'filter';
|
|
1762
|
+
filter: TFilter;
|
|
1763
|
+
exports?: DocumentInputExportKey[];
|
|
1764
|
+
};
|
|
1765
|
+
|
|
1766
|
+
declare type DocumentFilterMode = 'include' | 'exclude';
|
|
1767
|
+
|
|
1768
|
+
export declare type DocumentFooterRegion = DocumentRegionBase & {
|
|
1769
|
+
region: 'footer';
|
|
1770
|
+
layout: {
|
|
1771
|
+
type: 'preset';
|
|
1772
|
+
preset: 'mvp_footer';
|
|
1773
|
+
};
|
|
1774
|
+
};
|
|
1775
|
+
|
|
1776
|
+
export declare type DocumentHeaderRegion = DocumentRegionBase & {
|
|
1777
|
+
region: 'header';
|
|
1778
|
+
layout: {
|
|
1779
|
+
type: 'preset';
|
|
1780
|
+
preset: 'mvp_header';
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1783
|
+
|
|
1784
|
+
export declare type DocumentImageRegionBlock = DocumentRegionBlockBase & {
|
|
1785
|
+
type: 'image';
|
|
1786
|
+
role?: 'logo';
|
|
1787
|
+
src: string;
|
|
1788
|
+
alt?: string;
|
|
1789
|
+
widthPx?: number;
|
|
1790
|
+
};
|
|
1791
|
+
|
|
1792
|
+
export declare type DocumentInputBase = {
|
|
1793
|
+
id: string;
|
|
1794
|
+
label: string;
|
|
1795
|
+
variableName: string;
|
|
1796
|
+
requiredAtExecution: boolean;
|
|
1797
|
+
documentPlacement?: 'input_bar';
|
|
1798
|
+
description?: string;
|
|
1799
|
+
};
|
|
1800
|
+
|
|
1801
|
+
export declare type DocumentInputDefinition = DocumentFilterInputDefinition | DocumentControlInputDefinition;
|
|
1802
|
+
|
|
1803
|
+
export declare type DocumentInputExportKey = 'label' | 'value' | 'start' | 'end' | 'range';
|
|
1804
|
+
|
|
1805
|
+
export declare type DocumentInputRuntimeState = {
|
|
1806
|
+
filterValuesByInputId: Record<string, TFilterValue | undefined>;
|
|
1807
|
+
filterModesByInputId: Record<string, DocumentFilterMode>;
|
|
1808
|
+
controlValuesByInputId: Record<string, unknown>;
|
|
1809
|
+
};
|
|
1810
|
+
|
|
1811
|
+
export declare type DocumentInputRuntimeValues = {
|
|
1812
|
+
sheetId?: string;
|
|
1813
|
+
filterValuesByInputId?: Record<string, TFilterValue | undefined>;
|
|
1814
|
+
controlValuesByInputId?: Record<string, unknown>;
|
|
1815
|
+
generatedAt?: string;
|
|
1816
|
+
};
|
|
1817
|
+
|
|
1818
|
+
export declare type DocumentInspectorTab = 'section' | 'page' | 'header' | 'footer' | 'inputs';
|
|
1819
|
+
|
|
1820
|
+
export declare type DocumentPageBreakSection = {
|
|
1821
|
+
id: string;
|
|
1822
|
+
type: 'page_break';
|
|
1823
|
+
};
|
|
1824
|
+
|
|
1825
|
+
export declare type DocumentPageSetup = {
|
|
1826
|
+
size: 'letter' | 'a4';
|
|
1827
|
+
orientation: 'portrait' | 'landscape';
|
|
1828
|
+
margins: {
|
|
1829
|
+
top: number;
|
|
1830
|
+
right: number;
|
|
1831
|
+
bottom: number;
|
|
1832
|
+
left: number;
|
|
1833
|
+
unit: 'in' | 'mm';
|
|
1834
|
+
};
|
|
1835
|
+
};
|
|
1836
|
+
|
|
1837
|
+
export declare type DocumentRegion = DocumentHeaderRegion | DocumentFooterRegion;
|
|
1838
|
+
|
|
1839
|
+
export declare type DocumentRegionBase = {
|
|
1840
|
+
enabled: boolean;
|
|
1841
|
+
heightPx?: number;
|
|
1842
|
+
layout: DocumentRegionLayout;
|
|
1843
|
+
blocks: DocumentRegionBlock[];
|
|
1844
|
+
};
|
|
1845
|
+
|
|
1846
|
+
export declare type DocumentRegionBlock = DocumentTextRegionBlock | DocumentImageRegionBlock;
|
|
1847
|
+
|
|
1848
|
+
export declare type DocumentRegionBlockBase = {
|
|
1849
|
+
id: string;
|
|
1850
|
+
area?: 'left' | 'center' | 'right' | 'title' | 'metadata' | 'note' | 'pageInfo';
|
|
1851
|
+
};
|
|
1852
|
+
|
|
1853
|
+
export declare type DocumentRegionLayout = {
|
|
1854
|
+
type: 'preset';
|
|
1855
|
+
preset: 'mvp_header' | 'mvp_footer';
|
|
1856
|
+
};
|
|
1857
|
+
|
|
1858
|
+
export declare type DocumentRuntimeSettings = {
|
|
1859
|
+
generatedAtFormat?: string;
|
|
1860
|
+
};
|
|
1861
|
+
|
|
1862
|
+
export declare type DocumentSection = DocumentTextSection | DocumentTableSection | DocumentChartSection | DocumentSpacerSection | DocumentPageBreakSection;
|
|
1863
|
+
|
|
1864
|
+
export declare type DocumentSpacerSection = {
|
|
1865
|
+
id: string;
|
|
1866
|
+
type: 'spacer';
|
|
1867
|
+
heightPx: number;
|
|
1868
|
+
};
|
|
1869
|
+
|
|
1870
|
+
export declare type DocumentTableDensity = 'comfortable' | 'standard' | 'compact' | 'dense';
|
|
1871
|
+
|
|
1872
|
+
export declare type DocumentTableGridLines = 'none' | 'outer' | 'inner' | 'horizontal' | 'vertical' | 'top' | 'right' | 'bottom' | 'left' | 'full';
|
|
1873
|
+
|
|
1874
|
+
export declare type DocumentTableHeaderStyle = 'plain' | 'filled' | 'accent';
|
|
1875
|
+
|
|
1876
|
+
export declare type DocumentTableSection = {
|
|
1877
|
+
id: string;
|
|
1878
|
+
type: 'table';
|
|
1879
|
+
title?: string;
|
|
1880
|
+
card: TCard;
|
|
1881
|
+
table: {
|
|
1882
|
+
totalsRow?: boolean;
|
|
1883
|
+
columnFormatting?: Record<string, unknown>;
|
|
1884
|
+
repeatHeaderOnPageBreak?: boolean;
|
|
1885
|
+
rowHeightPx?: number;
|
|
1886
|
+
style?: DocumentTableStyle;
|
|
1887
|
+
totalsStyle?: DocumentTableTotalsStyle;
|
|
1888
|
+
};
|
|
1889
|
+
};
|
|
1890
|
+
|
|
1891
|
+
export declare type DocumentTableStyle = {
|
|
1892
|
+
density?: DocumentTableDensity;
|
|
1893
|
+
headerStyle?: DocumentTableHeaderStyle;
|
|
1894
|
+
headerBackgroundColor?: string;
|
|
1895
|
+
headerTextColor?: string;
|
|
1896
|
+
stripedRows?: boolean;
|
|
1897
|
+
gridLines?: DocumentTableGridLines;
|
|
1898
|
+
wrapText?: boolean;
|
|
1899
|
+
};
|
|
1900
|
+
|
|
1901
|
+
export declare type DocumentTableTotalsFontWeight = 'normal' | 'medium' | 'semibold' | 'bold';
|
|
1902
|
+
|
|
1903
|
+
export declare type DocumentTableTotalsStyle = {
|
|
1904
|
+
backgroundColor?: string;
|
|
1905
|
+
textColor?: string;
|
|
1906
|
+
fontWeight?: DocumentTableTotalsFontWeight;
|
|
1907
|
+
borderTop?: boolean;
|
|
1908
|
+
};
|
|
1909
|
+
|
|
1910
|
+
export declare type DocumentTextContent = DocumentTextNode[];
|
|
1911
|
+
|
|
1912
|
+
export declare type DocumentTextInlineFormat = {
|
|
1913
|
+
bold?: boolean;
|
|
1914
|
+
italic?: boolean;
|
|
1915
|
+
underline?: boolean;
|
|
1916
|
+
};
|
|
1917
|
+
|
|
1918
|
+
export declare type DocumentTextNode = {
|
|
1919
|
+
type: 'text';
|
|
1920
|
+
value: string;
|
|
1921
|
+
format?: DocumentTextInlineFormat;
|
|
1922
|
+
} | {
|
|
1923
|
+
type: 'variable';
|
|
1924
|
+
ref: DocumentVariableRef;
|
|
1925
|
+
format?: DocumentTextInlineFormat;
|
|
1926
|
+
};
|
|
1927
|
+
|
|
1928
|
+
export declare type DocumentTextRegionBlock = DocumentRegionBlockBase & {
|
|
1929
|
+
type: 'text';
|
|
1930
|
+
role?: 'title' | 'metadata' | 'note' | 'pageInfo';
|
|
1931
|
+
content: DocumentTextContent;
|
|
1932
|
+
style?: DocumentTextStyle;
|
|
1933
|
+
};
|
|
1934
|
+
|
|
1935
|
+
export declare type DocumentTextSection = {
|
|
1936
|
+
id: string;
|
|
1937
|
+
type: 'text';
|
|
1938
|
+
content: DocumentTextContent;
|
|
1939
|
+
style?: DocumentTextStyle;
|
|
1940
|
+
};
|
|
1941
|
+
|
|
1942
|
+
export declare type DocumentTextStyle = {
|
|
1943
|
+
fontSize?: number;
|
|
1944
|
+
fontWeight?: 'normal' | 'medium' | 'semibold' | 'bold';
|
|
1945
|
+
color?: string;
|
|
1946
|
+
align?: 'left' | 'center' | 'right';
|
|
1947
|
+
};
|
|
1948
|
+
|
|
1949
|
+
export declare type DocumentTheme = {
|
|
1950
|
+
fontFamily?: string;
|
|
1951
|
+
primaryColor?: string;
|
|
1952
|
+
};
|
|
1953
|
+
|
|
1954
|
+
export declare type DocumentVariableRef = {
|
|
1955
|
+
source: 'input';
|
|
1956
|
+
inputId: string;
|
|
1957
|
+
export: DocumentInputExportKey;
|
|
1958
|
+
} | {
|
|
1959
|
+
source: 'documentMeta';
|
|
1960
|
+
key: 'generatedAt' | 'pageNumber' | 'pageCount';
|
|
1961
|
+
};
|
|
1962
|
+
|
|
1708
1963
|
export declare interface DomainCalculatedDimension {
|
|
1709
1964
|
name: string;
|
|
1710
1965
|
label: string;
|
|
@@ -1728,6 +1983,16 @@ export declare interface DomainCalculatedMetric {
|
|
|
1728
1983
|
aggregationStrategy?: AggregationStrategy;
|
|
1729
1984
|
}
|
|
1730
1985
|
|
|
1986
|
+
export declare function downloadDocumentPdf(apiServiceUrl: string, authToken: AuthToken | undefined, options: {
|
|
1987
|
+
sheetId: string;
|
|
1988
|
+
title: string;
|
|
1989
|
+
pageSize: string;
|
|
1990
|
+
orientation: string;
|
|
1991
|
+
inputValues: DocumentInputRuntimeValues;
|
|
1992
|
+
timezone?: string;
|
|
1993
|
+
password?: string;
|
|
1994
|
+
}): Promise<void>;
|
|
1995
|
+
|
|
1731
1996
|
export declare function downloadPdf(apiServiceUrl: string, authToken: AuthToken | undefined, password?: string, sheetSelection?: 'current' | 'all', expandedState?: Record<string, boolean>): Promise<void>;
|
|
1732
1997
|
|
|
1733
1998
|
declare type DraftDeliveryConfig = {
|
|
@@ -2034,6 +2299,19 @@ export declare interface DynamicDrillInteraction {
|
|
|
2034
2299
|
/* Excluded from this release type: drillField */
|
|
2035
2300
|
}
|
|
2036
2301
|
|
|
2302
|
+
export declare type EditorContext = {
|
|
2303
|
+
type: 'dashboard';
|
|
2304
|
+
} | {
|
|
2305
|
+
type: 'documentSection';
|
|
2306
|
+
sheetId: string;
|
|
2307
|
+
sectionId: string;
|
|
2308
|
+
cardId: string;
|
|
2309
|
+
documentFilterValues?: TFilterValue[];
|
|
2310
|
+
documentControlDefinitions?: ControlDefinition[];
|
|
2311
|
+
documentControlValues?: Record<string, unknown>;
|
|
2312
|
+
missingRequiredInputLabels?: string[];
|
|
2313
|
+
};
|
|
2314
|
+
|
|
2037
2315
|
export declare type EditorStore = {
|
|
2038
2316
|
tempQueryData?: {
|
|
2039
2317
|
queryKey: string[];
|
|
@@ -2071,6 +2349,7 @@ export declare type EditorStore = {
|
|
|
2071
2349
|
onSchemaChange?: (schemaName: string) => void;
|
|
2072
2350
|
onSave?: (card: TFrame) => void | Promise<void>;
|
|
2073
2351
|
onClose?: () => void;
|
|
2352
|
+
editorContext?: EditorContext;
|
|
2074
2353
|
/** Draft slots for mode switching - preserves work when toggling between dev/standard */
|
|
2075
2354
|
modeDrafts: ModeDrafts;
|
|
2076
2355
|
};
|
|
@@ -2477,6 +2756,8 @@ declare type FixedMonthDefaultDateFilter = {
|
|
|
2477
2756
|
month: number;
|
|
2478
2757
|
};
|
|
2479
2758
|
|
|
2759
|
+
export declare type FlatTableTotalsBehavior = 'sum' | 'avg' | 'count' | 'label';
|
|
2760
|
+
|
|
2480
2761
|
export declare function fmt(str: string): string;
|
|
2481
2762
|
|
|
2482
2763
|
/**
|
|
@@ -3178,6 +3459,7 @@ export declare interface QueryExecutionResponse {
|
|
|
3178
3459
|
subtotalColumns?: string[];
|
|
3179
3460
|
columnSubtotalMeta?: any;
|
|
3180
3461
|
columnKeyMap?: QueryColumnKeyMap;
|
|
3462
|
+
tableTotalsByColumnId?: Record<string, string | number | null>;
|
|
3181
3463
|
metadata?: any;
|
|
3182
3464
|
}
|
|
3183
3465
|
|
|
@@ -3216,6 +3498,16 @@ export declare function resolveDatamodelName(datamodelName: string): string;
|
|
|
3216
3498
|
|
|
3217
3499
|
export declare const resolveDataType: (value: any) => string;
|
|
3218
3500
|
|
|
3501
|
+
export declare type ResolvedDocumentInput = {
|
|
3502
|
+
inputId: string;
|
|
3503
|
+
variableName: string;
|
|
3504
|
+
rawValue: unknown;
|
|
3505
|
+
displayValue: string;
|
|
3506
|
+
filterValues?: TFilterValue[];
|
|
3507
|
+
controlValue?: unknown;
|
|
3508
|
+
exports: Record<string, string | number | boolean | null>;
|
|
3509
|
+
};
|
|
3510
|
+
|
|
3219
3511
|
declare type ResolvedPrimaryDateField = {
|
|
3220
3512
|
sourceDataset: string;
|
|
3221
3513
|
sourceField: string;
|
|
@@ -3565,7 +3857,7 @@ export declare type TableConfig = {
|
|
|
3565
3857
|
* the Linear-style spec). Drives row padding, cell font size, and header
|
|
3566
3858
|
* font size via a shared density spec in DataTable.
|
|
3567
3859
|
*/
|
|
3568
|
-
declare type TableDensity = 'compact' | 'comfortable' | 'spacious';
|
|
3860
|
+
declare type TableDensity = 'dense' | 'compact' | 'standard' | 'comfortable' | 'spacious';
|
|
3569
3861
|
|
|
3570
3862
|
export declare type TableItem = DropdownItem;
|
|
3571
3863
|
|
|
@@ -3578,6 +3870,17 @@ declare type TablePreferences = {
|
|
|
3578
3870
|
enableDevModePagination?: boolean;
|
|
3579
3871
|
forceClientPagination?: boolean;
|
|
3580
3872
|
density?: TableDensity;
|
|
3873
|
+
documentWrapText?: boolean;
|
|
3874
|
+
};
|
|
3875
|
+
|
|
3876
|
+
export declare type TableTotalsRequest = {
|
|
3877
|
+
source: 'documentFlatTable';
|
|
3878
|
+
columns: Array<{
|
|
3879
|
+
fieldId: string;
|
|
3880
|
+
role: 'detail' | 'groupby' | 'metric';
|
|
3881
|
+
behavior: FlatTableTotalsBehavior;
|
|
3882
|
+
label?: string;
|
|
3883
|
+
}>;
|
|
3581
3884
|
};
|
|
3582
3885
|
|
|
3583
3886
|
/**
|
|
@@ -4567,6 +4870,7 @@ export declare type TSelectedRecord = ComboBoxOption;
|
|
|
4567
4870
|
|
|
4568
4871
|
export declare type TSheet = {
|
|
4569
4872
|
id: string;
|
|
4873
|
+
kind?: 'dashboard' | 'document';
|
|
4570
4874
|
title?: string;
|
|
4571
4875
|
description?: string;
|
|
4572
4876
|
layout?: ReactGridLayout.Layout[];
|
|
@@ -4574,6 +4878,7 @@ export declare type TSheet = {
|
|
|
4574
4878
|
cards?: TCard[];
|
|
4575
4879
|
frames?: TFrame[];
|
|
4576
4880
|
calculatedFields?: Field[];
|
|
4881
|
+
document?: DocumentDefinition;
|
|
4577
4882
|
};
|
|
4578
4883
|
|
|
4579
4884
|
/**
|
package/dist/types/shared.d.ts
CHANGED
|
@@ -483,6 +483,216 @@ declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowfla
|
|
|
483
483
|
|
|
484
484
|
declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
|
|
485
485
|
|
|
486
|
+
declare type DocumentChartSection = {
|
|
487
|
+
id: string;
|
|
488
|
+
type: 'chart';
|
|
489
|
+
title?: string;
|
|
490
|
+
card: TCard;
|
|
491
|
+
heightPx: number;
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
declare type DocumentControlInputDefinition = DocumentInputBase & {
|
|
495
|
+
kind: 'control';
|
|
496
|
+
control: ControlDefinition;
|
|
497
|
+
exports?: DocumentInputExportKey[];
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
declare type DocumentDefinition = {
|
|
501
|
+
version: 1;
|
|
502
|
+
page: DocumentPageSetup;
|
|
503
|
+
runtime?: DocumentRuntimeSettings;
|
|
504
|
+
inputs?: DocumentInputDefinition[];
|
|
505
|
+
defaultInputValues?: Record<string, unknown>;
|
|
506
|
+
header?: DocumentHeaderRegion;
|
|
507
|
+
footer?: DocumentFooterRegion;
|
|
508
|
+
sections: DocumentSection[];
|
|
509
|
+
theme?: DocumentTheme;
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
declare type DocumentFilterInputDefinition = DocumentInputBase & {
|
|
513
|
+
kind: 'filter';
|
|
514
|
+
filter: TFilter;
|
|
515
|
+
exports?: DocumentInputExportKey[];
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
declare type DocumentFooterRegion = DocumentRegionBase & {
|
|
519
|
+
region: 'footer';
|
|
520
|
+
layout: {
|
|
521
|
+
type: 'preset';
|
|
522
|
+
preset: 'mvp_footer';
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
declare type DocumentHeaderRegion = DocumentRegionBase & {
|
|
527
|
+
region: 'header';
|
|
528
|
+
layout: {
|
|
529
|
+
type: 'preset';
|
|
530
|
+
preset: 'mvp_header';
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
declare type DocumentImageRegionBlock = DocumentRegionBlockBase & {
|
|
535
|
+
type: 'image';
|
|
536
|
+
role?: 'logo';
|
|
537
|
+
src: string;
|
|
538
|
+
alt?: string;
|
|
539
|
+
widthPx?: number;
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
declare type DocumentInputBase = {
|
|
543
|
+
id: string;
|
|
544
|
+
label: string;
|
|
545
|
+
variableName: string;
|
|
546
|
+
requiredAtExecution: boolean;
|
|
547
|
+
documentPlacement?: 'input_bar';
|
|
548
|
+
description?: string;
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
declare type DocumentInputDefinition = DocumentFilterInputDefinition | DocumentControlInputDefinition;
|
|
552
|
+
|
|
553
|
+
declare type DocumentInputExportKey = 'label' | 'value' | 'start' | 'end' | 'range';
|
|
554
|
+
|
|
555
|
+
declare type DocumentPageBreakSection = {
|
|
556
|
+
id: string;
|
|
557
|
+
type: 'page_break';
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
declare type DocumentPageSetup = {
|
|
561
|
+
size: 'letter' | 'a4';
|
|
562
|
+
orientation: 'portrait' | 'landscape';
|
|
563
|
+
margins: {
|
|
564
|
+
top: number;
|
|
565
|
+
right: number;
|
|
566
|
+
bottom: number;
|
|
567
|
+
left: number;
|
|
568
|
+
unit: 'in' | 'mm';
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
declare type DocumentRegionBase = {
|
|
573
|
+
enabled: boolean;
|
|
574
|
+
heightPx?: number;
|
|
575
|
+
layout: DocumentRegionLayout;
|
|
576
|
+
blocks: DocumentRegionBlock[];
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
declare type DocumentRegionBlock = DocumentTextRegionBlock | DocumentImageRegionBlock;
|
|
580
|
+
|
|
581
|
+
declare type DocumentRegionBlockBase = {
|
|
582
|
+
id: string;
|
|
583
|
+
area?: 'left' | 'center' | 'right' | 'title' | 'metadata' | 'note' | 'pageInfo';
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
declare type DocumentRegionLayout = {
|
|
587
|
+
type: 'preset';
|
|
588
|
+
preset: 'mvp_header' | 'mvp_footer';
|
|
589
|
+
};
|
|
590
|
+
|
|
591
|
+
declare type DocumentRuntimeSettings = {
|
|
592
|
+
generatedAtFormat?: string;
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
declare type DocumentSection = DocumentTextSection | DocumentTableSection | DocumentChartSection | DocumentSpacerSection | DocumentPageBreakSection;
|
|
596
|
+
|
|
597
|
+
declare type DocumentSpacerSection = {
|
|
598
|
+
id: string;
|
|
599
|
+
type: 'spacer';
|
|
600
|
+
heightPx: number;
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
declare type DocumentTableDensity = 'comfortable' | 'standard' | 'compact' | 'dense';
|
|
604
|
+
|
|
605
|
+
declare type DocumentTableGridLines = 'none' | 'outer' | 'inner' | 'horizontal' | 'vertical' | 'top' | 'right' | 'bottom' | 'left' | 'full';
|
|
606
|
+
|
|
607
|
+
declare type DocumentTableHeaderStyle = 'plain' | 'filled' | 'accent';
|
|
608
|
+
|
|
609
|
+
declare type DocumentTableSection = {
|
|
610
|
+
id: string;
|
|
611
|
+
type: 'table';
|
|
612
|
+
title?: string;
|
|
613
|
+
card: TCard;
|
|
614
|
+
table: {
|
|
615
|
+
totalsRow?: boolean;
|
|
616
|
+
columnFormatting?: Record<string, unknown>;
|
|
617
|
+
repeatHeaderOnPageBreak?: boolean;
|
|
618
|
+
rowHeightPx?: number;
|
|
619
|
+
style?: DocumentTableStyle;
|
|
620
|
+
totalsStyle?: DocumentTableTotalsStyle;
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
declare type DocumentTableStyle = {
|
|
625
|
+
density?: DocumentTableDensity;
|
|
626
|
+
headerStyle?: DocumentTableHeaderStyle;
|
|
627
|
+
headerBackgroundColor?: string;
|
|
628
|
+
headerTextColor?: string;
|
|
629
|
+
stripedRows?: boolean;
|
|
630
|
+
gridLines?: DocumentTableGridLines;
|
|
631
|
+
wrapText?: boolean;
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
declare type DocumentTableTotalsFontWeight = 'normal' | 'medium' | 'semibold' | 'bold';
|
|
635
|
+
|
|
636
|
+
declare type DocumentTableTotalsStyle = {
|
|
637
|
+
backgroundColor?: string;
|
|
638
|
+
textColor?: string;
|
|
639
|
+
fontWeight?: DocumentTableTotalsFontWeight;
|
|
640
|
+
borderTop?: boolean;
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
declare type DocumentTextContent = DocumentTextNode[];
|
|
644
|
+
|
|
645
|
+
declare type DocumentTextInlineFormat = {
|
|
646
|
+
bold?: boolean;
|
|
647
|
+
italic?: boolean;
|
|
648
|
+
underline?: boolean;
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
declare type DocumentTextNode = {
|
|
652
|
+
type: 'text';
|
|
653
|
+
value: string;
|
|
654
|
+
format?: DocumentTextInlineFormat;
|
|
655
|
+
} | {
|
|
656
|
+
type: 'variable';
|
|
657
|
+
ref: DocumentVariableRef;
|
|
658
|
+
format?: DocumentTextInlineFormat;
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
declare type DocumentTextRegionBlock = DocumentRegionBlockBase & {
|
|
662
|
+
type: 'text';
|
|
663
|
+
role?: 'title' | 'metadata' | 'note' | 'pageInfo';
|
|
664
|
+
content: DocumentTextContent;
|
|
665
|
+
style?: DocumentTextStyle;
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
declare type DocumentTextSection = {
|
|
669
|
+
id: string;
|
|
670
|
+
type: 'text';
|
|
671
|
+
content: DocumentTextContent;
|
|
672
|
+
style?: DocumentTextStyle;
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
declare type DocumentTextStyle = {
|
|
676
|
+
fontSize?: number;
|
|
677
|
+
fontWeight?: 'normal' | 'medium' | 'semibold' | 'bold';
|
|
678
|
+
color?: string;
|
|
679
|
+
align?: 'left' | 'center' | 'right';
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
declare type DocumentTheme = {
|
|
683
|
+
fontFamily?: string;
|
|
684
|
+
primaryColor?: string;
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
declare type DocumentVariableRef = {
|
|
688
|
+
source: 'input';
|
|
689
|
+
inputId: string;
|
|
690
|
+
export: DocumentInputExportKey;
|
|
691
|
+
} | {
|
|
692
|
+
source: 'documentMeta';
|
|
693
|
+
key: 'generatedAt' | 'pageNumber' | 'pageCount';
|
|
694
|
+
};
|
|
695
|
+
|
|
486
696
|
declare interface DrillDownInteraction {
|
|
487
697
|
mode: 'drillDown';
|
|
488
698
|
/**
|
|
@@ -1224,7 +1434,7 @@ declare type StyleProps = {
|
|
|
1224
1434
|
* the Linear-style spec). Drives row padding, cell font size, and header
|
|
1225
1435
|
* font size via a shared density spec in DataTable.
|
|
1226
1436
|
*/
|
|
1227
|
-
declare type TableDensity = 'compact' | 'comfortable' | 'spacious';
|
|
1437
|
+
declare type TableDensity = 'dense' | 'compact' | 'standard' | 'comfortable' | 'spacious';
|
|
1228
1438
|
|
|
1229
1439
|
declare type TablePreferences = {
|
|
1230
1440
|
columnSettingsMap?: ColumnSettingsMap;
|
|
@@ -1235,6 +1445,7 @@ declare type TablePreferences = {
|
|
|
1235
1445
|
enableDevModePagination?: boolean;
|
|
1236
1446
|
forceClientPagination?: boolean;
|
|
1237
1447
|
density?: TableDensity;
|
|
1448
|
+
documentWrapText?: boolean;
|
|
1238
1449
|
};
|
|
1239
1450
|
|
|
1240
1451
|
/**
|
|
@@ -1933,6 +2144,7 @@ declare type TPointStyle = 'circle' | 'cross' | 'crossRot' | 'dash' | 'line' | '
|
|
|
1933
2144
|
|
|
1934
2145
|
declare type TSheet = {
|
|
1935
2146
|
id: string;
|
|
2147
|
+
kind?: 'dashboard' | 'document';
|
|
1936
2148
|
title?: string;
|
|
1937
2149
|
description?: string;
|
|
1938
2150
|
layout?: ReactGridLayout.Layout[];
|
|
@@ -1940,6 +2152,7 @@ declare type TSheet = {
|
|
|
1940
2152
|
cards?: TCard[];
|
|
1941
2153
|
frames?: TFrame[];
|
|
1942
2154
|
calculatedFields?: Field[];
|
|
2155
|
+
document?: DocumentDefinition;
|
|
1943
2156
|
};
|
|
1944
2157
|
|
|
1945
2158
|
/**
|