@datarecce/ui 0.1.8 → 0.1.10

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.
@@ -0,0 +1,388 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React$1 from 'react';
3
+ import React__default, { ReactNode, ComponentType } from 'react';
4
+ import { a as LineageGraphNode, b as LineageGraphEdge, c as LineageGraphColumnNode, d as LineageGraph } from './LineageViewContext-BPpYWJ2B.mjs';
5
+ export { L as LineageViewContext, u as useLineageViewContext } from './LineageViewContext-BPpYWJ2B.mjs';
6
+ import { Y as LineageDiffViewOptions, $ as RowCountDiff, _ as RowCount, M as ManifestMetadata, a$ as RunResultViewProps, c as QueryViewOptions, aL as Run, b0 as DataGridHandle, g as QueryDiffViewOptions, a6 as ProfileDiffViewOptions, ac as HistogramResult, a9 as TopKResult, a_ as RunFormProps, ab as HistogramDiffParams, a8 as TopKDiffParams, b1 as ViewOptionTypes, y as NodeData, aE as RowObjectType, C as Check, b2 as RegistryEntry, b3 as RefTypes, b4 as RunType, b5 as RunFormParamTypes } from './lineagecheck-BIlm5vq1.mjs';
7
+ export { P as ProfileDiffForm, R as RunToolbar, S as ScreenshotDataGrid, V as ValueDiffForm } from './lineagecheck-BIlm5vq1.mjs';
8
+ import { NodeProps, EdgeProps } from '@xyflow/react';
9
+ import { BoxProps } from '@mui/material/Box';
10
+ import { AnimationOptions } from 'chart.js';
11
+ import { SplitProps } from 'react-split';
12
+ import '@tanstack/react-query';
13
+ import 'axios';
14
+ import 'react-icons';
15
+ import 'ag-grid-community';
16
+ import 'ag-grid-react';
17
+
18
+ interface MuiProviderProps {
19
+ children: ReactNode;
20
+ /**
21
+ * Force a specific theme mode. If not provided, follows system/user preference.
22
+ */
23
+ forcedTheme?: "light" | "dark";
24
+ /**
25
+ * Whether to include MUI's CssBaseline for consistent baseline styles.
26
+ * Disabled by default to avoid conflicts with Chakra/Tailwind during migration.
27
+ */
28
+ enableCssBaseline?: boolean;
29
+ }
30
+ /**
31
+ * MUI Theme Provider for Recce
32
+ *
33
+ * This provider integrates MUI theming with the existing next-themes
34
+ * color mode system used by Chakra UI. During the migration period,
35
+ * both Chakra and MUI components will share the same theme mode.
36
+ *
37
+ * Usage:
38
+ * ```tsx
39
+ * <MuiProvider>
40
+ * <MuiButton>Click me</MuiButton>
41
+ * </MuiProvider>
42
+ * ```
43
+ */
44
+ declare function MuiProvider({ children, forcedTheme, enableCssBaseline, }: MuiProviderProps): react_jsx_runtime.JSX.Element;
45
+
46
+ /**
47
+ * Toast types and interfaces
48
+ */
49
+ interface ToastOptions {
50
+ id?: string;
51
+ title?: string;
52
+ description?: ReactNode;
53
+ type?: "success" | "error" | "warning" | "info" | "loading";
54
+ duration?: number;
55
+ closable?: boolean;
56
+ action?: {
57
+ label: string;
58
+ onClick: () => void;
59
+ };
60
+ }
61
+ interface ToasterContextValue {
62
+ toast: (options: ToastOptions) => string;
63
+ success: (options: Omit<ToastOptions, "type">) => string;
64
+ error: (options: Omit<ToastOptions, "type">) => string;
65
+ warning: (options: Omit<ToastOptions, "type">) => string;
66
+ info: (options: Omit<ToastOptions, "type">) => string;
67
+ loading: (options: Omit<ToastOptions, "type">) => string;
68
+ dismiss: (id: string) => void;
69
+ update: (id: string, options: Partial<ToastOptions>) => void;
70
+ }
71
+ /**
72
+ * Simple toaster implementation using MUI Snackbar
73
+ */
74
+ declare function ToasterProvider({ children }: {
75
+ children: ReactNode;
76
+ }): react_jsx_runtime.JSX.Element;
77
+ /**
78
+ * Hook to use the toaster
79
+ */
80
+ declare function useToaster(): ToasterContextValue;
81
+ /**
82
+ * Toaster component that renders toasts from the standalone toaster
83
+ */
84
+ declare function Toaster(): react_jsx_runtime.JSX.Element;
85
+
86
+ declare function LineagePage(): react_jsx_runtime.JSX.Element;
87
+
88
+ interface LineageViewProps {
89
+ viewOptions?: LineageDiffViewOptions;
90
+ interactive?: boolean;
91
+ weight?: number;
92
+ height?: number;
93
+ filterNodes?: (key: string, node: LineageGraphNode) => boolean;
94
+ }
95
+ interface LineageViewRef {
96
+ copyToClipboard: () => void;
97
+ }
98
+ declare const LineageView: React__default.ForwardRefExoticComponent<LineageViewProps & React__default.RefAttributes<LineageViewRef>>;
99
+
100
+ declare const LineageViewTopBar: () => react_jsx_runtime.JSX.Element;
101
+
102
+ type GraphNodeProps = NodeProps<LineageGraphNode>;
103
+ declare function GraphNode(nodeProps: GraphNodeProps): react_jsx_runtime.JSX.Element;
104
+
105
+ type GraphEdgeProps = EdgeProps<LineageGraphEdge>;
106
+ declare function GraphEdge(props: GraphEdgeProps): react_jsx_runtime.JSX.Element;
107
+
108
+ type GrapeColumnNodeProps = NodeProps<LineageGraphColumnNode>;
109
+ declare function GraphColumnNode(nodeProps: GrapeColumnNodeProps): react_jsx_runtime.JSX.Element;
110
+
111
+ interface NodeViewProps {
112
+ node: LineageGraphNode;
113
+ onCloseNode: () => void;
114
+ }
115
+ declare function NodeView({ node, onCloseNode }: NodeViewProps): react_jsx_runtime.JSX.Element;
116
+
117
+ interface NodeSqlViewProps {
118
+ node: LineageGraphNode;
119
+ }
120
+ declare const NodeSqlView: ({ node }: NodeSqlViewProps) => react_jsx_runtime.JSX.Element | "Not available";
121
+
122
+ declare function ResourceTypeTag({ node }: {
123
+ node: LineageGraphNode;
124
+ }): react_jsx_runtime.JSX.Element;
125
+ interface ModelRowCountProps {
126
+ rowCount?: RowCountDiff;
127
+ }
128
+ declare function ModelRowCount({ rowCount }: ModelRowCountProps): react_jsx_runtime.JSX.Element;
129
+ interface RowCountDiffTagProps {
130
+ node: LineageGraphNode;
131
+ rowCount?: RowCountDiff;
132
+ onRefresh?: () => void;
133
+ isFetching?: boolean;
134
+ error?: Error | null;
135
+ }
136
+ declare function RowCountDiffTag({ rowCount: fetchedRowCount, node, onRefresh, isFetching, }: RowCountDiffTagProps): react_jsx_runtime.JSX.Element;
137
+ interface RowCountTagProps {
138
+ node: LineageGraphNode;
139
+ rowCount?: RowCount;
140
+ onRefresh?: () => void;
141
+ isFetching?: boolean;
142
+ error?: Error | null;
143
+ }
144
+
145
+ interface QueryFormProps extends BoxProps {
146
+ defaultPrimaryKeys: string[] | undefined;
147
+ onPrimaryKeysChange: (primaryKeys: string[]) => void;
148
+ }
149
+ declare const QueryForm: ({ defaultPrimaryKeys, onPrimaryKeysChange, ...props }: QueryFormProps) => react_jsx_runtime.JSX.Element;
150
+
151
+ declare const QueryPage: () => react_jsx_runtime.JSX.Element;
152
+
153
+ interface SqlEditorProps {
154
+ language?: string;
155
+ theme?: string;
156
+ value: string;
157
+ baseValue?: string;
158
+ onChange?: (value: string) => void;
159
+ onChangeBase?: (value: string) => void;
160
+ onRun?: () => void;
161
+ onRunBase?: () => void;
162
+ onRunDiff?: () => void;
163
+ options?: {
164
+ readOnly?: boolean;
165
+ fontSize?: number;
166
+ lineNumbers?: "on" | "off";
167
+ wordWrap?: "on" | "off";
168
+ };
169
+ manifestData?: ManifestMetadata;
170
+ schemas?: string;
171
+ label?: string;
172
+ CustomEditor?: React__default.ReactNode;
173
+ }
174
+ declare function SqlEditor({ value, onChange, onRun, onRunBase, onRunDiff, label, CustomEditor, options, manifestData, schemas, ...props }: SqlEditorProps): react_jsx_runtime.JSX.Element;
175
+
176
+ interface DiffTextProps {
177
+ value: string;
178
+ colorPalette: "red" | "green";
179
+ grayOut?: boolean;
180
+ noCopy?: boolean;
181
+ fontSize?: string;
182
+ }
183
+ declare const DiffText: ({ value, colorPalette, grayOut, noCopy, fontSize, }: DiffTextProps) => react_jsx_runtime.JSX.Element;
184
+
185
+ interface QueryResultViewProp extends RunResultViewProps<QueryViewOptions> {
186
+ onAddToChecklist?: (run: Run) => void;
187
+ }
188
+ declare const QueryResultView: React__default.ForwardRefExoticComponent<QueryResultViewProp & React__default.RefAttributes<DataGridHandle>>;
189
+
190
+ interface QueryDiffResultViewProps extends RunResultViewProps<QueryDiffViewOptions> {
191
+ onAddToChecklist?: (run: Run) => void;
192
+ baseTitle?: string;
193
+ currentTitle?: string;
194
+ }
195
+ declare const QueryDiffResultView: React$1.ForwardRefExoticComponent<QueryDiffResultViewProps & React$1.RefAttributes<DataGridHandle>>;
196
+
197
+ type ProfileDiffResultViewProp = RunResultViewProps<ProfileDiffViewOptions>;
198
+ declare const ProfileDiffResultView: React$1.ForwardRefExoticComponent<ProfileDiffResultViewProp & React$1.RefAttributes<DataGridHandle>>;
199
+
200
+ /**
201
+ * Histogram Chart that can display generic data types such as Numeric, Datetime, Integer
202
+ * X: The Min/Max of the labels range is the scaled width of charting area
203
+ * Y: The Min/Max of the counts range is the scaled height of charting area
204
+ * Counts: Abbreviated based on K, Mn, Bn, Tr (see formatters)
205
+ */
206
+ interface HistogramChartProps {
207
+ data: {
208
+ title: string;
209
+ type: string;
210
+ samples?: number;
211
+ min?: string | number;
212
+ max?: string | number;
213
+ binEdges: number[];
214
+ datasets: HistogramResult[];
215
+ };
216
+ animation?: AnimationOptions<"bar">["animation"];
217
+ hideAxis?: boolean;
218
+ }
219
+ declare function HistogramChart({ data, hideAxis, animation, }: HistogramChartProps): react_jsx_runtime.JSX.Element;
220
+
221
+ interface Props$2 {
222
+ topk: TopKResult;
223
+ valids: number;
224
+ isDisplayTopTen: boolean;
225
+ }
226
+ /**
227
+ * A list of each topk summary item (categorical)
228
+ * Last list item will show 'others' when there are leftover values, which is the count difference of valids and displayed topk items
229
+ */
230
+ declare function TopKSummaryList({ topk, valids, isDisplayTopTen }: Props$2): react_jsx_runtime.JSX.Element;
231
+
232
+ declare function SquareIcon({ color }: {
233
+ color: string;
234
+ }): react_jsx_runtime.JSX.Element;
235
+
236
+ type HistogramDiffEditProps = RunFormProps<HistogramDiffParams>;
237
+ declare function HistogramDiffForm({ params, onParamsChanged, setIsReadyToExecute, }: HistogramDiffEditProps): react_jsx_runtime.JSX.Element;
238
+
239
+ type HistogramDiffResultViewProp = RunResultViewProps;
240
+ declare const HistogramDiffResultView: React$1.ForwardRefExoticComponent<HistogramDiffResultViewProp & React$1.RefAttributes<HTMLDivElement>>;
241
+
242
+ type TopKDiffFormProps = RunFormProps<TopKDiffParams>;
243
+ declare function TopKDiffForm({ params, onParamsChanged, setIsReadyToExecute, }: TopKDiffFormProps): react_jsx_runtime.JSX.Element;
244
+
245
+ type TopKDiffResultViewProp = RunResultViewProps;
246
+ declare const TopKDiffResultView: React$1.ForwardRefExoticComponent<TopKDiffResultViewProp & React$1.RefAttributes<HTMLDivElement>>;
247
+
248
+ declare const RowCountDiffResultView: React$1.ForwardRefExoticComponent<RunResultViewProps<ViewOptionTypes> & React$1.RefAttributes<DataGridHandle>>;
249
+
250
+ interface SchemaViewProps {
251
+ base?: NodeData;
252
+ current?: NodeData;
253
+ enableScreenshot?: boolean;
254
+ showMenu?: boolean;
255
+ }
256
+ declare const SchemaView: React$1.ForwardRefExoticComponent<SchemaViewProps & React$1.RefAttributes<DataGridHandle>>;
257
+
258
+ /**
259
+ * @file toSchemaDataGrid.ts
260
+ * @description Grid generator for schema diff and single-environment schema views
261
+ *
262
+ * This file is intentionally .ts (not .tsx) - all JSX rendering is delegated
263
+ * to schemaCells.tsx via render functions.
264
+ */
265
+
266
+ interface SchemaDiffRow extends RowObjectType {
267
+ name: string;
268
+ reordered?: boolean;
269
+ currentIndex?: number;
270
+ baseIndex?: number;
271
+ currentType?: string;
272
+ baseType?: string;
273
+ }
274
+
275
+ declare function ColumnNameCell({ model, row, singleEnv, cllRunning, showMenu, }: {
276
+ model: NodeData;
277
+ row: SchemaDiffRow;
278
+ singleEnv?: boolean;
279
+ cllRunning?: boolean;
280
+ showMenu?: boolean;
281
+ }): react_jsx_runtime.JSX.Element;
282
+
283
+ declare const CheckList: ({ checks, selectedItem, onCheckSelected, onChecksReordered, }: {
284
+ checks: Check[];
285
+ selectedItem: string | null;
286
+ onCheckSelected: (checkId: string) => void;
287
+ onChecksReordered: (source: number, destination: number) => void;
288
+ }) => react_jsx_runtime.JSX.Element;
289
+
290
+ interface CheckDetailProps {
291
+ checkId: string;
292
+ refreshCheckList?: () => void;
293
+ }
294
+ declare function CheckDetail({ checkId, refreshCheckList, }: CheckDetailProps): ReactNode;
295
+
296
+ interface CheckBreadcrumbProps {
297
+ name: string;
298
+ setName: (name: string) => void;
299
+ }
300
+ declare function CheckBreadcrumb({ name, setName }: CheckBreadcrumbProps): react_jsx_runtime.JSX.Element;
301
+
302
+ interface CheckDescriptionProps {
303
+ value?: string;
304
+ onChange?: (value?: string) => void;
305
+ }
306
+ declare function CheckDescription({ value, onChange }: CheckDescriptionProps): react_jsx_runtime.JSX.Element;
307
+
308
+ interface LineageDiffViewProps {
309
+ check: Check;
310
+ }
311
+ declare const LineageDiffView: React$1.ForwardRefExoticComponent<LineageDiffViewProps & React$1.RefAttributes<LineageViewRef>>;
312
+
313
+ interface SchemaDiffViewProps {
314
+ check: Check;
315
+ }
316
+ declare const SchemaDiffView: React__default.ForwardRefExoticComponent<SchemaDiffViewProps & React__default.RefAttributes<DataGridHandle>>;
317
+
318
+ interface RunPageProps {
319
+ runId: string;
320
+ }
321
+ declare const RunPage: ({ runId }: RunPageProps) => react_jsx_runtime.JSX.Element;
322
+
323
+ declare const RunList: () => react_jsx_runtime.JSX.Element;
324
+
325
+ interface RunViewProps<VO = ViewOptionTypes> {
326
+ isRunning?: boolean;
327
+ run?: Run;
328
+ error?: Error | null;
329
+ progress?: Run["progress"];
330
+ isAborting?: boolean;
331
+ isCheckDetail?: boolean;
332
+ onCancel?: () => void;
333
+ onExecuteRun?: () => void;
334
+ viewOptions?: VO;
335
+ onViewOptionsChanged?: (viewOptions: VO) => void;
336
+ RunResultView?: RegistryEntry["RunResultView"] | undefined;
337
+ children?: (params: RunResultViewProps) => React__default.ReactNode;
338
+ }
339
+ declare const RunView: React__default.ForwardRefExoticComponent<RunViewProps<ViewOptionTypes> & React__default.RefAttributes<RefTypes>>;
340
+
341
+ interface RunModalProps {
342
+ isOpen: boolean;
343
+ onClose: () => void;
344
+ onExecute: (type: RunType, params: RunFormParamTypes) => void;
345
+ title: string;
346
+ type: RunType;
347
+ params?: RunFormParamTypes;
348
+ initialRun?: Run;
349
+ RunForm?: ComponentType<RunFormProps<RunFormParamTypes>>;
350
+ }
351
+ declare const RunModal: ({ isOpen, onClose, onExecute, type, title, params: defaultParams, RunForm, }: RunModalProps) => react_jsx_runtime.JSX.Element;
352
+
353
+ declare const RunStatusAndDate: ({ run }: {
354
+ run: Run;
355
+ }) => react_jsx_runtime.JSX.Element;
356
+
357
+ declare function SummaryView(): react_jsx_runtime.JSX.Element;
358
+
359
+ interface Props$1 {
360
+ lineageGraph: LineageGraph;
361
+ }
362
+ declare function ChangeSummary({ lineageGraph }: Props$1): react_jsx_runtime.JSX.Element;
363
+
364
+ interface Props {
365
+ lineageGraph: LineageGraph;
366
+ }
367
+ declare function SchemaSummary({ lineageGraph }: Props): react_jsx_runtime.JSX.Element;
368
+
369
+ declare function HistoryToggle(): ReactNode;
370
+
371
+ declare const HSplit: (props: SplitProps) => react_jsx_runtime.JSX.Element;
372
+ declare const VSplit: (props: SplitProps) => react_jsx_runtime.JSX.Element;
373
+
374
+ interface ScreenshotBoxProps extends BoxProps {
375
+ backgroundColor?: string;
376
+ blockSize?: string;
377
+ children?: React.ReactNode;
378
+ }
379
+ declare const ScreenshotBox: React$1.ForwardRefExoticComponent<Omit<ScreenshotBoxProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
380
+
381
+ declare const IconSync: (props: React__default.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
382
+ declare const IconExport: (props: React__default.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
383
+ declare const IconImport: (props: React__default.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
384
+ declare const IconSave: (props: React__default.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
385
+ declare const IconEdit: (props: React__default.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
386
+ declare const IconInfo: (props: React__default.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
387
+
388
+ export { ChangeSummary, CheckBreadcrumb, CheckDescription, CheckDetail, CheckList, ColumnNameCell, DiffText, GraphColumnNode, GraphEdge, GraphNode, HSplit, HistogramChart, HistogramDiffForm, HistogramDiffResultView, HistoryToggle, IconEdit, IconExport, IconImport, IconInfo, IconSave, IconSync, LineageDiffView, LineagePage, LineageView, LineageViewTopBar, ModelRowCount, MuiProvider, MuiProvider as MuiProviderDefault, NodeSqlView, NodeView, ProfileDiffResultView, QueryDiffResultView, QueryForm, QueryPage, QueryResultView, ResourceTypeTag, RowCountDiffResultView, RowCountDiffTag, type RowCountDiffTagProps, type RowCountTagProps, RunList, RunModal, RunPage, RunStatusAndDate, RunView, SchemaDiffView, SchemaSummary, SchemaView, ScreenshotBox, SqlEditor, SquareIcon, SummaryView, Toaster, ToasterProvider, TopKDiffForm, TopKDiffResultView, TopKSummaryList, VSplit, useToaster };