@datarecce/ui 0.1.12 → 0.1.13
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/{LineageViewContext-BPpYWJ2B.d.mts → LineageViewContext-DEa54ZNF.d.mts} +1 -1
- package/dist/{LineageViewContext-DqJPwm_c.d.ts → LineageViewContext-DPVC8ak8.d.ts} +1 -1
- package/dist/{agGridStyles-L5J6VVIU.css → agGridStyles-VYALGSJU.css} +4 -3
- package/dist/api.d.mts +6 -5
- package/dist/api.d.ts +6 -5
- package/dist/api.js +13 -12
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +13 -12
- package/dist/api.mjs.map +1 -1
- package/dist/components.d.mts +4 -4
- package/dist/components.d.ts +4 -4
- package/dist/components.js +1217 -879
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +962 -623
- package/dist/components.mjs.map +1 -1
- package/dist/hooks.d.mts +23 -3
- package/dist/hooks.d.ts +23 -3
- package/dist/hooks.js +742 -538
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +587 -383
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1311 -962
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +998 -648
- package/dist/index.mjs.map +1 -1
- package/dist/{lineagecheck-BIlm5vq1.d.ts → lineagecheck-BQaKAQzn.d.mts} +3 -3
- package/dist/{lineagecheck-BIlm5vq1.d.mts → lineagecheck-BQaKAQzn.d.ts} +3 -3
- package/dist/{style-LYNBK7ND.css → style-466WWZLM.css} +36 -8
- package/dist/styles-JV3V5MVO.css +42 -0
- package/dist/{styles-PJUYW64Y.css → styles-QUPOR3LM.css} +7 -2
- package/dist/types.d.mts +2 -2
- package/dist/types.d.ts +2 -2
- package/package.json +5 -5
- package/dist/styles-VXS6KNFS.css +0 -9
package/dist/components.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var CssBaseline = require('@mui/material/CssBaseline');
|
|
4
4
|
var styles = require('@mui/material/styles');
|
|
5
5
|
var nextThemes = require('next-themes');
|
|
6
|
-
var
|
|
6
|
+
var React4 = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var MuiAlert = require('@mui/material/Alert');
|
|
9
9
|
var CircularProgress4 = require('@mui/material/CircularProgress');
|
|
@@ -14,11 +14,12 @@ var Box35 = require('@mui/material/Box');
|
|
|
14
14
|
var Button11 = require('@mui/material/Button');
|
|
15
15
|
var react = require('@sentry/react');
|
|
16
16
|
var ReactSplit = require('react-split');
|
|
17
|
-
require('./styles-
|
|
17
|
+
require('./styles-QUPOR3LM.css');
|
|
18
18
|
var react$1 = require('@xyflow/react');
|
|
19
19
|
var Divider = require('@mui/material/Divider');
|
|
20
20
|
var dagre = require('@dagrejs/dagre');
|
|
21
21
|
require('@xyflow/react/dist/style.css');
|
|
22
|
+
require('./styles-JV3V5MVO.css');
|
|
22
23
|
var reactQuery = require('@tanstack/react-query');
|
|
23
24
|
var axios = require('axios');
|
|
24
25
|
var fi = require('react-icons/fi');
|
|
@@ -55,11 +56,11 @@ var vsc = require('react-icons/vsc');
|
|
|
55
56
|
var pi = require('react-icons/pi');
|
|
56
57
|
var MuiTooltip = require('@mui/material/Tooltip');
|
|
57
58
|
var usehooksTs = require('usehooks-ts');
|
|
58
|
-
require('./style-
|
|
59
|
+
require('./style-466WWZLM.css');
|
|
59
60
|
var ListSubheader3 = require('@mui/material/ListSubheader');
|
|
60
61
|
var agGridCommunity = require('ag-grid-community');
|
|
61
62
|
var agGridReact = require('ag-grid-react');
|
|
62
|
-
require('./agGridStyles-
|
|
63
|
+
require('./agGridStyles-VYALGSJU.css');
|
|
63
64
|
var ButtonGroup = require('@mui/material/ButtonGroup');
|
|
64
65
|
var dateFns = require('date-fns');
|
|
65
66
|
var saveAs = require('file-saver');
|
|
@@ -67,7 +68,6 @@ var htmlToImage = require('html-to-image');
|
|
|
67
68
|
var fa = require('react-icons/fa');
|
|
68
69
|
var fa6 = require('react-icons/fa6');
|
|
69
70
|
var Chip2 = require('@mui/material/Chip');
|
|
70
|
-
require('./styles-VXS6KNFS.css');
|
|
71
71
|
var Skeleton = require('@mui/material/Skeleton');
|
|
72
72
|
var ri = require('react-icons/ri');
|
|
73
73
|
var bi = require('react-icons/bi');
|
|
@@ -106,7 +106,6 @@ var Markdown = require('react-markdown');
|
|
|
106
106
|
var reactSyntaxHighlighter = require('react-syntax-highlighter');
|
|
107
107
|
var prism = require('react-syntax-highlighter/dist/esm/styles/prism');
|
|
108
108
|
var remarkGfm = require('remark-gfm');
|
|
109
|
-
var Breadcrumbs = require('@mui/material/Breadcrumbs');
|
|
110
109
|
var SimpleBar = require('simplebar-react');
|
|
111
110
|
require('simplebar/dist/simplebar.min.css');
|
|
112
111
|
var Card = require('@mui/material/Card');
|
|
@@ -117,7 +116,7 @@ var Badge = require('@mui/material/Badge');
|
|
|
117
116
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
118
117
|
|
|
119
118
|
var CssBaseline__default = /*#__PURE__*/_interopDefault(CssBaseline);
|
|
120
|
-
var
|
|
119
|
+
var React4__default = /*#__PURE__*/_interopDefault(React4);
|
|
121
120
|
var MuiAlert__default = /*#__PURE__*/_interopDefault(MuiAlert);
|
|
122
121
|
var CircularProgress4__default = /*#__PURE__*/_interopDefault(CircularProgress4);
|
|
123
122
|
var Snackbar__default = /*#__PURE__*/_interopDefault(Snackbar);
|
|
@@ -175,7 +174,6 @@ var Grid2__default = /*#__PURE__*/_interopDefault(Grid2);
|
|
|
175
174
|
var MuiAvatar__default = /*#__PURE__*/_interopDefault(MuiAvatar);
|
|
176
175
|
var Markdown__default = /*#__PURE__*/_interopDefault(Markdown);
|
|
177
176
|
var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
|
|
178
|
-
var Breadcrumbs__default = /*#__PURE__*/_interopDefault(Breadcrumbs);
|
|
179
177
|
var SimpleBar__default = /*#__PURE__*/_interopDefault(SimpleBar);
|
|
180
178
|
var Card__default = /*#__PURE__*/_interopDefault(Card);
|
|
181
179
|
var CardContent__default = /*#__PURE__*/_interopDefault(CardContent);
|
|
@@ -392,35 +390,8 @@ var buttonColorVariants = [
|
|
|
392
390
|
...createButtonColorVariants("red", colors.red),
|
|
393
391
|
...createButtonColorVariants("rose", colors.rose),
|
|
394
392
|
...createButtonColorVariants("fuchsia", colors.fuchsia),
|
|
395
|
-
...createButtonColorVariants("brand", colors.brand)
|
|
396
|
-
// Neutral
|
|
397
|
-
{
|
|
398
|
-
props: { color: "neutral", variant: "contained" },
|
|
399
|
-
style: {
|
|
400
|
-
backgroundColor: colors.neutral[700],
|
|
401
|
-
color: "#FFFFFF",
|
|
402
|
-
"&:hover": { backgroundColor: colors.neutral[800] }
|
|
403
|
-
}
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
props: { color: "neutral", variant: "outlined" },
|
|
407
|
-
style: {
|
|
408
|
-
borderColor: colors.neutral[300],
|
|
409
|
-
// Lighter border (neutral.light)
|
|
410
|
-
color: colors.neutral[900],
|
|
411
|
-
"&:hover": {
|
|
412
|
-
borderColor: colors.neutral[400],
|
|
413
|
-
backgroundColor: colors.neutral[100]
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
props: { color: "neutral", variant: "text" },
|
|
419
|
-
style: {
|
|
420
|
-
color: colors.neutral[700],
|
|
421
|
-
"&:hover": { backgroundColor: colors.neutral[100] }
|
|
422
|
-
}
|
|
423
|
-
}
|
|
393
|
+
...createButtonColorVariants("brand", colors.brand)
|
|
394
|
+
// Neutral variants are handled via styleOverrides for theme-awareness
|
|
424
395
|
];
|
|
425
396
|
var progressColorVariants = [
|
|
426
397
|
createProgressColorVariant("iochmara", colors.iochmara),
|
|
@@ -480,11 +451,31 @@ var componentOverrides = {
|
|
|
480
451
|
...buttonColorVariants
|
|
481
452
|
],
|
|
482
453
|
styleOverrides: {
|
|
483
|
-
root: {
|
|
454
|
+
root: ({ theme, ownerState }) => ({
|
|
484
455
|
textTransform: "none",
|
|
485
456
|
fontWeight: 500,
|
|
486
|
-
borderRadius: 6
|
|
487
|
-
|
|
457
|
+
borderRadius: 6,
|
|
458
|
+
// Theme-aware neutral button colors
|
|
459
|
+
...ownerState.color === "neutral" && ownerState.variant === "contained" && {
|
|
460
|
+
backgroundColor: colors.neutral[700],
|
|
461
|
+
color: "#FFFFFF",
|
|
462
|
+
"&:hover": { backgroundColor: colors.neutral[800] }
|
|
463
|
+
},
|
|
464
|
+
...ownerState.color === "neutral" && ownerState.variant === "outlined" && {
|
|
465
|
+
borderColor: theme.palette.mode === "dark" ? colors.neutral[500] : colors.neutral[300],
|
|
466
|
+
color: theme.palette.mode === "dark" ? colors.neutral[100] : colors.neutral[900],
|
|
467
|
+
"&:hover": {
|
|
468
|
+
borderColor: theme.palette.mode === "dark" ? colors.neutral[400] : colors.neutral[400],
|
|
469
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[100]
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
...ownerState.color === "neutral" && ownerState.variant === "text" && {
|
|
473
|
+
color: theme.palette.mode === "dark" ? colors.neutral[200] : colors.neutral[700],
|
|
474
|
+
"&:hover": {
|
|
475
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[100]
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}),
|
|
488
479
|
sizeSmall: {
|
|
489
480
|
padding: "0.25rem 0.75rem",
|
|
490
481
|
fontSize: "0.875rem"
|
|
@@ -511,11 +502,11 @@ var componentOverrides = {
|
|
|
511
502
|
}
|
|
512
503
|
},
|
|
513
504
|
// Text variant (ghost in Chakra)
|
|
514
|
-
text: {
|
|
505
|
+
text: ({ theme }) => ({
|
|
515
506
|
"&:hover": {
|
|
516
|
-
backgroundColor: "rgba(0, 0, 0, 0.04)"
|
|
507
|
+
backgroundColor: theme.palette.mode === "dark" ? "rgba(255, 255, 255, 0.08)" : "rgba(0, 0, 0, 0.04)"
|
|
517
508
|
}
|
|
518
|
-
}
|
|
509
|
+
})
|
|
519
510
|
}
|
|
520
511
|
},
|
|
521
512
|
// IconButton overrides
|
|
@@ -562,9 +553,9 @@ var componentOverrides = {
|
|
|
562
553
|
borderWidth: 2
|
|
563
554
|
}
|
|
564
555
|
},
|
|
565
|
-
notchedOutline: {
|
|
566
|
-
borderColor: colors.neutral[300]
|
|
567
|
-
}
|
|
556
|
+
notchedOutline: ({ theme }) => ({
|
|
557
|
+
borderColor: theme.palette.mode === "dark" ? colors.neutral[600] : colors.neutral[300]
|
|
558
|
+
})
|
|
568
559
|
}
|
|
569
560
|
},
|
|
570
561
|
// Checkbox overrides
|
|
@@ -611,19 +602,19 @@ var componentOverrides = {
|
|
|
611
602
|
},
|
|
612
603
|
MuiMenuItem: {
|
|
613
604
|
styleOverrides: {
|
|
614
|
-
root: {
|
|
605
|
+
root: ({ theme }) => ({
|
|
615
606
|
fontSize: "0.875rem",
|
|
616
607
|
padding: "0.5rem 0.75rem",
|
|
617
608
|
"&:hover": {
|
|
618
|
-
backgroundColor: colors.neutral[100]
|
|
609
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.neutral[600] : colors.neutral[100]
|
|
619
610
|
},
|
|
620
611
|
"&.Mui-selected": {
|
|
621
|
-
backgroundColor: colors.iochmara[50],
|
|
612
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.iochmara[900] : colors.iochmara[50],
|
|
622
613
|
"&:hover": {
|
|
623
|
-
backgroundColor: colors.iochmara[100]
|
|
614
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.iochmara[800] : colors.iochmara[100]
|
|
624
615
|
}
|
|
625
616
|
}
|
|
626
|
-
}
|
|
617
|
+
})
|
|
627
618
|
}
|
|
628
619
|
},
|
|
629
620
|
// Chip overrides (Tag in Chakra)
|
|
@@ -658,15 +649,15 @@ var componentOverrides = {
|
|
|
658
649
|
// Tooltip overrides
|
|
659
650
|
MuiTooltip: {
|
|
660
651
|
styleOverrides: {
|
|
661
|
-
tooltip: {
|
|
662
|
-
backgroundColor: colors.neutral[800],
|
|
652
|
+
tooltip: ({ theme }) => ({
|
|
653
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[800],
|
|
663
654
|
fontSize: "0.75rem",
|
|
664
655
|
padding: "0.25rem 0.5rem",
|
|
665
656
|
borderRadius: 4
|
|
666
|
-
},
|
|
667
|
-
arrow: {
|
|
668
|
-
color: colors.neutral[800]
|
|
669
|
-
}
|
|
657
|
+
}),
|
|
658
|
+
arrow: ({ theme }) => ({
|
|
659
|
+
color: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[800]
|
|
660
|
+
})
|
|
670
661
|
}
|
|
671
662
|
},
|
|
672
663
|
// Alert overrides
|
|
@@ -675,22 +666,22 @@ var componentOverrides = {
|
|
|
675
666
|
root: {
|
|
676
667
|
borderRadius: 6
|
|
677
668
|
},
|
|
678
|
-
standardSuccess: {
|
|
679
|
-
backgroundColor: colors.green[50],
|
|
680
|
-
color: colors.green[800]
|
|
681
|
-
},
|
|
682
|
-
standardWarning: {
|
|
683
|
-
backgroundColor: colors.amber[50],
|
|
684
|
-
color: colors.amber[800]
|
|
685
|
-
},
|
|
686
|
-
standardError: {
|
|
687
|
-
backgroundColor: colors.red[50],
|
|
688
|
-
color: colors.red[800]
|
|
689
|
-
},
|
|
690
|
-
standardInfo: {
|
|
691
|
-
backgroundColor: colors.iochmara[50],
|
|
692
|
-
color: colors.iochmara[800]
|
|
693
|
-
}
|
|
669
|
+
standardSuccess: ({ theme }) => ({
|
|
670
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.green[900] : colors.green[50],
|
|
671
|
+
color: theme.palette.mode === "dark" ? colors.green[200] : colors.green[800]
|
|
672
|
+
}),
|
|
673
|
+
standardWarning: ({ theme }) => ({
|
|
674
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.amber[900] : colors.amber[50],
|
|
675
|
+
color: theme.palette.mode === "dark" ? colors.amber[200] : colors.amber[800]
|
|
676
|
+
}),
|
|
677
|
+
standardError: ({ theme }) => ({
|
|
678
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.red[900] : colors.red[50],
|
|
679
|
+
color: theme.palette.mode === "dark" ? colors.red[200] : colors.red[800]
|
|
680
|
+
}),
|
|
681
|
+
standardInfo: ({ theme }) => ({
|
|
682
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.iochmara[900] : colors.iochmara[50],
|
|
683
|
+
color: theme.palette.mode === "dark" ? colors.iochmara[200] : colors.iochmara[800]
|
|
684
|
+
})
|
|
694
685
|
}
|
|
695
686
|
},
|
|
696
687
|
// Tabs overrides
|
|
@@ -771,17 +762,17 @@ var componentOverrides = {
|
|
|
771
762
|
// Divider overrides
|
|
772
763
|
MuiDivider: {
|
|
773
764
|
styleOverrides: {
|
|
774
|
-
root: {
|
|
775
|
-
borderColor: colors.neutral[200]
|
|
776
|
-
}
|
|
765
|
+
root: ({ theme }) => ({
|
|
766
|
+
borderColor: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[200]
|
|
767
|
+
})
|
|
777
768
|
}
|
|
778
769
|
},
|
|
779
770
|
// Breadcrumbs overrides
|
|
780
771
|
MuiBreadcrumbs: {
|
|
781
772
|
styleOverrides: {
|
|
782
|
-
separator: {
|
|
783
|
-
color: colors.neutral[400]
|
|
784
|
-
}
|
|
773
|
+
separator: ({ theme }) => ({
|
|
774
|
+
color: theme.palette.mode === "dark" ? colors.neutral[500] : colors.neutral[400]
|
|
775
|
+
})
|
|
785
776
|
}
|
|
786
777
|
}
|
|
787
778
|
};
|
|
@@ -1013,7 +1004,7 @@ function MuiProvider({
|
|
|
1013
1004
|
enableCssBaseline = false
|
|
1014
1005
|
}) {
|
|
1015
1006
|
const { resolvedTheme } = nextThemes.useTheme();
|
|
1016
|
-
const theme =
|
|
1007
|
+
const theme = React4.useMemo(() => {
|
|
1017
1008
|
const mode = forcedTheme ?? resolvedTheme;
|
|
1018
1009
|
return mode === "dark" ? darkTheme : lightTheme;
|
|
1019
1010
|
}, [forcedTheme, resolvedTheme]);
|
|
@@ -1023,11 +1014,11 @@ function MuiProvider({
|
|
|
1023
1014
|
] });
|
|
1024
1015
|
}
|
|
1025
1016
|
var mui_provider_default = MuiProvider;
|
|
1026
|
-
var ToasterContext =
|
|
1017
|
+
var ToasterContext = React4.createContext(null);
|
|
1027
1018
|
var toastIdCounter = 0;
|
|
1028
1019
|
function ToasterProvider({ children }) {
|
|
1029
|
-
const [toasts, setToasts] =
|
|
1030
|
-
const createToast =
|
|
1020
|
+
const [toasts, setToasts] = React4.useState([]);
|
|
1021
|
+
const createToast = React4.useCallback((options) => {
|
|
1031
1022
|
const id = options.id || `toast-${++toastIdCounter}`;
|
|
1032
1023
|
const newToast = {
|
|
1033
1024
|
id,
|
|
@@ -1042,7 +1033,7 @@ function ToasterProvider({ children }) {
|
|
|
1042
1033
|
});
|
|
1043
1034
|
return id;
|
|
1044
1035
|
}, []);
|
|
1045
|
-
const dismiss =
|
|
1036
|
+
const dismiss = React4.useCallback((id) => {
|
|
1046
1037
|
setToasts(
|
|
1047
1038
|
(prev) => prev.map((t) => t.id === id ? { ...t, open: false } : t)
|
|
1048
1039
|
);
|
|
@@ -1050,7 +1041,7 @@ function ToasterProvider({ children }) {
|
|
|
1050
1041
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
1051
1042
|
}, 300);
|
|
1052
1043
|
}, []);
|
|
1053
|
-
const update =
|
|
1044
|
+
const update = React4.useCallback((id, options) => {
|
|
1054
1045
|
setToasts(
|
|
1055
1046
|
(prev) => prev.map((t) => t.id === id ? { ...t, ...options } : t)
|
|
1056
1047
|
);
|
|
@@ -1093,7 +1084,7 @@ function ToasterProvider({ children }) {
|
|
|
1093
1084
|
] });
|
|
1094
1085
|
}
|
|
1095
1086
|
function useToaster() {
|
|
1096
|
-
const context =
|
|
1087
|
+
const context = React4.useContext(ToasterContext);
|
|
1097
1088
|
if (!context) {
|
|
1098
1089
|
throw new Error("useToaster must be used within ToasterProvider");
|
|
1099
1090
|
}
|
|
@@ -1129,8 +1120,8 @@ var toaster = {
|
|
|
1129
1120
|
}
|
|
1130
1121
|
};
|
|
1131
1122
|
function Toaster() {
|
|
1132
|
-
const [toasts, setToasts] =
|
|
1133
|
-
|
|
1123
|
+
const [toasts, setToasts] = React4.useState([]);
|
|
1124
|
+
React4.useState(() => {
|
|
1134
1125
|
const unsubscribe = toaster.subscribe((event) => {
|
|
1135
1126
|
if (event.type === "create" && event.options) {
|
|
1136
1127
|
const newToast = {
|
|
@@ -1211,8 +1202,9 @@ var Fallback = (errorData) => {
|
|
|
1211
1202
|
display: "flex",
|
|
1212
1203
|
flexDirection: "column",
|
|
1213
1204
|
justifyContent: "flex-start",
|
|
1214
|
-
bgcolor: "
|
|
1215
|
-
border: "solid
|
|
1205
|
+
bgcolor: "background.paper",
|
|
1206
|
+
border: "solid 1px",
|
|
1207
|
+
borderColor: "divider",
|
|
1216
1208
|
minHeight: "200px"
|
|
1217
1209
|
},
|
|
1218
1210
|
children: [
|
|
@@ -1281,7 +1273,7 @@ var VSplit = (props) => {
|
|
|
1281
1273
|
}
|
|
1282
1274
|
);
|
|
1283
1275
|
};
|
|
1284
|
-
var ScreenshotBox =
|
|
1276
|
+
var ScreenshotBox = React4.forwardRef(
|
|
1285
1277
|
({
|
|
1286
1278
|
backgroundColor = "white",
|
|
1287
1279
|
blockSize,
|
|
@@ -1742,6 +1734,17 @@ function formatDuration(totalSeconds, style = "verbose") {
|
|
|
1742
1734
|
}
|
|
1743
1735
|
return formatVerbose(components);
|
|
1744
1736
|
}
|
|
1737
|
+
var ApiConfigContext = React4.createContext(null);
|
|
1738
|
+
var defaultApiConfigContext = {
|
|
1739
|
+
apiPrefix: "",
|
|
1740
|
+
authToken: void 0,
|
|
1741
|
+
baseUrl: void 0,
|
|
1742
|
+
apiClient: axios__default.default.create({ baseURL: PUBLIC_API_URL })
|
|
1743
|
+
};
|
|
1744
|
+
function useApiConfig() {
|
|
1745
|
+
const context = React4.useContext(ApiConfigContext);
|
|
1746
|
+
return context ?? defaultApiConfigContext;
|
|
1747
|
+
}
|
|
1745
1748
|
|
|
1746
1749
|
// recce-source/js/src/lib/api/cacheKeys.ts
|
|
1747
1750
|
var cacheKeys = {
|
|
@@ -1759,11 +1762,20 @@ var cacheKeys = {
|
|
|
1759
1762
|
};
|
|
1760
1763
|
|
|
1761
1764
|
// recce-source/js/src/lib/api/instanceInfo.ts
|
|
1762
|
-
async function getRecceInstanceInfo() {
|
|
1763
|
-
return (await
|
|
1765
|
+
async function getRecceInstanceInfo(client = axiosClient) {
|
|
1766
|
+
return (await client.get(
|
|
1764
1767
|
"/api/instance-info"
|
|
1765
1768
|
)).data;
|
|
1766
1769
|
}
|
|
1770
|
+
|
|
1771
|
+
// recce-source/js/src/lib/hooks/useRecceInstanceInfo.tsx
|
|
1772
|
+
var useRecceInstanceInfo = () => {
|
|
1773
|
+
const { apiClient } = useApiConfig();
|
|
1774
|
+
return reactQuery.useQuery({
|
|
1775
|
+
queryKey: cacheKeys.instanceInfo(),
|
|
1776
|
+
queryFn: () => getRecceInstanceInfo(apiClient)
|
|
1777
|
+
});
|
|
1778
|
+
};
|
|
1767
1779
|
var defaultFeatureToggles = {
|
|
1768
1780
|
mode: null,
|
|
1769
1781
|
disableSaveToFile: false,
|
|
@@ -1783,12 +1795,12 @@ var defaultValue = {
|
|
|
1783
1795
|
shareUrl: void 0,
|
|
1784
1796
|
sessionId: void 0
|
|
1785
1797
|
};
|
|
1786
|
-
var InstanceInfo =
|
|
1787
|
-
var useRecceInstanceContext = () =>
|
|
1798
|
+
var InstanceInfo = React4.createContext(defaultValue);
|
|
1799
|
+
var useRecceInstanceContext = () => React4.useContext(InstanceInfo);
|
|
1788
1800
|
|
|
1789
1801
|
// recce-source/js/src/lib/api/flag.ts
|
|
1790
|
-
async function getServerFlag() {
|
|
1791
|
-
return (await
|
|
1802
|
+
async function getServerFlag(client = axiosClient) {
|
|
1803
|
+
return (await client.get("/api/flag")).data;
|
|
1792
1804
|
}
|
|
1793
1805
|
async function getModelInfo(model) {
|
|
1794
1806
|
return (await axiosClient.get(
|
|
@@ -1850,28 +1862,29 @@ async function listRuns() {
|
|
|
1850
1862
|
);
|
|
1851
1863
|
return response.data;
|
|
1852
1864
|
}
|
|
1853
|
-
var IdleTimeoutContext =
|
|
1865
|
+
var IdleTimeoutContext = React4.createContext(
|
|
1854
1866
|
void 0
|
|
1855
1867
|
);
|
|
1856
1868
|
function useIdleTimeout() {
|
|
1857
|
-
const context =
|
|
1869
|
+
const context = React4.useContext(IdleTimeoutContext);
|
|
1858
1870
|
if (!context) {
|
|
1859
1871
|
throw new Error("useIdleTimeout must be used within IdleTimeoutProvider");
|
|
1860
1872
|
}
|
|
1861
1873
|
return context;
|
|
1862
1874
|
}
|
|
1863
1875
|
var useRecceServerFlag = () => {
|
|
1876
|
+
const { apiClient } = useApiConfig();
|
|
1864
1877
|
return reactQuery.useQuery({
|
|
1865
1878
|
queryKey: cacheKeys.flag(),
|
|
1866
|
-
queryFn: getServerFlag
|
|
1879
|
+
queryFn: () => getServerFlag(apiClient)
|
|
1867
1880
|
});
|
|
1868
1881
|
};
|
|
1869
1882
|
var defaultLineageGraphsContext = {
|
|
1870
1883
|
isActionAvailable: () => true,
|
|
1871
1884
|
isDemoSite: false
|
|
1872
1885
|
};
|
|
1873
|
-
var LineageGraphContext =
|
|
1874
|
-
var useLineageGraphContext = () =>
|
|
1886
|
+
var LineageGraphContext = React4.createContext(defaultLineageGraphsContext);
|
|
1887
|
+
var useLineageGraphContext = () => React4.useContext(LineageGraphContext);
|
|
1875
1888
|
var useRunsAggregated = () => {
|
|
1876
1889
|
const { runsAggregated, refetchRunsAggregated } = useLineageGraphContext();
|
|
1877
1890
|
return [runsAggregated, refetchRunsAggregated];
|
|
@@ -2041,13 +2054,13 @@ var RunModal = ({
|
|
|
2041
2054
|
params: defaultParams,
|
|
2042
2055
|
RunForm
|
|
2043
2056
|
}) => {
|
|
2044
|
-
const [params, setParams] =
|
|
2057
|
+
const [params, setParams] = React4.useState(
|
|
2045
2058
|
defaultParams ?? {}
|
|
2046
2059
|
);
|
|
2047
|
-
const [anchorEl, setAnchorEl] =
|
|
2048
|
-
const [isReadyToExecute, setIsReadyToExecute] =
|
|
2060
|
+
const [anchorEl, setAnchorEl] = React4.useState(null);
|
|
2061
|
+
const [isReadyToExecute, setIsReadyToExecute] = React4.useState(false);
|
|
2049
2062
|
const documentationUrl = getDocumentationUrl(type);
|
|
2050
|
-
const executeClicked =
|
|
2063
|
+
const executeClicked = React4.useRef(false);
|
|
2051
2064
|
const handleClose = () => {
|
|
2052
2065
|
if (!executeClicked.current && isExploreAction(type)) {
|
|
2053
2066
|
trackExploreActionForm({
|
|
@@ -2149,8 +2162,9 @@ var RunModal = ({
|
|
|
2149
2162
|
sx: {
|
|
2150
2163
|
p: 0,
|
|
2151
2164
|
overflow: "auto",
|
|
2152
|
-
borderTop: "1px solid
|
|
2153
|
-
borderBottom: "1px solid
|
|
2165
|
+
borderTop: "1px solid",
|
|
2166
|
+
borderBottom: "1px solid",
|
|
2167
|
+
borderColor: "divider"
|
|
2154
2168
|
},
|
|
2155
2169
|
children: /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { contain: "layout" }, children: RunForm && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2156
2170
|
RunForm,
|
|
@@ -2214,17 +2228,17 @@ var useModelColumns = (model) => {
|
|
|
2214
2228
|
name: model
|
|
2215
2229
|
}
|
|
2216
2230
|
});
|
|
2217
|
-
const nodeColumns =
|
|
2231
|
+
const nodeColumns = React4.useMemo(() => {
|
|
2218
2232
|
return node ? extractColumns(node) : [];
|
|
2219
2233
|
}, [node]);
|
|
2220
|
-
const [columns, setColumns] =
|
|
2221
|
-
const [primaryKey, setPrimaryKey] =
|
|
2222
|
-
const [isLoading, setIsLoading] =
|
|
2223
|
-
const [error, setError] =
|
|
2224
|
-
const [prevNodeColumns, setPrevNodeColumns] =
|
|
2225
|
-
const [prevNodeId, setPrevNodeId] =
|
|
2234
|
+
const [columns, setColumns] = React4.useState([]);
|
|
2235
|
+
const [primaryKey, setPrimaryKey] = React4.useState();
|
|
2236
|
+
const [isLoading, setIsLoading] = React4.useState(true);
|
|
2237
|
+
const [error, setError] = React4.useState(null);
|
|
2238
|
+
const [prevNodeColumns, setPrevNodeColumns] = React4.useState([]);
|
|
2239
|
+
const [prevNodeId, setPrevNodeId] = React4.useState(node?.id);
|
|
2226
2240
|
const nodePrimaryKey = node ? node.data.data.current?.primary_key : void 0;
|
|
2227
|
-
const fetchData =
|
|
2241
|
+
const fetchData = React4.useCallback(async () => {
|
|
2228
2242
|
if (!node) {
|
|
2229
2243
|
return;
|
|
2230
2244
|
}
|
|
@@ -2255,7 +2269,7 @@ var useModelColumns = (model) => {
|
|
|
2255
2269
|
setIsLoading(false);
|
|
2256
2270
|
}
|
|
2257
2271
|
}
|
|
2258
|
-
|
|
2272
|
+
React4.useEffect(() => {
|
|
2259
2273
|
if (nodeColumns.length === 0 && node?.id !== void 0) {
|
|
2260
2274
|
fetchData().catch((e) => {
|
|
2261
2275
|
console.error(e);
|
|
@@ -2451,10 +2465,56 @@ function formatAsAbbreviatedNumber(input) {
|
|
|
2451
2465
|
}).format(input);
|
|
2452
2466
|
}
|
|
2453
2467
|
}
|
|
2468
|
+
|
|
2469
|
+
// recce-source/js/src/components/charts/chartTheme.ts
|
|
2470
|
+
function getChartThemeColors(isDark) {
|
|
2471
|
+
return {
|
|
2472
|
+
gridColor: isDark ? "#4b5563" : "#d1d5db",
|
|
2473
|
+
textColor: isDark ? "#e5e7eb" : "#374151",
|
|
2474
|
+
borderColor: isDark ? "#6b7280" : "#9ca3af",
|
|
2475
|
+
tooltipBackgroundColor: isDark ? "#1f2937" : "#ffffff",
|
|
2476
|
+
tooltipTextColor: isDark ? "#e5e7eb" : "#111827"
|
|
2477
|
+
};
|
|
2478
|
+
}
|
|
2479
|
+
function getThemedPluginOptions(isDark) {
|
|
2480
|
+
const colors2 = getChartThemeColors(isDark);
|
|
2481
|
+
return {
|
|
2482
|
+
legend: {
|
|
2483
|
+
labels: {
|
|
2484
|
+
color: colors2.textColor
|
|
2485
|
+
}
|
|
2486
|
+
},
|
|
2487
|
+
title: {
|
|
2488
|
+
color: colors2.textColor
|
|
2489
|
+
},
|
|
2490
|
+
tooltip: {
|
|
2491
|
+
backgroundColor: colors2.tooltipBackgroundColor,
|
|
2492
|
+
titleColor: colors2.tooltipTextColor,
|
|
2493
|
+
bodyColor: colors2.tooltipTextColor,
|
|
2494
|
+
borderColor: colors2.borderColor,
|
|
2495
|
+
borderWidth: 1
|
|
2496
|
+
}
|
|
2497
|
+
};
|
|
2498
|
+
}
|
|
2454
2499
|
var CURRENT_BAR_COLOR = "#63B3ED";
|
|
2455
2500
|
var BASE_BAR_COLOR = "#F6AD55";
|
|
2456
2501
|
var CURRENT_BAR_COLOR_WITH_ALPHA = `${CURRENT_BAR_COLOR}A5`;
|
|
2457
2502
|
var BASE_BAR_COLOR_WITH_ALPHA = `${BASE_BAR_COLOR}A5`;
|
|
2503
|
+
var CURRENT_BAR_COLOR_DARK = "#90CDF4";
|
|
2504
|
+
var BASE_BAR_COLOR_DARK = "#FBD38D";
|
|
2505
|
+
var CURRENT_BAR_COLOR_DARK_WITH_ALPHA = `${CURRENT_BAR_COLOR_DARK}A5`;
|
|
2506
|
+
var BASE_BAR_COLOR_DARK_WITH_ALPHA = `${BASE_BAR_COLOR_DARK}A5`;
|
|
2507
|
+
var INFO_VAL_COLOR = "#63B3ED";
|
|
2508
|
+
var INFO_VAL_COLOR_DARK = "#90CDF4";
|
|
2509
|
+
function getBarColors(isDark) {
|
|
2510
|
+
return {
|
|
2511
|
+
current: isDark ? CURRENT_BAR_COLOR_DARK : CURRENT_BAR_COLOR,
|
|
2512
|
+
base: isDark ? BASE_BAR_COLOR_DARK : BASE_BAR_COLOR,
|
|
2513
|
+
currentWithAlpha: isDark ? CURRENT_BAR_COLOR_DARK_WITH_ALPHA : CURRENT_BAR_COLOR_WITH_ALPHA,
|
|
2514
|
+
baseWithAlpha: isDark ? BASE_BAR_COLOR_DARK_WITH_ALPHA : BASE_BAR_COLOR_WITH_ALPHA,
|
|
2515
|
+
info: isDark ? INFO_VAL_COLOR_DARK : INFO_VAL_COLOR
|
|
2516
|
+
};
|
|
2517
|
+
}
|
|
2458
2518
|
function SquareIcon({ color }) {
|
|
2459
2519
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2460
2520
|
Box35__default.default,
|
|
@@ -2478,6 +2538,8 @@ function HistogramChart({
|
|
|
2478
2538
|
hideAxis = false,
|
|
2479
2539
|
animation = false
|
|
2480
2540
|
}) {
|
|
2541
|
+
const theme = styles.useTheme();
|
|
2542
|
+
const isDark = theme.palette.mode === "dark";
|
|
2481
2543
|
chart_js.Chart.register(
|
|
2482
2544
|
chart_js.BarElement,
|
|
2483
2545
|
chart_js.TimeSeriesScale,
|
|
@@ -2487,8 +2549,10 @@ function HistogramChart({
|
|
|
2487
2549
|
chart_js.Legend,
|
|
2488
2550
|
chart_js.Tooltip
|
|
2489
2551
|
);
|
|
2490
|
-
const chartOptions = getHistogramChartOptions(data, hideAxis, {
|
|
2491
|
-
|
|
2552
|
+
const chartOptions = getHistogramChartOptions(data, hideAxis, isDark, {
|
|
2553
|
+
animation
|
|
2554
|
+
});
|
|
2555
|
+
const chartData = getHistogramChartData(data, isDark);
|
|
2492
2556
|
return /* @__PURE__ */ jsxRuntime.jsx(reactChartjs2.Chart, { type: "bar", options: chartOptions, data: chartData, plugins: [] });
|
|
2493
2557
|
}
|
|
2494
2558
|
function getHistogramChartDataset(type, binEdges, label, color, data) {
|
|
@@ -2509,53 +2573,65 @@ function getHistogramChartDataset(type, binEdges, label, color, data) {
|
|
|
2509
2573
|
xAxisID: "x"
|
|
2510
2574
|
};
|
|
2511
2575
|
}
|
|
2512
|
-
function getHistogramChartData(data) {
|
|
2576
|
+
function getHistogramChartData(data, isDark = false) {
|
|
2513
2577
|
const { datasets, type, binEdges } = data;
|
|
2514
2578
|
const [base, current] = datasets;
|
|
2579
|
+
const barColors = getBarColors(isDark);
|
|
2515
2580
|
const currentDataset = getHistogramChartDataset(
|
|
2516
2581
|
type,
|
|
2517
2582
|
binEdges,
|
|
2518
2583
|
"Current",
|
|
2519
|
-
|
|
2584
|
+
barColors.currentWithAlpha,
|
|
2520
2585
|
current
|
|
2521
2586
|
);
|
|
2522
2587
|
const baseDataset = getHistogramChartDataset(
|
|
2523
2588
|
type,
|
|
2524
2589
|
binEdges,
|
|
2525
2590
|
"Base",
|
|
2526
|
-
|
|
2591
|
+
barColors.baseWithAlpha,
|
|
2527
2592
|
base
|
|
2528
2593
|
);
|
|
2529
|
-
const newLabels = binEdges.map((
|
|
2594
|
+
const newLabels = binEdges.map((_v, i) => formatDisplayedBinItem(binEdges, i)).slice(0, -1);
|
|
2530
2595
|
return {
|
|
2531
2596
|
labels: newLabels,
|
|
2532
2597
|
datasets: [currentDataset, baseDataset]
|
|
2533
2598
|
};
|
|
2534
2599
|
}
|
|
2535
|
-
function getHistogramChartOptions(data, hideAxis = false, { ...configOverrides } = {}) {
|
|
2600
|
+
function getHistogramChartOptions(data, hideAxis = false, isDark = false, { ...configOverrides } = {}) {
|
|
2536
2601
|
const { title, datasets, type, samples = 0, binEdges } = data;
|
|
2537
2602
|
const [base, current] = datasets;
|
|
2538
2603
|
const isDatetime = type === "datetime";
|
|
2604
|
+
const themeColors = getChartThemeColors(isDark);
|
|
2605
|
+
const themedPlugins = getThemedPluginOptions(isDark);
|
|
2539
2606
|
return {
|
|
2540
2607
|
responsive: true,
|
|
2541
2608
|
maintainAspectRatio: false,
|
|
2542
2609
|
plugins: {
|
|
2543
2610
|
legend: {
|
|
2544
|
-
reverse: true
|
|
2611
|
+
reverse: true,
|
|
2612
|
+
labels: {
|
|
2613
|
+
color: themeColors.textColor
|
|
2614
|
+
}
|
|
2545
2615
|
},
|
|
2546
2616
|
title: {
|
|
2547
2617
|
display: true,
|
|
2548
2618
|
text: title,
|
|
2549
2619
|
font: {
|
|
2550
2620
|
size: 20
|
|
2551
|
-
}
|
|
2621
|
+
},
|
|
2622
|
+
color: themeColors.textColor
|
|
2552
2623
|
},
|
|
2553
2624
|
tooltip: {
|
|
2554
2625
|
mode: "index",
|
|
2555
2626
|
// position: 'nearest',
|
|
2556
2627
|
intersect: false,
|
|
2628
|
+
backgroundColor: themedPlugins.tooltip.backgroundColor,
|
|
2629
|
+
titleColor: themedPlugins.tooltip.titleColor,
|
|
2630
|
+
bodyColor: themedPlugins.tooltip.bodyColor,
|
|
2631
|
+
borderColor: themedPlugins.tooltip.borderColor,
|
|
2632
|
+
borderWidth: themedPlugins.tooltip.borderWidth,
|
|
2557
2633
|
callbacks: {
|
|
2558
|
-
title([{ dataIndex
|
|
2634
|
+
title([{ dataIndex }]) {
|
|
2559
2635
|
const result = formatDisplayedBinItem(binEdges, dataIndex);
|
|
2560
2636
|
const prefix3 = isDatetime ? DATE_RANGE : type === "string" ? TEXTLENGTH : VALUE_RANGE;
|
|
2561
2637
|
return `${prefix3}
|
|
@@ -2572,15 +2648,16 @@ ${result}`;
|
|
|
2572
2648
|
}
|
|
2573
2649
|
}
|
|
2574
2650
|
},
|
|
2575
|
-
scales: getScales(data, hideAxis),
|
|
2651
|
+
scales: getScales(data, hideAxis, isDark),
|
|
2576
2652
|
...configOverrides
|
|
2577
2653
|
};
|
|
2578
2654
|
}
|
|
2579
|
-
function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = false) {
|
|
2655
|
+
function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = false, isDark = false) {
|
|
2580
2656
|
const isDatetime = type === "datetime";
|
|
2581
2657
|
const [base, current] = datasets;
|
|
2582
2658
|
const maxCount = Math.max(...current.counts, ...base.counts);
|
|
2583
|
-
const
|
|
2659
|
+
const themeColors = getChartThemeColors(isDark);
|
|
2660
|
+
const newLabels = binEdges.map((_v, i) => formatDisplayedBinItem(binEdges, i)).slice(0, -1);
|
|
2584
2661
|
const xScaleDate = {
|
|
2585
2662
|
display: !hideAxis,
|
|
2586
2663
|
type: "timeseries",
|
|
@@ -2597,7 +2674,8 @@ function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = fa
|
|
|
2597
2674
|
ticks: {
|
|
2598
2675
|
minRotation: 30,
|
|
2599
2676
|
maxRotation: 30,
|
|
2600
|
-
maxTicksLimit: 8
|
|
2677
|
+
maxTicksLimit: 8,
|
|
2678
|
+
color: themeColors.textColor
|
|
2601
2679
|
}
|
|
2602
2680
|
};
|
|
2603
2681
|
const xScaleCategory = {
|
|
@@ -2606,9 +2684,10 @@ function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = fa
|
|
|
2606
2684
|
//Linear doesn't understand bins!
|
|
2607
2685
|
grid: { display: false },
|
|
2608
2686
|
ticks: {
|
|
2609
|
-
callback(
|
|
2687
|
+
callback(_val, index) {
|
|
2610
2688
|
return newLabels[index];
|
|
2611
|
-
}
|
|
2689
|
+
},
|
|
2690
|
+
color: themeColors.textColor
|
|
2612
2691
|
},
|
|
2613
2692
|
stacked: true
|
|
2614
2693
|
};
|
|
@@ -2618,12 +2697,13 @@ function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = fa
|
|
|
2618
2697
|
type: "linear",
|
|
2619
2698
|
max: maxCount,
|
|
2620
2699
|
//NOTE: do not add `min` since if they are equal nothing gets displayed sometimes
|
|
2621
|
-
border: { dash: [2, 2] },
|
|
2700
|
+
border: { dash: [2, 2], color: themeColors.borderColor },
|
|
2622
2701
|
grid: {
|
|
2623
|
-
color:
|
|
2702
|
+
color: themeColors.gridColor
|
|
2624
2703
|
},
|
|
2625
2704
|
ticks: {
|
|
2626
2705
|
maxTicksLimit: 8,
|
|
2706
|
+
color: themeColors.textColor,
|
|
2627
2707
|
callback: function(val) {
|
|
2628
2708
|
return formatAsAbbreviatedNumber(val);
|
|
2629
2709
|
}
|
|
@@ -2640,6 +2720,8 @@ function formatDisplayedBinItem(binEdges, currentIndex) {
|
|
|
2640
2720
|
return `${formattedStart} - ${formattedEnd}`;
|
|
2641
2721
|
}
|
|
2642
2722
|
function _HistogramDiffResultView({ run }, ref) {
|
|
2723
|
+
const theme = styles.useTheme();
|
|
2724
|
+
const isDark = theme.palette.mode === "dark";
|
|
2643
2725
|
if (!isHistogramDiffRun(run)) {
|
|
2644
2726
|
throw new Error("Run type must be histogram_diff");
|
|
2645
2727
|
}
|
|
@@ -2652,37 +2734,45 @@ function _HistogramDiffResultView({ run }, ref) {
|
|
|
2652
2734
|
if (!base || !current) {
|
|
2653
2735
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Loading..." });
|
|
2654
2736
|
}
|
|
2655
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2737
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2738
|
+
ScreenshotBox,
|
|
2739
|
+
{
|
|
2740
|
+
ref,
|
|
2741
|
+
height: "100%",
|
|
2742
|
+
backgroundColor: isDark ? "#1f2937" : "white",
|
|
2743
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Box35__default.default, { sx: { display: "flex", flexDirection: "row" }, children: [
|
|
2744
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { flex: 1 } }),
|
|
2745
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { width: "80%", height: "35vh", m: 4 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2746
|
+
HistogramChart,
|
|
2747
|
+
{
|
|
2748
|
+
data: {
|
|
2749
|
+
title: `Model ${params.model}.${params.column_name}`,
|
|
2750
|
+
type: run.params?.column_type ?? "",
|
|
2751
|
+
datasets: [base, current],
|
|
2752
|
+
min,
|
|
2753
|
+
max,
|
|
2754
|
+
samples: base.total,
|
|
2755
|
+
binEdges
|
|
2756
|
+
}
|
|
2757
|
+
}
|
|
2758
|
+
) }),
|
|
2759
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { flex: 1 } })
|
|
2760
|
+
] })
|
|
2761
|
+
}
|
|
2762
|
+
) });
|
|
2673
2763
|
}
|
|
2674
|
-
var HistogramDiffResultView =
|
|
2764
|
+
var HistogramDiffResultView = React4.forwardRef(_HistogramDiffResultView);
|
|
2675
2765
|
function ProfileDiffForm({
|
|
2676
2766
|
params,
|
|
2677
2767
|
onParamsChanged,
|
|
2678
2768
|
setIsReadyToExecute
|
|
2679
2769
|
}) {
|
|
2680
|
-
const [allColumns, setAllColumns] =
|
|
2770
|
+
const [allColumns, setAllColumns] = React4.useState(
|
|
2681
2771
|
!params.columns || params.columns.length === 0
|
|
2682
2772
|
);
|
|
2683
2773
|
const model = params.model;
|
|
2684
2774
|
const { columns, isLoading, error } = useModelColumns_default(params.model);
|
|
2685
|
-
|
|
2775
|
+
React4.useEffect(() => {
|
|
2686
2776
|
setIsReadyToExecute(!!model);
|
|
2687
2777
|
}, [model, setIsReadyToExecute]);
|
|
2688
2778
|
const columnNames = columns.map((c) => c.name);
|
|
@@ -2952,7 +3042,7 @@ function DataFrameColumnGroupHeader({
|
|
|
2952
3042
|
onPinnedColumnsChange,
|
|
2953
3043
|
onColumnsRenderModeChanged
|
|
2954
3044
|
}) {
|
|
2955
|
-
const [anchorEl, setAnchorEl] =
|
|
3045
|
+
const [anchorEl, setAnchorEl] = React4.useState(null);
|
|
2956
3046
|
const menuOpen = Boolean(anchorEl);
|
|
2957
3047
|
const handleMenuClick = (event) => {
|
|
2958
3048
|
setAnchorEl(event.currentTarget);
|
|
@@ -3075,7 +3165,7 @@ function DataFrameColumnHeader({
|
|
|
3075
3165
|
columnType,
|
|
3076
3166
|
onColumnsRenderModeChanged
|
|
3077
3167
|
}) {
|
|
3078
|
-
const [anchorEl, setAnchorEl] =
|
|
3168
|
+
const [anchorEl, setAnchorEl] = React4.useState(null);
|
|
3079
3169
|
const menuOpen = Boolean(anchorEl);
|
|
3080
3170
|
const handleMenuClick = (event) => {
|
|
3081
3171
|
setAnchorEl(event.currentTarget);
|
|
@@ -3394,8 +3484,8 @@ function getHeaderCellClass(columnStatus) {
|
|
|
3394
3484
|
}
|
|
3395
3485
|
var defaultRenderCell = (params) => {
|
|
3396
3486
|
const colDef = params.colDef;
|
|
3397
|
-
const columnType = colDef?.columnType;
|
|
3398
|
-
const columnRenderMode = colDef?.columnRenderMode;
|
|
3487
|
+
const columnType = colDef?.context?.columnType;
|
|
3488
|
+
const columnRenderMode = colDef?.context?.columnRenderMode;
|
|
3399
3489
|
const fieldName = colDef?.field ?? "";
|
|
3400
3490
|
if (!params.data) {
|
|
3401
3491
|
return null;
|
|
@@ -3415,6 +3505,31 @@ var defaultRenderCell = (params) => {
|
|
|
3415
3505
|
}
|
|
3416
3506
|
);
|
|
3417
3507
|
};
|
|
3508
|
+
|
|
3509
|
+
// recce-source/js/src/lib/hooks/useClipBoardToast.tsx
|
|
3510
|
+
function useClipBoardToast() {
|
|
3511
|
+
function successToast(message) {
|
|
3512
|
+
toaster.create({
|
|
3513
|
+
description: message,
|
|
3514
|
+
type: "info",
|
|
3515
|
+
duration: 5e3,
|
|
3516
|
+
closable: true
|
|
3517
|
+
});
|
|
3518
|
+
}
|
|
3519
|
+
function failToast(title, error) {
|
|
3520
|
+
toaster.create({
|
|
3521
|
+
title,
|
|
3522
|
+
description: String(error),
|
|
3523
|
+
type: "error",
|
|
3524
|
+
duration: 5e3,
|
|
3525
|
+
closable: true
|
|
3526
|
+
});
|
|
3527
|
+
}
|
|
3528
|
+
return {
|
|
3529
|
+
successToast,
|
|
3530
|
+
failToast
|
|
3531
|
+
};
|
|
3532
|
+
}
|
|
3418
3533
|
var DiffText = ({
|
|
3419
3534
|
value,
|
|
3420
3535
|
colorPalette,
|
|
@@ -3422,7 +3537,7 @@ var DiffText = ({
|
|
|
3422
3537
|
noCopy,
|
|
3423
3538
|
fontSize
|
|
3424
3539
|
}) => {
|
|
3425
|
-
const [isHovered, setIsHovered] =
|
|
3540
|
+
const [isHovered, setIsHovered] = React4.useState(false);
|
|
3426
3541
|
const textColor = colors[colorPalette][800];
|
|
3427
3542
|
const bgColor = colors[colorPalette][100];
|
|
3428
3543
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3480,39 +3595,38 @@ function CopyControl({
|
|
|
3480
3595
|
grayOut,
|
|
3481
3596
|
isHovered
|
|
3482
3597
|
}) {
|
|
3483
|
-
const [
|
|
3484
|
-
const
|
|
3485
|
-
if (noCopy || grayOut) {
|
|
3598
|
+
const [, copyToClipboard] = usehooksTs.useCopyToClipboard();
|
|
3599
|
+
const { successToast } = useClipBoardToast();
|
|
3600
|
+
if (noCopy || grayOut || !isHovered) {
|
|
3486
3601
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
3487
3602
|
}
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
}
|
|
3494
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3603
|
+
const handleCopy = () => {
|
|
3604
|
+
copyToClipboard(value);
|
|
3605
|
+
successToast(`${value} copied`);
|
|
3606
|
+
};
|
|
3607
|
+
return /* @__PURE__ */ jsxRuntime.jsx(MuiTooltip__default.default, { title: "Copy Value", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3495
3608
|
IconButton2__default.default,
|
|
3496
3609
|
{
|
|
3497
3610
|
"aria-label": "Copy",
|
|
3498
3611
|
size: "small",
|
|
3499
|
-
onClick:
|
|
3612
|
+
onClick: handleCopy,
|
|
3500
3613
|
sx: {
|
|
3501
|
-
minWidth: "
|
|
3502
|
-
height: "
|
|
3614
|
+
minWidth: "0.625rem",
|
|
3615
|
+
height: "0.625rem",
|
|
3503
3616
|
display: "flex",
|
|
3504
3617
|
alignItems: "center",
|
|
3505
3618
|
justifyContent: "center",
|
|
3506
|
-
p: 0
|
|
3619
|
+
p: 0,
|
|
3620
|
+
color: "inherit"
|
|
3507
3621
|
},
|
|
3508
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(pi.PiCopy, { size: "
|
|
3622
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(pi.PiCopy, { size: "0.625rem" })
|
|
3509
3623
|
}
|
|
3510
|
-
);
|
|
3624
|
+
) });
|
|
3511
3625
|
}
|
|
3512
3626
|
var inlineRenderCell = (params) => {
|
|
3513
3627
|
const colDef = params.colDef;
|
|
3514
|
-
const columnType = colDef?.columnType;
|
|
3515
|
-
const columnRenderMode = colDef?.columnRenderMode;
|
|
3628
|
+
const columnType = colDef?.context?.columnType;
|
|
3629
|
+
const columnRenderMode = colDef?.context?.columnRenderMode;
|
|
3516
3630
|
const columnKey = colDef?.field ?? "";
|
|
3517
3631
|
if (!params.data) {
|
|
3518
3632
|
return null;
|
|
@@ -3697,8 +3811,7 @@ function toDiffColumn(config) {
|
|
|
3697
3811
|
headerClass: headerCellClass,
|
|
3698
3812
|
headerComponent,
|
|
3699
3813
|
cellRenderer: inlineRenderCell,
|
|
3700
|
-
columnType,
|
|
3701
|
-
columnRenderMode
|
|
3814
|
+
context: { columnType, columnRenderMode }
|
|
3702
3815
|
};
|
|
3703
3816
|
}
|
|
3704
3817
|
const cellClassBase = createCellClassBase(name, columnStatus);
|
|
@@ -3707,8 +3820,7 @@ function toDiffColumn(config) {
|
|
|
3707
3820
|
headerName: name,
|
|
3708
3821
|
headerClass: headerCellClass,
|
|
3709
3822
|
headerGroupComponent: headerComponent,
|
|
3710
|
-
columnType,
|
|
3711
|
-
columnRenderMode,
|
|
3823
|
+
context: { columnType, columnRenderMode },
|
|
3712
3824
|
children: [
|
|
3713
3825
|
{
|
|
3714
3826
|
field: `base__${name}`,
|
|
@@ -3716,8 +3828,7 @@ function toDiffColumn(config) {
|
|
|
3716
3828
|
headerClass: headerCellClass,
|
|
3717
3829
|
cellClass: cellClassBase,
|
|
3718
3830
|
cellRenderer: defaultRenderCell,
|
|
3719
|
-
columnType,
|
|
3720
|
-
columnRenderMode
|
|
3831
|
+
context: { columnType, columnRenderMode }
|
|
3721
3832
|
},
|
|
3722
3833
|
{
|
|
3723
3834
|
field: `current__${name}`,
|
|
@@ -3725,8 +3836,7 @@ function toDiffColumn(config) {
|
|
|
3725
3836
|
headerClass: headerCellClass,
|
|
3726
3837
|
cellClass: cellClassCurrent,
|
|
3727
3838
|
cellRenderer: defaultRenderCell,
|
|
3728
|
-
columnType,
|
|
3729
|
-
columnRenderMode
|
|
3839
|
+
context: { columnType, columnRenderMode }
|
|
3730
3840
|
}
|
|
3731
3841
|
]
|
|
3732
3842
|
};
|
|
@@ -3764,8 +3874,7 @@ function createPrimaryKeyColumn(config, headerProps) {
|
|
|
3764
3874
|
return void 0;
|
|
3765
3875
|
},
|
|
3766
3876
|
cellRenderer: defaultRenderCell,
|
|
3767
|
-
columnType,
|
|
3768
|
-
columnRenderMode
|
|
3877
|
+
context: { columnType, columnRenderMode }
|
|
3769
3878
|
};
|
|
3770
3879
|
}
|
|
3771
3880
|
function createDiffColumn(config, displayMode, headerProps, baseTitle, currentTitle) {
|
|
@@ -3954,8 +4063,7 @@ function createPrimaryKeyColumn2(config, headerProps) {
|
|
|
3954
4063
|
),
|
|
3955
4064
|
pinned: "left",
|
|
3956
4065
|
cellRenderer: defaultRenderCell,
|
|
3957
|
-
columnType,
|
|
3958
|
-
columnRenderMode
|
|
4066
|
+
context: { columnType, columnRenderMode }
|
|
3959
4067
|
};
|
|
3960
4068
|
}
|
|
3961
4069
|
function createRegularColumn(config, headerProps) {
|
|
@@ -3974,8 +4082,7 @@ function createRegularColumn(config, headerProps) {
|
|
|
3974
4082
|
}
|
|
3975
4083
|
),
|
|
3976
4084
|
cellRenderer: defaultRenderCell,
|
|
3977
|
-
columnType,
|
|
3978
|
-
columnRenderMode
|
|
4085
|
+
context: { columnType, columnRenderMode }
|
|
3979
4086
|
};
|
|
3980
4087
|
}
|
|
3981
4088
|
function buildSimpleColumnDefinitions(config) {
|
|
@@ -4474,9 +4581,9 @@ function toRowCountDiffDataGrid(result) {
|
|
|
4474
4581
|
];
|
|
4475
4582
|
return { columns, rows };
|
|
4476
4583
|
}
|
|
4477
|
-
var LineageViewContext =
|
|
4584
|
+
var LineageViewContext = React4.createContext(void 0);
|
|
4478
4585
|
var useLineageViewContextSafe = () => {
|
|
4479
|
-
const context =
|
|
4586
|
+
const context = React4.useContext(LineageViewContext);
|
|
4480
4587
|
if (!context) {
|
|
4481
4588
|
throw new Error(
|
|
4482
4589
|
"useLineageViewContext must be used within a LineageViewProvider"
|
|
@@ -4485,7 +4592,7 @@ var useLineageViewContextSafe = () => {
|
|
|
4485
4592
|
return context;
|
|
4486
4593
|
};
|
|
4487
4594
|
var useLineageViewContext = () => {
|
|
4488
|
-
return
|
|
4595
|
+
return React4.useContext(LineageViewContext);
|
|
4489
4596
|
};
|
|
4490
4597
|
function ColumnNameCell({
|
|
4491
4598
|
model,
|
|
@@ -4499,7 +4606,7 @@ function ColumnNameCell({
|
|
|
4499
4606
|
const { featureToggles } = useRecceInstanceContext();
|
|
4500
4607
|
const { name, baseType, currentType, baseIndex, currentIndex } = row;
|
|
4501
4608
|
const columnType = currentType ?? baseType;
|
|
4502
|
-
const [anchorEl, setAnchorEl] =
|
|
4609
|
+
const [anchorEl, setAnchorEl] = React4.useState(null);
|
|
4503
4610
|
const menuOpen = Boolean(anchorEl);
|
|
4504
4611
|
const handleMenuClick = (event) => {
|
|
4505
4612
|
event.stopPropagation();
|
|
@@ -4698,7 +4805,7 @@ function renderIndexCell(params) {
|
|
|
4698
4805
|
const value = isRemoved ? baseIndex !== void 0 ? baseIndex : "-" : currentIndex !== void 0 ? currentIndex : "-";
|
|
4699
4806
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: value });
|
|
4700
4807
|
}
|
|
4701
|
-
var MemoizedRenderIndexCell =
|
|
4808
|
+
var MemoizedRenderIndexCell = React4__default.default.memo(renderIndexCell);
|
|
4702
4809
|
MemoizedRenderIndexCell.displayName = "MemoizedRenderIndexCell";
|
|
4703
4810
|
function renderTypeCell(params) {
|
|
4704
4811
|
if (!params.data) {
|
|
@@ -4731,7 +4838,7 @@ function renderTypeCell(params) {
|
|
|
4731
4838
|
}
|
|
4732
4839
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: isRemoved ? baseType : currentType });
|
|
4733
4840
|
}
|
|
4734
|
-
var MemoizedRenderTypeCell =
|
|
4841
|
+
var MemoizedRenderTypeCell = React4__default.default.memo(renderTypeCell);
|
|
4735
4842
|
MemoizedRenderTypeCell.displayName = "MemoizedRenderTypeCell";
|
|
4736
4843
|
|
|
4737
4844
|
// recce-source/js/src/lib/dataGrid/generators/toSchemaDataGrid.ts
|
|
@@ -4864,7 +4971,7 @@ function ValueDiffColumnNameCell({
|
|
|
4864
4971
|
}) {
|
|
4865
4972
|
const { runAction } = useRecceActionContext();
|
|
4866
4973
|
const { featureToggles } = useRecceInstanceContext();
|
|
4867
|
-
const [anchorEl, setAnchorEl] =
|
|
4974
|
+
const [anchorEl, setAnchorEl] = React4.useState(null);
|
|
4868
4975
|
const menuOpen = Boolean(anchorEl);
|
|
4869
4976
|
const handleMenuClick = (event) => {
|
|
4870
4977
|
setAnchorEl(event.currentTarget);
|
|
@@ -5290,7 +5397,7 @@ var recceGridThemeLight = agGridCommunity.themeQuartz.withParams({
|
|
|
5290
5397
|
headerFontWeight: 700,
|
|
5291
5398
|
cellHorizontalPadding: 8
|
|
5292
5399
|
});
|
|
5293
|
-
agGridCommunity.themeQuartz.withParams({
|
|
5400
|
+
var recceGridThemeDark = agGridCommunity.themeQuartz.withParams({
|
|
5294
5401
|
backgroundColor: "#1e1e1e",
|
|
5295
5402
|
headerBackgroundColor: "#252526",
|
|
5296
5403
|
rowHoverColor: "#1e1e1e",
|
|
@@ -5336,9 +5443,9 @@ function _ScreenshotDataGrid({
|
|
|
5336
5443
|
renderers,
|
|
5337
5444
|
...props
|
|
5338
5445
|
}, ref) {
|
|
5339
|
-
const containerRef =
|
|
5340
|
-
const gridApiRef =
|
|
5341
|
-
|
|
5446
|
+
const containerRef = React4.useRef(null);
|
|
5447
|
+
const gridApiRef = React4.useRef(null);
|
|
5448
|
+
React4.useImperativeHandle(
|
|
5342
5449
|
ref,
|
|
5343
5450
|
() => ({
|
|
5344
5451
|
api: gridApiRef.current,
|
|
@@ -5346,11 +5453,15 @@ function _ScreenshotDataGrid({
|
|
|
5346
5453
|
}),
|
|
5347
5454
|
[]
|
|
5348
5455
|
);
|
|
5349
|
-
const
|
|
5456
|
+
const muiTheme = styles.useTheme();
|
|
5457
|
+
const gridTheme = React4.useMemo(
|
|
5458
|
+
() => muiTheme.palette.mode === "dark" ? recceGridThemeDark : recceGridThemeLight,
|
|
5459
|
+
[muiTheme.palette.mode]
|
|
5460
|
+
);
|
|
5350
5461
|
const resolvedColumnDefs = columnDefs ?? columns;
|
|
5351
5462
|
const resolvedRowData = rowData ?? rows;
|
|
5352
5463
|
const resolvedDefaultColDef = defaultColDef ?? defaultColumnOptions;
|
|
5353
|
-
const mergedDefaultColDef =
|
|
5464
|
+
const mergedDefaultColDef = React4.useMemo(
|
|
5354
5465
|
() => ({
|
|
5355
5466
|
resizable: true,
|
|
5356
5467
|
suppressMovable: true,
|
|
@@ -5358,11 +5469,11 @@ function _ScreenshotDataGrid({
|
|
|
5358
5469
|
}),
|
|
5359
5470
|
[resolvedDefaultColDef]
|
|
5360
5471
|
);
|
|
5361
|
-
const noRowsOverlayComponent =
|
|
5472
|
+
const noRowsOverlayComponent = React4.useMemo(() => {
|
|
5362
5473
|
if (!renderers?.noRowsFallback) return void 0;
|
|
5363
5474
|
return () => renderers.noRowsFallback;
|
|
5364
5475
|
}, [renderers?.noRowsFallback]);
|
|
5365
|
-
const resolvedGetRowId =
|
|
5476
|
+
const resolvedGetRowId = React4.useMemo(() => {
|
|
5366
5477
|
if (getRowId) return getRowId;
|
|
5367
5478
|
return (params) => {
|
|
5368
5479
|
const data = params.data;
|
|
@@ -5373,7 +5484,7 @@ function _ScreenshotDataGrid({
|
|
|
5373
5484
|
return String(index ?? Math.random());
|
|
5374
5485
|
};
|
|
5375
5486
|
}, [getRowId]);
|
|
5376
|
-
const gridKey =
|
|
5487
|
+
const gridKey = React4.useMemo(() => {
|
|
5377
5488
|
if (!resolvedColumnDefs) return "grid";
|
|
5378
5489
|
const pinnedFields = resolvedColumnDefs.filter(
|
|
5379
5490
|
(col) => "field" in col && col.pinned === "left"
|
|
@@ -5408,18 +5519,18 @@ function _ScreenshotDataGrid({
|
|
|
5408
5519
|
"& .ag-header-cell": {
|
|
5409
5520
|
borderRight: "1px solid var(--ag-border-color)"
|
|
5410
5521
|
},
|
|
5411
|
-
// Diff cell styling
|
|
5522
|
+
// Diff cell styling - theme-aware colors
|
|
5412
5523
|
"& .diff-cell-added": {
|
|
5413
|
-
backgroundColor: "#cefece !important",
|
|
5414
|
-
color:
|
|
5524
|
+
backgroundColor: muiTheme.palette.mode === "dark" ? "#1a4d1a !important" : "#cefece !important",
|
|
5525
|
+
color: muiTheme.palette.text.primary
|
|
5415
5526
|
},
|
|
5416
5527
|
"& .diff-cell-removed": {
|
|
5417
|
-
backgroundColor: "#ffc5c5 !important",
|
|
5418
|
-
color:
|
|
5528
|
+
backgroundColor: muiTheme.palette.mode === "dark" ? "#5c1f1f !important" : "#ffc5c5 !important",
|
|
5529
|
+
color: muiTheme.palette.text.primary
|
|
5419
5530
|
},
|
|
5420
5531
|
"& .diff-cell-modified": {
|
|
5421
|
-
backgroundColor: "#ffc5c5 !important",
|
|
5422
|
-
color:
|
|
5532
|
+
backgroundColor: muiTheme.palette.mode === "dark" ? "#5c1f1f !important" : "#ffc5c5 !important",
|
|
5533
|
+
color: muiTheme.palette.text.primary
|
|
5423
5534
|
},
|
|
5424
5535
|
// Diff header styling
|
|
5425
5536
|
"& .diff-header-added": {
|
|
@@ -5432,18 +5543,18 @@ function _ScreenshotDataGrid({
|
|
|
5432
5543
|
},
|
|
5433
5544
|
// Index column styling
|
|
5434
5545
|
"& .index-column": {
|
|
5435
|
-
color:
|
|
5546
|
+
color: muiTheme.palette.text.secondary,
|
|
5436
5547
|
textAlign: "right"
|
|
5437
5548
|
},
|
|
5438
5549
|
// Frozen/pinned column styling
|
|
5439
5550
|
"& .ag-pinned-left-cols-container .ag-cell": {
|
|
5440
|
-
backgroundColor: "#f5f5f5"
|
|
5551
|
+
backgroundColor: muiTheme.palette.mode === "dark" ? "#2d2d2d" : "#f5f5f5"
|
|
5441
5552
|
}
|
|
5442
5553
|
},
|
|
5443
5554
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5444
5555
|
agGridReact.AgGridReact,
|
|
5445
5556
|
{
|
|
5446
|
-
theme,
|
|
5557
|
+
theme: gridTheme,
|
|
5447
5558
|
columnDefs: resolvedColumnDefs,
|
|
5448
5559
|
rowData: resolvedRowData,
|
|
5449
5560
|
getRowId: resolvedGetRowId,
|
|
@@ -5465,7 +5576,7 @@ function _ScreenshotDataGrid({
|
|
|
5465
5576
|
}
|
|
5466
5577
|
);
|
|
5467
5578
|
}
|
|
5468
|
-
var ScreenshotDataGrid =
|
|
5579
|
+
var ScreenshotDataGrid = React4.forwardRef(_ScreenshotDataGrid);
|
|
5469
5580
|
var ToggleSwitch = ({
|
|
5470
5581
|
value,
|
|
5471
5582
|
onChange,
|
|
@@ -5545,17 +5656,22 @@ var RunToolbar = ({
|
|
|
5545
5656
|
warnings,
|
|
5546
5657
|
children
|
|
5547
5658
|
}) => {
|
|
5659
|
+
const theme = styles.useTheme();
|
|
5660
|
+
const isDark = theme.palette.mode === "dark";
|
|
5661
|
+
const hasWarnings = warnings && warnings.length > 0;
|
|
5548
5662
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5549
5663
|
Box35__default.default,
|
|
5550
5664
|
{
|
|
5551
5665
|
sx: {
|
|
5552
5666
|
display: "flex",
|
|
5553
|
-
borderBottom: "1px solid
|
|
5667
|
+
borderBottom: "1px solid",
|
|
5668
|
+
borderColor: "divider",
|
|
5554
5669
|
justifyContent: "flex-end",
|
|
5555
5670
|
gap: "5px",
|
|
5556
5671
|
alignItems: "center",
|
|
5557
5672
|
px: "10px",
|
|
5558
|
-
bgcolor:
|
|
5673
|
+
bgcolor: hasWarnings ? isDark ? colors.amber[900] : colors.amber[100] : "inherit",
|
|
5674
|
+
color: hasWarnings ? isDark ? colors.amber[200] : colors.amber[800] : "inherit"
|
|
5559
5675
|
},
|
|
5560
5676
|
children: [
|
|
5561
5677
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5568,8 +5684,13 @@ var RunToolbar = ({
|
|
|
5568
5684
|
gap: 0
|
|
5569
5685
|
},
|
|
5570
5686
|
children: warnings?.map((warning) => /* @__PURE__ */ jsxRuntime.jsxs(Box35__default.default, { children: [
|
|
5571
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5572
|
-
|
|
5687
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5688
|
+
pi.PiWarning,
|
|
5689
|
+
{
|
|
5690
|
+
color: isDark ? colors.amber[400] : colors.amber[600],
|
|
5691
|
+
style: { verticalAlign: "middle", marginRight: 4 }
|
|
5692
|
+
}
|
|
5693
|
+
),
|
|
5573
5694
|
warning
|
|
5574
5695
|
] }, _3__default.default.uniqueId(`-${warning}`)))
|
|
5575
5696
|
}
|
|
@@ -5581,18 +5702,20 @@ var RunToolbar = ({
|
|
|
5581
5702
|
);
|
|
5582
5703
|
};
|
|
5583
5704
|
var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged }, ref) => {
|
|
5705
|
+
const theme = styles.useTheme();
|
|
5706
|
+
const isDark = theme.palette.mode === "dark";
|
|
5584
5707
|
if (!isProfileDiffRun(run)) {
|
|
5585
5708
|
throw new Error("Only run type profile_diff is supported");
|
|
5586
5709
|
}
|
|
5587
|
-
const pinnedColumns =
|
|
5710
|
+
const pinnedColumns = React4.useMemo(
|
|
5588
5711
|
() => viewOptions?.pinned_columns ?? [],
|
|
5589
5712
|
[viewOptions]
|
|
5590
5713
|
);
|
|
5591
|
-
const displayMode =
|
|
5714
|
+
const displayMode = React4.useMemo(
|
|
5592
5715
|
() => viewOptions?.display_mode ?? "inline",
|
|
5593
5716
|
[viewOptions]
|
|
5594
5717
|
);
|
|
5595
|
-
const columnsRenderMode =
|
|
5718
|
+
const columnsRenderMode = React4.useMemo(
|
|
5596
5719
|
() => ({
|
|
5597
5720
|
distinct_proportion: "percent",
|
|
5598
5721
|
not_null_proportion: "percent",
|
|
@@ -5600,7 +5723,7 @@ var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged },
|
|
|
5600
5723
|
}),
|
|
5601
5724
|
[viewOptions]
|
|
5602
5725
|
);
|
|
5603
|
-
const gridData =
|
|
5726
|
+
const gridData = React4.useMemo(() => {
|
|
5604
5727
|
const onColumnsRenderModeChanged = (cols) => {
|
|
5605
5728
|
const newRenderModes = {
|
|
5606
5729
|
...viewOptions?.columnsRenderMode ?? {},
|
|
@@ -5656,7 +5779,7 @@ var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged },
|
|
|
5656
5779
|
sx: {
|
|
5657
5780
|
display: "flex",
|
|
5658
5781
|
flexDirection: "column",
|
|
5659
|
-
bgcolor: "
|
|
5782
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
5660
5783
|
height: "100%"
|
|
5661
5784
|
},
|
|
5662
5785
|
children: [
|
|
@@ -5690,14 +5813,16 @@ var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged },
|
|
|
5690
5813
|
);
|
|
5691
5814
|
};
|
|
5692
5815
|
var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref) => {
|
|
5816
|
+
const theme = styles.useTheme();
|
|
5817
|
+
const isDark = theme.palette.mode === "dark";
|
|
5693
5818
|
if (!isProfileRun(run)) {
|
|
5694
5819
|
throw new Error("Only run type profile_diff is supported");
|
|
5695
5820
|
}
|
|
5696
|
-
const pinnedColumns =
|
|
5821
|
+
const pinnedColumns = React4.useMemo(
|
|
5697
5822
|
() => viewOptions?.pinned_columns ?? [],
|
|
5698
5823
|
[viewOptions]
|
|
5699
5824
|
);
|
|
5700
|
-
const columnsRenderMode =
|
|
5825
|
+
const columnsRenderMode = React4.useMemo(
|
|
5701
5826
|
() => ({
|
|
5702
5827
|
distinct_proportion: "percent",
|
|
5703
5828
|
not_null_proportion: "percent",
|
|
@@ -5705,7 +5830,7 @@ var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref)
|
|
|
5705
5830
|
}),
|
|
5706
5831
|
[viewOptions]
|
|
5707
5832
|
);
|
|
5708
|
-
const gridData =
|
|
5833
|
+
const gridData = React4.useMemo(() => {
|
|
5709
5834
|
const onColumnsRenderModeChanged = (cols) => {
|
|
5710
5835
|
const newRenderModes = {
|
|
5711
5836
|
...viewOptions?.columnsRenderMode ?? {},
|
|
@@ -5759,7 +5884,7 @@ var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref)
|
|
|
5759
5884
|
sx: {
|
|
5760
5885
|
display: "flex",
|
|
5761
5886
|
flexDirection: "column",
|
|
5762
|
-
bgcolor: "
|
|
5887
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
5763
5888
|
height: "100%"
|
|
5764
5889
|
},
|
|
5765
5890
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5776,8 +5901,8 @@ var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref)
|
|
|
5776
5901
|
}
|
|
5777
5902
|
);
|
|
5778
5903
|
};
|
|
5779
|
-
var ProfileDiffResultView =
|
|
5780
|
-
var ProfileResultView =
|
|
5904
|
+
var ProfileDiffResultView = React4.forwardRef(PrivateProfileDiffResultView);
|
|
5905
|
+
var ProfileResultView = React4.forwardRef(PrivateProfileResultView);
|
|
5781
5906
|
var ChangedOnlyCheckbox = ({
|
|
5782
5907
|
changedOnly,
|
|
5783
5908
|
onChange
|
|
@@ -5810,30 +5935,32 @@ var PrivateQueryDiffResultView = ({
|
|
|
5810
5935
|
baseTitle,
|
|
5811
5936
|
currentTitle
|
|
5812
5937
|
}, ref) => {
|
|
5813
|
-
const
|
|
5938
|
+
const theme = styles.useTheme();
|
|
5939
|
+
const isDark = theme.palette.mode === "dark";
|
|
5940
|
+
const primaryKeys = React4.useMemo(
|
|
5814
5941
|
() => viewOptions?.primary_keys ?? [],
|
|
5815
5942
|
[viewOptions]
|
|
5816
5943
|
);
|
|
5817
|
-
const changedOnly =
|
|
5944
|
+
const changedOnly = React4.useMemo(
|
|
5818
5945
|
() => viewOptions?.changed_only ?? false,
|
|
5819
5946
|
[viewOptions]
|
|
5820
5947
|
);
|
|
5821
|
-
const pinnedColumns =
|
|
5948
|
+
const pinnedColumns = React4.useMemo(
|
|
5822
5949
|
() => viewOptions?.pinned_columns ?? [],
|
|
5823
5950
|
[viewOptions]
|
|
5824
5951
|
);
|
|
5825
|
-
const displayMode =
|
|
5952
|
+
const displayMode = React4.useMemo(
|
|
5826
5953
|
() => viewOptions?.display_mode ?? "inline",
|
|
5827
5954
|
[viewOptions]
|
|
5828
5955
|
);
|
|
5829
|
-
const columnsRenderMode =
|
|
5956
|
+
const columnsRenderMode = React4.useMemo(
|
|
5830
5957
|
() => viewOptions?.columnsRenderMode ?? {},
|
|
5831
5958
|
[viewOptions]
|
|
5832
5959
|
);
|
|
5833
5960
|
if (run.type !== "query_diff") {
|
|
5834
5961
|
throw new Error("QueryDiffResult view should be rendered as query_diff");
|
|
5835
5962
|
}
|
|
5836
|
-
const gridData =
|
|
5963
|
+
const gridData = React4.useMemo(() => {
|
|
5837
5964
|
const onColumnsRenderModeChanged = (cols) => {
|
|
5838
5965
|
const newRenderModes = {
|
|
5839
5966
|
...viewOptions?.columnsRenderMode ?? {},
|
|
@@ -5885,7 +6012,7 @@ var PrivateQueryDiffResultView = ({
|
|
|
5885
6012
|
currentTitle,
|
|
5886
6013
|
columnsRenderMode
|
|
5887
6014
|
]);
|
|
5888
|
-
const warningPKey =
|
|
6015
|
+
const warningPKey = React4.useMemo(() => {
|
|
5889
6016
|
const pkName = primaryKeys.join(", ");
|
|
5890
6017
|
if (gridData.invalidPKeyBase && gridData.invalidPKeyCurrent) {
|
|
5891
6018
|
return `Warning: The primary key '${pkName}' is not unique in the base and current environments`;
|
|
@@ -5924,7 +6051,7 @@ var PrivateQueryDiffResultView = ({
|
|
|
5924
6051
|
sx: {
|
|
5925
6052
|
display: "flex",
|
|
5926
6053
|
flexDirection: "column",
|
|
5927
|
-
bgcolor: "
|
|
6054
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
5928
6055
|
height: "100%"
|
|
5929
6056
|
},
|
|
5930
6057
|
children: [
|
|
@@ -5997,26 +6124,28 @@ var PrivateQueryDiffJoinResultView = ({
|
|
|
5997
6124
|
baseTitle,
|
|
5998
6125
|
currentTitle
|
|
5999
6126
|
}, ref) => {
|
|
6127
|
+
const theme = styles.useTheme();
|
|
6128
|
+
const isDark = theme.palette.mode === "dark";
|
|
6000
6129
|
if (run.type !== "query_diff") {
|
|
6001
6130
|
throw new Error("QueryDiffResult view should be rendered as query_diff");
|
|
6002
6131
|
}
|
|
6003
|
-
const changedOnly =
|
|
6132
|
+
const changedOnly = React4.useMemo(
|
|
6004
6133
|
() => viewOptions?.changed_only ?? false,
|
|
6005
6134
|
[viewOptions]
|
|
6006
6135
|
);
|
|
6007
|
-
const pinnedColumns =
|
|
6136
|
+
const pinnedColumns = React4.useMemo(
|
|
6008
6137
|
() => viewOptions?.pinned_columns ?? [],
|
|
6009
6138
|
[viewOptions]
|
|
6010
6139
|
);
|
|
6011
|
-
const displayMode =
|
|
6140
|
+
const displayMode = React4.useMemo(
|
|
6012
6141
|
() => viewOptions?.display_mode ?? "inline",
|
|
6013
6142
|
[viewOptions]
|
|
6014
6143
|
);
|
|
6015
|
-
const columnsRenderMode =
|
|
6144
|
+
const columnsRenderMode = React4.useMemo(
|
|
6016
6145
|
() => viewOptions?.columnsRenderMode ?? {},
|
|
6017
6146
|
[viewOptions]
|
|
6018
6147
|
);
|
|
6019
|
-
const gridData =
|
|
6148
|
+
const gridData = React4.useMemo(() => {
|
|
6020
6149
|
const onColumnsRenderModeChanged = (cols) => {
|
|
6021
6150
|
const newRenderModes = {
|
|
6022
6151
|
...viewOptions?.columnsRenderMode ?? {},
|
|
@@ -6085,7 +6214,7 @@ var PrivateQueryDiffJoinResultView = ({
|
|
|
6085
6214
|
sx: {
|
|
6086
6215
|
display: "flex",
|
|
6087
6216
|
flexDirection: "column",
|
|
6088
|
-
bgcolor: "
|
|
6217
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
6089
6218
|
height: "100%"
|
|
6090
6219
|
},
|
|
6091
6220
|
children: [
|
|
@@ -6120,7 +6249,7 @@ var PrivateQueryDiffJoinResultView = ({
|
|
|
6120
6249
|
sx: {
|
|
6121
6250
|
display: "flex",
|
|
6122
6251
|
flexDirection: "column",
|
|
6123
|
-
bgcolor: "
|
|
6252
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
6124
6253
|
height: "100%"
|
|
6125
6254
|
},
|
|
6126
6255
|
children: [
|
|
@@ -6186,11 +6315,11 @@ var PrivateQueryDiffJoinResultView = ({
|
|
|
6186
6315
|
}
|
|
6187
6316
|
);
|
|
6188
6317
|
};
|
|
6189
|
-
var QueryDiffResultViewWithRef =
|
|
6190
|
-
var QueryDiffJoinResultViewWithRef =
|
|
6318
|
+
var QueryDiffResultViewWithRef = React4.forwardRef(PrivateQueryDiffResultView);
|
|
6319
|
+
var QueryDiffJoinResultViewWithRef = React4.forwardRef(
|
|
6191
6320
|
PrivateQueryDiffJoinResultView
|
|
6192
6321
|
);
|
|
6193
|
-
var QueryDiffResultView =
|
|
6322
|
+
var QueryDiffResultView = React4.forwardRef(
|
|
6194
6323
|
(props, ref) => {
|
|
6195
6324
|
let baseTitle;
|
|
6196
6325
|
let currentTitle;
|
|
@@ -6227,19 +6356,21 @@ var PrivateQueryResultView = ({
|
|
|
6227
6356
|
onViewOptionsChanged,
|
|
6228
6357
|
onAddToChecklist
|
|
6229
6358
|
}, ref) => {
|
|
6359
|
+
const theme = styles.useTheme();
|
|
6360
|
+
const isDark = theme.palette.mode === "dark";
|
|
6230
6361
|
if (!(isQueryRun(run) || isQueryBaseRun(run))) {
|
|
6231
6362
|
throw new Error("run type must be query");
|
|
6232
6363
|
}
|
|
6233
|
-
const pinnedColumns =
|
|
6364
|
+
const pinnedColumns = React4.useMemo(
|
|
6234
6365
|
() => viewOptions?.pinned_columns ?? [],
|
|
6235
6366
|
[viewOptions]
|
|
6236
6367
|
);
|
|
6237
|
-
const columnsRenderMode =
|
|
6368
|
+
const columnsRenderMode = React4.useMemo(
|
|
6238
6369
|
() => viewOptions?.columnsRenderMode ?? {},
|
|
6239
6370
|
[viewOptions]
|
|
6240
6371
|
);
|
|
6241
6372
|
const dataframe = run.result;
|
|
6242
|
-
const gridData =
|
|
6373
|
+
const gridData = React4.useMemo(() => {
|
|
6243
6374
|
const onColumnsRenderModeChanged = (cols) => {
|
|
6244
6375
|
const newRenderModes = {
|
|
6245
6376
|
...viewOptions?.columnsRenderMode ?? {},
|
|
@@ -6290,25 +6421,27 @@ var PrivateQueryResultView = ({
|
|
|
6290
6421
|
const limit = dataframe ? dataframe.limit ?? 0 : 0;
|
|
6291
6422
|
const warning = limit > 0 && dataframe?.more ? `Warning: Displayed results are limited to ${limit.toLocaleString()} records. To ensure complete data retrieval, consider applying a LIMIT or WHERE clause to constrain the result set.` : null;
|
|
6292
6423
|
const showTopBar = onAddToChecklist ?? warning;
|
|
6293
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Stack24__default.default, { sx: { bgcolor: "
|
|
6424
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Stack24__default.default, { sx: { bgcolor: isDark ? "grey.900" : "grey.50", height: "100%" }, children: [
|
|
6294
6425
|
showTopBar && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6295
6426
|
Stack24__default.default,
|
|
6296
6427
|
{
|
|
6297
6428
|
direction: "row",
|
|
6298
6429
|
sx: {
|
|
6299
|
-
borderBottom: "1px solid
|
|
6430
|
+
borderBottom: "1px solid",
|
|
6431
|
+
borderBottomColor: "divider",
|
|
6300
6432
|
alignItems: "center",
|
|
6301
6433
|
gap: "5px",
|
|
6302
6434
|
px: "10px",
|
|
6303
|
-
bgcolor: warning ?
|
|
6435
|
+
bgcolor: warning ? isDark ? colors.amber[900] : colors.amber[100] : "inherit",
|
|
6436
|
+
color: warning ? isDark ? colors.amber[200] : colors.amber[800] : "inherit"
|
|
6304
6437
|
},
|
|
6305
6438
|
children: [
|
|
6306
6439
|
warning && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6307
6440
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6308
|
-
|
|
6441
|
+
pi.PiWarning,
|
|
6309
6442
|
{
|
|
6310
|
-
|
|
6311
|
-
|
|
6443
|
+
color: isDark ? colors.amber[400] : colors.amber[600],
|
|
6444
|
+
style: { alignSelf: "center" }
|
|
6312
6445
|
}
|
|
6313
6446
|
),
|
|
6314
6447
|
" ",
|
|
@@ -6344,17 +6477,19 @@ var PrivateQueryResultView = ({
|
|
|
6344
6477
|
maxWidth: 800,
|
|
6345
6478
|
minWidth: 35
|
|
6346
6479
|
},
|
|
6347
|
-
className: "rdg-light"
|
|
6480
|
+
className: isDark ? "rdg-dark" : "rdg-light"
|
|
6348
6481
|
}
|
|
6349
6482
|
)
|
|
6350
6483
|
] });
|
|
6351
6484
|
};
|
|
6352
|
-
var QueryResultView =
|
|
6485
|
+
var QueryResultView = React4.forwardRef(PrivateQueryResultView);
|
|
6353
6486
|
function _RowCountGridView({ run, typeGuard, expectedType }, ref) {
|
|
6487
|
+
const theme = styles.useTheme();
|
|
6488
|
+
const isDark = theme.palette.mode === "dark";
|
|
6354
6489
|
if (!typeGuard(run)) {
|
|
6355
6490
|
throw new Error(`Run type must be ${expectedType}`);
|
|
6356
6491
|
}
|
|
6357
|
-
const gridData =
|
|
6492
|
+
const gridData = React4.useMemo(() => {
|
|
6358
6493
|
return createDataGrid(run) ?? { columns: [], rows: [] };
|
|
6359
6494
|
}, [run]);
|
|
6360
6495
|
if (gridData.rows.length === 0) {
|
|
@@ -6365,7 +6500,7 @@ function _RowCountGridView({ run, typeGuard, expectedType }, ref) {
|
|
|
6365
6500
|
display: "flex",
|
|
6366
6501
|
alignItems: "center",
|
|
6367
6502
|
justifyContent: "center",
|
|
6368
|
-
bgcolor: "
|
|
6503
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
6369
6504
|
height: "100%"
|
|
6370
6505
|
},
|
|
6371
6506
|
children: "No nodes matched"
|
|
@@ -6390,7 +6525,7 @@ function _RowCountGridView({ run, typeGuard, expectedType }, ref) {
|
|
|
6390
6525
|
}
|
|
6391
6526
|
) });
|
|
6392
6527
|
}
|
|
6393
|
-
var RowCountGridView =
|
|
6528
|
+
var RowCountGridView = React4.forwardRef(_RowCountGridView);
|
|
6394
6529
|
function _RowCountDiffResultView({ run }, ref) {
|
|
6395
6530
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6396
6531
|
RowCountGridView,
|
|
@@ -6413,8 +6548,8 @@ function _RowCountResultView({ run }, ref) {
|
|
|
6413
6548
|
}
|
|
6414
6549
|
);
|
|
6415
6550
|
}
|
|
6416
|
-
var RowCountDiffResultView =
|
|
6417
|
-
var RowCountResultView =
|
|
6551
|
+
var RowCountDiffResultView = React4.forwardRef(_RowCountDiffResultView);
|
|
6552
|
+
var RowCountResultView = React4.forwardRef(_RowCountResultView);
|
|
6418
6553
|
function TopKDiffForm({
|
|
6419
6554
|
params,
|
|
6420
6555
|
onParamsChanged,
|
|
@@ -6422,7 +6557,7 @@ function TopKDiffForm({
|
|
|
6422
6557
|
}) {
|
|
6423
6558
|
const { columns, isLoading, error } = useModelColumns_default(params.model);
|
|
6424
6559
|
const columnNames = columns.map((c) => c.name);
|
|
6425
|
-
|
|
6560
|
+
React4.useEffect(() => {
|
|
6426
6561
|
setIsReadyToExecute(!!params.column_name);
|
|
6427
6562
|
}, [params, setIsReadyToExecute]);
|
|
6428
6563
|
if (isLoading) {
|
|
@@ -6449,7 +6584,7 @@ function TopKDiffForm({
|
|
|
6449
6584
|
)
|
|
6450
6585
|
] }) });
|
|
6451
6586
|
}
|
|
6452
|
-
var
|
|
6587
|
+
var INFO_VAL_COLOR2 = "#63B3ED";
|
|
6453
6588
|
function prepareSummaryList(topK, isDisplayTopTen) {
|
|
6454
6589
|
const endAtIndex = isDisplayTopTen ? 10 : topK.counts.length;
|
|
6455
6590
|
const counts = topK.counts.slice(0, endAtIndex);
|
|
@@ -6485,6 +6620,7 @@ function prepareSummaryList(topK, isDisplayTopTen) {
|
|
|
6485
6620
|
function TopKChartTooltip({
|
|
6486
6621
|
base,
|
|
6487
6622
|
current,
|
|
6623
|
+
barColors,
|
|
6488
6624
|
children
|
|
6489
6625
|
}) {
|
|
6490
6626
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6492,7 +6628,7 @@ function TopKChartTooltip({
|
|
|
6492
6628
|
{
|
|
6493
6629
|
title: /* @__PURE__ */ jsxRuntime.jsxs(Box35__default.default, { children: [
|
|
6494
6630
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography28__default.default, { children: [
|
|
6495
|
-
/* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color:
|
|
6631
|
+
/* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color: barColors.current }),
|
|
6496
6632
|
"Current: ",
|
|
6497
6633
|
current.count,
|
|
6498
6634
|
" (",
|
|
@@ -6500,7 +6636,7 @@ function TopKChartTooltip({
|
|
|
6500
6636
|
")"
|
|
6501
6637
|
] }),
|
|
6502
6638
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography28__default.default, { children: [
|
|
6503
|
-
/* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color:
|
|
6639
|
+
/* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color: barColors.base }),
|
|
6504
6640
|
"Base: ",
|
|
6505
6641
|
base.count,
|
|
6506
6642
|
" (",
|
|
@@ -6517,6 +6653,9 @@ function TopKSummaryBarChart({
|
|
|
6517
6653
|
topKDiff,
|
|
6518
6654
|
isDisplayTopTen
|
|
6519
6655
|
}) {
|
|
6656
|
+
const theme = styles.useTheme();
|
|
6657
|
+
const isDark = theme.palette.mode === "dark";
|
|
6658
|
+
const barColors = getBarColors(isDark);
|
|
6520
6659
|
const currents = prepareSummaryList(topKDiff.current, isDisplayTopTen);
|
|
6521
6660
|
const bases = prepareSummaryList(topKDiff.base, isDisplayTopTen);
|
|
6522
6661
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box35__default.default, { sx: { width: "100%", px: 20, py: 2 }, children: [
|
|
@@ -6526,9 +6665,9 @@ function TopKSummaryBarChart({
|
|
|
6526
6665
|
Typography28__default.default,
|
|
6527
6666
|
{
|
|
6528
6667
|
component: "h3",
|
|
6529
|
-
sx: { fontSize: "0.875rem", p: 1, color: "
|
|
6668
|
+
sx: { fontSize: "0.875rem", p: 1, color: "text.secondary" },
|
|
6530
6669
|
children: [
|
|
6531
|
-
/* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color:
|
|
6670
|
+
/* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color: barColors.base }),
|
|
6532
6671
|
" Base"
|
|
6533
6672
|
]
|
|
6534
6673
|
}
|
|
@@ -6537,9 +6676,9 @@ function TopKSummaryBarChart({
|
|
|
6537
6676
|
Typography28__default.default,
|
|
6538
6677
|
{
|
|
6539
6678
|
component: "h3",
|
|
6540
|
-
sx: { fontSize: "0.875rem", p: 1, color: "
|
|
6679
|
+
sx: { fontSize: "0.875rem", p: 1, color: "text.secondary" },
|
|
6541
6680
|
children: [
|
|
6542
|
-
/* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color:
|
|
6681
|
+
/* @__PURE__ */ jsxRuntime.jsx(SquareIcon, { color: barColors.current }),
|
|
6543
6682
|
" Current"
|
|
6544
6683
|
]
|
|
6545
6684
|
}
|
|
@@ -6551,121 +6690,134 @@ function TopKSummaryBarChart({
|
|
|
6551
6690
|
if (current.isLastItemOthers && current.count === 0 && base.count === 0) {
|
|
6552
6691
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
6553
6692
|
}
|
|
6554
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6555
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6556
|
-
|
|
6693
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React4.Fragment, { children: [
|
|
6694
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6695
|
+
TopKChartTooltip,
|
|
6557
6696
|
{
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6697
|
+
base,
|
|
6698
|
+
current,
|
|
6699
|
+
barColors,
|
|
6700
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6701
|
+
Box35__default.default,
|
|
6702
|
+
{
|
|
6703
|
+
sx: {
|
|
6704
|
+
display: "flex",
|
|
6705
|
+
alignItems: "center",
|
|
6706
|
+
width: "100%",
|
|
6707
|
+
"&:hover": { bgcolor: "action.hover" },
|
|
6708
|
+
px: 2
|
|
6709
|
+
},
|
|
6710
|
+
children: [
|
|
6711
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6712
|
+
Typography28__default.default,
|
|
6713
|
+
{
|
|
6714
|
+
sx: {
|
|
6715
|
+
width: "10em",
|
|
6716
|
+
fontSize: "0.875rem",
|
|
6717
|
+
color: current.isSpecialLabel ? "grey.400" : "inherit",
|
|
6718
|
+
overflow: "hidden",
|
|
6719
|
+
textOverflow: "ellipsis",
|
|
6720
|
+
whiteSpace: "nowrap"
|
|
6721
|
+
},
|
|
6722
|
+
children: current.label
|
|
6723
|
+
}
|
|
6724
|
+
),
|
|
6725
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6726
|
+
Box35__default.default,
|
|
6727
|
+
{
|
|
6728
|
+
sx: {
|
|
6729
|
+
display: "flex",
|
|
6730
|
+
width: "70%",
|
|
6731
|
+
flexDirection: "column"
|
|
6732
|
+
},
|
|
6733
|
+
children: [
|
|
6734
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box35__default.default, { sx: { display: "flex", height: "1em" }, children: [
|
|
6735
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6736
|
+
CategoricalBarChart,
|
|
6737
|
+
{
|
|
6738
|
+
topkCount: current.count,
|
|
6739
|
+
topkLabel: current.label,
|
|
6740
|
+
valids: topKDiff.current.valids,
|
|
6741
|
+
color: barColors.current,
|
|
6742
|
+
isDark
|
|
6743
|
+
}
|
|
6744
|
+
),
|
|
6745
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6746
|
+
Typography28__default.default,
|
|
6747
|
+
{
|
|
6748
|
+
sx: {
|
|
6749
|
+
ml: 2.5,
|
|
6750
|
+
mr: 1,
|
|
6751
|
+
fontSize: "0.875rem",
|
|
6752
|
+
width: "6em"
|
|
6753
|
+
},
|
|
6754
|
+
children: current.displayCount
|
|
6755
|
+
}
|
|
6756
|
+
),
|
|
6757
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6758
|
+
Typography28__default.default,
|
|
6759
|
+
{
|
|
6760
|
+
sx: {
|
|
6761
|
+
color: "grey.400",
|
|
6762
|
+
fontSize: "0.875rem",
|
|
6763
|
+
width: "4em"
|
|
6764
|
+
},
|
|
6765
|
+
children: current.displayRatio
|
|
6766
|
+
}
|
|
6767
|
+
)
|
|
6768
|
+
] }),
|
|
6769
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box35__default.default, { sx: { display: "flex", height: "1em" }, children: [
|
|
6770
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6771
|
+
CategoricalBarChart,
|
|
6772
|
+
{
|
|
6773
|
+
topkCount: base.count,
|
|
6774
|
+
topkLabel: base.label,
|
|
6775
|
+
valids: topKDiff.base.valids,
|
|
6776
|
+
color: barColors.base,
|
|
6777
|
+
isDark
|
|
6778
|
+
}
|
|
6779
|
+
),
|
|
6780
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6781
|
+
Typography28__default.default,
|
|
6782
|
+
{
|
|
6783
|
+
sx: {
|
|
6784
|
+
ml: 2.5,
|
|
6785
|
+
mr: 1,
|
|
6786
|
+
fontSize: "0.875rem",
|
|
6787
|
+
width: "6em"
|
|
6788
|
+
},
|
|
6789
|
+
children: base.displayCount
|
|
6790
|
+
}
|
|
6791
|
+
),
|
|
6792
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6793
|
+
Typography28__default.default,
|
|
6794
|
+
{
|
|
6795
|
+
sx: {
|
|
6796
|
+
color: "grey.400",
|
|
6797
|
+
fontSize: "0.875rem",
|
|
6798
|
+
width: "4em"
|
|
6799
|
+
},
|
|
6800
|
+
children: base.displayRatio
|
|
6801
|
+
}
|
|
6802
|
+
)
|
|
6803
|
+
] })
|
|
6804
|
+
]
|
|
6805
|
+
}
|
|
6806
|
+
)
|
|
6807
|
+
]
|
|
6808
|
+
}
|
|
6809
|
+
)
|
|
6661
6810
|
}
|
|
6662
|
-
)
|
|
6811
|
+
),
|
|
6663
6812
|
/* @__PURE__ */ jsxRuntime.jsx(Divider__default.default, {})
|
|
6664
6813
|
] }, current.label);
|
|
6665
6814
|
})
|
|
6666
6815
|
] });
|
|
6667
6816
|
}
|
|
6668
6817
|
function TopKSummaryList({ topk, valids, isDisplayTopTen }) {
|
|
6818
|
+
const theme = styles.useTheme();
|
|
6819
|
+
const isDark = theme.palette.mode === "dark";
|
|
6820
|
+
const barColors = getBarColors(isDark);
|
|
6669
6821
|
const endAtIndex = isDisplayTopTen ? 10 : topk.counts.length;
|
|
6670
6822
|
const displayList = topk.counts.slice(0, endAtIndex);
|
|
6671
6823
|
const remainingSumCount = valids - displayList.reduce((accum, curr) => accum + curr, 0);
|
|
@@ -6676,7 +6828,7 @@ function TopKSummaryList({ topk, valids, isDisplayTopTen }) {
|
|
|
6676
6828
|
const topkLabel = isLastItemOthers ? "(others)" : catName || "(empty)";
|
|
6677
6829
|
const displayTopkCount = formatAsAbbreviatedNumber(topkCount);
|
|
6678
6830
|
const displayTopkRatio = formatIntervalMinMax(topkCount / valids);
|
|
6679
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6831
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React4.Fragment, { children: !isLastItemOthers || topkCount > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6680
6832
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6681
6833
|
Box35__default.default,
|
|
6682
6834
|
{
|
|
@@ -6707,7 +6859,9 @@ function TopKSummaryList({ topk, valids, isDisplayTopTen }) {
|
|
|
6707
6859
|
{
|
|
6708
6860
|
topkCount,
|
|
6709
6861
|
topkLabel,
|
|
6710
|
-
valids
|
|
6862
|
+
valids,
|
|
6863
|
+
color: barColors.info,
|
|
6864
|
+
isDark
|
|
6711
6865
|
}
|
|
6712
6866
|
) }),
|
|
6713
6867
|
/* @__PURE__ */ jsxRuntime.jsx(MuiTooltip__default.default, { title: displayTopkCount, placement: "top-start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6748,10 +6902,13 @@ function CategoricalBarChart({
|
|
|
6748
6902
|
topkLabel,
|
|
6749
6903
|
valids,
|
|
6750
6904
|
animation = false,
|
|
6751
|
-
color =
|
|
6905
|
+
color = INFO_VAL_COLOR2,
|
|
6906
|
+
isDark = false
|
|
6752
6907
|
}) {
|
|
6753
6908
|
chart_js.Chart.register(chart_js.CategoryScale, chart_js.BarElement, chart_js.LinearScale);
|
|
6754
|
-
const chartOptions = getCatBarChartOptions(topkCount, valids, {
|
|
6909
|
+
const chartOptions = getCatBarChartOptions(topkCount, valids, isDark, {
|
|
6910
|
+
animation
|
|
6911
|
+
});
|
|
6755
6912
|
const chartData = getCatBarChartData({
|
|
6756
6913
|
topkCount,
|
|
6757
6914
|
topkLabel,
|
|
@@ -6759,7 +6916,8 @@ function CategoricalBarChart({
|
|
|
6759
6916
|
});
|
|
6760
6917
|
return /* @__PURE__ */ jsxRuntime.jsx(reactChartjs2.Bar, { data: chartData, options: chartOptions, plugins: [] });
|
|
6761
6918
|
}
|
|
6762
|
-
function getCatBarChartOptions(
|
|
6919
|
+
function getCatBarChartOptions(_count, valids, isDark = false, { ...configOverrides } = {}) {
|
|
6920
|
+
const themeColors = getChartThemeColors(isDark);
|
|
6763
6921
|
return {
|
|
6764
6922
|
responsive: true,
|
|
6765
6923
|
maintainAspectRatio: false,
|
|
@@ -6768,10 +6926,12 @@ function getCatBarChartOptions(count, valids, { ...configOverrides } = {}) {
|
|
|
6768
6926
|
x: {
|
|
6769
6927
|
display: false,
|
|
6770
6928
|
max: valids,
|
|
6771
|
-
grid: { display: false }
|
|
6929
|
+
grid: { display: false },
|
|
6930
|
+
ticks: { color: themeColors.textColor }
|
|
6772
6931
|
},
|
|
6773
6932
|
y: {
|
|
6774
|
-
display: false
|
|
6933
|
+
display: false,
|
|
6934
|
+
ticks: { color: themeColors.textColor }
|
|
6775
6935
|
}
|
|
6776
6936
|
},
|
|
6777
6937
|
plugins: {
|
|
@@ -6785,7 +6945,7 @@ function getCatBarChartOptions(count, valids, { ...configOverrides } = {}) {
|
|
|
6785
6945
|
function getCatBarChartData({
|
|
6786
6946
|
topkLabel,
|
|
6787
6947
|
topkCount,
|
|
6788
|
-
color =
|
|
6948
|
+
color = INFO_VAL_COLOR2
|
|
6789
6949
|
}) {
|
|
6790
6950
|
return {
|
|
6791
6951
|
labels: [topkLabel],
|
|
@@ -6806,39 +6966,53 @@ function getCatBarChartData({
|
|
|
6806
6966
|
};
|
|
6807
6967
|
}
|
|
6808
6968
|
var PrivateTopKDiffResultView = ({ run }, ref) => {
|
|
6809
|
-
const
|
|
6969
|
+
const theme = styles.useTheme();
|
|
6970
|
+
const isDark = theme.palette.mode === "dark";
|
|
6971
|
+
const [isDisplayTopTen, setIsDisplayTopTen] = React4.useState(true);
|
|
6810
6972
|
const result = run.result;
|
|
6811
6973
|
const params = run.params;
|
|
6812
6974
|
const baseTopK = result.base;
|
|
6813
6975
|
const currentTopK = result.current;
|
|
6814
6976
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box35__default.default, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
6815
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6977
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6978
|
+
ScreenshotBox,
|
|
6979
|
+
{
|
|
6980
|
+
ref,
|
|
6981
|
+
blockSize: "auto",
|
|
6982
|
+
backgroundColor: isDark ? "#1f2937" : "white",
|
|
6983
|
+
children: [
|
|
6984
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6985
|
+
Typography28__default.default,
|
|
6986
|
+
{
|
|
6987
|
+
variant: "h5",
|
|
6988
|
+
sx: {
|
|
6989
|
+
pt: 4,
|
|
6990
|
+
textAlign: "center",
|
|
6991
|
+
color: isDark ? "grey.200" : "grey.600"
|
|
6992
|
+
},
|
|
6993
|
+
children: [
|
|
6994
|
+
"Model ",
|
|
6995
|
+
params.model,
|
|
6996
|
+
".",
|
|
6997
|
+
params.column_name
|
|
6998
|
+
]
|
|
6999
|
+
}
|
|
7000
|
+
),
|
|
7001
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Stack24__default.default, { direction: "row", alignItems: "center", children: [
|
|
7002
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { flex: 1 } }),
|
|
7003
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7004
|
+
TopKSummaryBarChart,
|
|
7005
|
+
{
|
|
7006
|
+
topKDiff: result,
|
|
7007
|
+
valids: currentTopK.valids || 0,
|
|
7008
|
+
isDisplayTopTen
|
|
7009
|
+
}
|
|
7010
|
+
),
|
|
7011
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { flex: 1 } })
|
|
7012
|
+
] })
|
|
7013
|
+
]
|
|
7014
|
+
}
|
|
7015
|
+
),
|
|
6842
7016
|
/* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { flex: 1 } }),
|
|
6843
7017
|
(baseTopK.values.length > 10 || currentTopK.values.length > 10) && /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { display: "flex", p: 5, justifyContent: "start" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6844
7018
|
Link__default.default,
|
|
@@ -6853,33 +7027,35 @@ var PrivateTopKDiffResultView = ({ run }, ref) => {
|
|
|
6853
7027
|
) })
|
|
6854
7028
|
] });
|
|
6855
7029
|
};
|
|
6856
|
-
var TopKDiffResultView =
|
|
7030
|
+
var TopKDiffResultView = React4.forwardRef(PrivateTopKDiffResultView);
|
|
6857
7031
|
var PrivateValueDiffDetailResultView = ({
|
|
6858
7032
|
run,
|
|
6859
7033
|
onAddToChecklist,
|
|
6860
7034
|
viewOptions,
|
|
6861
7035
|
onViewOptionsChanged
|
|
6862
7036
|
}, ref) => {
|
|
7037
|
+
const theme = styles.useTheme();
|
|
7038
|
+
const isDark = theme.palette.mode === "dark";
|
|
6863
7039
|
if (!isValueDiffDetailRun(run)) {
|
|
6864
7040
|
throw new Error("run type must be value_diff_detail");
|
|
6865
7041
|
}
|
|
6866
|
-
const changedOnly =
|
|
7042
|
+
const changedOnly = React4.useMemo(
|
|
6867
7043
|
() => viewOptions?.changed_only ?? false,
|
|
6868
7044
|
[viewOptions]
|
|
6869
7045
|
);
|
|
6870
|
-
const pinnedColumns =
|
|
7046
|
+
const pinnedColumns = React4.useMemo(
|
|
6871
7047
|
() => viewOptions?.pinned_columns ?? [],
|
|
6872
7048
|
[viewOptions]
|
|
6873
7049
|
);
|
|
6874
|
-
const displayMode =
|
|
7050
|
+
const displayMode = React4.useMemo(
|
|
6875
7051
|
() => viewOptions?.display_mode ?? "inline",
|
|
6876
7052
|
[viewOptions]
|
|
6877
7053
|
);
|
|
6878
|
-
const columnsRenderMode =
|
|
7054
|
+
const columnsRenderMode = React4.useMemo(
|
|
6879
7055
|
() => viewOptions?.columnsRenderMode ?? {},
|
|
6880
7056
|
[viewOptions]
|
|
6881
7057
|
);
|
|
6882
|
-
const gridData =
|
|
7058
|
+
const gridData = React4.useMemo(() => {
|
|
6883
7059
|
const onColumnsRenderModeChanged = (cols) => {
|
|
6884
7060
|
const newRenderModes = {
|
|
6885
7061
|
...viewOptions?.columnsRenderMode ?? {},
|
|
@@ -6944,7 +7120,7 @@ var PrivateValueDiffDetailResultView = ({
|
|
|
6944
7120
|
sx: {
|
|
6945
7121
|
display: "flex",
|
|
6946
7122
|
flexDirection: "column",
|
|
6947
|
-
bgcolor: "
|
|
7123
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
6948
7124
|
height: "100%"
|
|
6949
7125
|
},
|
|
6950
7126
|
children: [
|
|
@@ -6979,7 +7155,7 @@ var PrivateValueDiffDetailResultView = ({
|
|
|
6979
7155
|
sx: {
|
|
6980
7156
|
display: "flex",
|
|
6981
7157
|
flexDirection: "column",
|
|
6982
|
-
bgcolor: "
|
|
7158
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
6983
7159
|
height: "100%"
|
|
6984
7160
|
},
|
|
6985
7161
|
children: [
|
|
@@ -7041,7 +7217,7 @@ var PrivateValueDiffDetailResultView = ({
|
|
|
7041
7217
|
}
|
|
7042
7218
|
);
|
|
7043
7219
|
};
|
|
7044
|
-
var ValueDiffDetailResultView =
|
|
7220
|
+
var ValueDiffDetailResultView = React4.forwardRef(
|
|
7045
7221
|
PrivateValueDiffDetailResultView
|
|
7046
7222
|
);
|
|
7047
7223
|
function ValueDiffForm({
|
|
@@ -7049,18 +7225,72 @@ function ValueDiffForm({
|
|
|
7049
7225
|
onParamsChanged,
|
|
7050
7226
|
setIsReadyToExecute
|
|
7051
7227
|
}) {
|
|
7052
|
-
const
|
|
7228
|
+
const theme = styles.useTheme();
|
|
7229
|
+
const isDark = theme.palette.mode === "dark";
|
|
7230
|
+
const [allColumns, setAllColumns] = React4.useState(
|
|
7053
7231
|
!params.columns || params.columns.length === 0
|
|
7054
7232
|
);
|
|
7055
7233
|
const model = params.model;
|
|
7056
7234
|
const primaryKey = params.primary_key;
|
|
7235
|
+
const selectStyles = React4.useMemo(
|
|
7236
|
+
() => ({
|
|
7237
|
+
container: (base) => ({
|
|
7238
|
+
...base,
|
|
7239
|
+
width: "100%"
|
|
7240
|
+
}),
|
|
7241
|
+
control: (base) => ({
|
|
7242
|
+
...base,
|
|
7243
|
+
minHeight: "40px",
|
|
7244
|
+
backgroundColor: isDark ? colors.neutral[700] : base.backgroundColor,
|
|
7245
|
+
borderColor: isDark ? colors.neutral[600] : base.borderColor
|
|
7246
|
+
}),
|
|
7247
|
+
menu: (base) => ({
|
|
7248
|
+
...base,
|
|
7249
|
+
backgroundColor: isDark ? colors.neutral[700] : base.backgroundColor
|
|
7250
|
+
}),
|
|
7251
|
+
option: (base, state) => ({
|
|
7252
|
+
...base,
|
|
7253
|
+
backgroundColor: state.isSelected ? isDark ? colors.neutral[600] : colors.iochmara[500] : state.isFocused ? isDark ? colors.neutral[600] : colors.iochmara[50] : isDark ? colors.neutral[700] : base.backgroundColor,
|
|
7254
|
+
color: isDark ? colors.neutral[200] : base.color
|
|
7255
|
+
}),
|
|
7256
|
+
multiValue: (base) => ({
|
|
7257
|
+
...base,
|
|
7258
|
+
backgroundColor: isDark ? colors.neutral[600] : base.backgroundColor
|
|
7259
|
+
}),
|
|
7260
|
+
multiValueLabel: (base) => ({
|
|
7261
|
+
...base,
|
|
7262
|
+
color: isDark ? colors.neutral[200] : base.color
|
|
7263
|
+
}),
|
|
7264
|
+
multiValueRemove: (base) => ({
|
|
7265
|
+
...base,
|
|
7266
|
+
color: isDark ? colors.neutral[400] : base.color,
|
|
7267
|
+
"&:hover": {
|
|
7268
|
+
backgroundColor: isDark ? colors.neutral[500] : colors.red[200],
|
|
7269
|
+
color: isDark ? colors.neutral[200] : colors.red[600]
|
|
7270
|
+
}
|
|
7271
|
+
}),
|
|
7272
|
+
input: (base) => ({
|
|
7273
|
+
...base,
|
|
7274
|
+
color: isDark ? colors.neutral[200] : base.color
|
|
7275
|
+
}),
|
|
7276
|
+
singleValue: (base) => ({
|
|
7277
|
+
...base,
|
|
7278
|
+
color: isDark ? colors.neutral[200] : base.color
|
|
7279
|
+
}),
|
|
7280
|
+
placeholder: (base) => ({
|
|
7281
|
+
...base,
|
|
7282
|
+
color: isDark ? colors.neutral[400] : base.color
|
|
7283
|
+
})
|
|
7284
|
+
}),
|
|
7285
|
+
[isDark]
|
|
7286
|
+
);
|
|
7057
7287
|
const {
|
|
7058
7288
|
columns,
|
|
7059
7289
|
primaryKey: nodePrimaryKey,
|
|
7060
7290
|
isLoading,
|
|
7061
7291
|
error
|
|
7062
7292
|
} = useModelColumns_default(params.model);
|
|
7063
|
-
|
|
7293
|
+
React4.useEffect(() => {
|
|
7064
7294
|
if (!primaryKey && nodePrimaryKey) {
|
|
7065
7295
|
onParamsChanged({
|
|
7066
7296
|
...params,
|
|
@@ -7068,7 +7298,7 @@ function ValueDiffForm({
|
|
|
7068
7298
|
});
|
|
7069
7299
|
}
|
|
7070
7300
|
}, [primaryKey, nodePrimaryKey, params, onParamsChanged]);
|
|
7071
|
-
|
|
7301
|
+
React4.useEffect(() => {
|
|
7072
7302
|
setIsReadyToExecute(!!(primaryKey && model));
|
|
7073
7303
|
}, [primaryKey, model, setIsReadyToExecute]);
|
|
7074
7304
|
const columnNames = columns.map((c) => c.name);
|
|
@@ -7113,16 +7343,7 @@ function ValueDiffForm({
|
|
|
7113
7343
|
primary_key: optionsArray.length == 1 ? optionsArray[0].value : optionsArray.map((v) => v.value)
|
|
7114
7344
|
});
|
|
7115
7345
|
},
|
|
7116
|
-
styles:
|
|
7117
|
-
container: (base) => ({
|
|
7118
|
-
...base,
|
|
7119
|
-
width: "100%"
|
|
7120
|
-
}),
|
|
7121
|
-
control: (base) => ({
|
|
7122
|
-
...base,
|
|
7123
|
-
minHeight: "40px"
|
|
7124
|
-
})
|
|
7125
|
-
}
|
|
7346
|
+
styles: selectStyles
|
|
7126
7347
|
}
|
|
7127
7348
|
)
|
|
7128
7349
|
] }),
|
|
@@ -7173,16 +7394,7 @@ function ValueDiffForm({
|
|
|
7173
7394
|
columns: cols
|
|
7174
7395
|
});
|
|
7175
7396
|
},
|
|
7176
|
-
styles:
|
|
7177
|
-
container: (base) => ({
|
|
7178
|
-
...base,
|
|
7179
|
-
width: "100%"
|
|
7180
|
-
}),
|
|
7181
|
-
control: (base) => ({
|
|
7182
|
-
...base,
|
|
7183
|
-
minHeight: "40px"
|
|
7184
|
-
})
|
|
7185
|
-
}
|
|
7397
|
+
styles: selectStyles
|
|
7186
7398
|
}
|
|
7187
7399
|
)
|
|
7188
7400
|
] })
|
|
@@ -7225,27 +7437,35 @@ function _ValueDiffResultView({ run }, ref) {
|
|
|
7225
7437
|
" removed)"
|
|
7226
7438
|
] }),
|
|
7227
7439
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7228
|
-
|
|
7440
|
+
Box35__default.default,
|
|
7229
7441
|
{
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7442
|
+
sx: {
|
|
7443
|
+
flex: 1,
|
|
7444
|
+
minHeight: 0,
|
|
7233
7445
|
maxHeight: "100%",
|
|
7234
7446
|
overflow: "auto",
|
|
7235
|
-
|
|
7447
|
+
borderTop: "1px solid",
|
|
7448
|
+
borderBottom: "1px solid",
|
|
7449
|
+
borderColor: "divider"
|
|
7236
7450
|
},
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7451
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7452
|
+
ScreenshotDataGrid,
|
|
7453
|
+
{
|
|
7454
|
+
ref,
|
|
7455
|
+
columns,
|
|
7456
|
+
rows,
|
|
7457
|
+
renderers: { noRowsFallback: /* @__PURE__ */ jsxRuntime.jsx(EmptyRowsRenderer, {}) },
|
|
7458
|
+
defaultColumnOptions: { resizable: true },
|
|
7459
|
+
className: "rdg-light"
|
|
7460
|
+
}
|
|
7461
|
+
)
|
|
7242
7462
|
}
|
|
7243
7463
|
)
|
|
7244
7464
|
]
|
|
7245
7465
|
}
|
|
7246
7466
|
);
|
|
7247
7467
|
}
|
|
7248
|
-
var ValueDiffResultView =
|
|
7468
|
+
var ValueDiffResultView = React4.forwardRef(_ValueDiffResultView);
|
|
7249
7469
|
|
|
7250
7470
|
// recce-source/js/src/components/run/registry.ts
|
|
7251
7471
|
function runTypeHasRef(runType) {
|
|
@@ -7351,7 +7571,7 @@ var findByRunType = (runType) => {
|
|
|
7351
7571
|
function useAppLocation() {
|
|
7352
7572
|
const router = navigation.useRouter();
|
|
7353
7573
|
const pathname = navigation.usePathname();
|
|
7354
|
-
const setLocation =
|
|
7574
|
+
const setLocation = React4.useCallback(
|
|
7355
7575
|
(to, options) => {
|
|
7356
7576
|
if (options?.replace) {
|
|
7357
7577
|
router.replace(to, { scroll: options?.scroll ?? true });
|
|
@@ -7363,7 +7583,7 @@ function useAppLocation() {
|
|
|
7363
7583
|
);
|
|
7364
7584
|
return [pathname, setLocation];
|
|
7365
7585
|
}
|
|
7366
|
-
var RecceActionContext =
|
|
7586
|
+
var RecceActionContext = React4.createContext({
|
|
7367
7587
|
runAction: () => {
|
|
7368
7588
|
return void 0;
|
|
7369
7589
|
},
|
|
@@ -7388,32 +7608,7 @@ var RecceActionContext = React3.createContext({
|
|
|
7388
7608
|
return void 0;
|
|
7389
7609
|
}
|
|
7390
7610
|
});
|
|
7391
|
-
var useRecceActionContext = () =>
|
|
7392
|
-
|
|
7393
|
-
// recce-source/js/src/lib/hooks/useClipBoardToast.tsx
|
|
7394
|
-
function useClipBoardToast() {
|
|
7395
|
-
function successToast(message) {
|
|
7396
|
-
toaster.create({
|
|
7397
|
-
description: message,
|
|
7398
|
-
type: "info",
|
|
7399
|
-
duration: 5e3,
|
|
7400
|
-
closable: true
|
|
7401
|
-
});
|
|
7402
|
-
}
|
|
7403
|
-
function failToast(title, error) {
|
|
7404
|
-
toaster.create({
|
|
7405
|
-
title,
|
|
7406
|
-
description: String(error),
|
|
7407
|
-
type: "error",
|
|
7408
|
-
duration: 5e3,
|
|
7409
|
-
closable: true
|
|
7410
|
-
});
|
|
7411
|
-
}
|
|
7412
|
-
return {
|
|
7413
|
-
successToast,
|
|
7414
|
-
failToast
|
|
7415
|
-
};
|
|
7416
|
-
}
|
|
7611
|
+
var useRecceActionContext = () => React4.useContext(RecceActionContext);
|
|
7417
7612
|
var loadHtml2Canvas = async () => {
|
|
7418
7613
|
const module = await import('html2canvas-pro/dist/html2canvas-pro.esm.js');
|
|
7419
7614
|
return module.default;
|
|
@@ -7432,14 +7627,14 @@ function useCopyToClipboard2({
|
|
|
7432
7627
|
backgroundColor = null,
|
|
7433
7628
|
boardEffect = true,
|
|
7434
7629
|
shadowEffect = false,
|
|
7435
|
-
borderStyle =
|
|
7630
|
+
borderStyle = `solid 1px ${colors.neutral[300]}`,
|
|
7436
7631
|
borderRadius = "10px",
|
|
7437
7632
|
onSuccess,
|
|
7438
7633
|
onError,
|
|
7439
7634
|
ignoreElements
|
|
7440
7635
|
}) {
|
|
7441
|
-
const [status, setStatus] =
|
|
7442
|
-
const ref =
|
|
7636
|
+
const [status, setStatus] = React4.useState("idle");
|
|
7637
|
+
const ref = React4.useRef(null);
|
|
7443
7638
|
const { onOpen, setImgBlob, ImageDownloadModal } = useImageDownloadModal();
|
|
7444
7639
|
const toImage = async () => {
|
|
7445
7640
|
if (!ref.current) {
|
|
@@ -7470,7 +7665,7 @@ function useCopyToClipboard2({
|
|
|
7470
7665
|
nodeToUse.style.overflow = "hidden";
|
|
7471
7666
|
nodeToUse.style.border = boardEffect ? borderStyle : "";
|
|
7472
7667
|
nodeToUse.style.borderRadius = boardEffect ? borderRadius : "";
|
|
7473
|
-
nodeToUse.style.backgroundColor = backgroundColor ??
|
|
7668
|
+
nodeToUse.style.backgroundColor = backgroundColor ?? colors.neutral[100];
|
|
7474
7669
|
nodeToUse.style.height = `${String(nodeToUse.offsetHeight)}px`;
|
|
7475
7670
|
const style = document.createElement("style");
|
|
7476
7671
|
document.head.appendChild(style);
|
|
@@ -7484,7 +7679,7 @@ function useCopyToClipboard2({
|
|
|
7484
7679
|
const html2canvas = await loadHtml2Canvas();
|
|
7485
7680
|
canvas = await html2canvas(nodeToUse, {
|
|
7486
7681
|
logging: false,
|
|
7487
|
-
backgroundColor:
|
|
7682
|
+
backgroundColor: backgroundColor ?? colors.neutral[100],
|
|
7488
7683
|
ignoreElements
|
|
7489
7684
|
});
|
|
7490
7685
|
} else {
|
|
@@ -7557,7 +7752,7 @@ function useCopyToClipboardButton(options) {
|
|
|
7557
7752
|
const { isLoading, copyToClipboard, ImageDownloadModal, ref } = useCopyToClipboard2({
|
|
7558
7753
|
imageType: "png",
|
|
7559
7754
|
shadowEffect: true,
|
|
7560
|
-
backgroundColor: options?.backgroundColor ??
|
|
7755
|
+
backgroundColor: options?.backgroundColor ?? colors.neutral[100],
|
|
7561
7756
|
onSuccess: () => {
|
|
7562
7757
|
successToast("Copied the query result as an image to clipboard");
|
|
7563
7758
|
},
|
|
@@ -7566,7 +7761,7 @@ function useCopyToClipboardButton(options) {
|
|
|
7566
7761
|
failToast("Failed to copy image to clipboard", error);
|
|
7567
7762
|
}
|
|
7568
7763
|
});
|
|
7569
|
-
const onMouseEnter =
|
|
7764
|
+
const onMouseEnter = React4.useCallback(() => {
|
|
7570
7765
|
if (ref.current) {
|
|
7571
7766
|
const nodeToUse = getHTMLElementFromRef(ref.current);
|
|
7572
7767
|
if (nodeToUse) {
|
|
@@ -7575,7 +7770,7 @@ function useCopyToClipboardButton(options) {
|
|
|
7575
7770
|
}
|
|
7576
7771
|
}
|
|
7577
7772
|
}, [ref]);
|
|
7578
|
-
const onMouseLeave =
|
|
7773
|
+
const onMouseLeave = React4.useCallback(() => {
|
|
7579
7774
|
if (ref.current) {
|
|
7580
7775
|
const nodeToUse = getHTMLElementFromRef(ref.current);
|
|
7581
7776
|
if (nodeToUse) {
|
|
@@ -7583,7 +7778,7 @@ function useCopyToClipboardButton(options) {
|
|
|
7583
7778
|
}
|
|
7584
7779
|
}
|
|
7585
7780
|
}, [ref]);
|
|
7586
|
-
const onCopyToClipboard =
|
|
7781
|
+
const onCopyToClipboard = React4.useCallback(async () => {
|
|
7587
7782
|
if (ref.current) {
|
|
7588
7783
|
await copyToClipboard();
|
|
7589
7784
|
const nodeToUse = getHTMLElementFromRef(ref.current);
|
|
@@ -7624,13 +7819,13 @@ function useCopyToClipboardButton(options) {
|
|
|
7624
7819
|
};
|
|
7625
7820
|
}
|
|
7626
7821
|
function useImageDownloadModal() {
|
|
7627
|
-
const [open, setOpen] =
|
|
7628
|
-
const [imgBlob, setImgBlob] =
|
|
7822
|
+
const [open, setOpen] = React4.useState(false);
|
|
7823
|
+
const [imgBlob, setImgBlob] = React4.useState();
|
|
7629
7824
|
const onOpen = () => setOpen(true);
|
|
7630
7825
|
const onClose = () => setOpen(false);
|
|
7631
7826
|
function ImageDownloadModal() {
|
|
7632
|
-
const [base64Img, setBase64Img] =
|
|
7633
|
-
|
|
7827
|
+
const [base64Img, setBase64Img] = React4.useState();
|
|
7828
|
+
React4.useEffect(() => {
|
|
7634
7829
|
if (!imgBlob) {
|
|
7635
7830
|
return;
|
|
7636
7831
|
}
|
|
@@ -7700,8 +7895,8 @@ function useImageDownloadModal() {
|
|
|
7700
7895
|
};
|
|
7701
7896
|
}
|
|
7702
7897
|
var useRun = (runId) => {
|
|
7703
|
-
const [isRunning, setIsRunning] =
|
|
7704
|
-
const [aborting, setAborting] =
|
|
7898
|
+
const [isRunning, setIsRunning] = React4.useState(false);
|
|
7899
|
+
const [aborting, setAborting] = React4.useState(false);
|
|
7705
7900
|
const [, refetchRunsAggregated] = useRunsAggregated();
|
|
7706
7901
|
const { error, data: run } = reactQuery.useQuery({
|
|
7707
7902
|
queryKey: cacheKeys.run(runId ?? ""),
|
|
@@ -7712,8 +7907,8 @@ var useRun = (runId) => {
|
|
|
7712
7907
|
refetchInterval: isRunning ? 50 : false,
|
|
7713
7908
|
retry: false
|
|
7714
7909
|
});
|
|
7715
|
-
const [prevRun, setPrevRun] =
|
|
7716
|
-
const [prevError, setPrevError] =
|
|
7910
|
+
const [prevRun, setPrevRun] = React4.useState(run);
|
|
7911
|
+
const [prevError, setPrevError] = React4.useState(error);
|
|
7717
7912
|
if (run !== prevRun || error !== prevError) {
|
|
7718
7913
|
setPrevRun(run);
|
|
7719
7914
|
setPrevError(error);
|
|
@@ -7723,12 +7918,12 @@ var useRun = (runId) => {
|
|
|
7723
7918
|
setIsRunning(true);
|
|
7724
7919
|
}
|
|
7725
7920
|
}
|
|
7726
|
-
|
|
7921
|
+
React4.useEffect(() => {
|
|
7727
7922
|
if ((error || run?.result || run?.error) && (run?.type === "row_count_diff" || run?.type === "row_count")) {
|
|
7728
7923
|
refetchRunsAggregated();
|
|
7729
7924
|
}
|
|
7730
7925
|
}, [run, error, refetchRunsAggregated]);
|
|
7731
|
-
const onCancel =
|
|
7926
|
+
const onCancel = React4.useCallback(async () => {
|
|
7732
7927
|
setAborting(true);
|
|
7733
7928
|
if (!runId) {
|
|
7734
7929
|
return;
|
|
@@ -7749,6 +7944,74 @@ var useRun = (runId) => {
|
|
|
7749
7944
|
RunResultView
|
|
7750
7945
|
};
|
|
7751
7946
|
};
|
|
7947
|
+
function useThemeColors() {
|
|
7948
|
+
const theme = styles.useTheme();
|
|
7949
|
+
const isDark = theme.palette.mode === "dark";
|
|
7950
|
+
return {
|
|
7951
|
+
/** Whether the current theme is dark mode */
|
|
7952
|
+
isDark,
|
|
7953
|
+
/** MUI theme object for direct access when needed */
|
|
7954
|
+
theme,
|
|
7955
|
+
/** Background colors */
|
|
7956
|
+
background: {
|
|
7957
|
+
/** Default page background */
|
|
7958
|
+
default: theme.palette.background.default,
|
|
7959
|
+
/** Paper/card background */
|
|
7960
|
+
paper: theme.palette.background.paper,
|
|
7961
|
+
/** Subtle background for slight elevation (e.g., hover states, inputs) */
|
|
7962
|
+
subtle: isDark ? colors.neutral[800] : colors.neutral[50],
|
|
7963
|
+
/** Emphasized background for higher contrast areas */
|
|
7964
|
+
emphasized: isDark ? colors.neutral[700] : colors.neutral[100]
|
|
7965
|
+
},
|
|
7966
|
+
/** Text colors */
|
|
7967
|
+
text: {
|
|
7968
|
+
/** Primary text color */
|
|
7969
|
+
primary: theme.palette.text.primary,
|
|
7970
|
+
/** Secondary/muted text color */
|
|
7971
|
+
secondary: theme.palette.text.secondary,
|
|
7972
|
+
/** Disabled text color */
|
|
7973
|
+
disabled: isDark ? colors.neutral[500] : colors.neutral[400],
|
|
7974
|
+
/** Inverted text (for use on dark backgrounds in light mode, etc.) */
|
|
7975
|
+
inverted: isDark ? colors.neutral[900] : colors.neutral[50]
|
|
7976
|
+
},
|
|
7977
|
+
/** Border colors */
|
|
7978
|
+
border: {
|
|
7979
|
+
/** Light border for subtle separations */
|
|
7980
|
+
light: isDark ? colors.neutral[700] : colors.neutral[200],
|
|
7981
|
+
/** Default border color */
|
|
7982
|
+
default: isDark ? colors.neutral[600] : colors.neutral[300],
|
|
7983
|
+
/** Strong border for emphasis */
|
|
7984
|
+
strong: isDark ? colors.neutral[500] : colors.neutral[400]
|
|
7985
|
+
},
|
|
7986
|
+
/** Status/semantic colors */
|
|
7987
|
+
status: {
|
|
7988
|
+
/** Added/success backgrounds */
|
|
7989
|
+
added: {
|
|
7990
|
+
bg: isDark ? "#1a4d1a" : "#cefece",
|
|
7991
|
+
text: theme.palette.text.primary
|
|
7992
|
+
},
|
|
7993
|
+
/** Removed/error backgrounds */
|
|
7994
|
+
removed: {
|
|
7995
|
+
bg: isDark ? "#5c1f1f" : "#ffc5c5",
|
|
7996
|
+
text: theme.palette.text.primary
|
|
7997
|
+
},
|
|
7998
|
+
/** Modified/warning backgrounds */
|
|
7999
|
+
modified: {
|
|
8000
|
+
bg: isDark ? "#5c4a1a" : "#fff3cd",
|
|
8001
|
+
text: theme.palette.text.primary
|
|
8002
|
+
}
|
|
8003
|
+
},
|
|
8004
|
+
/** Interactive element colors */
|
|
8005
|
+
interactive: {
|
|
8006
|
+
/** Hover state background */
|
|
8007
|
+
hover: isDark ? colors.neutral[700] : colors.neutral[100],
|
|
8008
|
+
/** Active/pressed state background */
|
|
8009
|
+
active: isDark ? colors.neutral[600] : colors.neutral[200],
|
|
8010
|
+
/** Focus ring color */
|
|
8011
|
+
focus: colors.iochmara[500]
|
|
8012
|
+
}
|
|
8013
|
+
};
|
|
8014
|
+
}
|
|
7752
8015
|
function ActionControl({ onClose }) {
|
|
7753
8016
|
const { cancel, actionState } = useLineageViewContextSafe();
|
|
7754
8017
|
const getProgressMessage = () => {
|
|
@@ -7766,7 +8029,7 @@ function ActionControl({ onClose }) {
|
|
|
7766
8029
|
}
|
|
7767
8030
|
}
|
|
7768
8031
|
};
|
|
7769
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { bgcolor: "
|
|
8032
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { bgcolor: "background.paper", borderRadius: 1, boxShadow: 6 }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7770
8033
|
Stack24__default.default,
|
|
7771
8034
|
{
|
|
7772
8035
|
direction: "row",
|
|
@@ -7823,10 +8086,10 @@ var IconChanged = (props) => {
|
|
|
7823
8086
|
}
|
|
7824
8087
|
);
|
|
7825
8088
|
};
|
|
7826
|
-
function getIconForChangeStatus(changeStatus) {
|
|
8089
|
+
function getIconForChangeStatus(changeStatus, isDark) {
|
|
7827
8090
|
if (changeStatus === "added") {
|
|
7828
8091
|
const color2 = String(token("colors.green.solid"));
|
|
7829
|
-
const backgroundColor2 = String(token("colors.green.subtle"));
|
|
8092
|
+
const backgroundColor2 = isDark ? String(token("colors.green.muted")) : String(token("colors.green.subtle"));
|
|
7830
8093
|
return {
|
|
7831
8094
|
color: color2,
|
|
7832
8095
|
hexColor: color2,
|
|
@@ -7836,7 +8099,7 @@ function getIconForChangeStatus(changeStatus) {
|
|
|
7836
8099
|
};
|
|
7837
8100
|
} else if (changeStatus === "removed") {
|
|
7838
8101
|
const color2 = String(token("colors.red.solid"));
|
|
7839
|
-
const backgroundColor2 = String(token("colors.red.subtle"));
|
|
8102
|
+
const backgroundColor2 = isDark ? String(token("colors.red.muted")) : String(token("colors.red.subtle"));
|
|
7840
8103
|
return {
|
|
7841
8104
|
color: color2,
|
|
7842
8105
|
hexColor: color2,
|
|
@@ -7846,7 +8109,7 @@ function getIconForChangeStatus(changeStatus) {
|
|
|
7846
8109
|
};
|
|
7847
8110
|
} else if (changeStatus === "modified") {
|
|
7848
8111
|
const color2 = String(token("colors.amber.emphasized"));
|
|
7849
|
-
const backgroundColor2 = String(token("colors.amber.subtle"));
|
|
8112
|
+
const backgroundColor2 = isDark ? String(token("colors.amber.emphasized")) : String(token("colors.amber.subtle"));
|
|
7850
8113
|
return {
|
|
7851
8114
|
color: color2,
|
|
7852
8115
|
hexColor: color2,
|
|
@@ -7856,7 +8119,7 @@ function getIconForChangeStatus(changeStatus) {
|
|
|
7856
8119
|
};
|
|
7857
8120
|
}
|
|
7858
8121
|
const color = String(token("colors.gray.focusRing"));
|
|
7859
|
-
const backgroundColor = "#ffffff";
|
|
8122
|
+
const backgroundColor = isDark ? "#404040" : "#ffffff";
|
|
7860
8123
|
return {
|
|
7861
8124
|
color,
|
|
7862
8125
|
hexColor: color,
|
|
@@ -7915,10 +8178,10 @@ function ChangeStatusLegend() {
|
|
|
7915
8178
|
Box35__default.default,
|
|
7916
8179
|
{
|
|
7917
8180
|
sx: {
|
|
7918
|
-
bgcolor: "
|
|
8181
|
+
bgcolor: "background.paper",
|
|
7919
8182
|
padding: "12px",
|
|
7920
8183
|
border: "1px solid",
|
|
7921
|
-
borderColor: "
|
|
8184
|
+
borderColor: "divider",
|
|
7922
8185
|
fontSize: "0.875rem"
|
|
7923
8186
|
},
|
|
7924
8187
|
children: Object.entries(CHANGE_STATUS_MSGS).map(([key, [label, tip]]) => {
|
|
@@ -7968,13 +8231,13 @@ var ModeMessage = () => {
|
|
|
7968
8231
|
onClick: () => {
|
|
7969
8232
|
centerNode(nodeId);
|
|
7970
8233
|
},
|
|
7971
|
-
sx: {
|
|
8234
|
+
sx: (theme) => ({
|
|
7972
8235
|
cursor: "pointer",
|
|
7973
8236
|
fontFamily: "monospace",
|
|
7974
|
-
bgcolor: "grey.100",
|
|
8237
|
+
bgcolor: theme.palette.mode === "dark" ? "grey.700" : "grey.100",
|
|
7975
8238
|
px: 0.5,
|
|
7976
8239
|
borderRadius: 0.5
|
|
7977
|
-
},
|
|
8240
|
+
}),
|
|
7978
8241
|
children: nodeName
|
|
7979
8242
|
}
|
|
7980
8243
|
)
|
|
@@ -7993,13 +8256,13 @@ var ModeMessage = () => {
|
|
|
7993
8256
|
onClick: () => {
|
|
7994
8257
|
centerNode(nodeId);
|
|
7995
8258
|
},
|
|
7996
|
-
sx: {
|
|
8259
|
+
sx: (theme) => ({
|
|
7997
8260
|
cursor: "pointer",
|
|
7998
8261
|
fontFamily: "monospace",
|
|
7999
|
-
bgcolor: "grey.100",
|
|
8262
|
+
bgcolor: theme.palette.mode === "dark" ? "grey.700" : "grey.100",
|
|
8000
8263
|
px: 0.5,
|
|
8001
8264
|
borderRadius: 0.5
|
|
8002
|
-
},
|
|
8265
|
+
}),
|
|
8003
8266
|
children: [
|
|
8004
8267
|
nodeName,
|
|
8005
8268
|
".",
|
|
@@ -8035,10 +8298,11 @@ var ColumnLevelLineageControl = ({
|
|
|
8035
8298
|
{
|
|
8036
8299
|
size: "small",
|
|
8037
8300
|
variant: "outlined",
|
|
8301
|
+
color: "neutral",
|
|
8038
8302
|
sx: {
|
|
8039
|
-
borderColor: "neutral.light",
|
|
8040
8303
|
whiteSpace: "nowrap",
|
|
8041
|
-
display: "inline-flex"
|
|
8304
|
+
display: "inline-flex",
|
|
8305
|
+
bgcolor: "background.paper"
|
|
8042
8306
|
},
|
|
8043
8307
|
disabled: !interactive || noCatalogCurrent,
|
|
8044
8308
|
startIcon: /* @__PURE__ */ jsxRuntime.jsx(fa.FaRegDotCircle, {}),
|
|
@@ -8062,8 +8326,8 @@ var ColumnLevelLineageControl = ({
|
|
|
8062
8326
|
borderRadius: 1,
|
|
8063
8327
|
boxShadow: 3,
|
|
8064
8328
|
border: "1px solid",
|
|
8065
|
-
borderColor: "
|
|
8066
|
-
bgcolor: "
|
|
8329
|
+
borderColor: "divider",
|
|
8330
|
+
bgcolor: "background.paper",
|
|
8067
8331
|
fontSize: "0.8rem",
|
|
8068
8332
|
p: "0 0.625rem"
|
|
8069
8333
|
},
|
|
@@ -8181,6 +8445,7 @@ function GraphColumnNode(nodeProps) {
|
|
|
8181
8445
|
const { id: nodeId } = data.node;
|
|
8182
8446
|
const { column, type, transformationType, changeStatus } = data;
|
|
8183
8447
|
const showContent = react$1.useStore((s) => s.transform[2] > 0.3);
|
|
8448
|
+
const { background, text, border } = useThemeColors();
|
|
8184
8449
|
const {
|
|
8185
8450
|
viewOptions,
|
|
8186
8451
|
showContextMenu,
|
|
@@ -8190,7 +8455,7 @@ function GraphColumnNode(nodeProps) {
|
|
|
8190
8455
|
const selectedNode = viewOptions.column_level_lineage?.node_id;
|
|
8191
8456
|
const selectedColumn = viewOptions.column_level_lineage?.column;
|
|
8192
8457
|
const isFocus = column === selectedColumn && nodeId === selectedNode;
|
|
8193
|
-
const [isHovered, setIsHovered] =
|
|
8458
|
+
const [isHovered, setIsHovered] = React4__default.default.useState(false);
|
|
8194
8459
|
const isHighlighted = isNodeHighlighted(columnNodeId);
|
|
8195
8460
|
const isShowingChangeAnalysis = isNodeShowingChangeAnalysis(nodeId);
|
|
8196
8461
|
if (!showContent) {
|
|
@@ -8203,10 +8468,11 @@ function GraphColumnNode(nodeProps) {
|
|
|
8203
8468
|
display: "flex",
|
|
8204
8469
|
width: 280,
|
|
8205
8470
|
padding: "0px 10px",
|
|
8206
|
-
border: "1px solid
|
|
8207
|
-
|
|
8471
|
+
border: "1px solid",
|
|
8472
|
+
borderColor: border.default,
|
|
8473
|
+
backgroundColor: isFocus ? background.subtle : "inherit",
|
|
8208
8474
|
"&:hover": {
|
|
8209
|
-
backgroundColor:
|
|
8475
|
+
backgroundColor: background.subtle
|
|
8210
8476
|
},
|
|
8211
8477
|
filter: isHighlighted ? "none" : "opacity(0.2) grayscale(50%)",
|
|
8212
8478
|
cursor: "pointer"
|
|
@@ -8224,7 +8490,7 @@ function GraphColumnNode(nodeProps) {
|
|
|
8224
8490
|
sx: {
|
|
8225
8491
|
display: "flex",
|
|
8226
8492
|
fontSize: "11px",
|
|
8227
|
-
color:
|
|
8493
|
+
color: text.primary,
|
|
8228
8494
|
width: "100%",
|
|
8229
8495
|
gap: "3px",
|
|
8230
8496
|
alignItems: "center",
|
|
@@ -8242,7 +8508,7 @@ function GraphColumnNode(nodeProps) {
|
|
|
8242
8508
|
fontSize: 14,
|
|
8243
8509
|
display: "inline-flex",
|
|
8244
8510
|
cursor: "pointer",
|
|
8245
|
-
"&:hover": { color:
|
|
8511
|
+
"&:hover": { color: text.primary }
|
|
8246
8512
|
},
|
|
8247
8513
|
onClick: (e) => {
|
|
8248
8514
|
e.preventDefault();
|
|
@@ -8312,10 +8578,10 @@ function ColumnLevelLineageLegend() {
|
|
|
8312
8578
|
Box35__default.default,
|
|
8313
8579
|
{
|
|
8314
8580
|
sx: {
|
|
8315
|
-
bgcolor: "
|
|
8581
|
+
bgcolor: "background.paper",
|
|
8316
8582
|
padding: "12px",
|
|
8317
8583
|
border: "1px solid",
|
|
8318
|
-
borderColor: "
|
|
8584
|
+
borderColor: "divider",
|
|
8319
8585
|
fontSize: "0.875rem"
|
|
8320
8586
|
},
|
|
8321
8587
|
children: Object.entries(TRANSFORMATION_MSGS).map(([key, [label, tip]]) => {
|
|
@@ -8409,17 +8675,17 @@ function SetupConnectionPopover({
|
|
|
8409
8675
|
children,
|
|
8410
8676
|
display
|
|
8411
8677
|
}) {
|
|
8412
|
-
const [hovered, setHovered] =
|
|
8413
|
-
const timeoutRef =
|
|
8414
|
-
const anchorRef =
|
|
8415
|
-
const handleMouseEnter =
|
|
8678
|
+
const [hovered, setHovered] = React4.useState(false);
|
|
8679
|
+
const timeoutRef = React4.useRef(null);
|
|
8680
|
+
const anchorRef = React4.useRef(null);
|
|
8681
|
+
const handleMouseEnter = React4.useCallback(() => {
|
|
8416
8682
|
if (timeoutRef.current) {
|
|
8417
8683
|
clearTimeout(timeoutRef.current);
|
|
8418
8684
|
timeoutRef.current = null;
|
|
8419
8685
|
}
|
|
8420
8686
|
setHovered(true);
|
|
8421
8687
|
}, []);
|
|
8422
|
-
const handleMouseLeave =
|
|
8688
|
+
const handleMouseLeave = React4.useCallback(() => {
|
|
8423
8689
|
timeoutRef.current = setTimeout(() => {
|
|
8424
8690
|
setHovered(false);
|
|
8425
8691
|
}, 100);
|
|
@@ -8485,15 +8751,16 @@ function SetupConnectionPopover({
|
|
|
8485
8751
|
)
|
|
8486
8752
|
] });
|
|
8487
8753
|
}
|
|
8488
|
-
var tagRootSx = {
|
|
8754
|
+
var tagRootSx = (theme) => ({
|
|
8489
8755
|
display: "inline-flex",
|
|
8490
8756
|
alignItems: "center",
|
|
8491
8757
|
borderRadius: 16,
|
|
8492
8758
|
px: 1,
|
|
8493
8759
|
py: 0.25,
|
|
8494
8760
|
fontSize: "0.75rem",
|
|
8495
|
-
bgcolor: "grey.100"
|
|
8496
|
-
|
|
8761
|
+
bgcolor: theme.palette.mode === "dark" ? "grey.700" : "grey.100",
|
|
8762
|
+
color: theme.palette.mode === "dark" ? "grey.100" : "inherit"
|
|
8763
|
+
});
|
|
8497
8764
|
var tagStartElementSx = {
|
|
8498
8765
|
mr: 0.5,
|
|
8499
8766
|
display: "flex",
|
|
@@ -8586,10 +8853,10 @@ function RowCountDiffTag({
|
|
|
8586
8853
|
Box35__default.default,
|
|
8587
8854
|
{
|
|
8588
8855
|
component: "span",
|
|
8589
|
-
sx: {
|
|
8590
|
-
...tagRootSx,
|
|
8856
|
+
sx: (theme) => ({
|
|
8857
|
+
...tagRootSx(theme),
|
|
8591
8858
|
gap: 0.5
|
|
8592
|
-
},
|
|
8859
|
+
}),
|
|
8593
8860
|
children: [
|
|
8594
8861
|
/* @__PURE__ */ jsxRuntime.jsx(RunTypeIcon, {}),
|
|
8595
8862
|
rowsToShow != null || isFetching ? isFetching ? /* @__PURE__ */ jsxRuntime.jsx(Skeleton__default.default, { width: 30, height: 16 }) : rowsToShow != null ? /* @__PURE__ */ jsxRuntime.jsx(_RowCountByRate, { rowCount: rowsToShow }) : /* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { variant: "caption", children: "row count" }) : /* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { variant: "caption", children: "row count" }),
|
|
@@ -8784,6 +9051,7 @@ var NodeRunsAggregated = ({
|
|
|
8784
9051
|
inverted
|
|
8785
9052
|
}) => {
|
|
8786
9053
|
const { lineageGraph, runsAggregated } = useLineageGraphContext();
|
|
9054
|
+
const { text, isDark } = useThemeColors();
|
|
8787
9055
|
const runs = runsAggregated?.[id];
|
|
8788
9056
|
const node = lineageGraph?.nodes[id];
|
|
8789
9057
|
if (!runs && !node) {
|
|
@@ -8801,8 +9069,8 @@ var NodeRunsAggregated = ({
|
|
|
8801
9069
|
const result = rowCountDiff.result;
|
|
8802
9070
|
rowCountChanged = result.curr !== result.base;
|
|
8803
9071
|
}
|
|
8804
|
-
const colorChanged = inverted ?
|
|
8805
|
-
const colorUnchanged = inverted ? "
|
|
9072
|
+
const colorChanged = inverted ? text.inverted : getIconForChangeStatus("modified").color;
|
|
9073
|
+
const colorUnchanged = inverted ? text.secondary : isDark ? "grey.700" : "grey.100";
|
|
8806
9074
|
const SchemaDiffIcon = findByRunType("schema_diff").icon;
|
|
8807
9075
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box35__default.default, { sx: { display: "flex", flex: 1, alignItems: "center" }, children: [
|
|
8808
9076
|
schemaChanged !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8883,8 +9151,9 @@ function GraphNode(nodeProps) {
|
|
|
8883
9151
|
const { data } = nodeProps;
|
|
8884
9152
|
const { id, resourceType, changeStatus } = data;
|
|
8885
9153
|
const showContent = react$1.useStore((s) => s.transform[2] > 0.3);
|
|
9154
|
+
const { background, text, isDark } = useThemeColors();
|
|
8886
9155
|
const { icon: ResourceIcon } = getIconForResourceType(resourceType);
|
|
8887
|
-
const [isHovered, setIsHovered] =
|
|
9156
|
+
const [isHovered, setIsHovered] = React4.useState(false);
|
|
8888
9157
|
const {
|
|
8889
9158
|
interactive,
|
|
8890
9159
|
selectNode,
|
|
@@ -8910,10 +9179,10 @@ function GraphNode(nodeProps) {
|
|
|
8910
9179
|
icon: IconChangeStatus,
|
|
8911
9180
|
color: colorChangeStatus,
|
|
8912
9181
|
backgroundColor: backgroundColorChangeStatus
|
|
8913
|
-
} = changeStatus ? getIconForChangeStatus(changeStatus) : {
|
|
9182
|
+
} = changeStatus ? getIconForChangeStatus(changeStatus, isDark) : {
|
|
8914
9183
|
icon: void 0,
|
|
8915
9184
|
color: String(token("colors.gray.400")),
|
|
8916
|
-
backgroundColor: String(token("colors.gray.100"))
|
|
9185
|
+
backgroundColor: isDark ? String(token("colors.gray.700")) : String(token("colors.gray.100"))
|
|
8917
9186
|
};
|
|
8918
9187
|
const borderWidth = "2px";
|
|
8919
9188
|
const borderColor = colorChangeStatus;
|
|
@@ -8924,15 +9193,15 @@ function GraphNode(nodeProps) {
|
|
|
8924
9193
|
const nodeBackgroundColor = (function() {
|
|
8925
9194
|
if (showContent) {
|
|
8926
9195
|
if (selectMode === "selecting") {
|
|
8927
|
-
return isSelected ? colorChangeStatus :
|
|
9196
|
+
return isSelected ? colorChangeStatus : background.paper;
|
|
8928
9197
|
} else if (selectMode === "action_result") {
|
|
8929
9198
|
if (!action) {
|
|
8930
|
-
return
|
|
9199
|
+
return background.paper;
|
|
8931
9200
|
} else {
|
|
8932
9201
|
return isFocused || isSelected || isHovered ? backgroundColorChangeStatus : colorChangeStatus;
|
|
8933
9202
|
}
|
|
8934
9203
|
} else {
|
|
8935
|
-
return isFocused || isSelected || isHovered ? backgroundColorChangeStatus :
|
|
9204
|
+
return isFocused || isSelected || isHovered ? backgroundColorChangeStatus : background.paper;
|
|
8936
9205
|
}
|
|
8937
9206
|
} else {
|
|
8938
9207
|
return isFocused || isSelected || isHovered ? colorChangeStatus : backgroundColorChangeStatus;
|
|
@@ -8940,27 +9209,27 @@ function GraphNode(nodeProps) {
|
|
|
8940
9209
|
})();
|
|
8941
9210
|
const titleColor = (function() {
|
|
8942
9211
|
if (selectMode === "selecting") {
|
|
8943
|
-
return isSelected ?
|
|
9212
|
+
return isSelected ? text.inverted : text.primary;
|
|
8944
9213
|
} else if (selectMode === "action_result") {
|
|
8945
|
-
return !!action && !isSelected ?
|
|
9214
|
+
return !!action && !isSelected ? text.inverted : text.primary;
|
|
8946
9215
|
} else {
|
|
8947
|
-
return
|
|
9216
|
+
return text.primary;
|
|
8948
9217
|
}
|
|
8949
9218
|
})();
|
|
8950
9219
|
const iconResourceColor = (function() {
|
|
8951
9220
|
if (selectMode === "selecting") {
|
|
8952
|
-
return isSelected ?
|
|
9221
|
+
return isSelected ? text.inverted : text.primary;
|
|
8953
9222
|
} else if (selectMode === "action_result") {
|
|
8954
|
-
return !!action && !isSelected ?
|
|
9223
|
+
return !!action && !isSelected ? text.inverted : text.primary;
|
|
8955
9224
|
} else {
|
|
8956
|
-
return
|
|
9225
|
+
return text.primary;
|
|
8957
9226
|
}
|
|
8958
9227
|
})();
|
|
8959
9228
|
const iconChangeStatusColor = (function() {
|
|
8960
9229
|
if (selectMode === "selecting") {
|
|
8961
|
-
return isSelected ?
|
|
9230
|
+
return isSelected ? text.inverted : colorChangeStatus;
|
|
8962
9231
|
} else if (selectMode === "action_result") {
|
|
8963
|
-
return !!action && !isSelected ?
|
|
9232
|
+
return !!action && !isSelected ? text.inverted : text.primary;
|
|
8964
9233
|
} else {
|
|
8965
9234
|
return colorChangeStatus;
|
|
8966
9235
|
}
|
|
@@ -9089,9 +9358,9 @@ function GraphNode(nodeProps) {
|
|
|
9089
9358
|
component: fa.FaRegDotCircle,
|
|
9090
9359
|
sx: {
|
|
9091
9360
|
fontSize: 14,
|
|
9092
|
-
color:
|
|
9361
|
+
color: text.secondary,
|
|
9093
9362
|
cursor: "pointer",
|
|
9094
|
-
"&:hover": { color:
|
|
9363
|
+
"&:hover": { color: text.primary }
|
|
9095
9364
|
},
|
|
9096
9365
|
onClick: (e) => {
|
|
9097
9366
|
e.preventDefault();
|
|
@@ -9113,9 +9382,9 @@ function GraphNode(nodeProps) {
|
|
|
9113
9382
|
{
|
|
9114
9383
|
component: vsc.VscKebabVertical,
|
|
9115
9384
|
sx: {
|
|
9116
|
-
color:
|
|
9385
|
+
color: text.secondary,
|
|
9117
9386
|
cursor: "pointer",
|
|
9118
|
-
"&:hover": { color:
|
|
9387
|
+
"&:hover": { color: text.primary }
|
|
9119
9388
|
},
|
|
9120
9389
|
onClick: (e) => {
|
|
9121
9390
|
e.preventDefault();
|
|
@@ -9171,7 +9440,7 @@ function GraphNode(nodeProps) {
|
|
|
9171
9440
|
{
|
|
9172
9441
|
sx: {
|
|
9173
9442
|
height: 20,
|
|
9174
|
-
color:
|
|
9443
|
+
color: text.secondary,
|
|
9175
9444
|
fontSize: "9pt",
|
|
9176
9445
|
margin: 0,
|
|
9177
9446
|
fontWeight: 600
|
|
@@ -9285,15 +9554,15 @@ var defaultQueryContext = {
|
|
|
9285
9554
|
return void 0;
|
|
9286
9555
|
}
|
|
9287
9556
|
};
|
|
9288
|
-
var RecceQueryContext =
|
|
9289
|
-
var useRecceQueryContext = () =>
|
|
9557
|
+
var RecceQueryContext = React4.createContext(defaultQueryContext);
|
|
9558
|
+
var useRecceQueryContext = () => React4.useContext(RecceQueryContext);
|
|
9290
9559
|
var defaultRowCountStateContext = {
|
|
9291
9560
|
isNodesFetching: [],
|
|
9292
9561
|
setIsNodesFetching: () => {
|
|
9293
9562
|
return void 0;
|
|
9294
9563
|
}
|
|
9295
9564
|
};
|
|
9296
|
-
|
|
9565
|
+
React4.createContext(defaultRowCountStateContext);
|
|
9297
9566
|
var ContextMenu = ({ menuItems, open, onClose, x, y }) => {
|
|
9298
9567
|
const { featureToggles } = useRecceInstanceContext();
|
|
9299
9568
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9775,14 +10044,14 @@ var LineageViewContextMenu = ({
|
|
|
9775
10044
|
}
|
|
9776
10045
|
};
|
|
9777
10046
|
var useLineageViewContextMenu = () => {
|
|
9778
|
-
const [open, setOpen] =
|
|
10047
|
+
const [open, setOpen] = React4.useState(false);
|
|
9779
10048
|
const onOpen = () => setOpen(true);
|
|
9780
10049
|
const onClose = () => setOpen(false);
|
|
9781
|
-
const [position, setPosition] =
|
|
10050
|
+
const [position, setPosition] = React4.useState({
|
|
9782
10051
|
x: 0,
|
|
9783
10052
|
y: 0
|
|
9784
10053
|
});
|
|
9785
|
-
const [node, setNode] =
|
|
10054
|
+
const [node, setNode] = React4.useState();
|
|
9786
10055
|
const showContextMenu = (x, y, node2) => {
|
|
9787
10056
|
setPosition({ x, y });
|
|
9788
10057
|
setNode(node2);
|
|
@@ -9817,7 +10086,7 @@ function LineageViewNotification({
|
|
|
9817
10086
|
type
|
|
9818
10087
|
}) {
|
|
9819
10088
|
const notificationKey = sessionStorageKeys.lineageNotificationDismissed;
|
|
9820
|
-
const [visible, setVisible] =
|
|
10089
|
+
const [visible, setVisible] = React4.useState(() => {
|
|
9821
10090
|
const dismissed = sessionStorage.getItem(notificationKey);
|
|
9822
10091
|
return dismissed !== "true";
|
|
9823
10092
|
});
|
|
@@ -9876,6 +10145,7 @@ function HistoryToggle() {
|
|
|
9876
10145
|
{
|
|
9877
10146
|
size: "xsmall",
|
|
9878
10147
|
variant: "outlined",
|
|
10148
|
+
color: "neutral",
|
|
9879
10149
|
startIcon: /* @__PURE__ */ jsxRuntime.jsx(vsc.VscHistory, {}),
|
|
9880
10150
|
onClick: () => {
|
|
9881
10151
|
trackHistoryAction({ name: isHistoryOpen ? "hide" : "show" });
|
|
@@ -9886,81 +10156,39 @@ function HistoryToggle() {
|
|
|
9886
10156
|
)
|
|
9887
10157
|
] });
|
|
9888
10158
|
}
|
|
10159
|
+
var codeBlockSx = (theme) => ({
|
|
10160
|
+
fontSize: "8pt",
|
|
10161
|
+
bgcolor: theme.palette.mode === "dark" ? "grey.700" : "grey.100",
|
|
10162
|
+
px: 0.5,
|
|
10163
|
+
borderRadius: 1
|
|
10164
|
+
});
|
|
9889
10165
|
var SelectFilterTooltip = () => {
|
|
9890
10166
|
return /* @__PURE__ */ jsxRuntime.jsxs(Stack24__default.default, { alignItems: "flex-start", spacing: 0, children: [
|
|
9891
10167
|
/* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { fontSize: "10pt", color: "text.secondary", pb: 1, children: "Select nodes by dbt node selector syntax" }),
|
|
9892
10168
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography28__default.default, { fontSize: "8pt", children: [
|
|
9893
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9894
|
-
Box35__default.default,
|
|
9895
|
-
{
|
|
9896
|
-
component: "code",
|
|
9897
|
-
sx: {
|
|
9898
|
-
fontSize: "8pt",
|
|
9899
|
-
bgcolor: "grey.100",
|
|
9900
|
-
px: 0.5,
|
|
9901
|
-
borderRadius: 1
|
|
9902
|
-
},
|
|
9903
|
-
children: "model_name"
|
|
9904
|
-
}
|
|
9905
|
-
),
|
|
10169
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { component: "code", sx: codeBlockSx, children: "model_name" }),
|
|
9906
10170
|
" ",
|
|
9907
10171
|
"Select a node"
|
|
9908
10172
|
] }),
|
|
9909
10173
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography28__default.default, { fontSize: "8pt", children: [
|
|
9910
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9911
|
-
Box35__default.default,
|
|
9912
|
-
{
|
|
9913
|
-
component: "code",
|
|
9914
|
-
sx: {
|
|
9915
|
-
fontSize: "8pt",
|
|
9916
|
-
bgcolor: "grey.100",
|
|
9917
|
-
px: 0.5,
|
|
9918
|
-
borderRadius: 1
|
|
9919
|
-
},
|
|
9920
|
-
children: "model_name+"
|
|
9921
|
-
}
|
|
9922
|
-
),
|
|
10174
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { component: "code", sx: codeBlockSx, children: "model_name+" }),
|
|
9923
10175
|
" ",
|
|
9924
10176
|
"Select downstream nodes"
|
|
9925
10177
|
] }),
|
|
9926
10178
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography28__default.default, { fontSize: "8pt", children: [
|
|
9927
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9928
|
-
Box35__default.default,
|
|
9929
|
-
{
|
|
9930
|
-
component: "code",
|
|
9931
|
-
sx: {
|
|
9932
|
-
fontSize: "8pt",
|
|
9933
|
-
bgcolor: "grey.100",
|
|
9934
|
-
px: 0.5,
|
|
9935
|
-
borderRadius: 1
|
|
9936
|
-
},
|
|
9937
|
-
children: "+model_name"
|
|
9938
|
-
}
|
|
9939
|
-
),
|
|
10179
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { component: "code", sx: codeBlockSx, children: "+model_name" }),
|
|
9940
10180
|
" ",
|
|
9941
10181
|
"Select upstream nodes"
|
|
9942
10182
|
] }),
|
|
9943
10183
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography28__default.default, { fontSize: "8pt", children: [
|
|
9944
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9945
|
-
Box35__default.default,
|
|
9946
|
-
{
|
|
9947
|
-
component: "code",
|
|
9948
|
-
sx: {
|
|
9949
|
-
fontSize: "8pt",
|
|
9950
|
-
bgcolor: "grey.100",
|
|
9951
|
-
px: 0.5,
|
|
9952
|
-
borderRadius: 1
|
|
9953
|
-
},
|
|
9954
|
-
children: "model*"
|
|
9955
|
-
}
|
|
9956
|
-
),
|
|
10184
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { component: "code", sx: codeBlockSx, children: "model*" }),
|
|
9957
10185
|
" ",
|
|
9958
10186
|
"Select by wildcard"
|
|
9959
10187
|
] })
|
|
9960
10188
|
] });
|
|
9961
10189
|
};
|
|
9962
10190
|
var ViewModeSelectMenu = ({ isDisabled }) => {
|
|
9963
|
-
const [anchorEl, setAnchorEl] =
|
|
10191
|
+
const [anchorEl, setAnchorEl] = React4.useState(null);
|
|
9964
10192
|
const open = Boolean(anchorEl);
|
|
9965
10193
|
const { viewOptions, onViewOptionsChanged } = useLineageViewContextSafe();
|
|
9966
10194
|
const viewMode = viewOptions.view_mode ?? "changed_models";
|
|
@@ -10020,7 +10248,7 @@ var ViewModeSelectMenu = ({ isDisabled }) => {
|
|
|
10020
10248
|
] });
|
|
10021
10249
|
};
|
|
10022
10250
|
var PackageSelectMenu = ({ isDisabled }) => {
|
|
10023
|
-
const [anchorEl, setAnchorEl] =
|
|
10251
|
+
const [anchorEl, setAnchorEl] = React4.useState(null);
|
|
10024
10252
|
const open = Boolean(anchorEl);
|
|
10025
10253
|
const { lineageGraph } = useLineageGraphContext();
|
|
10026
10254
|
const { viewOptions, onViewOptionsChanged } = useLineageViewContextSafe();
|
|
@@ -10105,10 +10333,10 @@ var PackageSelectMenu = ({ isDisabled }) => {
|
|
|
10105
10333
|
] });
|
|
10106
10334
|
};
|
|
10107
10335
|
var NodeSelectionInput = (props) => {
|
|
10108
|
-
const [inputValue, setInputValue] =
|
|
10336
|
+
const [inputValue, setInputValue] = React4.useState(props.value);
|
|
10109
10337
|
const { data: flags } = useRecceServerFlag();
|
|
10110
|
-
const inputRef =
|
|
10111
|
-
|
|
10338
|
+
const inputRef = React4.useRef(null);
|
|
10339
|
+
React4.useEffect(() => {
|
|
10112
10340
|
if (inputRef.current) {
|
|
10113
10341
|
inputRef.current.value = props.value;
|
|
10114
10342
|
}
|
|
@@ -10126,8 +10354,8 @@ var NodeSelectionInput = (props) => {
|
|
|
10126
10354
|
boxShadow: 3,
|
|
10127
10355
|
border: 1,
|
|
10128
10356
|
borderRadius: 1,
|
|
10129
|
-
color: "
|
|
10130
|
-
bgcolor: "
|
|
10357
|
+
color: "text.primary",
|
|
10358
|
+
bgcolor: "background.paper"
|
|
10131
10359
|
}
|
|
10132
10360
|
}
|
|
10133
10361
|
},
|
|
@@ -10216,7 +10444,7 @@ var LineageViewTopBar = () => {
|
|
|
10216
10444
|
const { featureToggles } = useRecceInstanceContext();
|
|
10217
10445
|
const { data: flags } = useRecceServerFlag();
|
|
10218
10446
|
const isSingleEnvOnboarding = flags?.single_env_onboarding;
|
|
10219
|
-
const [actionsAnchorEl, setActionsAnchorEl] =
|
|
10447
|
+
const [actionsAnchorEl, setActionsAnchorEl] = React4.useState(
|
|
10220
10448
|
null
|
|
10221
10449
|
);
|
|
10222
10450
|
const actionsOpen = Boolean(actionsAnchorEl);
|
|
@@ -10471,7 +10699,7 @@ var LearnHowLink = () => {
|
|
|
10471
10699
|
href: "https://docs.datarecce.io/get-started/#prepare-dbt-artifacts",
|
|
10472
10700
|
target: "_blank",
|
|
10473
10701
|
sx: {
|
|
10474
|
-
color: "
|
|
10702
|
+
color: "primary.main",
|
|
10475
10703
|
fontWeight: "bold",
|
|
10476
10704
|
textDecoration: "underline",
|
|
10477
10705
|
display: "inline-flex",
|
|
@@ -10487,11 +10715,11 @@ var LearnHowLink = () => {
|
|
|
10487
10715
|
};
|
|
10488
10716
|
function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
10489
10717
|
const lineageViewContext = useLineageViewContext();
|
|
10490
|
-
const [gridApi, setGridApi] =
|
|
10491
|
-
const [cllRunningMap, setCllRunningMap] =
|
|
10718
|
+
const [gridApi, setGridApi] = React4.useState(null);
|
|
10719
|
+
const [cllRunningMap, setCllRunningMap] = React4.useState(
|
|
10492
10720
|
/* @__PURE__ */ new Map()
|
|
10493
10721
|
);
|
|
10494
|
-
const { columns, rows } =
|
|
10722
|
+
const { columns, rows } = React4.useMemo(() => {
|
|
10495
10723
|
return createDataGridFromData(
|
|
10496
10724
|
{ type: "schema_single", columns: current?.columns },
|
|
10497
10725
|
{ node: current, cllRunningMap, showMenu }
|
|
@@ -10520,7 +10748,7 @@ function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
|
10520
10748
|
}
|
|
10521
10749
|
setCllRunningMap((prev) => new Map(prev).set(columnName, false));
|
|
10522
10750
|
};
|
|
10523
|
-
const getRowId =
|
|
10751
|
+
const getRowId = React4.useCallback(
|
|
10524
10752
|
(params) => {
|
|
10525
10753
|
const modelId = current?.id;
|
|
10526
10754
|
return `${modelId}-${params.data.name}`;
|
|
@@ -10529,7 +10757,7 @@ function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
|
10529
10757
|
);
|
|
10530
10758
|
const cll = lineageViewContext?.viewOptions.column_level_lineage;
|
|
10531
10759
|
const selectedRowId = cll ? `${cll.node_id}-${cll.column}` : null;
|
|
10532
|
-
|
|
10760
|
+
React4.useEffect(() => {
|
|
10533
10761
|
if (!gridApi) return;
|
|
10534
10762
|
gridApi.deselectAll();
|
|
10535
10763
|
if (selectedRowId) {
|
|
@@ -10539,7 +10767,7 @@ function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
|
10539
10767
|
}
|
|
10540
10768
|
}
|
|
10541
10769
|
}, [gridApi, selectedRowId]);
|
|
10542
|
-
const handleGridReady =
|
|
10770
|
+
const handleGridReady = React4.useCallback((event) => {
|
|
10543
10771
|
setGridApi(event.api);
|
|
10544
10772
|
}, []);
|
|
10545
10773
|
const getRowClass = (_params) => {
|
|
@@ -10579,18 +10807,18 @@ function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
|
10579
10807
|
getRowClass,
|
|
10580
10808
|
onCellClicked: handleCellClicked,
|
|
10581
10809
|
onGridReady: handleGridReady,
|
|
10582
|
-
rowSelection: "
|
|
10810
|
+
rowSelection: { mode: "singleRow" }
|
|
10583
10811
|
}
|
|
10584
10812
|
)
|
|
10585
10813
|
] });
|
|
10586
10814
|
}
|
|
10587
10815
|
function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
10588
10816
|
const lineageViewContext = useLineageViewContext();
|
|
10589
|
-
const [gridApi, setGridApi] =
|
|
10590
|
-
const [cllRunningMap, setCllRunningMap] =
|
|
10817
|
+
const [gridApi, setGridApi] = React4.useState(null);
|
|
10818
|
+
const [cllRunningMap, setCllRunningMap] = React4.useState(
|
|
10591
10819
|
/* @__PURE__ */ new Map()
|
|
10592
10820
|
);
|
|
10593
|
-
const { columns, rows } =
|
|
10821
|
+
const { columns, rows } = React4.useMemo(() => {
|
|
10594
10822
|
const resourceType = current?.resource_type ?? base?.resource_type;
|
|
10595
10823
|
const node = resourceType && ["model", "seed", "snapshot", "source"].includes(resourceType) ? current ?? base : void 0;
|
|
10596
10824
|
return createDataGridFromData(
|
|
@@ -10631,7 +10859,7 @@ function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
|
10631
10859
|
}
|
|
10632
10860
|
setCllRunningMap((prev) => new Map(prev).set(columnName, false));
|
|
10633
10861
|
};
|
|
10634
|
-
const getRowId =
|
|
10862
|
+
const getRowId = React4.useCallback(
|
|
10635
10863
|
(params) => {
|
|
10636
10864
|
const modelId = current?.id ?? base?.id;
|
|
10637
10865
|
return `${modelId}-${params.data.name}`;
|
|
@@ -10640,7 +10868,7 @@ function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
|
10640
10868
|
);
|
|
10641
10869
|
const cll = lineageViewContext?.viewOptions.column_level_lineage;
|
|
10642
10870
|
const selectedRowId = cll ? `${cll.node_id}-${cll.column}` : null;
|
|
10643
|
-
|
|
10871
|
+
React4.useEffect(() => {
|
|
10644
10872
|
if (!gridApi) return;
|
|
10645
10873
|
gridApi.deselectAll();
|
|
10646
10874
|
if (selectedRowId) {
|
|
@@ -10650,7 +10878,7 @@ function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
|
10650
10878
|
}
|
|
10651
10879
|
}
|
|
10652
10880
|
}, [gridApi, selectedRowId]);
|
|
10653
|
-
const handleGridReady =
|
|
10881
|
+
const handleGridReady = React4.useCallback(
|
|
10654
10882
|
(event) => {
|
|
10655
10883
|
setGridApi(event.api);
|
|
10656
10884
|
},
|
|
@@ -10706,13 +10934,13 @@ function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
|
10706
10934
|
getRowClass,
|
|
10707
10935
|
onCellClicked: handleCellClicked,
|
|
10708
10936
|
onGridReady: handleGridReady,
|
|
10709
|
-
rowSelection: "
|
|
10937
|
+
rowSelection: { mode: "singleRow" }
|
|
10710
10938
|
}
|
|
10711
10939
|
)
|
|
10712
10940
|
] });
|
|
10713
10941
|
}
|
|
10714
|
-
var SchemaView =
|
|
10715
|
-
var SingleEnvSchemaView =
|
|
10942
|
+
var SchemaView = React4.forwardRef(PrivateSchemaView);
|
|
10943
|
+
var SingleEnvSchemaView = React4.forwardRef(PrivateSingleEnvSchemaView);
|
|
10716
10944
|
var getLanguageExtension = (language) => {
|
|
10717
10945
|
switch (language) {
|
|
10718
10946
|
case "sql":
|
|
@@ -10736,7 +10964,7 @@ function CodeEditor({
|
|
|
10736
10964
|
theme = "light",
|
|
10737
10965
|
keyBindings = []
|
|
10738
10966
|
}) {
|
|
10739
|
-
const extensions =
|
|
10967
|
+
const extensions = React4.useMemo(() => {
|
|
10740
10968
|
const exts = [
|
|
10741
10969
|
getLanguageExtension(language),
|
|
10742
10970
|
view.EditorView.theme({
|
|
@@ -10753,7 +10981,7 @@ function CodeEditor({
|
|
|
10753
10981
|
}
|
|
10754
10982
|
return exts;
|
|
10755
10983
|
}, [language, fontSize, wordWrap, keyBindings]);
|
|
10756
|
-
const themeExtension =
|
|
10984
|
+
const themeExtension = React4.useMemo(() => {
|
|
10757
10985
|
return theme === "dark" ? codemirrorThemeGithub.githubDark : codemirrorThemeGithub.githubLight;
|
|
10758
10986
|
}, [theme]);
|
|
10759
10987
|
const handleChange = (val) => {
|
|
@@ -10807,16 +11035,16 @@ function DiffEditor({
|
|
|
10807
11035
|
theme = "light",
|
|
10808
11036
|
onModifiedChange
|
|
10809
11037
|
}) {
|
|
10810
|
-
const containerRef =
|
|
10811
|
-
const viewRef =
|
|
10812
|
-
const extensions =
|
|
11038
|
+
const containerRef = React4.useRef(null);
|
|
11039
|
+
const viewRef = React4.useRef(null);
|
|
11040
|
+
const extensions = React4.useMemo(() => {
|
|
10813
11041
|
const exts = [getLanguageExtension2(language), getThemeExtension(theme)];
|
|
10814
11042
|
if (lineNumbers) {
|
|
10815
11043
|
exts.push(view.lineNumbers());
|
|
10816
11044
|
}
|
|
10817
11045
|
return exts;
|
|
10818
11046
|
}, [language, theme, lineNumbers]);
|
|
10819
|
-
|
|
11047
|
+
React4.useEffect(() => {
|
|
10820
11048
|
if (!containerRef.current) return;
|
|
10821
11049
|
if (viewRef.current) {
|
|
10822
11050
|
viewRef.current.destroy();
|
|
@@ -10899,9 +11127,11 @@ function DiffEditor({
|
|
|
10899
11127
|
}
|
|
10900
11128
|
var DiffEditor_default = DiffEditor;
|
|
10901
11129
|
var NodeSqlView = ({ node }) => {
|
|
10902
|
-
const [isOpen, setIsOpen] =
|
|
10903
|
-
const [isHovered, setIsHovered] =
|
|
11130
|
+
const [isOpen, setIsOpen] = React4.useState(false);
|
|
11131
|
+
const [isHovered, setIsHovered] = React4.useState(false);
|
|
10904
11132
|
const { data: flags, isLoading } = useRecceServerFlag();
|
|
11133
|
+
const muiTheme = styles.useTheme();
|
|
11134
|
+
const isDark = muiTheme.palette.mode === "dark";
|
|
10905
11135
|
const isSingleEnvOnboarding = flags?.single_env_onboarding;
|
|
10906
11136
|
if (isLoading) {
|
|
10907
11137
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
@@ -10931,7 +11161,8 @@ var NodeSqlView = ({ node }) => {
|
|
|
10931
11161
|
value: original ?? "",
|
|
10932
11162
|
readOnly: true,
|
|
10933
11163
|
lineNumbers: true,
|
|
10934
|
-
wordWrap: false
|
|
11164
|
+
wordWrap: false,
|
|
11165
|
+
theme: isDark ? "dark" : "light"
|
|
10935
11166
|
}
|
|
10936
11167
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
10937
11168
|
DiffEditor,
|
|
@@ -10942,6 +11173,7 @@ var NodeSqlView = ({ node }) => {
|
|
|
10942
11173
|
readOnly: true,
|
|
10943
11174
|
lineNumbers: true,
|
|
10944
11175
|
sideBySide: false,
|
|
11176
|
+
theme: isDark ? "dark" : "light",
|
|
10945
11177
|
height: "100%"
|
|
10946
11178
|
}
|
|
10947
11179
|
),
|
|
@@ -10991,7 +11223,8 @@ var NodeSqlView = ({ node }) => {
|
|
|
10991
11223
|
fontSize: 16,
|
|
10992
11224
|
readOnly: true,
|
|
10993
11225
|
lineNumbers: true,
|
|
10994
|
-
wordWrap: false
|
|
11226
|
+
wordWrap: false,
|
|
11227
|
+
theme: isDark ? "dark" : "light"
|
|
10995
11228
|
}
|
|
10996
11229
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
10997
11230
|
DiffEditor,
|
|
@@ -10999,6 +11232,7 @@ var NodeSqlView = ({ node }) => {
|
|
|
10999
11232
|
original: original ?? "",
|
|
11000
11233
|
modified: modified ?? "",
|
|
11001
11234
|
language: "sql",
|
|
11235
|
+
theme: isDark ? "dark" : "light",
|
|
11002
11236
|
className: "text-base"
|
|
11003
11237
|
}
|
|
11004
11238
|
) })
|
|
@@ -11098,7 +11332,7 @@ function useFeedbackCollectionToast(options) {
|
|
|
11098
11332
|
externalLink,
|
|
11099
11333
|
externalLinkText
|
|
11100
11334
|
} = options;
|
|
11101
|
-
const [toastId, setToastId] =
|
|
11335
|
+
const [toastId, setToastId] = React4.useState(void 0);
|
|
11102
11336
|
function feedBackCollectionToast(skipBypassFeedback = false) {
|
|
11103
11337
|
const isSkipFeedback = localStorage.getItem(feedbackId);
|
|
11104
11338
|
if (toastId != null) {
|
|
@@ -11144,7 +11378,7 @@ function useFeedbackCollectionToast(options) {
|
|
|
11144
11378
|
};
|
|
11145
11379
|
}
|
|
11146
11380
|
function useGuideToast(options) {
|
|
11147
|
-
const [toastId, setToastId] =
|
|
11381
|
+
const [toastId, setToastId] = React4.useState(void 0);
|
|
11148
11382
|
const { guideId, description, externalLinkText, onExternalLinkClick } = options;
|
|
11149
11383
|
function guideToast() {
|
|
11150
11384
|
if (toastId != null) {
|
|
@@ -11249,7 +11483,7 @@ function renderInfoEntries(info) {
|
|
|
11249
11483
|
}
|
|
11250
11484
|
function EnvInfo() {
|
|
11251
11485
|
const { envInfo, reviewMode, lineageGraph } = useLineageGraphContext();
|
|
11252
|
-
const [open, setOpen] =
|
|
11486
|
+
const [open, setOpen] = React4.useState(false);
|
|
11253
11487
|
const git = envInfo?.git;
|
|
11254
11488
|
const pr = envInfo?.pullRequest;
|
|
11255
11489
|
const reviewInfo = { ...git, ...pr };
|
|
@@ -11266,8 +11500,8 @@ function EnvInfo() {
|
|
|
11266
11500
|
currentRelativeTime = dbtCurrent.generated_at ? formatTimeToNow(dbtCurrent.generated_at) : "";
|
|
11267
11501
|
}
|
|
11268
11502
|
const [baseSchemas, currentSchemas] = extractSchemas(lineageGraph);
|
|
11269
|
-
const hasTrackedRef =
|
|
11270
|
-
|
|
11503
|
+
const hasTrackedRef = React4.useRef(false);
|
|
11504
|
+
React4.useEffect(() => {
|
|
11271
11505
|
if (!hasTrackedRef.current && envInfo) {
|
|
11272
11506
|
hasTrackedRef.current = true;
|
|
11273
11507
|
const trackingData = buildEnvironmentTrackingData(
|
|
@@ -11441,11 +11675,11 @@ function EnvInfo() {
|
|
|
11441
11675
|
}
|
|
11442
11676
|
var DropdownValuesInput = (props) => {
|
|
11443
11677
|
const { defaultValues, suggestionList, onValuesChange, className } = props;
|
|
11444
|
-
const [values, setValues] =
|
|
11445
|
-
const [filter, setFilter] =
|
|
11446
|
-
const [isTyping, setIsTyping] =
|
|
11447
|
-
const [anchorEl, setAnchorEl] =
|
|
11448
|
-
const inputRef =
|
|
11678
|
+
const [values, setValues] = React4.useState(defaultValues ?? []);
|
|
11679
|
+
const [filter, setFilter] = React4.useState("");
|
|
11680
|
+
const [isTyping, setIsTyping] = React4.useState(false);
|
|
11681
|
+
const [anchorEl, setAnchorEl] = React4.useState(null);
|
|
11682
|
+
const inputRef = React4.useRef(null);
|
|
11449
11683
|
const open = Boolean(anchorEl);
|
|
11450
11684
|
const showNumberOfValuesSelected = (tags) => {
|
|
11451
11685
|
if (tags.length > 1) {
|
|
@@ -11715,7 +11949,7 @@ var QueryForm = ({
|
|
|
11715
11949
|
}) => {
|
|
11716
11950
|
const { lineageGraph, isActionAvailable } = useLineageGraphContext();
|
|
11717
11951
|
const labelInfo = "Provide a primary key to perform query diff in data warehouse and only return changed rows.";
|
|
11718
|
-
const availableColumns =
|
|
11952
|
+
const availableColumns = React4.useMemo(() => {
|
|
11719
11953
|
if (!lineageGraph) {
|
|
11720
11954
|
return [];
|
|
11721
11955
|
}
|
|
@@ -11782,9 +12016,9 @@ function AuthModal({
|
|
|
11782
12016
|
variant = "auth"
|
|
11783
12017
|
}) {
|
|
11784
12018
|
const { authed } = useRecceInstanceContext();
|
|
11785
|
-
const [open, setOpen] =
|
|
12019
|
+
const [open, setOpen] = React4.useState(parentOpen || !authed);
|
|
11786
12020
|
const authStateCookieValue = Cookies__default.default.get("authState") ?? "pending";
|
|
11787
|
-
const [authState, setAuthState] =
|
|
12021
|
+
const [authState, setAuthState] = React4.useState(
|
|
11788
12022
|
ignoreCookie ? "pending" : authStateCookieValue
|
|
11789
12023
|
);
|
|
11790
12024
|
if (authState === "ignored" && !ignoreCookie) {
|
|
@@ -11959,9 +12193,9 @@ async function deleteCheck(checkId) {
|
|
|
11959
12193
|
async function markAsPresetCheck(checkId) {
|
|
11960
12194
|
await axiosClient.post(`/api/checks/${checkId}/mark-as-preset`);
|
|
11961
12195
|
}
|
|
11962
|
-
var ShareState =
|
|
12196
|
+
var ShareState = React4.createContext(void 0);
|
|
11963
12197
|
var useRecceShareStateContext = () => {
|
|
11964
|
-
const context =
|
|
12198
|
+
const context = React4.useContext(ShareState);
|
|
11965
12199
|
if (!context) {
|
|
11966
12200
|
throw new Error(
|
|
11967
12201
|
"useRecceShareStateContext must be used within a RecceShareStateContextProvider"
|
|
@@ -11983,6 +12217,8 @@ function SqlEditor({
|
|
|
11983
12217
|
...props
|
|
11984
12218
|
}) {
|
|
11985
12219
|
const { featureToggles } = useRecceInstanceContext();
|
|
12220
|
+
const muiTheme = styles.useTheme();
|
|
12221
|
+
const isDark = muiTheme.palette.mode === "dark";
|
|
11986
12222
|
const handleEditorChange = (value2) => {
|
|
11987
12223
|
if (onChange) {
|
|
11988
12224
|
onChange(value2);
|
|
@@ -11992,7 +12228,7 @@ function SqlEditor({
|
|
|
11992
12228
|
if (manifestData) {
|
|
11993
12229
|
timestamp = manifestData.generated_at ? formatTimeToNow(manifestData.generated_at) : "";
|
|
11994
12230
|
}
|
|
11995
|
-
const keyBindings =
|
|
12231
|
+
const keyBindings = React4.useMemo(() => {
|
|
11996
12232
|
const bindings = [];
|
|
11997
12233
|
if (onRun) {
|
|
11998
12234
|
bindings.push({
|
|
@@ -12031,7 +12267,7 @@ function SqlEditor({
|
|
|
12031
12267
|
{
|
|
12032
12268
|
direction: "row",
|
|
12033
12269
|
sx: {
|
|
12034
|
-
bgcolor:
|
|
12270
|
+
bgcolor: isDark ? styles.alpha(colors.neutral[700], 0.5) : styles.alpha(colors.neutral[100], 0.5),
|
|
12035
12271
|
height: "40px",
|
|
12036
12272
|
minHeight: "40px",
|
|
12037
12273
|
fontSize: "14px",
|
|
@@ -12066,7 +12302,7 @@ function SqlEditor({
|
|
|
12066
12302
|
size: "xsmall",
|
|
12067
12303
|
variant: "outlined",
|
|
12068
12304
|
onClick: onRun ?? onRunBase,
|
|
12069
|
-
sx: { bgcolor: "
|
|
12305
|
+
sx: { bgcolor: "background.paper", p: "6px 12px" },
|
|
12070
12306
|
disabled: featureToggles.disableDatabaseQuery,
|
|
12071
12307
|
startIcon: /* @__PURE__ */ jsxRuntime.jsx(fa6.FaPlay, {}),
|
|
12072
12308
|
children: "Run Query"
|
|
@@ -12086,6 +12322,7 @@ function SqlEditor({
|
|
|
12086
12322
|
wordWrap: options.wordWrap !== "off",
|
|
12087
12323
|
fontSize: options.fontSize ?? 16,
|
|
12088
12324
|
keyBindings,
|
|
12325
|
+
theme: isDark ? "dark" : "light",
|
|
12089
12326
|
className: "no-track-pii-safe max-h-dvh h-full"
|
|
12090
12327
|
}
|
|
12091
12328
|
)
|
|
@@ -12122,7 +12359,8 @@ function DualSqlEditor({
|
|
|
12122
12359
|
height: "100%",
|
|
12123
12360
|
width: "50%",
|
|
12124
12361
|
gap: 0,
|
|
12125
|
-
borderRight: "1px solid
|
|
12362
|
+
borderRight: "1px solid",
|
|
12363
|
+
borderRightColor: "divider"
|
|
12126
12364
|
},
|
|
12127
12365
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12128
12366
|
SqlEditor,
|
|
@@ -12258,7 +12496,7 @@ var ResultErrorFallback = (errorData) => {
|
|
|
12258
12496
|
return /* @__PURE__ */ jsxRuntime.jsx(MuiAlert__default.default, { severity: "error", children: String(errorData.error) });
|
|
12259
12497
|
};
|
|
12260
12498
|
var ResultErrorFallback_default = ResultErrorFallback;
|
|
12261
|
-
var RunView =
|
|
12499
|
+
var RunView = React4.forwardRef(
|
|
12262
12500
|
({
|
|
12263
12501
|
isRunning,
|
|
12264
12502
|
isAborting,
|
|
@@ -12272,6 +12510,7 @@ var RunView = React3.forwardRef(
|
|
|
12272
12510
|
children,
|
|
12273
12511
|
onExecuteRun
|
|
12274
12512
|
}, ref) => {
|
|
12513
|
+
const theme = styles.useTheme();
|
|
12275
12514
|
const errorMessage = error?.response?.data?.detail ?? run?.error;
|
|
12276
12515
|
if (errorMessage) {
|
|
12277
12516
|
return /* @__PURE__ */ jsxRuntime.jsxs(MuiAlert__default.default, { severity: "error", children: [
|
|
@@ -12296,7 +12535,7 @@ var RunView = React3.forwardRef(
|
|
|
12296
12535
|
justifyContent: "center",
|
|
12297
12536
|
p: "1rem",
|
|
12298
12537
|
height: "100%",
|
|
12299
|
-
bgcolor: "
|
|
12538
|
+
bgcolor: theme.palette.mode === "dark" ? "grey.900" : "grey.50"
|
|
12300
12539
|
},
|
|
12301
12540
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Stack24__default.default, { spacing: 2, alignItems: "center", children: [
|
|
12302
12541
|
/* @__PURE__ */ jsxRuntime.jsxs(Stack24__default.default, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
@@ -12349,10 +12588,10 @@ var RunView = React3.forwardRef(
|
|
|
12349
12588
|
display: "flex",
|
|
12350
12589
|
alignItems: "center",
|
|
12351
12590
|
justifyContent: "center",
|
|
12352
|
-
bgcolor: "
|
|
12591
|
+
bgcolor: theme.palette.mode === "dark" ? "grey.900" : "grey.50",
|
|
12353
12592
|
height: "100%"
|
|
12354
12593
|
},
|
|
12355
|
-
children:
|
|
12594
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CircularProgress4__default.default, { size: 32 })
|
|
12356
12595
|
}
|
|
12357
12596
|
);
|
|
12358
12597
|
}
|
|
@@ -12392,6 +12631,8 @@ var RunView = React3.forwardRef(
|
|
|
12392
12631
|
}
|
|
12393
12632
|
);
|
|
12394
12633
|
var _ParamView = (data) => {
|
|
12634
|
+
const muiTheme = styles.useTheme();
|
|
12635
|
+
const isDark = muiTheme.palette.mode === "dark";
|
|
12395
12636
|
const yaml3 = YAML__default.default.stringify(data, null, 2);
|
|
12396
12637
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12397
12638
|
CodeEditor,
|
|
@@ -12403,6 +12644,7 @@ var _ParamView = (data) => {
|
|
|
12403
12644
|
wordWrap: true,
|
|
12404
12645
|
fontSize: 14,
|
|
12405
12646
|
height: "100%",
|
|
12647
|
+
theme: isDark ? "dark" : "light",
|
|
12406
12648
|
className: "no-track-pii-safe"
|
|
12407
12649
|
}
|
|
12408
12650
|
);
|
|
@@ -12410,7 +12652,7 @@ var _ParamView = (data) => {
|
|
|
12410
12652
|
var SingleEnvironmentSetupNotification = ({
|
|
12411
12653
|
runType
|
|
12412
12654
|
}) => {
|
|
12413
|
-
const [open, setOpen] =
|
|
12655
|
+
const [open, setOpen] = React4.useState(true);
|
|
12414
12656
|
if (!open) {
|
|
12415
12657
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
12416
12658
|
}
|
|
@@ -12439,8 +12681,8 @@ var RunResultShareMenu = ({
|
|
|
12439
12681
|
}) => {
|
|
12440
12682
|
const { authed } = useRecceInstanceContext();
|
|
12441
12683
|
const { handleShareClick } = useRecceShareStateContext();
|
|
12442
|
-
const [showModal, setShowModal] =
|
|
12443
|
-
const [anchorEl, setAnchorEl] =
|
|
12684
|
+
const [showModal, setShowModal] = React4.useState(false);
|
|
12685
|
+
const [anchorEl, setAnchorEl] = React4.useState(null);
|
|
12444
12686
|
const open = Boolean(anchorEl);
|
|
12445
12687
|
const handleClick = (event) => {
|
|
12446
12688
|
setAnchorEl(event.currentTarget);
|
|
@@ -12525,14 +12767,14 @@ var PrivateLoadableRunView = ({
|
|
|
12525
12767
|
const { featureToggles } = useRecceInstanceContext();
|
|
12526
12768
|
const { runAction } = useRecceActionContext();
|
|
12527
12769
|
const { error, run, onCancel, isRunning } = useRun(runId);
|
|
12528
|
-
const [viewOptions, setViewOptions] =
|
|
12529
|
-
const [tabValue, setTabValue] =
|
|
12770
|
+
const [viewOptions, setViewOptions] = React4.useState();
|
|
12771
|
+
const [tabValue, setTabValue] = React4.useState("result");
|
|
12530
12772
|
const showSingleEnvironmentSetupNotification = isSingleEnvironment;
|
|
12531
12773
|
let RunResultView;
|
|
12532
12774
|
if (run && runTypeHasRef(run.type)) {
|
|
12533
12775
|
RunResultView = findByRunType(run.type).RunResultView;
|
|
12534
12776
|
}
|
|
12535
|
-
const handleRerun =
|
|
12777
|
+
const handleRerun = React4.useCallback(() => {
|
|
12536
12778
|
if (run) {
|
|
12537
12779
|
runAction(run.type, run.params);
|
|
12538
12780
|
}
|
|
@@ -12694,13 +12936,13 @@ function AddToCheckButton({
|
|
|
12694
12936
|
const queryClient = reactQuery.useQueryClient();
|
|
12695
12937
|
const [, setLocation] = useAppLocation();
|
|
12696
12938
|
const checkId = run?.check_id;
|
|
12697
|
-
const handleGoToCheck =
|
|
12939
|
+
const handleGoToCheck = React4.useCallback(() => {
|
|
12698
12940
|
if (!checkId) {
|
|
12699
12941
|
return;
|
|
12700
12942
|
}
|
|
12701
12943
|
setLocation(`/checks/?id=${checkId}`);
|
|
12702
12944
|
}, [checkId, setLocation]);
|
|
12703
|
-
const handleAddToChecklist =
|
|
12945
|
+
const handleAddToChecklist = React4.useCallback(async () => {
|
|
12704
12946
|
if (!runId) {
|
|
12705
12947
|
return;
|
|
12706
12948
|
}
|
|
@@ -12756,7 +12998,8 @@ function SandboxTopBar({
|
|
|
12756
12998
|
p: "4pt 8pt",
|
|
12757
12999
|
gap: "5px",
|
|
12758
13000
|
height: "54px",
|
|
12759
|
-
borderBottom: "1px solid
|
|
13001
|
+
borderBottom: "1px solid",
|
|
13002
|
+
borderBottomColor: "divider",
|
|
12760
13003
|
flex: "0 0 54px"
|
|
12761
13004
|
},
|
|
12762
13005
|
children: [
|
|
@@ -12811,6 +13054,8 @@ function SandboxEditorLabels({
|
|
|
12811
13054
|
height = "32px",
|
|
12812
13055
|
flex = "0 0 auto"
|
|
12813
13056
|
}) {
|
|
13057
|
+
const theme = styles.useTheme();
|
|
13058
|
+
const isDark = theme.palette.mode === "dark";
|
|
12814
13059
|
const { lineageGraph, envInfo } = useLineageGraphContext();
|
|
12815
13060
|
const widthOfBar = "50%";
|
|
12816
13061
|
const margin = "0 16px";
|
|
@@ -12838,7 +13083,7 @@ function SandboxEditorLabels({
|
|
|
12838
13083
|
fontSize: "14px",
|
|
12839
13084
|
alignItems: "center",
|
|
12840
13085
|
m: 0,
|
|
12841
|
-
bgcolor:
|
|
13086
|
+
bgcolor: isDark ? styles.alpha(colors.neutral[700], 0.5) : styles.alpha(colors.neutral[100], 0.5)
|
|
12842
13087
|
},
|
|
12843
13088
|
children: [
|
|
12844
13089
|
/* @__PURE__ */ jsxRuntime.jsx(Stack24__default.default, { sx: { width: widthOfBar }, children: /* @__PURE__ */ jsxRuntime.jsxs(Typography28__default.default, { sx: { fontWeight: "bold", margin }, children: [
|
|
@@ -12854,6 +13099,8 @@ function SandboxEditorLabels({
|
|
|
12854
13099
|
);
|
|
12855
13100
|
}
|
|
12856
13101
|
function SqlPreview({ current, onChange }) {
|
|
13102
|
+
const muiTheme = styles.useTheme();
|
|
13103
|
+
const isDark = muiTheme.palette.mode === "dark";
|
|
12857
13104
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12858
13105
|
DiffEditor,
|
|
12859
13106
|
{
|
|
@@ -12863,17 +13110,18 @@ function SqlPreview({ current, onChange }) {
|
|
|
12863
13110
|
readOnly: false,
|
|
12864
13111
|
lineNumbers: true,
|
|
12865
13112
|
sideBySide: true,
|
|
13113
|
+
theme: isDark ? "dark" : "light",
|
|
12866
13114
|
height: "100%",
|
|
12867
13115
|
onModifiedChange: onChange
|
|
12868
13116
|
}
|
|
12869
13117
|
);
|
|
12870
13118
|
}
|
|
12871
13119
|
function SandboxView({ isOpen, onClose, current }) {
|
|
12872
|
-
const [isRunResultOpen, setIsRunResultOpen] =
|
|
12873
|
-
const [modifiedCode, setModifiedCode] =
|
|
13120
|
+
const [isRunResultOpen, setIsRunResultOpen] = React4.useState(false);
|
|
13121
|
+
const [modifiedCode, setModifiedCode] = React4.useState(
|
|
12874
13122
|
current?.raw_code ?? ""
|
|
12875
13123
|
);
|
|
12876
|
-
const [prevIsOpen, setPrevIsOpen] =
|
|
13124
|
+
const [prevIsOpen, setPrevIsOpen] = React4.useState(isOpen);
|
|
12877
13125
|
const { showRunId, clearRunResult } = useRecceActionContext();
|
|
12878
13126
|
const { primaryKeys, setPrimaryKeys } = useRecceQueryContext();
|
|
12879
13127
|
const { data: flags, isLoading } = useRecceServerFlag();
|
|
@@ -12990,7 +13238,7 @@ function SandboxView({ isOpen, onClose, current }) {
|
|
|
12990
13238
|
{
|
|
12991
13239
|
sx: {
|
|
12992
13240
|
height: "40px",
|
|
12993
|
-
bgcolor: "
|
|
13241
|
+
bgcolor: "cyan.600",
|
|
12994
13242
|
px: 0,
|
|
12995
13243
|
py: 2,
|
|
12996
13244
|
display: "flex",
|
|
@@ -13021,7 +13269,7 @@ function SandboxView({ isOpen, onClose, current }) {
|
|
|
13021
13269
|
sx: {
|
|
13022
13270
|
fontFamily: '"Montserrat", sans-serif',
|
|
13023
13271
|
fontSize: "1.125rem",
|
|
13024
|
-
color: "white"
|
|
13272
|
+
color: "common.white"
|
|
13025
13273
|
},
|
|
13026
13274
|
children: "RECCE"
|
|
13027
13275
|
}
|
|
@@ -13034,7 +13282,7 @@ function SandboxView({ isOpen, onClose, current }) {
|
|
|
13034
13282
|
variant: "outlined",
|
|
13035
13283
|
sx: {
|
|
13036
13284
|
fontSize: "0.875rem",
|
|
13037
|
-
color: "white",
|
|
13285
|
+
color: "common.white",
|
|
13038
13286
|
borderColor: "rgba(255,255,255,0.5)"
|
|
13039
13287
|
}
|
|
13040
13288
|
}
|
|
@@ -13051,7 +13299,7 @@ function SandboxView({ isOpen, onClose, current }) {
|
|
|
13051
13299
|
position: "absolute",
|
|
13052
13300
|
right: 8,
|
|
13053
13301
|
top: 4,
|
|
13054
|
-
color: "white"
|
|
13302
|
+
color: "common.white"
|
|
13055
13303
|
},
|
|
13056
13304
|
children: /* @__PURE__ */ jsxRuntime.jsx(io5.IoClose, {})
|
|
13057
13305
|
}
|
|
@@ -13123,9 +13371,9 @@ function TabPanel({ children, value, index }) {
|
|
|
13123
13371
|
}
|
|
13124
13372
|
function NodeView({ node, onCloseNode }) {
|
|
13125
13373
|
const withColumns = node.data.resourceType === "model" || node.data.resourceType === "seed" || node.data.resourceType === "source" || node.data.resourceType === "snapshot";
|
|
13126
|
-
const [isSandboxOpen, setIsSandboxOpen] =
|
|
13127
|
-
const [isNotificationOpen, setIsNotificationOpen] =
|
|
13128
|
-
const [tabValue, setTabValue] =
|
|
13374
|
+
const [isSandboxOpen, setIsSandboxOpen] = React4.useState(false);
|
|
13375
|
+
const [isNotificationOpen, setIsNotificationOpen] = React4.useState(true);
|
|
13376
|
+
const [tabValue, setTabValue] = React4.useState(0);
|
|
13129
13377
|
const { runAction } = useRecceActionContext();
|
|
13130
13378
|
const { isActionAvailable } = useLineageGraphContext();
|
|
13131
13379
|
const refetchRowCount = () => {
|
|
@@ -13271,7 +13519,7 @@ function SingleEnvironmentMenuButton({
|
|
|
13271
13519
|
refetchRowCount,
|
|
13272
13520
|
disableReason
|
|
13273
13521
|
}) {
|
|
13274
|
-
const [anchorEl, setAnchorEl] =
|
|
13522
|
+
const [anchorEl, setAnchorEl] = React4.useState(null);
|
|
13275
13523
|
const open = Boolean(anchorEl);
|
|
13276
13524
|
const [, setLocation] = useAppLocation();
|
|
13277
13525
|
const { setSqlQuery } = useRecceQueryContext();
|
|
@@ -13382,7 +13630,7 @@ function ExploreChangeMenuButton({
|
|
|
13382
13630
|
onSandboxOpen,
|
|
13383
13631
|
refetchRowCountDiff
|
|
13384
13632
|
}) {
|
|
13385
|
-
const [anchorEl, setAnchorEl] =
|
|
13633
|
+
const [anchorEl, setAnchorEl] = React4.useState(null);
|
|
13386
13634
|
const open = Boolean(anchorEl);
|
|
13387
13635
|
const [, setLocation] = useAppLocation();
|
|
13388
13636
|
const { runAction } = useRecceActionContext();
|
|
@@ -13392,7 +13640,7 @@ function ExploreChangeMenuButton({
|
|
|
13392
13640
|
const { primaryKey } = useModelColumns_default(node.data.name);
|
|
13393
13641
|
const metadataOnly = featureToggles.mode === "metadata only";
|
|
13394
13642
|
const isAddedOrRemoved = node.data.changeStatus === "added" || node.data.changeStatus === "removed";
|
|
13395
|
-
const addSchemaCheck =
|
|
13643
|
+
const addSchemaCheck = React4.useCallback(async () => {
|
|
13396
13644
|
const nodeId = node.id;
|
|
13397
13645
|
const check = await createSchemaDiffCheck({ node_id: nodeId });
|
|
13398
13646
|
setLocation(`/checks/?id=${check.check_id}`);
|
|
@@ -13638,10 +13886,7 @@ function getSettingsUrl(instanceInfo) {
|
|
|
13638
13886
|
}
|
|
13639
13887
|
function SetupConnectionBanner() {
|
|
13640
13888
|
const { featureToggles } = useRecceInstanceContext();
|
|
13641
|
-
const { data: instanceInfo } =
|
|
13642
|
-
queryKey: cacheKeys.instanceInfo(),
|
|
13643
|
-
queryFn: getRecceInstanceInfo
|
|
13644
|
-
});
|
|
13889
|
+
const { data: instanceInfo } = useRecceInstanceInfo();
|
|
13645
13890
|
if (featureToggles.mode !== "metadata only") {
|
|
13646
13891
|
return null;
|
|
13647
13892
|
}
|
|
@@ -13711,7 +13956,7 @@ function BaseEnvironmentSetupGuide() {
|
|
|
13711
13956
|
{
|
|
13712
13957
|
sx: {
|
|
13713
13958
|
p: 1,
|
|
13714
|
-
bgcolor: "
|
|
13959
|
+
bgcolor: "background.paper",
|
|
13715
13960
|
borderRadius: "50%",
|
|
13716
13961
|
display: "flex",
|
|
13717
13962
|
alignItems: "center",
|
|
@@ -13827,7 +14072,7 @@ var useMultiNodesAction = (nodes, {
|
|
|
13827
14072
|
onActionNodeUpdated,
|
|
13828
14073
|
onActionCompleted
|
|
13829
14074
|
}) => {
|
|
13830
|
-
const actionState =
|
|
14075
|
+
const actionState = React4.useRef({
|
|
13831
14076
|
...initValue
|
|
13832
14077
|
}).current;
|
|
13833
14078
|
const { showRunId } = useRecceActionContext();
|
|
@@ -14061,11 +14306,11 @@ var useMultiNodesAction = (nodes, {
|
|
|
14061
14306
|
};
|
|
14062
14307
|
};
|
|
14063
14308
|
function useValueDiffAlertDialog() {
|
|
14064
|
-
const [open, setOpen] =
|
|
14065
|
-
const [nodeCount, setNodeCount] =
|
|
14066
|
-
const [resolvePromise, setResolvePromise] =
|
|
14067
|
-
const cancelRef =
|
|
14068
|
-
const confirm =
|
|
14309
|
+
const [open, setOpen] = React4.useState(false);
|
|
14310
|
+
const [nodeCount, setNodeCount] = React4.useState(0);
|
|
14311
|
+
const [resolvePromise, setResolvePromise] = React4.useState();
|
|
14312
|
+
const cancelRef = React4.useRef(null);
|
|
14313
|
+
const confirm = React4.useCallback((nodeCount2) => {
|
|
14069
14314
|
setNodeCount(nodeCount2);
|
|
14070
14315
|
return new Promise((resolve) => {
|
|
14071
14316
|
setResolvePromise(() => resolve);
|
|
@@ -14165,14 +14410,14 @@ var edgeTypes = {
|
|
|
14165
14410
|
lineageGraphEdge: GraphEdge
|
|
14166
14411
|
};
|
|
14167
14412
|
var nodeColor = (node) => {
|
|
14168
|
-
return node.data.changeStatus ? getIconForChangeStatus(node.data.changeStatus).hexColor :
|
|
14413
|
+
return node.data.changeStatus ? getIconForChangeStatus(node.data.changeStatus).hexColor : colors.neutral[400];
|
|
14169
14414
|
};
|
|
14170
14415
|
var useResizeObserver = (ref, handler) => {
|
|
14171
|
-
const size =
|
|
14416
|
+
const size = React4.useRef({
|
|
14172
14417
|
width: 0,
|
|
14173
14418
|
height: 0
|
|
14174
14419
|
});
|
|
14175
|
-
|
|
14420
|
+
React4.useEffect(() => {
|
|
14176
14421
|
const target = ref.current;
|
|
14177
14422
|
const handleResize = (entries) => {
|
|
14178
14423
|
for (const entry of entries) {
|
|
@@ -14202,7 +14447,7 @@ var useResizeObserver = (ref, handler) => {
|
|
|
14202
14447
|
};
|
|
14203
14448
|
var useNavToCheck = () => {
|
|
14204
14449
|
const [, setLocation] = useAppLocation();
|
|
14205
|
-
return
|
|
14450
|
+
return React4.useCallback(
|
|
14206
14451
|
(check) => {
|
|
14207
14452
|
if (check.check_id) {
|
|
14208
14453
|
setLocation(`/checks/?id=${check.check_id}`);
|
|
@@ -14212,8 +14457,9 @@ var useNavToCheck = () => {
|
|
|
14212
14457
|
);
|
|
14213
14458
|
};
|
|
14214
14459
|
function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
14460
|
+
const { isDark } = useThemeColors();
|
|
14215
14461
|
const reactFlow = react$1.useReactFlow();
|
|
14216
|
-
const refResize =
|
|
14462
|
+
const refResize = React4.useRef(null);
|
|
14217
14463
|
const { successToast, failToast } = useClipBoardToast();
|
|
14218
14464
|
const {
|
|
14219
14465
|
copyToClipboard,
|
|
@@ -14223,7 +14469,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
14223
14469
|
renderLibrary: "html-to-image",
|
|
14224
14470
|
imageType: "png",
|
|
14225
14471
|
shadowEffect: true,
|
|
14226
|
-
backgroundColor:
|
|
14472
|
+
backgroundColor: isDark ? colors.neutral[900] : colors.neutral[50],
|
|
14227
14473
|
ignoreElements: (element) => {
|
|
14228
14474
|
try {
|
|
14229
14475
|
return element.classList.contains(IGNORE_SCREENSHOT_CLASS);
|
|
@@ -14254,10 +14500,10 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
14254
14500
|
const { featureToggles, singleEnv } = useRecceInstanceContext();
|
|
14255
14501
|
const { runId, showRunId, closeRunResult, runAction, isRunResultOpen } = useRecceActionContext();
|
|
14256
14502
|
const { run } = useRun(runId);
|
|
14257
|
-
const [viewOptions, setViewOptions] =
|
|
14503
|
+
const [viewOptions, setViewOptions] = React4.useState({
|
|
14258
14504
|
...props.viewOptions
|
|
14259
14505
|
});
|
|
14260
|
-
const trackLineageRender =
|
|
14506
|
+
const trackLineageRender = React4.useCallback(
|
|
14261
14507
|
(nodes2, currentViewMode, impactRadiusEnabled, cllColumnActive, rightSidebarOpen) => {
|
|
14262
14508
|
const lineageGraphNodesOnly = nodes2.filter(isLineageGraphNode);
|
|
14263
14509
|
const grouped = Object.groupBy(
|
|
@@ -14284,41 +14530,41 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
14284
14530
|
},
|
|
14285
14531
|
[]
|
|
14286
14532
|
);
|
|
14287
|
-
const cllHistory =
|
|
14288
|
-
const [cll, setCll] =
|
|
14533
|
+
const cllHistory = React4.useRef([]).current;
|
|
14534
|
+
const [cll, setCll] = React4.useState(void 0);
|
|
14289
14535
|
const actionGetCll = reactQuery.useMutation({
|
|
14290
14536
|
mutationFn: getCll
|
|
14291
14537
|
});
|
|
14292
|
-
const [nodeColumnSetMap, setNodeColumSetMap] =
|
|
14293
|
-
const findNodeByName =
|
|
14538
|
+
const [nodeColumnSetMap, setNodeColumSetMap] = React4.useState({});
|
|
14539
|
+
const findNodeByName = React4.useCallback(
|
|
14294
14540
|
(name) => {
|
|
14295
14541
|
return nodes.filter(isLineageGraphNode).find((n) => n.data.name === name);
|
|
14296
14542
|
},
|
|
14297
14543
|
[nodes]
|
|
14298
14544
|
);
|
|
14299
|
-
|
|
14545
|
+
React4.useImperativeHandle(ref, () => ({
|
|
14300
14546
|
copyToClipboard
|
|
14301
14547
|
}));
|
|
14302
|
-
const isModelsChanged =
|
|
14548
|
+
const isModelsChanged = React4.useMemo(() => {
|
|
14303
14549
|
return !!(lineageGraph && lineageGraph.modifiedSet.length > 0);
|
|
14304
14550
|
}, [lineageGraph]);
|
|
14305
14551
|
const viewMode = viewOptions.view_mode ?? "changed_models";
|
|
14306
|
-
const filteredNodeIds =
|
|
14552
|
+
const filteredNodeIds = React4.useMemo(() => {
|
|
14307
14553
|
return nodes.filter((node) => node.type === "lineageGraphNode").map((node) => node.id);
|
|
14308
14554
|
}, [nodes]);
|
|
14309
|
-
const filteredNodes =
|
|
14555
|
+
const filteredNodes = React4.useMemo(() => {
|
|
14310
14556
|
if (!lineageGraph) {
|
|
14311
14557
|
return [];
|
|
14312
14558
|
}
|
|
14313
14559
|
return filteredNodeIds.map((nodeId) => lineageGraph.nodes[nodeId]);
|
|
14314
14560
|
}, [lineageGraph, filteredNodeIds]);
|
|
14315
|
-
const [focusedNodeId, setFocusedNodeId] =
|
|
14561
|
+
const [focusedNodeId, setFocusedNodeId] = React4.useState();
|
|
14316
14562
|
const focusedNode = focusedNodeId ? lineageGraph?.nodes[focusedNodeId] : void 0;
|
|
14317
|
-
const [selectMode, setSelectMode] =
|
|
14318
|
-
const [selectedNodeIds, setSelectedNodeIds] =
|
|
14563
|
+
const [selectMode, setSelectMode] = React4.useState();
|
|
14564
|
+
const [selectedNodeIds, setSelectedNodeIds] = React4.useState(
|
|
14319
14565
|
/* @__PURE__ */ new Set()
|
|
14320
14566
|
);
|
|
14321
|
-
const selectedNodes =
|
|
14567
|
+
const selectedNodes = React4.useMemo(() => {
|
|
14322
14568
|
if (!lineageGraph) {
|
|
14323
14569
|
return [];
|
|
14324
14570
|
}
|
|
@@ -14348,7 +14594,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
14348
14594
|
}
|
|
14349
14595
|
}
|
|
14350
14596
|
);
|
|
14351
|
-
const highlighted =
|
|
14597
|
+
const highlighted = React4.useMemo(() => {
|
|
14352
14598
|
if (!lineageGraph) {
|
|
14353
14599
|
return /* @__PURE__ */ new Set();
|
|
14354
14600
|
}
|
|
@@ -14392,7 +14638,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
14392
14638
|
const closeContextMenu = () => {
|
|
14393
14639
|
lineageViewContextMenu.closeContextMenu();
|
|
14394
14640
|
};
|
|
14395
|
-
|
|
14641
|
+
React4.useLayoutEffect(() => {
|
|
14396
14642
|
const t = async () => {
|
|
14397
14643
|
let filteredNodeIds2 = void 0;
|
|
14398
14644
|
if (!lineageGraph) {
|
|
@@ -14662,7 +14908,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
14662
14908
|
});
|
|
14663
14909
|
};
|
|
14664
14910
|
const valueDiffAlertDialog = useValueDiffAlertDialog_default();
|
|
14665
|
-
|
|
14911
|
+
React4.useEffect(() => {
|
|
14666
14912
|
const runResultType = run?.type;
|
|
14667
14913
|
if (!interactive) {
|
|
14668
14914
|
return;
|
|
@@ -15075,14 +15321,28 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
15075
15321
|
minZoom: 0.1,
|
|
15076
15322
|
nodesDraggable: interactive,
|
|
15077
15323
|
ref: refReactFlow,
|
|
15324
|
+
colorMode: isDark ? "dark" : "light",
|
|
15078
15325
|
children: [
|
|
15079
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15326
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15327
|
+
react$1.Background,
|
|
15328
|
+
{
|
|
15329
|
+
id: "lineage-bg",
|
|
15330
|
+
variant: react$1.BackgroundVariant.Dots,
|
|
15331
|
+
color: isDark ? colors.neutral[700] : colors.neutral[300],
|
|
15332
|
+
gap: 20,
|
|
15333
|
+
size: 2
|
|
15334
|
+
}
|
|
15335
|
+
),
|
|
15080
15336
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15081
15337
|
react$1.Controls,
|
|
15082
15338
|
{
|
|
15083
15339
|
showInteractive: false,
|
|
15084
15340
|
position: "top-right",
|
|
15085
15341
|
className: IGNORE_SCREENSHOT_CLASS,
|
|
15342
|
+
style: {
|
|
15343
|
+
backgroundColor: isDark ? colors.neutral[700] : void 0,
|
|
15344
|
+
borderColor: isDark ? colors.neutral[600] : void 0
|
|
15345
|
+
},
|
|
15086
15346
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15087
15347
|
react$1.ControlButton,
|
|
15088
15348
|
{
|
|
@@ -15094,6 +15354,10 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
15094
15354
|
from: "lineage_view"
|
|
15095
15355
|
});
|
|
15096
15356
|
},
|
|
15357
|
+
style: {
|
|
15358
|
+
backgroundColor: isDark ? colors.neutral[700] : void 0,
|
|
15359
|
+
color: isDark ? colors.neutral[200] : void 0
|
|
15360
|
+
},
|
|
15097
15361
|
children: /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { component: fi.FiCopy })
|
|
15098
15362
|
}
|
|
15099
15363
|
)
|
|
@@ -15127,7 +15391,9 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
15127
15391
|
nodeColor,
|
|
15128
15392
|
nodeStrokeWidth: 3,
|
|
15129
15393
|
zoomable: true,
|
|
15130
|
-
pannable: true
|
|
15394
|
+
pannable: true,
|
|
15395
|
+
bgColor: isDark ? colors.neutral[800] : void 0,
|
|
15396
|
+
maskColor: isDark ? `${colors.neutral[900]}99` : `${colors.neutral[100]}99`
|
|
15131
15397
|
}
|
|
15132
15398
|
),
|
|
15133
15399
|
selectMode === "action_result" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -15152,24 +15418,31 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
15152
15418
|
]
|
|
15153
15419
|
}
|
|
15154
15420
|
),
|
|
15155
|
-
focusedNode ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15421
|
+
focusedNode ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15422
|
+
Box35__default.default,
|
|
15423
|
+
{
|
|
15424
|
+
sx: {
|
|
15425
|
+
borderLeft: "solid 1px",
|
|
15426
|
+
borderColor: "divider",
|
|
15427
|
+
height: "100%"
|
|
15428
|
+
},
|
|
15429
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(NodeView, { node: focusedNode, onCloseNode: onNodeViewClosed })
|
|
15430
|
+
}
|
|
15431
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, {})
|
|
15156
15432
|
]
|
|
15157
15433
|
}
|
|
15158
15434
|
),
|
|
15159
15435
|
valueDiffAlertDialog.AlertDialog
|
|
15160
15436
|
] });
|
|
15161
15437
|
}
|
|
15162
|
-
var LineageView =
|
|
15438
|
+
var LineageView = React4.forwardRef(
|
|
15163
15439
|
PrivateLineageView
|
|
15164
15440
|
);
|
|
15165
15441
|
function LineagePage() {
|
|
15166
15442
|
return /* @__PURE__ */ jsxRuntime.jsx(react$1.ReactFlowProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(LineageView, { interactive: true }) });
|
|
15167
15443
|
}
|
|
15168
15444
|
function SetupConnectionGuide() {
|
|
15169
|
-
const { data: instanceInfo } =
|
|
15170
|
-
queryKey: cacheKeys.instanceInfo(),
|
|
15171
|
-
queryFn: getRecceInstanceInfo
|
|
15172
|
-
});
|
|
15445
|
+
const { data: instanceInfo } = useRecceInstanceInfo();
|
|
15173
15446
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 h-full min-h-0 m-2 p-4 bg-blue-50 rounded-lg shadow-md justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-4/5 flex flex-col overflow-y-auto gap-6 px-8 pb-8", children: [
|
|
15174
15447
|
/* @__PURE__ */ jsxRuntime.jsxs(Stack24__default.default, { alignItems: "center", spacing: 2, children: [
|
|
15175
15448
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -15177,7 +15450,7 @@ function SetupConnectionGuide() {
|
|
|
15177
15450
|
{
|
|
15178
15451
|
sx: {
|
|
15179
15452
|
p: 1,
|
|
15180
|
-
bgcolor: "
|
|
15453
|
+
bgcolor: "background.paper",
|
|
15181
15454
|
borderRadius: "50%",
|
|
15182
15455
|
display: "flex",
|
|
15183
15456
|
alignItems: "center",
|
|
@@ -15295,7 +15568,7 @@ ${sqlQuery}`;
|
|
|
15295
15568
|
const { mutate: runQuery, isPending } = reactQuery.useMutation({
|
|
15296
15569
|
mutationFn: queryFn
|
|
15297
15570
|
});
|
|
15298
|
-
const currentSchema =
|
|
15571
|
+
const currentSchema = React4.useMemo(() => {
|
|
15299
15572
|
const initialValue = "N/A";
|
|
15300
15573
|
const countMap = {};
|
|
15301
15574
|
if (!lineageGraph) {
|
|
@@ -15326,7 +15599,8 @@ ${sqlQuery}`;
|
|
|
15326
15599
|
padding: "4pt 8pt",
|
|
15327
15600
|
gap: "5px",
|
|
15328
15601
|
height: "54px",
|
|
15329
|
-
borderBottom: "1px solid
|
|
15602
|
+
borderBottom: "1px solid",
|
|
15603
|
+
borderColor: "divider"
|
|
15330
15604
|
},
|
|
15331
15605
|
children: [
|
|
15332
15606
|
/* @__PURE__ */ jsxRuntime.jsx(HistoryToggle, {}),
|
|
@@ -15391,7 +15665,8 @@ ${sqlQuery}`;
|
|
|
15391
15665
|
padding: "4pt 8pt",
|
|
15392
15666
|
gap: "5px",
|
|
15393
15667
|
height: "54px",
|
|
15394
|
-
borderBottom: "1px solid
|
|
15668
|
+
borderBottom: "1px solid",
|
|
15669
|
+
borderColor: "divider",
|
|
15395
15670
|
flex: "0 0 54px"
|
|
15396
15671
|
},
|
|
15397
15672
|
children: [
|
|
@@ -15480,6 +15755,8 @@ var ChecklistItem = ({
|
|
|
15480
15755
|
onSelect,
|
|
15481
15756
|
onMarkAsApproved
|
|
15482
15757
|
}) => {
|
|
15758
|
+
const theme = styles.useTheme();
|
|
15759
|
+
const isDark = theme.palette.mode === "dark";
|
|
15483
15760
|
const { featureToggles } = useRecceInstanceContext();
|
|
15484
15761
|
const queryClient = reactQuery.useQueryClient();
|
|
15485
15762
|
const checkId = check.check_id;
|
|
@@ -15504,10 +15781,10 @@ var ChecklistItem = ({
|
|
|
15504
15781
|
width: "100%",
|
|
15505
15782
|
p: "0.25rem 1.25rem",
|
|
15506
15783
|
cursor: "pointer",
|
|
15507
|
-
"&:hover": { bgcolor: "Cornsilk" },
|
|
15508
|
-
bgcolor: selected ? "Floralwhite" : "inherit",
|
|
15784
|
+
"&:hover": { bgcolor: isDark ? "grey.800" : "Cornsilk" },
|
|
15785
|
+
bgcolor: selected ? isDark ? "grey.900" : "Floralwhite" : "inherit",
|
|
15509
15786
|
borderBottom: "1px solid",
|
|
15510
|
-
borderBottomColor: "divider",
|
|
15787
|
+
borderBottomColor: isDark ? "grey.700" : "divider",
|
|
15511
15788
|
borderLeft: "3px solid",
|
|
15512
15789
|
borderLeftColor: selected ? "orange" : "transparent",
|
|
15513
15790
|
display: "flex",
|
|
@@ -15555,7 +15832,7 @@ var ChecklistItem = ({
|
|
|
15555
15832
|
onClick: (e) => e.stopPropagation(),
|
|
15556
15833
|
sx: {
|
|
15557
15834
|
borderColor: "border.inverted",
|
|
15558
|
-
bgcolor: isMarkAsApprovedDisabled ? "grey.200" : void 0
|
|
15835
|
+
bgcolor: isMarkAsApprovedDisabled ? isDark ? "grey.700" : "grey.200" : void 0
|
|
15559
15836
|
}
|
|
15560
15837
|
}
|
|
15561
15838
|
) })
|
|
@@ -15571,9 +15848,9 @@ var CheckList = ({
|
|
|
15571
15848
|
onCheckSelected,
|
|
15572
15849
|
onChecksReordered
|
|
15573
15850
|
}) => {
|
|
15574
|
-
const [bypassModal, setBypassModal] =
|
|
15575
|
-
const [open, setOpen] =
|
|
15576
|
-
const [pendingApprovalCheckId, setPendingApprovalCheckId] =
|
|
15851
|
+
const [bypassModal, setBypassModal] = React4.useState(false);
|
|
15852
|
+
const [open, setOpen] = React4.useState(false);
|
|
15853
|
+
const [pendingApprovalCheckId, setPendingApprovalCheckId] = React4.useState(null);
|
|
15577
15854
|
const queryClient = reactQuery.useQueryClient();
|
|
15578
15855
|
const { mutate: markCheckedByID } = reactQuery.useMutation({
|
|
15579
15856
|
mutationFn: (checkId) => updateCheck(checkId, { is_checked: true }),
|
|
@@ -15843,7 +16120,9 @@ function CommentInput({
|
|
|
15843
16120
|
isSubmitting = false,
|
|
15844
16121
|
placeholder = "Add a comment..."
|
|
15845
16122
|
}) {
|
|
15846
|
-
const
|
|
16123
|
+
const theme = styles.useTheme();
|
|
16124
|
+
const isDark = theme.palette.mode === "dark";
|
|
16125
|
+
const [content, setContent] = React4.useState("");
|
|
15847
16126
|
const handleSubmit = () => {
|
|
15848
16127
|
const trimmed = content.trim();
|
|
15849
16128
|
if (trimmed) {
|
|
@@ -15872,14 +16151,17 @@ function CommentInput({
|
|
|
15872
16151
|
disabled: isSubmitting,
|
|
15873
16152
|
sx: {
|
|
15874
16153
|
"& .MuiOutlinedInput-root": {
|
|
15875
|
-
bgcolor: "
|
|
16154
|
+
bgcolor: "background.paper",
|
|
15876
16155
|
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
15877
|
-
borderColor: "grey.400"
|
|
16156
|
+
borderColor: isDark ? "grey.500" : "grey.400"
|
|
15878
16157
|
},
|
|
15879
16158
|
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
15880
16159
|
borderColor: "iochmara.400",
|
|
15881
16160
|
boxShadow: "0 0 0 1px #4299E1"
|
|
15882
16161
|
}
|
|
16162
|
+
},
|
|
16163
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
16164
|
+
borderColor: isDark ? "grey.600" : void 0
|
|
15883
16165
|
}
|
|
15884
16166
|
}
|
|
15885
16167
|
}
|
|
@@ -15921,7 +16203,7 @@ function ExternalLinkConfirmDialog({
|
|
|
15921
16203
|
onConfirm,
|
|
15922
16204
|
onCancel
|
|
15923
16205
|
}) {
|
|
15924
|
-
const cancelRef =
|
|
16206
|
+
const cancelRef = React4.useRef(null);
|
|
15925
16207
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15926
16208
|
MuiDialog2__default.default,
|
|
15927
16209
|
{
|
|
@@ -16012,8 +16294,8 @@ function MarkdownLink({
|
|
|
16012
16294
|
children,
|
|
16013
16295
|
internalDomains
|
|
16014
16296
|
}) {
|
|
16015
|
-
const [showConfirm, setShowConfirm] =
|
|
16016
|
-
const [pendingUrl, setPendingUrl] =
|
|
16297
|
+
const [showConfirm, setShowConfirm] = React4.useState(false);
|
|
16298
|
+
const [pendingUrl, setPendingUrl] = React4.useState(null);
|
|
16017
16299
|
const handleClick = (e) => {
|
|
16018
16300
|
if (!href) return;
|
|
16019
16301
|
if (isExternalUrl(href, internalDomains)) {
|
|
@@ -16066,7 +16348,8 @@ function MarkdownLink({
|
|
|
16066
16348
|
}
|
|
16067
16349
|
function CodeBlock({
|
|
16068
16350
|
className,
|
|
16069
|
-
children
|
|
16351
|
+
children,
|
|
16352
|
+
isDark = false
|
|
16070
16353
|
}) {
|
|
16071
16354
|
const match = /language-(\w+)/.exec(className || "");
|
|
16072
16355
|
const language = match ? match[1] : void 0;
|
|
@@ -16078,7 +16361,8 @@ function CodeBlock({
|
|
|
16078
16361
|
{
|
|
16079
16362
|
component: "code",
|
|
16080
16363
|
sx: {
|
|
16081
|
-
bgcolor: "grey.100",
|
|
16364
|
+
bgcolor: isDark ? "grey.800" : "grey.100",
|
|
16365
|
+
color: isDark ? "grey.200" : "inherit",
|
|
16082
16366
|
px: 1,
|
|
16083
16367
|
py: 0.5,
|
|
16084
16368
|
borderRadius: 0.5,
|
|
@@ -16115,6 +16399,8 @@ function MarkdownContent({
|
|
|
16115
16399
|
fontSize = "0.875rem",
|
|
16116
16400
|
internalDomains = []
|
|
16117
16401
|
}) {
|
|
16402
|
+
const theme = styles.useTheme();
|
|
16403
|
+
const isDark = theme.palette.mode === "dark";
|
|
16118
16404
|
const allInternalDomains = [
|
|
16119
16405
|
window.location.hostname,
|
|
16120
16406
|
"reccehq.com",
|
|
@@ -16126,7 +16412,7 @@ function MarkdownContent({
|
|
|
16126
16412
|
// Links with external confirmation
|
|
16127
16413
|
a: ({ href, children }) => /* @__PURE__ */ jsxRuntime.jsx(MarkdownLink, { href, internalDomains: allInternalDomains, children }),
|
|
16128
16414
|
// Code blocks with syntax highlighting
|
|
16129
|
-
code: CodeBlock,
|
|
16415
|
+
code: (props) => /* @__PURE__ */ jsxRuntime.jsx(CodeBlock, { ...props, isDark }),
|
|
16130
16416
|
// Paragraphs
|
|
16131
16417
|
p: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16132
16418
|
Typography28__default.default,
|
|
@@ -16162,11 +16448,11 @@ function MarkdownContent({
|
|
|
16162
16448
|
{
|
|
16163
16449
|
sx: {
|
|
16164
16450
|
borderLeft: "3px solid",
|
|
16165
|
-
borderLeftColor: "grey.300",
|
|
16451
|
+
borderLeftColor: isDark ? "grey.600" : "grey.300",
|
|
16166
16452
|
pl: 3,
|
|
16167
16453
|
py: 1,
|
|
16168
16454
|
my: 2,
|
|
16169
|
-
color: "grey.600",
|
|
16455
|
+
color: isDark ? "grey.400" : "grey.600",
|
|
16170
16456
|
fontStyle: "italic"
|
|
16171
16457
|
},
|
|
16172
16458
|
children
|
|
@@ -16181,19 +16467,22 @@ function MarkdownContent({
|
|
|
16181
16467
|
width: "100%",
|
|
16182
16468
|
fontSize,
|
|
16183
16469
|
border: "1px solid",
|
|
16184
|
-
borderColor: "grey.200",
|
|
16470
|
+
borderColor: isDark ? "grey.700" : "grey.200",
|
|
16185
16471
|
borderRadius: 1
|
|
16186
16472
|
},
|
|
16187
16473
|
children
|
|
16188
16474
|
}
|
|
16189
16475
|
) }),
|
|
16190
|
-
thead: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { component: "thead", sx: { bgcolor: "grey.50" }, children }),
|
|
16476
|
+
thead: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { component: "thead", sx: { bgcolor: isDark ? "grey.800" : "grey.50" }, children }),
|
|
16191
16477
|
tbody: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { component: "tbody", children }),
|
|
16192
16478
|
tr: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16193
16479
|
Box35__default.default,
|
|
16194
16480
|
{
|
|
16195
16481
|
component: "tr",
|
|
16196
|
-
sx: {
|
|
16482
|
+
sx: {
|
|
16483
|
+
borderBottom: "1px solid",
|
|
16484
|
+
borderColor: isDark ? "grey.700" : "grey.200"
|
|
16485
|
+
},
|
|
16197
16486
|
children
|
|
16198
16487
|
}
|
|
16199
16488
|
),
|
|
@@ -16207,7 +16496,13 @@ function MarkdownContent({
|
|
|
16207
16496
|
),
|
|
16208
16497
|
td: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { component: "td", sx: { px: 2, py: 1 }, children }),
|
|
16209
16498
|
// Horizontal rule
|
|
16210
|
-
hr: () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16499
|
+
hr: () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16500
|
+
Box35__default.default,
|
|
16501
|
+
{
|
|
16502
|
+
component: "hr",
|
|
16503
|
+
sx: { my: 3, borderColor: isDark ? "grey.700" : "grey.200" }
|
|
16504
|
+
}
|
|
16505
|
+
),
|
|
16211
16506
|
// Strong/Bold
|
|
16212
16507
|
strong: ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { component: "strong", sx: { fontWeight: 600 }, children }),
|
|
16213
16508
|
// Emphasis/Italic
|
|
@@ -16319,11 +16614,13 @@ function CommentEvent({
|
|
|
16319
16614
|
onEdit,
|
|
16320
16615
|
onDelete
|
|
16321
16616
|
}) {
|
|
16322
|
-
const
|
|
16323
|
-
const
|
|
16324
|
-
const [
|
|
16325
|
-
const [
|
|
16326
|
-
const [
|
|
16617
|
+
const theme = styles.useTheme();
|
|
16618
|
+
const isDark = theme.palette.mode === "dark";
|
|
16619
|
+
const [isEditing, setIsEditing] = React4.useState(false);
|
|
16620
|
+
const [editContent, setEditContent] = React4.useState(event.content || "");
|
|
16621
|
+
const [isSubmitting, setIsSubmitting] = React4.useState(false);
|
|
16622
|
+
const [isDeleting, setIsDeleting] = React4.useState(false);
|
|
16623
|
+
const [deleteAnchorEl, setDeleteAnchorEl] = React4.useState(
|
|
16327
16624
|
null
|
|
16328
16625
|
);
|
|
16329
16626
|
const isDeletePopoverOpen = Boolean(deleteAnchorEl);
|
|
@@ -16438,7 +16735,7 @@ function CommentEvent({
|
|
|
16438
16735
|
autoFocus: true,
|
|
16439
16736
|
sx: {
|
|
16440
16737
|
"& .MuiOutlinedInput-root": {
|
|
16441
|
-
bgcolor: "
|
|
16738
|
+
bgcolor: "background.paper",
|
|
16442
16739
|
"&:focus-within": {
|
|
16443
16740
|
borderColor: "primary.main"
|
|
16444
16741
|
}
|
|
@@ -16484,11 +16781,11 @@ function CommentEvent({
|
|
|
16484
16781
|
Box35__default.default,
|
|
16485
16782
|
{
|
|
16486
16783
|
sx: {
|
|
16487
|
-
bgcolor: "grey.50",
|
|
16784
|
+
bgcolor: isDark ? "grey.800" : "grey.50",
|
|
16488
16785
|
borderRadius: 1,
|
|
16489
16786
|
p: 1,
|
|
16490
16787
|
border: "1px solid",
|
|
16491
|
-
borderColor: "grey.200",
|
|
16788
|
+
borderColor: isDark ? "grey.700" : "grey.200",
|
|
16492
16789
|
position: "relative",
|
|
16493
16790
|
"&:hover .comment-actions": {
|
|
16494
16791
|
opacity: 1
|
|
@@ -16611,6 +16908,8 @@ function TimelineEvent({
|
|
|
16611
16908
|
return /* @__PURE__ */ jsxRuntime.jsx(StateChangeEvent, { event });
|
|
16612
16909
|
}
|
|
16613
16910
|
function CheckTimeline({ checkId }) {
|
|
16911
|
+
const theme = styles.useTheme();
|
|
16912
|
+
const isDark = theme.palette.mode === "dark";
|
|
16614
16913
|
const {
|
|
16615
16914
|
events,
|
|
16616
16915
|
isLoading,
|
|
@@ -16671,7 +16970,7 @@ function CheckTimeline({ checkId }) {
|
|
|
16671
16970
|
height: "100%",
|
|
16672
16971
|
alignItems: "stretch",
|
|
16673
16972
|
borderLeft: "1px solid",
|
|
16674
|
-
borderColor: "grey.200"
|
|
16973
|
+
borderColor: isDark ? "grey.700" : "grey.200"
|
|
16675
16974
|
},
|
|
16676
16975
|
spacing: 0,
|
|
16677
16976
|
children: [
|
|
@@ -16682,7 +16981,7 @@ function CheckTimeline({ checkId }) {
|
|
|
16682
16981
|
px: 3,
|
|
16683
16982
|
py: 2,
|
|
16684
16983
|
borderBottom: "1px solid",
|
|
16685
|
-
borderColor: "grey.200"
|
|
16984
|
+
borderColor: isDark ? "grey.700" : "grey.200"
|
|
16686
16985
|
},
|
|
16687
16986
|
children: /* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { variant: "subtitle2", sx: { fontWeight: 500 }, children: "Activity" })
|
|
16688
16987
|
}
|
|
@@ -16697,7 +16996,12 @@ function CheckTimeline({ checkId }) {
|
|
|
16697
16996
|
onDelete: handleDeleteComment
|
|
16698
16997
|
}
|
|
16699
16998
|
),
|
|
16700
|
-
index < events.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16999
|
+
index < events.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17000
|
+
Divider__default.default,
|
|
17001
|
+
{
|
|
17002
|
+
sx: { borderColor: isDark ? "grey.700" : "grey.100" }
|
|
17003
|
+
}
|
|
17004
|
+
)
|
|
16701
17005
|
] }, event.id)) }) }),
|
|
16702
17006
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16703
17007
|
Box35__default.default,
|
|
@@ -16706,8 +17010,8 @@ function CheckTimeline({ checkId }) {
|
|
|
16706
17010
|
px: 3,
|
|
16707
17011
|
py: 3,
|
|
16708
17012
|
borderTop: "1px solid",
|
|
16709
|
-
borderColor: "grey.200",
|
|
16710
|
-
bgcolor: "grey.50"
|
|
17013
|
+
borderColor: isDark ? "grey.700" : "grey.200",
|
|
17014
|
+
bgcolor: isDark ? "grey.900" : "grey.50"
|
|
16711
17015
|
},
|
|
16712
17016
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16713
17017
|
CommentInput,
|
|
@@ -16722,22 +17026,22 @@ function CheckTimeline({ checkId }) {
|
|
|
16722
17026
|
}
|
|
16723
17027
|
);
|
|
16724
17028
|
}
|
|
16725
|
-
var RecceCheckContext =
|
|
17029
|
+
var RecceCheckContext = React4.createContext({
|
|
16726
17030
|
latestSelectedCheckId: "",
|
|
16727
17031
|
setLatestSelectedCheckId: () => {
|
|
16728
17032
|
return void 0;
|
|
16729
17033
|
}
|
|
16730
17034
|
});
|
|
16731
|
-
var useRecceCheckContext = () =>
|
|
17035
|
+
var useRecceCheckContext = () => React4.useContext(RecceCheckContext);
|
|
16732
17036
|
function CheckBreadcrumb({ name, setName }) {
|
|
16733
|
-
const [isEditing, setIsEditing] =
|
|
16734
|
-
const [editValue, setEditValue] =
|
|
16735
|
-
const editInputRef =
|
|
17037
|
+
const [isEditing, setIsEditing] = React4.useState(false);
|
|
17038
|
+
const [editValue, setEditValue] = React4.useState(name);
|
|
17039
|
+
const editInputRef = React4.useRef(null);
|
|
16736
17040
|
const handleClick = () => {
|
|
16737
17041
|
setEditValue(name);
|
|
16738
17042
|
setIsEditing(true);
|
|
16739
17043
|
};
|
|
16740
|
-
const handleCommit =
|
|
17044
|
+
const handleCommit = React4.useCallback(() => {
|
|
16741
17045
|
setName(editValue);
|
|
16742
17046
|
setIsEditing(false);
|
|
16743
17047
|
}, [setName, editValue]);
|
|
@@ -16753,7 +17057,7 @@ function CheckBreadcrumb({ name, setName }) {
|
|
|
16753
17057
|
const handleChange = (event) => {
|
|
16754
17058
|
setEditValue(event.target.value);
|
|
16755
17059
|
};
|
|
16756
|
-
|
|
17060
|
+
React4.useEffect(() => {
|
|
16757
17061
|
const handleClickOutside = (event) => {
|
|
16758
17062
|
if (editInputRef.current && !editInputRef.current.contains(event.target)) {
|
|
16759
17063
|
handleCommit();
|
|
@@ -16767,16 +17071,18 @@ function CheckBreadcrumb({ name, setName }) {
|
|
|
16767
17071
|
};
|
|
16768
17072
|
}, [isEditing, handleCommit]);
|
|
16769
17073
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16770
|
-
|
|
17074
|
+
Box35__default.default,
|
|
16771
17075
|
{
|
|
16772
17076
|
sx: {
|
|
16773
|
-
flex: "
|
|
16774
|
-
fontSize: "
|
|
17077
|
+
flex: "2",
|
|
17078
|
+
fontSize: "1rem",
|
|
16775
17079
|
fontWeight: 500,
|
|
16776
|
-
overflow: "hidden"
|
|
17080
|
+
overflow: "hidden",
|
|
17081
|
+
color: "text.primary",
|
|
17082
|
+
cursor: "pointer"
|
|
16777
17083
|
},
|
|
16778
17084
|
className: "no-track-pii-safe",
|
|
16779
|
-
children:
|
|
17085
|
+
children: isEditing ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
16780
17086
|
TextField__default.default,
|
|
16781
17087
|
{
|
|
16782
17088
|
inputRef: editInputRef,
|
|
@@ -16799,15 +17105,15 @@ function CheckBreadcrumb({ name, setName }) {
|
|
|
16799
17105
|
onClick: handleClick,
|
|
16800
17106
|
children: name
|
|
16801
17107
|
}
|
|
16802
|
-
)
|
|
17108
|
+
)
|
|
16803
17109
|
}
|
|
16804
17110
|
);
|
|
16805
17111
|
}
|
|
16806
17112
|
function CheckDescription({ value, onChange }) {
|
|
16807
17113
|
const { featureToggles } = useRecceInstanceContext();
|
|
16808
|
-
const [editing, setEditing] =
|
|
16809
|
-
const [tempValue, setTempValue] =
|
|
16810
|
-
const textareaRef =
|
|
17114
|
+
const [editing, setEditing] = React4.useState(false);
|
|
17115
|
+
const [tempValue, setTempValue] = React4.useState();
|
|
17116
|
+
const textareaRef = React4.useRef(null);
|
|
16811
17117
|
const handleEdit = () => {
|
|
16812
17118
|
setTempValue(value ?? "");
|
|
16813
17119
|
setEditing(true);
|
|
@@ -16836,7 +17142,7 @@ function CheckDescription({ value, onChange }) {
|
|
|
16836
17142
|
const handleChange = (event) => {
|
|
16837
17143
|
setTempValue(event.target.value);
|
|
16838
17144
|
};
|
|
16839
|
-
|
|
17145
|
+
React4.useEffect(() => {
|
|
16840
17146
|
if (editing && textareaRef.current) {
|
|
16841
17147
|
const element = textareaRef.current;
|
|
16842
17148
|
element.focus();
|
|
@@ -16939,7 +17245,7 @@ function _LineageDiffView({ check }, ref) {
|
|
|
16939
17245
|
};
|
|
16940
17246
|
return /* @__PURE__ */ jsxRuntime.jsx(Box35__default.default, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.ReactFlowProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(LineageView, { viewOptions, interactive: false, ref }) }) });
|
|
16941
17247
|
}
|
|
16942
|
-
var LineageDiffView =
|
|
17248
|
+
var LineageDiffView = React4.forwardRef(
|
|
16943
17249
|
_LineageDiffView
|
|
16944
17250
|
);
|
|
16945
17251
|
function generateCheckTemplate({
|
|
@@ -16960,6 +17266,8 @@ function generateCheckTemplate({
|
|
|
16960
17266
|
function PresetCheckTemplateView({
|
|
16961
17267
|
yamlTemplate
|
|
16962
17268
|
}) {
|
|
17269
|
+
const muiTheme = styles.useTheme();
|
|
17270
|
+
const isDark = muiTheme.palette.mode === "dark";
|
|
16963
17271
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16964
17272
|
CodeEditor,
|
|
16965
17273
|
{
|
|
@@ -16969,6 +17277,7 @@ function PresetCheckTemplateView({
|
|
|
16969
17277
|
lineNumbers: false,
|
|
16970
17278
|
wordWrap: true,
|
|
16971
17279
|
fontSize: 14,
|
|
17280
|
+
theme: isDark ? "dark" : "light",
|
|
16972
17281
|
height: "300px"
|
|
16973
17282
|
}
|
|
16974
17283
|
);
|
|
@@ -16977,7 +17286,8 @@ var NodelistItem = ({
|
|
|
16977
17286
|
node,
|
|
16978
17287
|
selected,
|
|
16979
17288
|
onSelect,
|
|
16980
|
-
schemaChanged
|
|
17289
|
+
schemaChanged,
|
|
17290
|
+
isDark
|
|
16981
17291
|
}) => {
|
|
16982
17292
|
const { icon } = getIconForResourceType(node.data.resourceType);
|
|
16983
17293
|
const { base, current } = node.data.data;
|
|
@@ -17002,8 +17312,8 @@ var NodelistItem = ({
|
|
|
17002
17312
|
fontSize: "10pt",
|
|
17003
17313
|
p: "5px 8px",
|
|
17004
17314
|
cursor: "pointer",
|
|
17005
|
-
"&:hover": { bgcolor: "grey.200" },
|
|
17006
|
-
bgcolor: selected ? "grey.100" : "inherit",
|
|
17315
|
+
"&:hover": { bgcolor: isDark ? "grey.700" : "grey.200" },
|
|
17316
|
+
bgcolor: selected ? isDark ? "grey.800" : "grey.100" : "inherit",
|
|
17007
17317
|
alignItems: "center",
|
|
17008
17318
|
gap: "5px"
|
|
17009
17319
|
},
|
|
@@ -17030,6 +17340,8 @@ var NodelistItem = ({
|
|
|
17030
17340
|
) });
|
|
17031
17341
|
};
|
|
17032
17342
|
function PrivateSchemaDiffView({ check }, ref) {
|
|
17343
|
+
const theme = styles.useTheme();
|
|
17344
|
+
const isDark = theme.palette.mode === "dark";
|
|
17033
17345
|
const { lineageGraph } = useLineageGraphContext();
|
|
17034
17346
|
const params = check.params;
|
|
17035
17347
|
const queryKey = [...cacheKeys.check(check.check_id), "select"];
|
|
@@ -17044,7 +17356,7 @@ function PrivateSchemaDiffView({ check }, ref) {
|
|
|
17044
17356
|
refetchOnMount: true,
|
|
17045
17357
|
enabled: !params.node_id
|
|
17046
17358
|
});
|
|
17047
|
-
const [nodes, changedNodes] =
|
|
17359
|
+
const [nodes, changedNodes] = React4.useMemo(() => {
|
|
17048
17360
|
const selectedNodes = [];
|
|
17049
17361
|
const changedNodes2 = [];
|
|
17050
17362
|
const addedNodes = [];
|
|
@@ -17103,7 +17415,7 @@ function PrivateSchemaDiffView({ check }, ref) {
|
|
|
17103
17415
|
});
|
|
17104
17416
|
return [filteredNodes, changedNodes2];
|
|
17105
17417
|
}, [params.node_id, data?.nodes, lineageGraph]);
|
|
17106
|
-
const [selected, setSelected] =
|
|
17418
|
+
const [selected, setSelected] = React4.useState(0);
|
|
17107
17419
|
if (isLoading) {
|
|
17108
17420
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17109
17421
|
Box35__default.default,
|
|
@@ -17112,7 +17424,7 @@ function PrivateSchemaDiffView({ check }, ref) {
|
|
|
17112
17424
|
display: "flex",
|
|
17113
17425
|
alignItems: "center",
|
|
17114
17426
|
justifyContent: "center",
|
|
17115
|
-
bgcolor: "
|
|
17427
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
17116
17428
|
height: "100%"
|
|
17117
17429
|
},
|
|
17118
17430
|
children: "Loading..."
|
|
@@ -17126,7 +17438,7 @@ function PrivateSchemaDiffView({ check }, ref) {
|
|
|
17126
17438
|
display: "flex",
|
|
17127
17439
|
alignItems: "center",
|
|
17128
17440
|
justifyContent: "center",
|
|
17129
|
-
bgcolor: "
|
|
17441
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
17130
17442
|
height: "100%"
|
|
17131
17443
|
},
|
|
17132
17444
|
className: "no-track-pii-safe",
|
|
@@ -17144,7 +17456,7 @@ function PrivateSchemaDiffView({ check }, ref) {
|
|
|
17144
17456
|
display: "flex",
|
|
17145
17457
|
alignItems: "center",
|
|
17146
17458
|
justifyContent: "center",
|
|
17147
|
-
bgcolor: "
|
|
17459
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
17148
17460
|
height: "100%"
|
|
17149
17461
|
},
|
|
17150
17462
|
children: "No nodes matched"
|
|
@@ -17168,7 +17480,7 @@ function PrivateSchemaDiffView({ check }, ref) {
|
|
|
17168
17480
|
{
|
|
17169
17481
|
sx: {
|
|
17170
17482
|
overflow: "auto",
|
|
17171
|
-
bgcolor: "
|
|
17483
|
+
bgcolor: "background.paper",
|
|
17172
17484
|
listStyle: "none"
|
|
17173
17485
|
},
|
|
17174
17486
|
children: nodes.map((node2, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17177,6 +17489,7 @@ function PrivateSchemaDiffView({ check }, ref) {
|
|
|
17177
17489
|
node: node2,
|
|
17178
17490
|
schemaChanged: changedNodes.includes(node2.id),
|
|
17179
17491
|
selected: i === selected,
|
|
17492
|
+
isDark,
|
|
17180
17493
|
onSelect: () => {
|
|
17181
17494
|
setSelected(i);
|
|
17182
17495
|
}
|
|
@@ -17189,11 +17502,13 @@ function PrivateSchemaDiffView({ check }, ref) {
|
|
|
17189
17502
|
}
|
|
17190
17503
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
17191
17504
|
}
|
|
17192
|
-
var SchemaDiffView =
|
|
17505
|
+
var SchemaDiffView = React4.forwardRef(PrivateSchemaDiffView);
|
|
17193
17506
|
function CheckDetail({
|
|
17194
17507
|
checkId,
|
|
17195
17508
|
refreshCheckList
|
|
17196
17509
|
}) {
|
|
17510
|
+
const theme = styles.useTheme();
|
|
17511
|
+
const isDark = theme.palette.mode === "dark";
|
|
17197
17512
|
const { featureToggles, sessionId } = useRecceInstanceContext();
|
|
17198
17513
|
const { setLatestSelectedCheckId } = useRecceCheckContext();
|
|
17199
17514
|
const { cloudMode } = useLineageGraphContext();
|
|
@@ -17201,11 +17516,11 @@ function CheckDetail({
|
|
|
17201
17516
|
const [, setLocation] = useAppLocation();
|
|
17202
17517
|
const { successToast, failToast } = useClipBoardToast();
|
|
17203
17518
|
const { markedAsApprovedToast } = useCheckToast();
|
|
17204
|
-
const [submittedRunId, setSubmittedRunId] =
|
|
17205
|
-
const [progress] =
|
|
17206
|
-
const [isAborting, setAborting] =
|
|
17207
|
-
const [isPresetCheckTemplateOpen, setIsPresetCheckTemplateOpen] =
|
|
17208
|
-
const [menuAnchorEl, setMenuAnchorEl] =
|
|
17519
|
+
const [submittedRunId, setSubmittedRunId] = React4.useState();
|
|
17520
|
+
const [progress] = React4.useState();
|
|
17521
|
+
const [isAborting, setAborting] = React4.useState(false);
|
|
17522
|
+
const [isPresetCheckTemplateOpen, setIsPresetCheckTemplateOpen] = React4.useState(false);
|
|
17523
|
+
const [menuAnchorEl, setMenuAnchorEl] = React4.useState(null);
|
|
17209
17524
|
const menuOpen = Boolean(menuAnchorEl);
|
|
17210
17525
|
const {
|
|
17211
17526
|
isLoading,
|
|
@@ -17225,7 +17540,7 @@ function CheckDetail({
|
|
|
17225
17540
|
RunResultView = runTypeEntry.RunResultView;
|
|
17226
17541
|
}
|
|
17227
17542
|
const isPresetCheck = check?.is_preset ?? false;
|
|
17228
|
-
const lineageViewRef =
|
|
17543
|
+
const lineageViewRef = React4.useRef(null);
|
|
17229
17544
|
const { mutate } = reactQuery.useMutation({
|
|
17230
17545
|
mutationFn: (check2) => updateCheck(checkId, check2),
|
|
17231
17546
|
onSuccess: async () => {
|
|
@@ -17260,7 +17575,7 @@ function CheckDetail({
|
|
|
17260
17575
|
failToast("Failed to mark check as preset", error2);
|
|
17261
17576
|
}
|
|
17262
17577
|
});
|
|
17263
|
-
const handleRerun =
|
|
17578
|
+
const handleRerun = React4.useCallback(async () => {
|
|
17264
17579
|
const type = check?.type;
|
|
17265
17580
|
if (!type) {
|
|
17266
17581
|
return;
|
|
@@ -17270,7 +17585,7 @@ function CheckDetail({
|
|
|
17270
17585
|
await queryClient.invalidateQueries({ queryKey: cacheKeys.check(checkId) });
|
|
17271
17586
|
if (refreshCheckList) refreshCheckList();
|
|
17272
17587
|
}, [check, checkId, queryClient, refreshCheckList]);
|
|
17273
|
-
const handleCancel =
|
|
17588
|
+
const handleCancel = React4.useCallback(async () => {
|
|
17274
17589
|
setAborting(true);
|
|
17275
17590
|
if (!trackedRunId) {
|
|
17276
17591
|
return;
|
|
@@ -17298,7 +17613,7 @@ function CheckDetail({
|
|
|
17298
17613
|
failToast("Failed to copy the check to clipboard", err);
|
|
17299
17614
|
}
|
|
17300
17615
|
};
|
|
17301
|
-
const handleApproveCheck =
|
|
17616
|
+
const handleApproveCheck = React4.useCallback(() => {
|
|
17302
17617
|
const isChecked = check?.is_checked;
|
|
17303
17618
|
mutate({ is_checked: !isChecked });
|
|
17304
17619
|
if (!isChecked) {
|
|
@@ -17317,7 +17632,7 @@ function CheckDetail({
|
|
|
17317
17632
|
const handleMenuClose = () => {
|
|
17318
17633
|
setMenuAnchorEl(null);
|
|
17319
17634
|
};
|
|
17320
|
-
const [tabValue, setTabValue] =
|
|
17635
|
+
const [tabValue, setTabValue] = React4.useState("result");
|
|
17321
17636
|
const { ref, onCopyToClipboard, onMouseEnter, onMouseLeave } = useCopyToClipboardButton();
|
|
17322
17637
|
const presetCheckTemplate = generateCheckTemplate({
|
|
17323
17638
|
name: check?.name ?? "",
|
|
@@ -17442,7 +17757,7 @@ function CheckDetail({
|
|
|
17442
17757
|
alignItems: "center",
|
|
17443
17758
|
height: 40,
|
|
17444
17759
|
borderBottom: "2px solid",
|
|
17445
|
-
borderColor: "grey.300"
|
|
17760
|
+
borderColor: isDark ? "grey.700" : "grey.300"
|
|
17446
17761
|
},
|
|
17447
17762
|
children: [
|
|
17448
17763
|
checkTypeIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17487,7 +17802,7 @@ function CheckDetail({
|
|
|
17487
17802
|
fa6.FaBookmark,
|
|
17488
17803
|
{
|
|
17489
17804
|
size: "1rem",
|
|
17490
|
-
color:
|
|
17805
|
+
color: theme.palette.iochmara.dark
|
|
17491
17806
|
}
|
|
17492
17807
|
)
|
|
17493
17808
|
}
|
|
@@ -17574,7 +17889,14 @@ function CheckDetail({
|
|
|
17574
17889
|
handleApproveCheck();
|
|
17575
17890
|
},
|
|
17576
17891
|
disabled: isDisabledByNoResult(check.type, run) || featureToggles.disableUpdateChecklist,
|
|
17577
|
-
startIcon: check.is_checked ? /* @__PURE__ */ jsxRuntime.jsx(pi.PiCheckCircle, {}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
17892
|
+
startIcon: check.is_checked ? /* @__PURE__ */ jsxRuntime.jsx(pi.PiCheckCircle, {}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
17893
|
+
vsc.VscCircleLarge,
|
|
17894
|
+
{
|
|
17895
|
+
style: {
|
|
17896
|
+
color: isDark ? theme.palette.grey[600] : theme.palette.grey[400]
|
|
17897
|
+
}
|
|
17898
|
+
}
|
|
17899
|
+
),
|
|
17578
17900
|
sx: { flex: "0 0 auto", textTransform: "none" },
|
|
17579
17901
|
children: check.is_checked ? "Approved" : "Pending"
|
|
17580
17902
|
}
|
|
@@ -17708,7 +18030,7 @@ function CheckDetail({
|
|
|
17708
18030
|
display: "flex",
|
|
17709
18031
|
alignItems: "center",
|
|
17710
18032
|
justifyContent: "center",
|
|
17711
|
-
bgcolor: "
|
|
18033
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
17712
18034
|
height: "100%"
|
|
17713
18035
|
},
|
|
17714
18036
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Stack24__default.default, { spacing: 2, alignItems: "center", children: [
|
|
@@ -17956,19 +18278,22 @@ var RunListItem = ({
|
|
|
17956
18278
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17957
18279
|
Box35__default.default,
|
|
17958
18280
|
{
|
|
17959
|
-
sx: {
|
|
18281
|
+
sx: (theme) => ({
|
|
17960
18282
|
minWidth: "200px",
|
|
17961
18283
|
display: "flex",
|
|
17962
18284
|
flexDirection: "column",
|
|
17963
18285
|
width: "100%",
|
|
17964
18286
|
p: "5px 20px",
|
|
17965
18287
|
cursor: "pointer",
|
|
17966
|
-
borderBottom: "solid 1px
|
|
18288
|
+
borderBottom: "solid 1px",
|
|
18289
|
+
borderBottomColor: "divider",
|
|
17967
18290
|
borderLeft: "4px solid",
|
|
17968
18291
|
borderLeftColor: isSelected ? "amber.400" : "transparent",
|
|
17969
|
-
backgroundColor: isSelected ? "amber.50" : "transparent",
|
|
17970
|
-
"&:hover": {
|
|
17971
|
-
|
|
18292
|
+
backgroundColor: isSelected ? theme.palette.mode === "dark" ? "amber.900" : "amber.50" : "transparent",
|
|
18293
|
+
"&:hover": {
|
|
18294
|
+
bgcolor: isSelected ? theme.palette.mode === "dark" ? "amber.800" : "orange.50" : theme.palette.mode === "dark" ? "grey.800" : "grey.200"
|
|
18295
|
+
}
|
|
18296
|
+
}),
|
|
17972
18297
|
onClick: () => {
|
|
17973
18298
|
onSelectRun(run.run_id);
|
|
17974
18299
|
},
|
|
@@ -18054,7 +18379,8 @@ var DateSegmentItem = ({ runAt }) => {
|
|
|
18054
18379
|
minWidth: "200px",
|
|
18055
18380
|
width: "100%",
|
|
18056
18381
|
p: "5px 20px",
|
|
18057
|
-
borderBottom: "solid 1px
|
|
18382
|
+
borderBottom: "solid 1px",
|
|
18383
|
+
borderBottomColor: "divider",
|
|
18058
18384
|
color: "grey.500",
|
|
18059
18385
|
fontSize: "11pt"
|
|
18060
18386
|
},
|
|
@@ -18081,7 +18407,8 @@ var RunList = () => {
|
|
|
18081
18407
|
width: "100%",
|
|
18082
18408
|
flex: "0 0 54px",
|
|
18083
18409
|
px: "24px 8px",
|
|
18084
|
-
borderBottom: "solid 1px
|
|
18410
|
+
borderBottom: "solid 1px",
|
|
18411
|
+
borderBottomColor: "divider"
|
|
18085
18412
|
},
|
|
18086
18413
|
children: [
|
|
18087
18414
|
/* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { variant: "h6", children: "History" }),
|
|
@@ -18140,7 +18467,7 @@ function DateDividedRunHistoryItem({
|
|
|
18140
18467
|
trackHistoryAction({ name: "click_run" });
|
|
18141
18468
|
showRunId(runId2, false);
|
|
18142
18469
|
};
|
|
18143
|
-
const handleAddToChecklist =
|
|
18470
|
+
const handleAddToChecklist = React4.useCallback(
|
|
18144
18471
|
async (clickedRunId) => {
|
|
18145
18472
|
const check = await createCheckByRun(clickedRunId);
|
|
18146
18473
|
await queryClient.invalidateQueries({ queryKey: cacheKeys.checks() });
|
|
@@ -18148,14 +18475,14 @@ function DateDividedRunHistoryItem({
|
|
|
18148
18475
|
},
|
|
18149
18476
|
[setLocation, queryClient]
|
|
18150
18477
|
);
|
|
18151
|
-
const handleGoToCheck =
|
|
18478
|
+
const handleGoToCheck = React4.useCallback(
|
|
18152
18479
|
(checkId) => {
|
|
18153
18480
|
trackHistoryAction({ name: "go_to_check" });
|
|
18154
18481
|
setLocation(`/checks/?id=${checkId}`);
|
|
18155
18482
|
},
|
|
18156
18483
|
[setLocation]
|
|
18157
18484
|
);
|
|
18158
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18485
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React4__default.default.Fragment, { children: [
|
|
18159
18486
|
shouldRenderDateSegment && /* @__PURE__ */ jsxRuntime.jsx(DateSegmentItem, { runAt: run.run_at }, currentDate),
|
|
18160
18487
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18161
18488
|
RunListItem,
|
|
@@ -18180,20 +18507,23 @@ var NODE_CHANGE_STATUS_MSGS = {
|
|
|
18180
18507
|
folder_changed: ["Modified", "Modified folder"]
|
|
18181
18508
|
};
|
|
18182
18509
|
function getIconForChangeStatus2(changeStatus) {
|
|
18510
|
+
const greenColor = String(token("colors.green.solid"));
|
|
18511
|
+
const redColor = String(token("colors.red.solid"));
|
|
18512
|
+
const amberColor = String(token("colors.amber.emphasized"));
|
|
18183
18513
|
if (changeStatus === "added") {
|
|
18184
|
-
return { color:
|
|
18514
|
+
return { color: greenColor, icon: IconAdded };
|
|
18185
18515
|
} else if (changeStatus === "removed") {
|
|
18186
|
-
return { color:
|
|
18516
|
+
return { color: redColor, icon: IconRemoved };
|
|
18187
18517
|
} else if (changeStatus === "modified") {
|
|
18188
|
-
return { color:
|
|
18518
|
+
return { color: amberColor, icon: IconModified };
|
|
18189
18519
|
} else if (changeStatus === "col_added") {
|
|
18190
|
-
return { color:
|
|
18520
|
+
return { color: greenColor, icon: IconAdded };
|
|
18191
18521
|
} else if (changeStatus === "col_removed") {
|
|
18192
|
-
return { color:
|
|
18522
|
+
return { color: redColor, icon: IconRemoved };
|
|
18193
18523
|
} else if (changeStatus === "col_changed") {
|
|
18194
|
-
return { color:
|
|
18524
|
+
return { color: amberColor, icon: IconModified };
|
|
18195
18525
|
} else if (changeStatus === "folder_changed") {
|
|
18196
|
-
return { color:
|
|
18526
|
+
return { color: amberColor, icon: IconChanged };
|
|
18197
18527
|
}
|
|
18198
18528
|
return { color: "inherit", icon: void 0 };
|
|
18199
18529
|
}
|
|
@@ -18293,11 +18623,12 @@ function ChangeSummary({ lineageGraph }) {
|
|
|
18293
18623
|
container: true,
|
|
18294
18624
|
sx: {
|
|
18295
18625
|
mb: "10px",
|
|
18296
|
-
borderTop: "1px solid
|
|
18626
|
+
borderTop: "1px solid",
|
|
18627
|
+
borderColor: "divider",
|
|
18297
18628
|
p: "2.5vw"
|
|
18298
18629
|
},
|
|
18299
18630
|
children: [
|
|
18300
|
-
/* @__PURE__ */ jsxRuntime.jsx(Grid2__default.default, { size: 6, sx: { borderColor: "
|
|
18631
|
+
/* @__PURE__ */ jsxRuntime.jsx(Grid2__default.default, { size: 6, sx: { borderColor: "divider" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18301
18632
|
SummaryText,
|
|
18302
18633
|
{
|
|
18303
18634
|
name: "Code Changes",
|
|
@@ -18320,35 +18651,42 @@ function ChangeSummary({ lineageGraph }) {
|
|
|
18320
18651
|
] })
|
|
18321
18652
|
}
|
|
18322
18653
|
) }),
|
|
18323
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18324
|
-
|
|
18654
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18655
|
+
Grid2__default.default,
|
|
18325
18656
|
{
|
|
18326
|
-
|
|
18327
|
-
|
|
18328
|
-
|
|
18329
|
-
|
|
18330
|
-
|
|
18331
|
-
|
|
18332
|
-
|
|
18333
|
-
|
|
18334
|
-
|
|
18335
|
-
|
|
18336
|
-
|
|
18337
|
-
|
|
18338
|
-
|
|
18339
|
-
|
|
18340
|
-
|
|
18341
|
-
|
|
18342
|
-
|
|
18343
|
-
|
|
18344
|
-
|
|
18345
|
-
|
|
18346
|
-
|
|
18347
|
-
|
|
18348
|
-
|
|
18349
|
-
|
|
18657
|
+
size: 6,
|
|
18658
|
+
sx: { borderLeft: "1px solid", borderLeftColor: "divider", pl: "12px" },
|
|
18659
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18660
|
+
SummaryText,
|
|
18661
|
+
{
|
|
18662
|
+
name: "Column Changes",
|
|
18663
|
+
value: /* @__PURE__ */ jsxRuntime.jsxs(Grid2__default.default, { container: true, sx: { width: "100%" }, children: [
|
|
18664
|
+
/* @__PURE__ */ jsxRuntime.jsx(Grid2__default.default, { size: 4, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18665
|
+
ChangeStatusCountLabel,
|
|
18666
|
+
{
|
|
18667
|
+
changeStatus: "col_added",
|
|
18668
|
+
value: col_added
|
|
18669
|
+
}
|
|
18670
|
+
) }),
|
|
18671
|
+
/* @__PURE__ */ jsxRuntime.jsx(Grid2__default.default, { size: 4, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18672
|
+
ChangeStatusCountLabel,
|
|
18673
|
+
{
|
|
18674
|
+
changeStatus: "col_removed",
|
|
18675
|
+
value: col_removed
|
|
18676
|
+
}
|
|
18677
|
+
) }),
|
|
18678
|
+
/* @__PURE__ */ jsxRuntime.jsx(Grid2__default.default, { size: 4, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18679
|
+
ChangeStatusCountLabel,
|
|
18680
|
+
{
|
|
18681
|
+
changeStatus: "col_changed",
|
|
18682
|
+
value: col_changed
|
|
18683
|
+
}
|
|
18684
|
+
) })
|
|
18685
|
+
] })
|
|
18686
|
+
}
|
|
18687
|
+
)
|
|
18350
18688
|
}
|
|
18351
|
-
)
|
|
18689
|
+
)
|
|
18352
18690
|
]
|
|
18353
18691
|
}
|
|
18354
18692
|
);
|
|
@@ -18392,8 +18730,8 @@ function listChangedNodes(lineageGraph) {
|
|
|
18392
18730
|
return changedNodes;
|
|
18393
18731
|
}
|
|
18394
18732
|
function SchemaSummary({ lineageGraph }) {
|
|
18395
|
-
const [changedNodes, setChangedNodes] =
|
|
18396
|
-
|
|
18733
|
+
const [changedNodes, setChangedNodes] = React4.useState([]);
|
|
18734
|
+
React4.useEffect(() => {
|
|
18397
18735
|
setChangedNodes(listChangedNodes(lineageGraph));
|
|
18398
18736
|
}, [lineageGraph]);
|
|
18399
18737
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|