serverside_pivot 0.0.0-stage → 0.0.91
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/README.md +182 -3
- package/dist/react/chunks/ContextMenu-Bt5_3bmD.mjs +192 -0
- package/dist/react/chunks/DetailDrawer-Eb4EpVHG.mjs +37 -0
- package/dist/react/chunks/DetailSidePanel-BTcHOiKr.mjs +36 -0
- package/dist/react/chunks/DetailSurfaceContent-B3ZNKh7q.mjs +200 -0
- package/dist/react/chunks/ECharts2dRenderer-C3Qv0uAa.mjs +3299 -0
- package/dist/react/chunks/ECharts3dRenderer-BB_7-fOt.mjs +21573 -0
- package/dist/react/chunks/EditSidePanel-C2cAvxlK.mjs +298 -0
- package/dist/react/chunks/InlineDetailPanel-BXLAw1o3.mjs +41 -0
- package/dist/react/chunks/PivotCharts-Bw6Swoa3.mjs +4252 -0
- package/dist/react/chunks/ReportEditor-D4V0ry2B.mjs +1726 -0
- package/dist/react/chunks/SidebarPanel-xO59p_2o.mjs +3339 -0
- package/dist/react/chunks/SparklineDetailGraph-Bu85X7OJ.mjs +200 -0
- package/dist/react/chunks/installCanvasRenderer-B7sfDGoL.mjs +21281 -0
- package/dist/react/chunks/react-CPZZxtSo.mjs +26999 -0
- package/dist/react/chunks/xlsx.mini.min-vfxHk3Ry.mjs +7996 -0
- package/dist/react/components/Charts/ChartRenderers.d.ts +73 -0
- package/dist/react/components/Charts/ChartWorkspace.d.ts +38 -0
- package/dist/react/components/Charts/ECharts2dRenderer.d.ts +5 -0
- package/dist/react/components/Charts/ECharts3dRenderer.d.ts +6 -0
- package/dist/react/components/Charts/PivotCharts.d.ts +9 -0
- package/dist/react/components/Charts/chartEnhancements.d.ts +66 -0
- package/dist/react/components/Charts/chartExportPresentation.d.ts +19 -0
- package/dist/react/components/Charts/chartMath.d.ts +4 -0
- package/dist/react/components/Charts/useChartExportMenu.d.ts +12 -0
- package/dist/react/components/DashTanstackPivot.react.d.ts +372 -0
- package/dist/react/components/Filters/ColumnFilter.d.ts +13 -0
- package/dist/react/components/Filters/DateRangeFilter.d.ts +8 -0
- package/dist/react/components/Filters/FilterPopover.d.ts +14 -0
- package/dist/react/components/Filters/MultiSelectFilter.d.ts +12 -0
- package/dist/react/components/Filters/NumericRangeFilter.d.ts +8 -0
- package/dist/react/components/Notification.d.ts +7 -0
- package/dist/react/components/PivotAppBar.d.ts +2 -0
- package/dist/react/components/PivotErrorBoundary.d.ts +15 -0
- package/dist/react/components/PivotSmallComponents.d.ts +6 -0
- package/dist/react/components/PivotWorkspace.d.ts +19 -0
- package/dist/react/components/PivotWorkspaceCanvas.d.ts +5 -0
- package/dist/react/components/PivotWorkspaceControls.d.ts +12 -0
- package/dist/react/components/PivotWorkspaceShell.d.ts +12 -0
- package/dist/react/components/RuntimeDataError.d.ts +7 -0
- package/dist/react/components/Sidebar/ColumnTreeItem.d.ts +14 -0
- package/dist/react/components/Sidebar/ReportEditor.d.ts +21 -0
- package/dist/react/components/Sidebar/SidebarFilterItem.d.ts +14 -0
- package/dist/react/components/Sidebar/SidebarPanel.d.ts +2 -0
- package/dist/react/components/Sidebar/ToolPanelSection.d.ts +14 -0
- package/dist/react/components/Sidebar/customCategoryUtils.d.ts +62 -0
- package/dist/react/components/Sidebar/formulaUtils.d.ts +22 -0
- package/dist/react/components/SkeletonRow.d.ts +6 -0
- package/dist/react/components/Table/ContextMenu.d.ts +9 -0
- package/dist/react/components/Table/DetailDrawer.d.ts +12 -0
- package/dist/react/components/Table/DetailSidePanel.d.ts +12 -0
- package/dist/react/components/Table/DetailSurfaceContent.d.ts +12 -0
- package/dist/react/components/Table/EditSidePanel.d.ts +21 -0
- package/dist/react/components/Table/EditableCell.d.ts +29 -0
- package/dist/react/components/Table/InlineDetailPanel.d.ts +14 -0
- package/dist/react/components/Table/PivotTableBody.d.ts +9 -0
- package/dist/react/components/Table/SparklineCell.d.ts +17 -0
- package/dist/react/components/Table/SparklineDetailGraph.d.ts +5 -0
- package/dist/react/components/Table/StatusBar.d.ts +8 -0
- package/dist/react/contexts/PivotConfigContext.d.ts +34 -0
- package/dist/react/contexts/PivotThemeContext.d.ts +7 -0
- package/dist/react/contexts/PivotValueDisplayContext.d.ts +10 -0
- package/dist/react/hooks/useCellInteraction.d.ts +31 -0
- package/dist/react/hooks/useChartState.d.ts +76 -0
- package/dist/react/hooks/useColumnDefs.d.ts +82 -0
- package/dist/react/hooks/useColumnVirtualizer.d.ts +30 -0
- package/dist/react/hooks/useDetailDrillThrough.d.ts +38 -0
- package/dist/react/hooks/useFilteredData.d.ts +2 -0
- package/dist/react/hooks/useFormatState.d.ts +44 -0
- package/dist/react/hooks/usePersistence.d.ts +5 -0
- package/dist/react/hooks/usePivotFieldInteractions.d.ts +28 -0
- package/dist/react/hooks/usePivotNormalization.d.ts +483 -0
- package/dist/react/hooks/usePivotRenderCounter.d.ts +1 -0
- package/dist/react/hooks/usePivotTransactions.d.ts +29 -0
- package/dist/react/hooks/useRenderHelpers.d.ts +85 -0
- package/dist/react/hooks/useReportMode.d.ts +32 -0
- package/dist/react/hooks/useRowCache.d.ts +19 -0
- package/dist/react/hooks/useRuntimeDataCommit.d.ts +26 -0
- package/dist/react/hooks/useRuntimeProfiling.d.ts +19 -0
- package/dist/react/hooks/useRuntimeTransport.d.ts +24 -0
- package/dist/react/hooks/useServerSideRowModel.d.ts +50 -0
- package/dist/react/hooks/useServerSideViewportController.d.ts +64 -0
- package/dist/react/hooks/useSidebarUI.d.ts +37 -0
- package/dist/react/hooks/useStickyStyles.d.ts +24 -0
- package/dist/react/index.mjs +16 -0
- package/dist/react/presentation/headerFormatting.d.ts +13 -0
- package/dist/react/presentation/safeCellContent.d.ts +16 -0
- package/dist/react/react.d.ts +8 -0
- package/dist/react/runtime/PivotRuntimeRoot.d.ts +7 -0
- package/dist/react/runtime/cellSelectionAnchor.d.ts +45 -0
- package/dist/react/runtime/client/clientPivotTransport.d.ts +28 -0
- package/dist/react/runtime/client/clientResponsePostProcessor.d.ts +20 -0
- package/dist/react/runtime/client/clientSqlPlanner.d.ts +5 -0
- package/dist/react/runtime/client/duckdbWasmExecutor.d.ts +36 -0
- package/dist/react/runtime/client/index.d.ts +6 -0
- package/dist/react/runtime/client/modeResolver.d.ts +16 -0
- package/dist/react/runtime/client/types.d.ts +202 -0
- package/dist/react/runtime/createRuntimeCellPresentation.d.ts +7 -0
- package/dist/react/runtime/createRuntimeExportCommands.d.ts +77 -0
- package/dist/react/runtime/createRuntimeRowPinCommand.d.ts +9 -0
- package/dist/react/runtime/createWorkspacePresentation.d.ts +7 -0
- package/dist/react/runtime/displayColumnOrder.d.ts +4 -0
- package/dist/react/runtime/httpTransport.d.ts +65 -0
- package/dist/react/runtime/runtime-contract.generated.d.ts +48 -0
- package/dist/react/runtime/runtime-response-contract.generated.d.ts +34 -0
- package/dist/react/runtime/runtimeContract.d.ts +115 -0
- package/dist/react/runtime/runtimeDomains.d.ts +642 -0
- package/dist/react/runtime/runtimeDomains.type-test.d.ts +1 -0
- package/dist/react/runtime/runtimeResponseDedup.d.ts +36 -0
- package/dist/react/runtime/useChartWorkspacePresentation.d.ts +50 -0
- package/dist/react/runtime/useCommandRuntime.d.ts +3 -0
- package/dist/react/runtime/useCommandRuntimeStage.d.ts +1 -0
- package/dist/react/runtime/useCoreRuntime.d.ts +3 -0
- package/dist/react/runtime/useCoreRuntimeStage.d.ts +3 -0
- package/dist/react/runtime/useRuntimeCellSelection.d.ts +44 -0
- package/dist/react/runtime/useRuntimeChartCanvasCommands.d.ts +36 -0
- package/dist/react/runtime/useRuntimeChartCanvasResize.d.ts +13 -0
- package/dist/react/runtime/useRuntimeChartCanvasVerticalResize.d.ts +9 -0
- package/dist/react/runtime/useRuntimeChartDefinitionCommands.d.ts +14 -0
- package/dist/react/runtime/useRuntimeChartFloatingInteractions.d.ts +28 -0
- package/dist/react/runtime/useRuntimeChartModels.d.ts +69 -0
- package/dist/react/runtime/useRuntimeChartPanelSizing.d.ts +12 -0
- package/dist/react/runtime/useRuntimeChartRequestDispatch.d.ts +7 -0
- package/dist/react/runtime/useRuntimeClipboardExportPresentation.d.ts +159 -0
- package/dist/react/runtime/useRuntimeClipboardPaste.d.ts +7 -0
- package/dist/react/runtime/useRuntimeColorScalePresentation.d.ts +55 -0
- package/dist/react/runtime/useRuntimeColumnAutoSizing.d.ts +26 -0
- package/dist/react/runtime/useRuntimeColumnCommands.d.ts +22 -0
- package/dist/react/runtime/useRuntimeColumnMeasurement.d.ts +16 -0
- package/dist/react/runtime/useRuntimeDataRetry.d.ts +12 -0
- package/dist/react/runtime/useRuntimeDisplayNavigation.d.ts +17 -0
- package/dist/react/runtime/useRuntimeEditCellIdentity.d.ts +22 -0
- package/dist/react/runtime/useRuntimeEditChangeTracking.d.ts +28 -0
- package/dist/react/runtime/useRuntimeEditComparisonState.d.ts +35 -0
- package/dist/react/runtime/useRuntimeEditDispatch.d.ts +47 -0
- package/dist/react/runtime/useRuntimeEditOwnership.d.ts +32 -0
- package/dist/react/runtime/useRuntimeEditPresentation.d.ts +32 -0
- package/dist/react/runtime/useRuntimeEditStatePersistence.d.ts +28 -0
- package/dist/react/runtime/useRuntimeExportState.d.ts +20 -0
- package/dist/react/runtime/useRuntimeFilterPopover.d.ts +23 -0
- package/dist/react/runtime/useRuntimeLayoutHistory.d.ts +44 -0
- package/dist/react/runtime/useRuntimeOptimisticCellState.d.ts +27 -0
- package/dist/react/runtime/useRuntimeRequestSession.d.ts +79 -0
- package/dist/react/runtime/useRuntimeResponseLifecycle.d.ts +47 -0
- package/dist/react/runtime/useRuntimeResponsePostCommit.d.ts +15 -0
- package/dist/react/runtime/useRuntimeRowEditSessions.d.ts +28 -0
- package/dist/react/runtime/useRuntimeRowEditing.d.ts +18 -0
- package/dist/react/runtime/useRuntimeRowSelection.d.ts +14 -0
- package/dist/react/runtime/useRuntimeSelectionFormatting.d.ts +36 -0
- package/dist/react/runtime/useRuntimeStructuralSync.d.ts +65 -0
- package/dist/react/runtime/useRuntimeViewRestoreScroll.d.ts +9 -0
- package/dist/react/runtime/useRuntimeViewSnapshot.d.ts +203 -0
- package/dist/react/runtime/useRuntimeViewportTableData.d.ts +23 -0
- package/dist/react/runtime/useTransportRuntime.d.ts +12 -0
- package/dist/react/runtime/useViewportRuntime.d.ts +3 -0
- package/dist/react/runtime/useViewportRuntimeStage.d.ts +1 -0
- package/dist/react/runtime/useWorkspaceRuntime.d.ts +3 -0
- package/dist/react/runtime/useWorkspaceRuntimeStage.d.ts +1 -0
- package/dist/react/runtime/useWorkspaceStatusPresentation.d.ts +115 -0
- package/dist/react/runtime/workspaceViewModel.d.ts +7 -0
- package/dist/react/utils/Icons.d.ts +46 -0
- package/dist/react/utils/chartModelBuilders.d.ts +236 -0
- package/dist/react/utils/columnOrder.d.ts +12 -0
- package/dist/react/utils/dataBars.d.ts +7 -0
- package/dist/react/utils/domEvents.d.ts +1 -0
- package/dist/react/utils/editing.d.ts +47 -0
- package/dist/react/utils/exportUtils.d.ts +121 -0
- package/dist/react/utils/fieldPanelLayout.d.ts +61 -0
- package/dist/react/utils/filterOptions.d.ts +4 -0
- package/dist/react/utils/formatting.d.ts +1 -0
- package/dist/react/utils/helpers.d.ts +20 -0
- package/dist/react/utils/horizontalViewport.d.ts +12 -0
- package/dist/react/utils/layoutRows.d.ts +3 -0
- package/dist/react/utils/measureAxis.d.ts +22 -0
- package/dist/react/utils/pivotLayoutUtils.d.ts +2 -0
- package/dist/react/utils/pivotProfiler.d.ts +4 -0
- package/dist/react/utils/rawTableTsv.d.ts +21 -0
- package/dist/react/utils/reportEditorSelection.d.ts +23 -0
- package/dist/react/utils/rowSpanning.d.ts +6 -0
- package/dist/react/utils/savedReports.d.ts +7 -0
- package/dist/react/utils/sorting.d.ts +14 -0
- package/dist/react/utils/sparklineDetail.d.ts +8 -0
- package/dist/react/utils/sparklines.d.ts +78 -0
- package/dist/react/utils/styles.d.ts +957 -0
- package/package.json +114 -6
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Owns client-side request profiling callbacks.
|
|
3
|
+
*
|
|
4
|
+
* Keeping these callbacks with transport makes the transport lifecycle
|
|
5
|
+
* explicit: queue, send, and response records use the same profiler refs and
|
|
6
|
+
* cannot be created as an incidental side effect of field/edit interactions.
|
|
7
|
+
*/
|
|
8
|
+
export function useRuntimeProfiling({ detailMode, pivotProfilerRef, profilerComponentIdRef, profilingEnabledRef, tableName, viewMode, }: {
|
|
9
|
+
detailMode: any;
|
|
10
|
+
pivotProfilerRef: any;
|
|
11
|
+
profilerComponentIdRef: any;
|
|
12
|
+
profilingEnabledRef: any;
|
|
13
|
+
tableName: any;
|
|
14
|
+
viewMode: any;
|
|
15
|
+
}): {
|
|
16
|
+
recordProfilerQueuedRequest: (requestMeta: any) => void;
|
|
17
|
+
recordProfilerRequestStart: (runtimeRequest: any) => void;
|
|
18
|
+
recordProfilerResponse: (response: any) => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Owns the client-to-Dash runtime request envelope.
|
|
3
|
+
*
|
|
4
|
+
* This hook deliberately stops at prop dispatch. Response handling, payload
|
|
5
|
+
* fetching, row-cache updates, and profiler response commits remain in their
|
|
6
|
+
* existing owners so request transport does not become a second data model.
|
|
7
|
+
*/
|
|
8
|
+
export function useRuntimeTransport({ clientInstanceRef, detailConfig, detailMode, profilingEnabledRef, recordProfilerRequestStart, sessionIdRef, setProps, tableName, treeConfig, viewMode, }: {
|
|
9
|
+
clientInstanceRef: any;
|
|
10
|
+
detailConfig: any;
|
|
11
|
+
detailMode: any;
|
|
12
|
+
profilingEnabledRef: any;
|
|
13
|
+
recordProfilerRequestStart: any;
|
|
14
|
+
sessionIdRef: any;
|
|
15
|
+
setProps: any;
|
|
16
|
+
tableName: any;
|
|
17
|
+
treeConfig: any;
|
|
18
|
+
viewMode: any;
|
|
19
|
+
}): {
|
|
20
|
+
dispatchSetProps: (nextProps: any) => void;
|
|
21
|
+
emitRuntimeRequest: (kind: any, payload: any) => void;
|
|
22
|
+
normalizeOutgoingRuntimeRequest: (runtimeRequest: any) => import("../runtime/runtimeContract").RuntimeRequestV1 | null;
|
|
23
|
+
setPropsRef: import("react").RefObject<(nextProps: any) => void>;
|
|
24
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export function useServerSideRowModel({ parentRef, serverSide, rowCount, rowHeight, data, dataOffset, dataVersion, dataStateEpoch, setProps, blockSize, maxBlocksInCache, blockLoadDebounceMs, rowOverscan, prefetchColumns, estimateRowHeight, keyMapper, cacheKey, excludeGrandTotal, immersiveMode, stateEpoch, sessionId, clientInstance, tableName, abortGeneration, structuralInFlight, requestVersionRef: externalRequestVersionRef, colStart, colEnd, responseColStart, responseColEnd, needsColSchema, columnRangeUrgencyToken, onViewportRequest, layoutMode, showSubtotals, layoutRequestFields, }: {
|
|
2
|
+
parentRef: any;
|
|
3
|
+
serverSide: any;
|
|
4
|
+
rowCount: any;
|
|
5
|
+
rowHeight: any;
|
|
6
|
+
data: any;
|
|
7
|
+
dataOffset?: number | undefined;
|
|
8
|
+
dataVersion?: number | undefined;
|
|
9
|
+
dataStateEpoch?: null | undefined;
|
|
10
|
+
setProps: any;
|
|
11
|
+
blockSize?: number | undefined;
|
|
12
|
+
maxBlocksInCache?: number | undefined;
|
|
13
|
+
blockLoadDebounceMs?: null | undefined;
|
|
14
|
+
rowOverscan?: null | undefined;
|
|
15
|
+
prefetchColumns?: null | undefined;
|
|
16
|
+
estimateRowHeight: any;
|
|
17
|
+
keyMapper: any;
|
|
18
|
+
cacheKey: any;
|
|
19
|
+
excludeGrandTotal?: boolean | undefined;
|
|
20
|
+
immersiveMode?: boolean | undefined;
|
|
21
|
+
stateEpoch?: number | undefined;
|
|
22
|
+
sessionId?: string | undefined;
|
|
23
|
+
clientInstance?: string | undefined;
|
|
24
|
+
tableName?: null | undefined;
|
|
25
|
+
abortGeneration?: number | undefined;
|
|
26
|
+
structuralInFlight?: boolean | undefined;
|
|
27
|
+
requestVersionRef?: null | undefined;
|
|
28
|
+
colStart?: null | undefined;
|
|
29
|
+
colEnd?: null | undefined;
|
|
30
|
+
responseColStart?: null | undefined;
|
|
31
|
+
responseColEnd?: null | undefined;
|
|
32
|
+
needsColSchema?: boolean | undefined;
|
|
33
|
+
columnRangeUrgencyToken?: number | undefined;
|
|
34
|
+
onViewportRequest?: null | undefined;
|
|
35
|
+
layoutMode?: string | undefined;
|
|
36
|
+
showSubtotals?: boolean | undefined;
|
|
37
|
+
layoutRequestFields?: null | undefined;
|
|
38
|
+
}): {
|
|
39
|
+
rowVirtualizer: import("@tanstack/virtual-core").Virtualizer<any, Element>;
|
|
40
|
+
getRow: (rowIndex: any) => any;
|
|
41
|
+
clearCache: () => void;
|
|
42
|
+
invalidateFromBlock: (blockIndex: any) => void;
|
|
43
|
+
softInvalidateFromBlock: (blockIndex: any) => void;
|
|
44
|
+
grandTotalRow: null;
|
|
45
|
+
loadedRows: any[];
|
|
46
|
+
renderedData: any;
|
|
47
|
+
renderedOffset: number;
|
|
48
|
+
requestUrgentColumnViewport: (overrideColStart: any, overrideColEnd: any) => boolean;
|
|
49
|
+
requestVisibleViewportRefresh: (overrideColStart?: null, overrideColEnd?: null, options?: {}) => boolean;
|
|
50
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export function useServerSideViewportController({ serverSide, effectiveRowCount, responseColumns, responseColSchema, dataVersion, stateEpoch, structuralInFlight, structuralPendingVersionRef, filteredData, rowFields, colFields, schemaFallbackWidth, requestVersionRef, latestDataVersionRef, requestUrgentColumnViewportRef, coerceTransportNumber, mergeSparseColSchema, isSparseSchemaRangeLoaded, performanceConfig, }: {
|
|
2
|
+
serverSide: any;
|
|
3
|
+
effectiveRowCount: any;
|
|
4
|
+
responseColumns: any;
|
|
5
|
+
responseColSchema?: null | undefined;
|
|
6
|
+
dataVersion: any;
|
|
7
|
+
stateEpoch: any;
|
|
8
|
+
structuralInFlight: any;
|
|
9
|
+
structuralPendingVersionRef: any;
|
|
10
|
+
filteredData: any;
|
|
11
|
+
rowFields: any;
|
|
12
|
+
colFields: any;
|
|
13
|
+
schemaFallbackWidth?: number | undefined;
|
|
14
|
+
requestVersionRef: any;
|
|
15
|
+
latestDataVersionRef: any;
|
|
16
|
+
requestUrgentColumnViewportRef?: null | undefined;
|
|
17
|
+
coerceTransportNumber: any;
|
|
18
|
+
mergeSparseColSchema: any;
|
|
19
|
+
isSparseSchemaRangeLoaded: any;
|
|
20
|
+
performanceConfig?: null | undefined;
|
|
21
|
+
}): {
|
|
22
|
+
cachedColSchema: null;
|
|
23
|
+
colRequestEnd: number | null;
|
|
24
|
+
colRequestStart: number | null;
|
|
25
|
+
colRequestEndRef: import("react").RefObject<null>;
|
|
26
|
+
colRequestStartRef: import("react").RefObject<null>;
|
|
27
|
+
colSchemaEpochRef: import("react").RefObject<number>;
|
|
28
|
+
columnRangeUrgencyToken: number;
|
|
29
|
+
handleHorizontalScrollMetrics: (metrics: any) => void;
|
|
30
|
+
isHorizontalColumnRequestPending: boolean;
|
|
31
|
+
isRequestPending: boolean;
|
|
32
|
+
latestRequestedColumnWindowRef: import("react").RefObject<{
|
|
33
|
+
start: null;
|
|
34
|
+
end: null;
|
|
35
|
+
}>;
|
|
36
|
+
latestRequestedViewportRef: import("react").RefObject<null>;
|
|
37
|
+
markRequestPending: (requestMeta: any) => void;
|
|
38
|
+
resolvePendingRequest: (requestMeta: any) => boolean;
|
|
39
|
+
needsColSchema: boolean;
|
|
40
|
+
needsColSchemaRef: import("react").RefObject<boolean>;
|
|
41
|
+
pendingHorizontalColumnCount: number;
|
|
42
|
+
resetVisibleColRange: (visibleCountHint?: null) => void;
|
|
43
|
+
responseSchemaWindow: {
|
|
44
|
+
start: null;
|
|
45
|
+
end: null;
|
|
46
|
+
} | {
|
|
47
|
+
start: number;
|
|
48
|
+
end: number;
|
|
49
|
+
};
|
|
50
|
+
resolveStableRequestedColumnWindow: () => {
|
|
51
|
+
start: null;
|
|
52
|
+
end: null;
|
|
53
|
+
} | {
|
|
54
|
+
start: number;
|
|
55
|
+
end: number;
|
|
56
|
+
};
|
|
57
|
+
serverSideBlockSize: number;
|
|
58
|
+
syncPreciseVisibleColRange: (nextPreciseRange: any, options?: {}) => void;
|
|
59
|
+
totalCenterCols: any;
|
|
60
|
+
visibleColRange: {
|
|
61
|
+
start: number;
|
|
62
|
+
end: number;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useSidebarUI — extracts sidebar/field-panel UI state from DashTanstackPivot.
|
|
3
|
+
*
|
|
4
|
+
* Covers: sidebar open/width, field panel sizes, filter column, sidebar tab,
|
|
5
|
+
* floating filters, sticky headers, column search/type filter, selected columns.
|
|
6
|
+
*/
|
|
7
|
+
export function useSidebarUI({ loadPersistedState, clampSidebarWidth, externalFieldPanelSizes, normalizedInitialFieldPanelSizes, sanitizeFieldPanelSizes, DEFAULT_FIELD_PANEL_SIZES, }: {
|
|
8
|
+
loadPersistedState: any;
|
|
9
|
+
clampSidebarWidth: any;
|
|
10
|
+
externalFieldPanelSizes: any;
|
|
11
|
+
normalizedInitialFieldPanelSizes: any;
|
|
12
|
+
sanitizeFieldPanelSizes: any;
|
|
13
|
+
DEFAULT_FIELD_PANEL_SIZES: any;
|
|
14
|
+
}): {
|
|
15
|
+
sidebarOpen: boolean;
|
|
16
|
+
setSidebarOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
17
|
+
sidebarWidth: any;
|
|
18
|
+
setSidebarWidth: import("react").Dispatch<any>;
|
|
19
|
+
fieldPanelSizes: any;
|
|
20
|
+
setFieldPanelSizes: import("react").Dispatch<any>;
|
|
21
|
+
activeFilterCol: null;
|
|
22
|
+
setActiveFilterCol: import("react").Dispatch<import("react").SetStateAction<null>>;
|
|
23
|
+
filterAnchorEl: null;
|
|
24
|
+
setFilterAnchorEl: import("react").Dispatch<import("react").SetStateAction<null>>;
|
|
25
|
+
sidebarTab: string;
|
|
26
|
+
setSidebarTab: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
27
|
+
showFloatingFilters: boolean;
|
|
28
|
+
setShowFloatingFilters: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
29
|
+
stickyHeaders: boolean;
|
|
30
|
+
setStickyHeaders: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
31
|
+
colSearch: string;
|
|
32
|
+
setColSearch: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
33
|
+
colTypeFilter: string;
|
|
34
|
+
setColTypeFilter: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
35
|
+
selectedCols: Set<any>;
|
|
36
|
+
setSelectedCols: import("react").Dispatch<import("react").SetStateAction<Set<any>>>;
|
|
37
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default useStickyStyles;
|
|
2
|
+
declare function useStickyStyles(theme: any, leftCols: any, rightCols: any): {
|
|
3
|
+
getHeaderStickyStyle: (header: any, level: any, renderSection: string | undefined, backgroundOverride: any) => {
|
|
4
|
+
position: string;
|
|
5
|
+
left: string | undefined;
|
|
6
|
+
right: string | undefined;
|
|
7
|
+
zIndex: number;
|
|
8
|
+
background: any;
|
|
9
|
+
} | {
|
|
10
|
+
background: any;
|
|
11
|
+
};
|
|
12
|
+
getStickyStyle: (column: any, bg: any) => {
|
|
13
|
+
background: any;
|
|
14
|
+
} | {
|
|
15
|
+
boxShadow?: string | undefined;
|
|
16
|
+
borderRight?: string | undefined;
|
|
17
|
+
borderLeft?: string | undefined;
|
|
18
|
+
position: string;
|
|
19
|
+
left: string | undefined;
|
|
20
|
+
right: string | undefined;
|
|
21
|
+
zIndex: number;
|
|
22
|
+
background: any;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ap as s, aq as t, ar as o, as as n, at as r, au as i, av as l, aw as c, ax as p, ay as m, az as u, aA as v, aB as C } from "./chunks/react-CPZZxtSo.mjs";
|
|
2
|
+
export {
|
|
3
|
+
s as ClientPivotTransport,
|
|
4
|
+
t as ClientResponsePostProcessor,
|
|
5
|
+
o as ClientSqlPlanner,
|
|
6
|
+
n as DuckDbWasmExecutor,
|
|
7
|
+
r as HttpPivotTransport,
|
|
8
|
+
i as LatestViewportScheduler,
|
|
9
|
+
l as PivotWorkspace,
|
|
10
|
+
c as injectThemeCssVars,
|
|
11
|
+
p as normalizeClientEngineKind,
|
|
12
|
+
m as normalizeExecutionMode,
|
|
13
|
+
u as resolveClientEngineKind,
|
|
14
|
+
v as resolveExecutionMode,
|
|
15
|
+
C as themes
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Pure header-formatting policy; deliberately independent of React state. */
|
|
2
|
+
export function normalizeHeaderStyle(rawStyle: any): {
|
|
3
|
+
background: any;
|
|
4
|
+
color: any;
|
|
5
|
+
} | {
|
|
6
|
+
background?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
background: string;
|
|
9
|
+
};
|
|
10
|
+
export function hasHeaderStyleKeys(value: any): boolean;
|
|
11
|
+
export function addHeaderCandidate(candidates: any, rawValue: any): void;
|
|
12
|
+
export function headerRuleTargetMatches(rule: any, candidateKeys: any): boolean;
|
|
13
|
+
export function headerRuleKindMatches(rule: any, level: any, headerKind: any): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function SafeCellContent({ render }: {
|
|
2
|
+
render: any;
|
|
3
|
+
}): any;
|
|
4
|
+
/** Renderer safety boundary, independent from cell selection/runtime state. */
|
|
5
|
+
export class CellErrorBoundary extends React.Component<any, any, any> {
|
|
6
|
+
static getDerivedStateFromError(): {
|
|
7
|
+
hasError: boolean;
|
|
8
|
+
};
|
|
9
|
+
constructor(props: any);
|
|
10
|
+
state: {
|
|
11
|
+
hasError: boolean;
|
|
12
|
+
};
|
|
13
|
+
componentDidUpdate(prevProps: any): void;
|
|
14
|
+
render(): any;
|
|
15
|
+
}
|
|
16
|
+
import React from 'react';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Public entry point for a standalone React host. */
|
|
2
|
+
export { PivotWorkspace } from './components/PivotWorkspace';
|
|
3
|
+
export { HttpPivotTransport, LatestViewportScheduler, type PayloadReference, type PivotTransport, } from './runtime/httpTransport';
|
|
4
|
+
export { themes, injectThemeCssVars } from './utils/styles';
|
|
5
|
+
export { ClientPivotTransport, DuckDbWasmExecutor, ClientSqlPlanner, ClientResponsePostProcessor, resolveExecutionMode, resolveClientEngineKind, normalizeExecutionMode, normalizeClientEngineKind, type ExecutionMode, type ClientEngineKind, type ClientRuntimeConfig, type ClientEngineTelemetry, type LogicalPivotPlan, } from './runtime/client/index';
|
|
6
|
+
export type { PivotWorkspaceProps } from './components/PivotWorkspace';
|
|
7
|
+
export type { PivotRuntimeProps, PivotThemeName, PivotValueConfig, ValConfig, FilterCondition, FilterConfig, SortConfig, ChartDefinition, } from './runtime/runtimeDomains';
|
|
8
|
+
export type { RuntimeRequestV1, RuntimeResponseV1, RuntimeRequestSchemaV1, RuntimeResponseSchemaV1, } from './runtime/runtimeContract';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PivotRuntimeProps } from './runtimeDomains';
|
|
3
|
+
import type { RuntimePayloadTransport } from './httpTransport';
|
|
4
|
+
/** Typed runtime composition boundary for the public Dash component. */
|
|
5
|
+
export declare function PivotRuntimeRoot({ payloadTransport, ...props }: PivotRuntimeProps & {
|
|
6
|
+
readonly payloadTransport?: RuntimePayloadTransport;
|
|
7
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** @typedef {{rowIndex:number, colIndex:number, rowId?:string, colId?:string, virtualIndex?:number, scopeKey?:string}} CellSelectionAnchor */
|
|
2
|
+
/** @typedef {{id:string, original?:{__virtualIndex?:number}, getValue:(columnId:string)=>unknown}} SelectionRow */
|
|
3
|
+
/** @typedef {{id:string}} SelectionColumn */
|
|
4
|
+
/**
|
|
5
|
+
* Positions are rendering hints only. IDs survive a server cache-window change;
|
|
6
|
+
* virtualIndex orders an absent endpoint without allocating missing rows.
|
|
7
|
+
* @param {SelectionRow[]} rows
|
|
8
|
+
* @param {SelectionColumn[]} columns
|
|
9
|
+
* @param {number} rowIndex
|
|
10
|
+
* @param {number} colIndex
|
|
11
|
+
* @param {string} scopeKey
|
|
12
|
+
* @returns {CellSelectionAnchor}
|
|
13
|
+
*/
|
|
14
|
+
export function captureCellAnchor(rows: SelectionRow[], columns: SelectionColumn[], rowIndex: number, colIndex: number, scopeKey: string): CellSelectionAnchor;
|
|
15
|
+
/** @param {CellSelectionAnchor} anchor @param {SelectionRow[]} rows */
|
|
16
|
+
export function resolveAnchorRow(anchor: CellSelectionAnchor, rows: SelectionRow[]): number;
|
|
17
|
+
/** @param {CellSelectionAnchor} anchor @param {SelectionColumn[]} columns */
|
|
18
|
+
export function resolveAnchorColumn(anchor: CellSelectionAnchor, columns: SelectionColumn[]): number;
|
|
19
|
+
/**
|
|
20
|
+
* Semantic scope only: callers must not pass viewport windows or response versions.
|
|
21
|
+
* @param {boolean} serverSide
|
|
22
|
+
* @param {string|null} dataset
|
|
23
|
+
* @param {string} rowStructureKey
|
|
24
|
+
* @param {unknown} expanded
|
|
25
|
+
* @param {unknown[]} viewDefinition
|
|
26
|
+
*/
|
|
27
|
+
export function cellSelectionScopeKey(serverSide: boolean, dataset: string | null, rowStructureKey: string, expanded: unknown, viewDefinition: unknown[]): string;
|
|
28
|
+
export type CellSelectionAnchor = {
|
|
29
|
+
rowIndex: number;
|
|
30
|
+
colIndex: number;
|
|
31
|
+
rowId?: string;
|
|
32
|
+
colId?: string;
|
|
33
|
+
virtualIndex?: number;
|
|
34
|
+
scopeKey?: string;
|
|
35
|
+
};
|
|
36
|
+
export type SelectionRow = {
|
|
37
|
+
id: string;
|
|
38
|
+
original?: {
|
|
39
|
+
__virtualIndex?: number;
|
|
40
|
+
};
|
|
41
|
+
getValue: (columnId: string) => unknown;
|
|
42
|
+
};
|
|
43
|
+
export type SelectionColumn = {
|
|
44
|
+
id: string;
|
|
45
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PayloadReference, RuntimeTransportRequestOptions } from '../httpTransport';
|
|
2
|
+
import type { JsonObject, RuntimeRequestV1, RuntimeResponseV1 } from '../runtimeContract';
|
|
3
|
+
import type { ClientEngineTelemetry, ClientPivotTransportInterface, ClientRuntimeConfig, DrillThroughQuery, DrillThroughResult } from './types';
|
|
4
|
+
export interface ClientPivotTransportOptions extends ClientRuntimeConfig {
|
|
5
|
+
data?: Array<{
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}>;
|
|
8
|
+
tableName?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class ClientPivotTransport implements ClientPivotTransportInterface {
|
|
11
|
+
private executor;
|
|
12
|
+
private config;
|
|
13
|
+
private payloadStore;
|
|
14
|
+
private exportStore;
|
|
15
|
+
constructor(options?: ClientPivotTransportOptions);
|
|
16
|
+
setData(rows: Array<{
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}>): void;
|
|
19
|
+
getData(): Array<{
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}>;
|
|
22
|
+
updateConfig(config: Partial<ClientRuntimeConfig>): void;
|
|
23
|
+
getTelemetry(): ClientEngineTelemetry;
|
|
24
|
+
request(request: RuntimeRequestV1, options?: RuntimeTransportRequestOptions): Promise<RuntimeResponseV1>;
|
|
25
|
+
queryDrillThrough(query: DrillThroughQuery): Promise<DrillThroughResult>;
|
|
26
|
+
fetchPayload(reference: PayloadReference, _options?: RuntimeTransportRequestOptions): Promise<JsonObject>;
|
|
27
|
+
fetchExportPayload(reference: PayloadReference, _options?: RuntimeTransportRequestOptions): Promise<Blob>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type RuntimeResponseV1 } from '../runtimeContract';
|
|
2
|
+
import type { ClientExecutedDataset, DrillThroughQuery, DrillThroughResult, LogicalPivotPlan } from './types';
|
|
3
|
+
export declare function evaluateSafeFormula(expression: string, context: {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}): {
|
|
6
|
+
value: number | null;
|
|
7
|
+
error: string | null;
|
|
8
|
+
};
|
|
9
|
+
export declare class ClientResponsePostProcessor {
|
|
10
|
+
static buildResponse(plan: LogicalPivotPlan, executed: ClientExecutedDataset): RuntimeResponseV1;
|
|
11
|
+
static buildDataResponse(plan: LogicalPivotPlan, executed: ClientExecutedDataset): RuntimeResponseV1;
|
|
12
|
+
static buildFilterOptionsResponse(plan: LogicalPivotPlan, executed: ClientExecutedDataset): RuntimeResponseV1;
|
|
13
|
+
static buildChartResponse(plan: LogicalPivotPlan, executed: ClientExecutedDataset): RuntimeResponseV1;
|
|
14
|
+
static executeDrillThroughQuery(allRows: Array<{
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}>, plan: LogicalPivotPlan, query: DrillThroughQuery): DrillThroughResult;
|
|
17
|
+
static buildDetailResponse(plan: LogicalPivotPlan, executed: ClientExecutedDataset): RuntimeResponseV1;
|
|
18
|
+
static buildDrillResponse(plan: LogicalPivotPlan, executed: ClientExecutedDataset): RuntimeResponseV1;
|
|
19
|
+
static buildExportResponse(plan: LogicalPivotPlan, executed: ClientExecutedDataset): RuntimeResponseV1;
|
|
20
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ClientEngineTelemetry, ClientExecutedDataset, ClientRuntimeConfig, LogicalPivotPlan, NormalizedCustomDimension, NormalizedFieldFilter } from './types';
|
|
2
|
+
export declare function applyCustomDimensionsToDataset(rows: Array<{
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
}>, customDimensions: NormalizedCustomDimension[]): Array<{
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function filterDatasetRows(rows: Array<{
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}>, filters: NormalizedFieldFilter[], excludeField?: string): Array<{
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}>;
|
|
12
|
+
export declare class DuckDbWasmExecutor {
|
|
13
|
+
private rows;
|
|
14
|
+
private config;
|
|
15
|
+
private wasmReady;
|
|
16
|
+
private wasmInitializing;
|
|
17
|
+
private wasmRetryAfter;
|
|
18
|
+
private dbInstance;
|
|
19
|
+
private dbConn;
|
|
20
|
+
private registeredTableSignature;
|
|
21
|
+
private telemetry;
|
|
22
|
+
constructor(initialRows?: Array<{
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}>, config?: ClientRuntimeConfig);
|
|
25
|
+
setData(rows: Array<{
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
}>): void;
|
|
28
|
+
getData(): Array<{
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}>;
|
|
31
|
+
updateConfig(config: Partial<ClientRuntimeConfig>): void;
|
|
32
|
+
getTelemetry(): ClientEngineTelemetry;
|
|
33
|
+
private tryInitializeWasm;
|
|
34
|
+
private ensureTableRegistered;
|
|
35
|
+
execute(plan: LogicalPivotPlan): Promise<ClientExecutedDataset>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ClientEngineKind, ClientRuntimeConfig, ExecutionMode } from './types';
|
|
2
|
+
export interface ModeResolutionInput {
|
|
3
|
+
serverSide?: boolean;
|
|
4
|
+
data?: unknown;
|
|
5
|
+
table?: string;
|
|
6
|
+
runtimeResponse?: unknown;
|
|
7
|
+
performanceConfig?: ClientRuntimeConfig | null;
|
|
8
|
+
}
|
|
9
|
+
export interface ModeResolutionOptions {
|
|
10
|
+
performanceConfig?: ClientRuntimeConfig | null;
|
|
11
|
+
hasExternalServerTransport?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function normalizeExecutionMode(value: unknown): ExecutionMode;
|
|
14
|
+
export declare function normalizeClientEngineKind(value: unknown): ClientEngineKind;
|
|
15
|
+
export declare function resolveExecutionMode(props?: ModeResolutionInput, options?: ModeResolutionOptions): 'client' | 'server';
|
|
16
|
+
export declare function resolveClientEngineKind(config: ClientRuntimeConfig | null | undefined, rowCount: number, wasmReady?: boolean): 'duckdb-wasm' | 'memory';
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type { PivotTransport } from '../httpTransport';
|
|
2
|
+
import type { RuntimeRequestV1 } from '../runtimeContract';
|
|
3
|
+
export type ExecutionMode = 'auto' | 'client' | 'server';
|
|
4
|
+
export type ClientEngineKind = 'auto' | 'duckdb-wasm' | 'memory';
|
|
5
|
+
export type PivotViewMode = 'pivot' | 'tree' | 'report' | 'table';
|
|
6
|
+
export type PivotLayoutMode = 'hierarchy' | 'outline' | 'tabular';
|
|
7
|
+
export interface ClientRuntimeConfig {
|
|
8
|
+
executionMode?: ExecutionMode;
|
|
9
|
+
clientEngine?: ClientEngineKind;
|
|
10
|
+
duckdbWasmThreshold?: number;
|
|
11
|
+
clientRowThreshold?: number;
|
|
12
|
+
dataUrl?: string;
|
|
13
|
+
duckdbWasmCdnUrl?: string;
|
|
14
|
+
duckdbWasmInstance?: unknown;
|
|
15
|
+
legacyClientTable?: boolean;
|
|
16
|
+
tableName?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ClientEngineTelemetry {
|
|
19
|
+
activeMode: 'client' | 'server';
|
|
20
|
+
activeEngine: 'duckdb-wasm' | 'memory' | 'server';
|
|
21
|
+
wasmReady: boolean;
|
|
22
|
+
lastQuerySql: string;
|
|
23
|
+
lastExecutionMs: number;
|
|
24
|
+
rowCount: number;
|
|
25
|
+
networkRoundtrips: number;
|
|
26
|
+
lastUpdatedAt: number;
|
|
27
|
+
}
|
|
28
|
+
export interface NormalizedValConfig {
|
|
29
|
+
field: string;
|
|
30
|
+
agg: string;
|
|
31
|
+
id: string;
|
|
32
|
+
label: string;
|
|
33
|
+
weightField?: string;
|
|
34
|
+
windowFn?: string;
|
|
35
|
+
formula?: string;
|
|
36
|
+
formulaScope?: 'measures' | 'columns';
|
|
37
|
+
percentile?: number;
|
|
38
|
+
separator?: string;
|
|
39
|
+
format?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface NormalizedCustomDimension {
|
|
42
|
+
id: string;
|
|
43
|
+
field: string;
|
|
44
|
+
name: string;
|
|
45
|
+
defaultBucket: string;
|
|
46
|
+
rules: Array<{
|
|
47
|
+
label: string;
|
|
48
|
+
op: string;
|
|
49
|
+
value: unknown;
|
|
50
|
+
value2?: unknown;
|
|
51
|
+
}>;
|
|
52
|
+
}
|
|
53
|
+
export interface NormalizedFilterClause {
|
|
54
|
+
type: string;
|
|
55
|
+
value?: unknown;
|
|
56
|
+
values?: unknown[];
|
|
57
|
+
caseSensitive?: boolean;
|
|
58
|
+
}
|
|
59
|
+
export interface NormalizedFieldFilter {
|
|
60
|
+
field: string;
|
|
61
|
+
operator: 'AND' | 'OR';
|
|
62
|
+
clauses: NormalizedFilterClause[];
|
|
63
|
+
}
|
|
64
|
+
export interface NormalizedSortRule {
|
|
65
|
+
id: string;
|
|
66
|
+
desc: boolean;
|
|
67
|
+
sortType?: string;
|
|
68
|
+
sortKeyField?: string;
|
|
69
|
+
absoluteSort?: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface LogicalPivotPlan {
|
|
72
|
+
kind: 'data' | 'filter_options' | 'chart' | 'detail' | 'drill' | 'update' | 'export' | 'transaction';
|
|
73
|
+
table: string;
|
|
74
|
+
viewMode: PivotViewMode;
|
|
75
|
+
layoutMode: PivotLayoutMode;
|
|
76
|
+
showSubtotalFooters: boolean;
|
|
77
|
+
includeGrandTotal: boolean;
|
|
78
|
+
showRowTotals: boolean;
|
|
79
|
+
showColTotals: boolean;
|
|
80
|
+
grandTotalPosition: 'top' | 'bottom';
|
|
81
|
+
rowFields: string[];
|
|
82
|
+
colFields: string[];
|
|
83
|
+
valConfigs: NormalizedValConfig[];
|
|
84
|
+
customDimensions: NormalizedCustomDimension[];
|
|
85
|
+
filters: NormalizedFieldFilter[];
|
|
86
|
+
sorting: NormalizedSortRule[];
|
|
87
|
+
sortOptions: {
|
|
88
|
+
columnSortBy?: string;
|
|
89
|
+
columnSortOrder?: string;
|
|
90
|
+
nulls?: string;
|
|
91
|
+
naturalSort?: boolean;
|
|
92
|
+
fieldOptions?: {
|
|
93
|
+
[key: string]: {
|
|
94
|
+
sortType?: string;
|
|
95
|
+
sortKeyField?: string;
|
|
96
|
+
absoluteSort?: boolean;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
expandedAll: boolean;
|
|
101
|
+
expandedPaths: string[][];
|
|
102
|
+
collapsedPaths: string[][];
|
|
103
|
+
measureAxis: {
|
|
104
|
+
placement: 'columns' | 'rows';
|
|
105
|
+
position?: number;
|
|
106
|
+
measureColId?: string;
|
|
107
|
+
valueColId?: string;
|
|
108
|
+
label?: string;
|
|
109
|
+
valueLabel?: string;
|
|
110
|
+
};
|
|
111
|
+
treeConfig: {
|
|
112
|
+
[key: string]: unknown;
|
|
113
|
+
} | null;
|
|
114
|
+
reportDef: {
|
|
115
|
+
[key: string]: unknown;
|
|
116
|
+
} | null;
|
|
117
|
+
detailConfig: {
|
|
118
|
+
[key: string]: unknown;
|
|
119
|
+
} | null;
|
|
120
|
+
layoutManifest: Array<{
|
|
121
|
+
id?: string;
|
|
122
|
+
layoutId?: string;
|
|
123
|
+
}> | null;
|
|
124
|
+
start: number;
|
|
125
|
+
end: number;
|
|
126
|
+
colStart: number | null;
|
|
127
|
+
colEnd: number | null;
|
|
128
|
+
needsColSchema: boolean;
|
|
129
|
+
version: number;
|
|
130
|
+
windowSeq: number;
|
|
131
|
+
stateEpoch: number;
|
|
132
|
+
abortGeneration: number;
|
|
133
|
+
sessionId: string;
|
|
134
|
+
clientInstance: string;
|
|
135
|
+
intent: string;
|
|
136
|
+
rawRequest: RuntimeRequestV1;
|
|
137
|
+
sql: {
|
|
138
|
+
baseFilteredSql: string;
|
|
139
|
+
groupingSql: string;
|
|
140
|
+
colValuesSql: string;
|
|
141
|
+
grandTotalSql: string;
|
|
142
|
+
filterOptionsSql: string;
|
|
143
|
+
drillSql: string;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
export interface AggregatedCellMetrics {
|
|
147
|
+
sum: number;
|
|
148
|
+
count: number;
|
|
149
|
+
numericCount: number;
|
|
150
|
+
min: number | null;
|
|
151
|
+
max: number | null;
|
|
152
|
+
weightedNumer: number;
|
|
153
|
+
weightedDenom: number;
|
|
154
|
+
values: unknown[];
|
|
155
|
+
firstValue: unknown;
|
|
156
|
+
lastValue: unknown;
|
|
157
|
+
}
|
|
158
|
+
export interface ClientExecutedDataset {
|
|
159
|
+
filteredRows: Array<{
|
|
160
|
+
[key: string]: unknown;
|
|
161
|
+
}>;
|
|
162
|
+
allRows: Array<{
|
|
163
|
+
[key: string]: unknown;
|
|
164
|
+
}>;
|
|
165
|
+
colCombinations: string[];
|
|
166
|
+
engineUsed: 'duckdb-wasm' | 'memory';
|
|
167
|
+
executionMs: number;
|
|
168
|
+
lastSql: string;
|
|
169
|
+
}
|
|
170
|
+
export interface DrillThroughQuery {
|
|
171
|
+
table?: string;
|
|
172
|
+
rowPath: string;
|
|
173
|
+
rowFields: string[];
|
|
174
|
+
colField?: string;
|
|
175
|
+
colVal?: string;
|
|
176
|
+
filters?: {
|
|
177
|
+
[key: string]: unknown;
|
|
178
|
+
};
|
|
179
|
+
customDimensions?: unknown[];
|
|
180
|
+
page?: number;
|
|
181
|
+
pageSize?: number;
|
|
182
|
+
sortCol?: string;
|
|
183
|
+
sortDir?: 'asc' | 'desc';
|
|
184
|
+
filterText?: string;
|
|
185
|
+
}
|
|
186
|
+
export interface DrillThroughResult {
|
|
187
|
+
rows: Array<{
|
|
188
|
+
[key: string]: unknown;
|
|
189
|
+
}>;
|
|
190
|
+
totalRows: number;
|
|
191
|
+
page: number;
|
|
192
|
+
pageSize: number;
|
|
193
|
+
columns: string[];
|
|
194
|
+
}
|
|
195
|
+
export interface ClientPivotTransportInterface extends PivotTransport {
|
|
196
|
+
setData: (rows: Array<{
|
|
197
|
+
[key: string]: unknown;
|
|
198
|
+
}>) => void;
|
|
199
|
+
updateConfig: (config: Partial<ClientRuntimeConfig>) => void;
|
|
200
|
+
getTelemetry: () => ClientEngineTelemetry;
|
|
201
|
+
queryDrillThrough: (query: DrillThroughQuery) => Promise<DrillThroughResult>;
|
|
202
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Creates pure cell validation and conditional-format presentation helpers. */
|
|
2
|
+
export function createRuntimeCellPresentation({ conditionalFormatting }: {
|
|
3
|
+
conditionalFormatting: any;
|
|
4
|
+
}): {
|
|
5
|
+
getRuleBasedStyle: (colId: any, value: any) => {};
|
|
6
|
+
validateCell: (value: any, rule: any) => boolean;
|
|
7
|
+
};
|