@datarecce/ui 0.1.12 → 0.1.14
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/hooks.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { QueryClient, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
2
2
|
import axios from 'axios';
|
|
3
|
+
import React12, { createContext, forwardRef, useRef, useImperativeHandle, useMemo, useState, Fragment as Fragment$1, useContext, useCallback, useEffect } from 'react';
|
|
4
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
5
|
import '@mui/material/Alert';
|
|
4
6
|
import '@mui/material/CircularProgress';
|
|
5
7
|
import '@mui/material/Snackbar';
|
|
6
8
|
import Stack5 from '@mui/material/Stack';
|
|
7
9
|
import Typography9 from '@mui/material/Typography';
|
|
8
|
-
import React11, { createContext, forwardRef, useRef, useImperativeHandle, useMemo, useState, Fragment as Fragment$1, useContext, useCallback, useEffect } from 'react';
|
|
9
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
10
|
import Box21 from '@mui/material/Box';
|
|
11
11
|
import Button2 from '@mui/material/Button';
|
|
12
12
|
import MuiDialog2 from '@mui/material/Dialog';
|
|
@@ -31,6 +31,7 @@ import FormControl from '@mui/material/FormControl';
|
|
|
31
31
|
import FormLabel from '@mui/material/FormLabel';
|
|
32
32
|
import NativeSelect from '@mui/material/NativeSelect';
|
|
33
33
|
import _3 from 'lodash';
|
|
34
|
+
import { createTheme, useTheme } from '@mui/material/styles';
|
|
34
35
|
import { Chart, BarElement, TimeSeriesScale, LinearScale, CategoryScale, Title, Legend, Tooltip } from 'chart.js';
|
|
35
36
|
import { Chart as Chart$1, Bar } from 'react-chartjs-2';
|
|
36
37
|
import '@jeromefitz/date-fns-tz';
|
|
@@ -45,12 +46,11 @@ import { VscKey, VscClose, VscPinned, VscPin, VscKebabVertical } from 'react-ico
|
|
|
45
46
|
import { PiWarning, PiCopy, PiDotsThreeVertical } from 'react-icons/pi';
|
|
46
47
|
import Tooltip2 from '@mui/material/Tooltip';
|
|
47
48
|
import { useCopyToClipboard } from 'usehooks-ts';
|
|
48
|
-
import
|
|
49
|
-
import './style-LYNBK7ND.css';
|
|
49
|
+
import './style-466WWZLM.css';
|
|
50
50
|
import ListSubheader2 from '@mui/material/ListSubheader';
|
|
51
51
|
import { themeQuartz, ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
|
|
52
52
|
import { AgGridReact } from 'ag-grid-react';
|
|
53
|
-
import './agGridStyles-
|
|
53
|
+
import './agGridStyles-VYALGSJU.css';
|
|
54
54
|
import ButtonGroup from '@mui/material/ButtonGroup';
|
|
55
55
|
import Divider from '@mui/material/Divider';
|
|
56
56
|
|
|
@@ -82,17 +82,29 @@ var axiosClient = axios.create({
|
|
|
82
82
|
new QueryClient();
|
|
83
83
|
|
|
84
84
|
// recce-source/js/src/lib/api/instanceInfo.ts
|
|
85
|
-
async function getRecceInstanceInfo() {
|
|
86
|
-
return (await
|
|
85
|
+
async function getRecceInstanceInfo(client = axiosClient) {
|
|
86
|
+
return (await client.get(
|
|
87
87
|
"/api/instance-info"
|
|
88
88
|
)).data;
|
|
89
89
|
}
|
|
90
|
+
var ApiConfigContext = createContext(null);
|
|
91
|
+
var defaultApiConfigContext = {
|
|
92
|
+
apiPrefix: "",
|
|
93
|
+
authToken: void 0,
|
|
94
|
+
baseUrl: void 0,
|
|
95
|
+
apiClient: axios.create({ baseURL: PUBLIC_API_URL })
|
|
96
|
+
};
|
|
97
|
+
function useApiConfig() {
|
|
98
|
+
const context = useContext(ApiConfigContext);
|
|
99
|
+
return context ?? defaultApiConfigContext;
|
|
100
|
+
}
|
|
90
101
|
|
|
91
102
|
// recce-source/js/src/lib/hooks/useRecceInstanceInfo.tsx
|
|
92
103
|
var useRecceInstanceInfo = () => {
|
|
104
|
+
const { apiClient } = useApiConfig();
|
|
93
105
|
return useQuery({
|
|
94
106
|
queryKey: cacheKeys.instanceInfo(),
|
|
95
|
-
queryFn: getRecceInstanceInfo
|
|
107
|
+
queryFn: () => getRecceInstanceInfo(apiClient)
|
|
96
108
|
});
|
|
97
109
|
};
|
|
98
110
|
createContext(null);
|
|
@@ -625,19 +637,19 @@ function RecceInstanceInfoProvider({
|
|
|
625
637
|
var useRecceInstanceContext = () => useContext(InstanceInfo);
|
|
626
638
|
|
|
627
639
|
// recce-source/js/src/lib/api/flag.ts
|
|
628
|
-
async function getServerFlag() {
|
|
629
|
-
return (await
|
|
640
|
+
async function getServerFlag(client = axiosClient) {
|
|
641
|
+
return (await client.get("/api/flag")).data;
|
|
630
642
|
}
|
|
631
|
-
async function markRelaunchHintCompleted() {
|
|
643
|
+
async function markRelaunchHintCompleted(client = axiosClient) {
|
|
632
644
|
try {
|
|
633
|
-
await
|
|
645
|
+
await client.post(
|
|
634
646
|
"/api/relaunch-hint/completed"
|
|
635
647
|
);
|
|
636
648
|
} catch (_error) {
|
|
637
649
|
}
|
|
638
650
|
}
|
|
639
|
-
async function getServerInfo() {
|
|
640
|
-
return (await
|
|
651
|
+
async function getServerInfo(client = axiosClient) {
|
|
652
|
+
return (await client.get(`/api/info`)).data;
|
|
641
653
|
}
|
|
642
654
|
async function getModelInfo(model) {
|
|
643
655
|
return (await axiosClient.get(
|
|
@@ -699,8 +711,11 @@ async function searchRuns(type, params, limit) {
|
|
|
699
711
|
);
|
|
700
712
|
return response.data;
|
|
701
713
|
}
|
|
702
|
-
async function aggregateRuns() {
|
|
703
|
-
const response = await
|
|
714
|
+
async function aggregateRuns(client = axiosClient) {
|
|
715
|
+
const response = await client.post(
|
|
716
|
+
`/api/runs/aggregate`,
|
|
717
|
+
{}
|
|
718
|
+
);
|
|
704
719
|
return response.data;
|
|
705
720
|
}
|
|
706
721
|
|
|
@@ -944,9 +959,10 @@ function useIdleTimeoutSafe() {
|
|
|
944
959
|
return useContext(IdleTimeoutContext) ?? null;
|
|
945
960
|
}
|
|
946
961
|
var useRecceServerFlag = () => {
|
|
962
|
+
const { apiClient } = useApiConfig();
|
|
947
963
|
return useQuery({
|
|
948
964
|
queryKey: cacheKeys.flag(),
|
|
949
|
-
queryFn: getServerFlag
|
|
965
|
+
queryFn: () => getServerFlag(apiClient)
|
|
950
966
|
});
|
|
951
967
|
};
|
|
952
968
|
var defaultLineageGraphsContext = {
|
|
@@ -954,14 +970,20 @@ var defaultLineageGraphsContext = {
|
|
|
954
970
|
isDemoSite: false
|
|
955
971
|
};
|
|
956
972
|
var LineageGraphContext = createContext(defaultLineageGraphsContext);
|
|
957
|
-
function useLineageWatcher(
|
|
973
|
+
function useLineageWatcher({
|
|
974
|
+
enabled = true,
|
|
975
|
+
baseUrl,
|
|
976
|
+
apiPrefix
|
|
977
|
+
} = {}) {
|
|
958
978
|
const [artifactsUpdatedToastId, setArtifactsUpdatedToastId] = useState(void 0);
|
|
959
979
|
const ref = useRef({
|
|
960
980
|
ws: void 0,
|
|
961
981
|
status: "pending",
|
|
962
982
|
artifactsUpdatedToastId: void 0
|
|
963
983
|
});
|
|
964
|
-
const [status, setStatus] = useState(
|
|
984
|
+
const [status, setStatus] = useState(
|
|
985
|
+
enabled ? "pending" : "connected"
|
|
986
|
+
);
|
|
965
987
|
const [envStatus, setEnvStatus] = useState(void 0);
|
|
966
988
|
useEffect(() => {
|
|
967
989
|
ref.current.status = status;
|
|
@@ -979,7 +1001,11 @@ function useLineageWatcher() {
|
|
|
979
1001
|
function httpUrlToWebSocketUrl(url) {
|
|
980
1002
|
return url.replace(/(http)(s)?:\/\//, "ws$2://");
|
|
981
1003
|
}
|
|
982
|
-
const
|
|
1004
|
+
const effectiveBaseUrl = baseUrl ?? PUBLIC_API_URL;
|
|
1005
|
+
const wsPath = apiPrefix ? `${apiPrefix}/ws` : "/api/ws";
|
|
1006
|
+
const ws = new WebSocket(
|
|
1007
|
+
`${httpUrlToWebSocketUrl(effectiveBaseUrl)}${wsPath}`
|
|
1008
|
+
);
|
|
983
1009
|
ref.current.ws = ws;
|
|
984
1010
|
ws.onopen = () => {
|
|
985
1011
|
ws.send("ping");
|
|
@@ -1042,8 +1068,11 @@ function useLineageWatcher() {
|
|
|
1042
1068
|
});
|
|
1043
1069
|
ref.current.ws = void 0;
|
|
1044
1070
|
};
|
|
1045
|
-
}, [invalidateCaches]);
|
|
1071
|
+
}, [invalidateCaches, baseUrl, apiPrefix]);
|
|
1046
1072
|
useEffect(() => {
|
|
1073
|
+
if (!enabled) {
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1047
1076
|
const refObj = ref.current;
|
|
1048
1077
|
connect();
|
|
1049
1078
|
return () => {
|
|
@@ -1051,7 +1080,7 @@ function useLineageWatcher() {
|
|
|
1051
1080
|
refObj.ws.close();
|
|
1052
1081
|
}
|
|
1053
1082
|
};
|
|
1054
|
-
}, [connect]);
|
|
1083
|
+
}, [connect, enabled]);
|
|
1055
1084
|
return {
|
|
1056
1085
|
connectionStatus: status,
|
|
1057
1086
|
connect,
|
|
@@ -1066,13 +1095,14 @@ function LineageGraphContextProvider({ children }) {
|
|
|
1066
1095
|
setDisconnected,
|
|
1067
1096
|
resetConnection
|
|
1068
1097
|
} = useIdleTimeout();
|
|
1098
|
+
const { apiClient, apiPrefix, baseUrl } = useApiConfig();
|
|
1069
1099
|
const queryServerInfo = useQuery({
|
|
1070
1100
|
queryKey: cacheKeys.lineage(),
|
|
1071
|
-
queryFn: getServerInfo
|
|
1101
|
+
queryFn: () => getServerInfo(apiClient)
|
|
1072
1102
|
});
|
|
1073
1103
|
const queryRunAggregated = useQuery({
|
|
1074
1104
|
queryKey: cacheKeys.runsAggregated(),
|
|
1075
|
-
queryFn: aggregateRuns
|
|
1105
|
+
queryFn: () => aggregateRuns(apiClient)
|
|
1076
1106
|
});
|
|
1077
1107
|
const lineageGraph = useMemo(() => {
|
|
1078
1108
|
const lineage2 = queryServerInfo.data?.lineage;
|
|
@@ -1112,7 +1142,11 @@ function LineageGraphContextProvider({ children }) {
|
|
|
1112
1142
|
},
|
|
1113
1143
|
sqlmesh
|
|
1114
1144
|
};
|
|
1115
|
-
const { connectionStatus, connect, envStatus } = useLineageWatcher(
|
|
1145
|
+
const { connectionStatus, connect, envStatus } = useLineageWatcher({
|
|
1146
|
+
enabled: true,
|
|
1147
|
+
baseUrl,
|
|
1148
|
+
apiPrefix
|
|
1149
|
+
});
|
|
1116
1150
|
useEffect(() => {
|
|
1117
1151
|
if (connectionStatus === "disconnected") {
|
|
1118
1152
|
setDisconnected();
|
|
@@ -1381,8 +1415,9 @@ var RunModal = ({
|
|
|
1381
1415
|
sx: {
|
|
1382
1416
|
p: 0,
|
|
1383
1417
|
overflow: "auto",
|
|
1384
|
-
borderTop: "1px solid
|
|
1385
|
-
borderBottom: "1px solid
|
|
1418
|
+
borderTop: "1px solid",
|
|
1419
|
+
borderBottom: "1px solid",
|
|
1420
|
+
borderColor: "divider"
|
|
1386
1421
|
},
|
|
1387
1422
|
children: /* @__PURE__ */ jsx(Box21, { sx: { contain: "layout" }, children: RunForm && /* @__PURE__ */ jsx(
|
|
1388
1423
|
RunForm,
|
|
@@ -1680,10 +1715,56 @@ function formatAsAbbreviatedNumber(input) {
|
|
|
1680
1715
|
}).format(input);
|
|
1681
1716
|
}
|
|
1682
1717
|
}
|
|
1718
|
+
|
|
1719
|
+
// recce-source/js/src/components/charts/chartTheme.ts
|
|
1720
|
+
function getChartThemeColors(isDark) {
|
|
1721
|
+
return {
|
|
1722
|
+
gridColor: isDark ? "#4b5563" : "#d1d5db",
|
|
1723
|
+
textColor: isDark ? "#e5e7eb" : "#374151",
|
|
1724
|
+
borderColor: isDark ? "#6b7280" : "#9ca3af",
|
|
1725
|
+
tooltipBackgroundColor: isDark ? "#1f2937" : "#ffffff",
|
|
1726
|
+
tooltipTextColor: isDark ? "#e5e7eb" : "#111827"
|
|
1727
|
+
};
|
|
1728
|
+
}
|
|
1729
|
+
function getThemedPluginOptions(isDark) {
|
|
1730
|
+
const colors2 = getChartThemeColors(isDark);
|
|
1731
|
+
return {
|
|
1732
|
+
legend: {
|
|
1733
|
+
labels: {
|
|
1734
|
+
color: colors2.textColor
|
|
1735
|
+
}
|
|
1736
|
+
},
|
|
1737
|
+
title: {
|
|
1738
|
+
color: colors2.textColor
|
|
1739
|
+
},
|
|
1740
|
+
tooltip: {
|
|
1741
|
+
backgroundColor: colors2.tooltipBackgroundColor,
|
|
1742
|
+
titleColor: colors2.tooltipTextColor,
|
|
1743
|
+
bodyColor: colors2.tooltipTextColor,
|
|
1744
|
+
borderColor: colors2.borderColor,
|
|
1745
|
+
borderWidth: 1
|
|
1746
|
+
}
|
|
1747
|
+
};
|
|
1748
|
+
}
|
|
1683
1749
|
var CURRENT_BAR_COLOR = "#63B3ED";
|
|
1684
1750
|
var BASE_BAR_COLOR = "#F6AD55";
|
|
1685
1751
|
var CURRENT_BAR_COLOR_WITH_ALPHA = `${CURRENT_BAR_COLOR}A5`;
|
|
1686
1752
|
var BASE_BAR_COLOR_WITH_ALPHA = `${BASE_BAR_COLOR}A5`;
|
|
1753
|
+
var CURRENT_BAR_COLOR_DARK = "#90CDF4";
|
|
1754
|
+
var BASE_BAR_COLOR_DARK = "#FBD38D";
|
|
1755
|
+
var CURRENT_BAR_COLOR_DARK_WITH_ALPHA = `${CURRENT_BAR_COLOR_DARK}A5`;
|
|
1756
|
+
var BASE_BAR_COLOR_DARK_WITH_ALPHA = `${BASE_BAR_COLOR_DARK}A5`;
|
|
1757
|
+
var INFO_VAL_COLOR = "#63B3ED";
|
|
1758
|
+
var INFO_VAL_COLOR_DARK = "#90CDF4";
|
|
1759
|
+
function getBarColors(isDark) {
|
|
1760
|
+
return {
|
|
1761
|
+
current: isDark ? CURRENT_BAR_COLOR_DARK : CURRENT_BAR_COLOR,
|
|
1762
|
+
base: isDark ? BASE_BAR_COLOR_DARK : BASE_BAR_COLOR,
|
|
1763
|
+
currentWithAlpha: isDark ? CURRENT_BAR_COLOR_DARK_WITH_ALPHA : CURRENT_BAR_COLOR_WITH_ALPHA,
|
|
1764
|
+
baseWithAlpha: isDark ? BASE_BAR_COLOR_DARK_WITH_ALPHA : BASE_BAR_COLOR_WITH_ALPHA,
|
|
1765
|
+
info: isDark ? INFO_VAL_COLOR_DARK : INFO_VAL_COLOR
|
|
1766
|
+
};
|
|
1767
|
+
}
|
|
1687
1768
|
function SquareIcon({ color }) {
|
|
1688
1769
|
return /* @__PURE__ */ jsx(
|
|
1689
1770
|
Box21,
|
|
@@ -1707,6 +1788,8 @@ function HistogramChart({
|
|
|
1707
1788
|
hideAxis = false,
|
|
1708
1789
|
animation = false
|
|
1709
1790
|
}) {
|
|
1791
|
+
const theme = useTheme();
|
|
1792
|
+
const isDark = theme.palette.mode === "dark";
|
|
1710
1793
|
Chart.register(
|
|
1711
1794
|
BarElement,
|
|
1712
1795
|
TimeSeriesScale,
|
|
@@ -1716,8 +1799,10 @@ function HistogramChart({
|
|
|
1716
1799
|
Legend,
|
|
1717
1800
|
Tooltip
|
|
1718
1801
|
);
|
|
1719
|
-
const chartOptions = getHistogramChartOptions(data, hideAxis, {
|
|
1720
|
-
|
|
1802
|
+
const chartOptions = getHistogramChartOptions(data, hideAxis, isDark, {
|
|
1803
|
+
animation
|
|
1804
|
+
});
|
|
1805
|
+
const chartData = getHistogramChartData(data, isDark);
|
|
1721
1806
|
return /* @__PURE__ */ jsx(Chart$1, { type: "bar", options: chartOptions, data: chartData, plugins: [] });
|
|
1722
1807
|
}
|
|
1723
1808
|
function getHistogramChartDataset(type, binEdges, label, color, data) {
|
|
@@ -1738,53 +1823,65 @@ function getHistogramChartDataset(type, binEdges, label, color, data) {
|
|
|
1738
1823
|
xAxisID: "x"
|
|
1739
1824
|
};
|
|
1740
1825
|
}
|
|
1741
|
-
function getHistogramChartData(data) {
|
|
1826
|
+
function getHistogramChartData(data, isDark = false) {
|
|
1742
1827
|
const { datasets, type, binEdges } = data;
|
|
1743
1828
|
const [base, current] = datasets;
|
|
1829
|
+
const barColors = getBarColors(isDark);
|
|
1744
1830
|
const currentDataset = getHistogramChartDataset(
|
|
1745
1831
|
type,
|
|
1746
1832
|
binEdges,
|
|
1747
1833
|
"Current",
|
|
1748
|
-
|
|
1834
|
+
barColors.currentWithAlpha,
|
|
1749
1835
|
current
|
|
1750
1836
|
);
|
|
1751
1837
|
const baseDataset = getHistogramChartDataset(
|
|
1752
1838
|
type,
|
|
1753
1839
|
binEdges,
|
|
1754
1840
|
"Base",
|
|
1755
|
-
|
|
1841
|
+
barColors.baseWithAlpha,
|
|
1756
1842
|
base
|
|
1757
1843
|
);
|
|
1758
|
-
const newLabels = binEdges.map((
|
|
1844
|
+
const newLabels = binEdges.map((_v, i) => formatDisplayedBinItem(binEdges, i)).slice(0, -1);
|
|
1759
1845
|
return {
|
|
1760
1846
|
labels: newLabels,
|
|
1761
1847
|
datasets: [currentDataset, baseDataset]
|
|
1762
1848
|
};
|
|
1763
1849
|
}
|
|
1764
|
-
function getHistogramChartOptions(data, hideAxis = false, { ...configOverrides } = {}) {
|
|
1850
|
+
function getHistogramChartOptions(data, hideAxis = false, isDark = false, { ...configOverrides } = {}) {
|
|
1765
1851
|
const { title, datasets, type, samples = 0, binEdges } = data;
|
|
1766
1852
|
const [base, current] = datasets;
|
|
1767
1853
|
const isDatetime = type === "datetime";
|
|
1854
|
+
const themeColors = getChartThemeColors(isDark);
|
|
1855
|
+
const themedPlugins = getThemedPluginOptions(isDark);
|
|
1768
1856
|
return {
|
|
1769
1857
|
responsive: true,
|
|
1770
1858
|
maintainAspectRatio: false,
|
|
1771
1859
|
plugins: {
|
|
1772
1860
|
legend: {
|
|
1773
|
-
reverse: true
|
|
1861
|
+
reverse: true,
|
|
1862
|
+
labels: {
|
|
1863
|
+
color: themeColors.textColor
|
|
1864
|
+
}
|
|
1774
1865
|
},
|
|
1775
1866
|
title: {
|
|
1776
1867
|
display: true,
|
|
1777
1868
|
text: title,
|
|
1778
1869
|
font: {
|
|
1779
1870
|
size: 20
|
|
1780
|
-
}
|
|
1871
|
+
},
|
|
1872
|
+
color: themeColors.textColor
|
|
1781
1873
|
},
|
|
1782
1874
|
tooltip: {
|
|
1783
1875
|
mode: "index",
|
|
1784
1876
|
// position: 'nearest',
|
|
1785
1877
|
intersect: false,
|
|
1878
|
+
backgroundColor: themedPlugins.tooltip.backgroundColor,
|
|
1879
|
+
titleColor: themedPlugins.tooltip.titleColor,
|
|
1880
|
+
bodyColor: themedPlugins.tooltip.bodyColor,
|
|
1881
|
+
borderColor: themedPlugins.tooltip.borderColor,
|
|
1882
|
+
borderWidth: themedPlugins.tooltip.borderWidth,
|
|
1786
1883
|
callbacks: {
|
|
1787
|
-
title([{ dataIndex
|
|
1884
|
+
title([{ dataIndex }]) {
|
|
1788
1885
|
const result = formatDisplayedBinItem(binEdges, dataIndex);
|
|
1789
1886
|
const prefix = isDatetime ? DATE_RANGE : type === "string" ? TEXTLENGTH : VALUE_RANGE;
|
|
1790
1887
|
return `${prefix}
|
|
@@ -1801,15 +1898,16 @@ ${result}`;
|
|
|
1801
1898
|
}
|
|
1802
1899
|
}
|
|
1803
1900
|
},
|
|
1804
|
-
scales: getScales(data, hideAxis),
|
|
1901
|
+
scales: getScales(data, hideAxis, isDark),
|
|
1805
1902
|
...configOverrides
|
|
1806
1903
|
};
|
|
1807
1904
|
}
|
|
1808
|
-
function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = false) {
|
|
1905
|
+
function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = false, isDark = false) {
|
|
1809
1906
|
const isDatetime = type === "datetime";
|
|
1810
1907
|
const [base, current] = datasets;
|
|
1811
1908
|
const maxCount = Math.max(...current.counts, ...base.counts);
|
|
1812
|
-
const
|
|
1909
|
+
const themeColors = getChartThemeColors(isDark);
|
|
1910
|
+
const newLabels = binEdges.map((_v, i) => formatDisplayedBinItem(binEdges, i)).slice(0, -1);
|
|
1813
1911
|
const xScaleDate = {
|
|
1814
1912
|
display: !hideAxis,
|
|
1815
1913
|
type: "timeseries",
|
|
@@ -1826,7 +1924,8 @@ function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = fa
|
|
|
1826
1924
|
ticks: {
|
|
1827
1925
|
minRotation: 30,
|
|
1828
1926
|
maxRotation: 30,
|
|
1829
|
-
maxTicksLimit: 8
|
|
1927
|
+
maxTicksLimit: 8,
|
|
1928
|
+
color: themeColors.textColor
|
|
1830
1929
|
}
|
|
1831
1930
|
};
|
|
1832
1931
|
const xScaleCategory = {
|
|
@@ -1835,9 +1934,10 @@ function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = fa
|
|
|
1835
1934
|
//Linear doesn't understand bins!
|
|
1836
1935
|
grid: { display: false },
|
|
1837
1936
|
ticks: {
|
|
1838
|
-
callback(
|
|
1937
|
+
callback(_val, index) {
|
|
1839
1938
|
return newLabels[index];
|
|
1840
|
-
}
|
|
1939
|
+
},
|
|
1940
|
+
color: themeColors.textColor
|
|
1841
1941
|
},
|
|
1842
1942
|
stacked: true
|
|
1843
1943
|
};
|
|
@@ -1847,12 +1947,13 @@ function getScales({ datasets, min = 0, max = 0, type, binEdges }, hideAxis = fa
|
|
|
1847
1947
|
type: "linear",
|
|
1848
1948
|
max: maxCount,
|
|
1849
1949
|
//NOTE: do not add `min` since if they are equal nothing gets displayed sometimes
|
|
1850
|
-
border: { dash: [2, 2] },
|
|
1950
|
+
border: { dash: [2, 2], color: themeColors.borderColor },
|
|
1851
1951
|
grid: {
|
|
1852
|
-
color:
|
|
1952
|
+
color: themeColors.gridColor
|
|
1853
1953
|
},
|
|
1854
1954
|
ticks: {
|
|
1855
1955
|
maxTicksLimit: 8,
|
|
1956
|
+
color: themeColors.textColor,
|
|
1856
1957
|
callback: function(val) {
|
|
1857
1958
|
return formatAsAbbreviatedNumber(val);
|
|
1858
1959
|
}
|
|
@@ -1897,6 +1998,8 @@ var ScreenshotBox = forwardRef(
|
|
|
1897
1998
|
}
|
|
1898
1999
|
);
|
|
1899
2000
|
function _HistogramDiffResultView({ run }, ref) {
|
|
2001
|
+
const theme = useTheme();
|
|
2002
|
+
const isDark = theme.palette.mode === "dark";
|
|
1900
2003
|
if (!isHistogramDiffRun(run)) {
|
|
1901
2004
|
throw new Error("Run type must be histogram_diff");
|
|
1902
2005
|
}
|
|
@@ -1909,24 +2012,32 @@ function _HistogramDiffResultView({ run }, ref) {
|
|
|
1909
2012
|
if (!base || !current) {
|
|
1910
2013
|
return /* @__PURE__ */ jsx("div", { children: "Loading..." });
|
|
1911
2014
|
}
|
|
1912
|
-
return /* @__PURE__ */ jsx(Box21, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: /* @__PURE__ */ jsx(
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
2015
|
+
return /* @__PURE__ */ jsx(Box21, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: /* @__PURE__ */ jsx(
|
|
2016
|
+
ScreenshotBox,
|
|
2017
|
+
{
|
|
2018
|
+
ref,
|
|
2019
|
+
height: "100%",
|
|
2020
|
+
backgroundColor: isDark ? "#1f2937" : "white",
|
|
2021
|
+
children: /* @__PURE__ */ jsxs(Box21, { sx: { display: "flex", flexDirection: "row" }, children: [
|
|
2022
|
+
/* @__PURE__ */ jsx(Box21, { sx: { flex: 1 } }),
|
|
2023
|
+
/* @__PURE__ */ jsx(Box21, { sx: { width: "80%", height: "35vh", m: 4 }, children: /* @__PURE__ */ jsx(
|
|
2024
|
+
HistogramChart,
|
|
2025
|
+
{
|
|
2026
|
+
data: {
|
|
2027
|
+
title: `Model ${params.model}.${params.column_name}`,
|
|
2028
|
+
type: run.params?.column_type ?? "",
|
|
2029
|
+
datasets: [base, current],
|
|
2030
|
+
min,
|
|
2031
|
+
max,
|
|
2032
|
+
samples: base.total,
|
|
2033
|
+
binEdges
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
) }),
|
|
2037
|
+
/* @__PURE__ */ jsx(Box21, { sx: { flex: 1 } })
|
|
2038
|
+
] })
|
|
2039
|
+
}
|
|
2040
|
+
) });
|
|
1930
2041
|
}
|
|
1931
2042
|
var HistogramDiffResultView = forwardRef(_HistogramDiffResultView);
|
|
1932
2043
|
function ProfileDiffForm({
|
|
@@ -2651,8 +2762,8 @@ function getHeaderCellClass(columnStatus) {
|
|
|
2651
2762
|
}
|
|
2652
2763
|
var defaultRenderCell = (params) => {
|
|
2653
2764
|
const colDef = params.colDef;
|
|
2654
|
-
const columnType = colDef?.columnType;
|
|
2655
|
-
const columnRenderMode = colDef?.columnRenderMode;
|
|
2765
|
+
const columnType = colDef?.context?.columnType;
|
|
2766
|
+
const columnRenderMode = colDef?.context?.columnRenderMode;
|
|
2656
2767
|
const fieldName = colDef?.field ?? "";
|
|
2657
2768
|
if (!params.data) {
|
|
2658
2769
|
return null;
|
|
@@ -2882,35 +2993,8 @@ var buttonColorVariants = [
|
|
|
2882
2993
|
...createButtonColorVariants("red", colors.red),
|
|
2883
2994
|
...createButtonColorVariants("rose", colors.rose),
|
|
2884
2995
|
...createButtonColorVariants("fuchsia", colors.fuchsia),
|
|
2885
|
-
...createButtonColorVariants("brand", colors.brand)
|
|
2886
|
-
// Neutral
|
|
2887
|
-
{
|
|
2888
|
-
props: { color: "neutral", variant: "contained" },
|
|
2889
|
-
style: {
|
|
2890
|
-
backgroundColor: colors.neutral[700],
|
|
2891
|
-
color: "#FFFFFF",
|
|
2892
|
-
"&:hover": { backgroundColor: colors.neutral[800] }
|
|
2893
|
-
}
|
|
2894
|
-
},
|
|
2895
|
-
{
|
|
2896
|
-
props: { color: "neutral", variant: "outlined" },
|
|
2897
|
-
style: {
|
|
2898
|
-
borderColor: colors.neutral[300],
|
|
2899
|
-
// Lighter border (neutral.light)
|
|
2900
|
-
color: colors.neutral[900],
|
|
2901
|
-
"&:hover": {
|
|
2902
|
-
borderColor: colors.neutral[400],
|
|
2903
|
-
backgroundColor: colors.neutral[100]
|
|
2904
|
-
}
|
|
2905
|
-
}
|
|
2906
|
-
},
|
|
2907
|
-
{
|
|
2908
|
-
props: { color: "neutral", variant: "text" },
|
|
2909
|
-
style: {
|
|
2910
|
-
color: colors.neutral[700],
|
|
2911
|
-
"&:hover": { backgroundColor: colors.neutral[100] }
|
|
2912
|
-
}
|
|
2913
|
-
}
|
|
2996
|
+
...createButtonColorVariants("brand", colors.brand)
|
|
2997
|
+
// Neutral variants are handled via styleOverrides for theme-awareness
|
|
2914
2998
|
];
|
|
2915
2999
|
var progressColorVariants = [
|
|
2916
3000
|
createProgressColorVariant("iochmara", colors.iochmara),
|
|
@@ -2970,11 +3054,31 @@ var componentOverrides = {
|
|
|
2970
3054
|
...buttonColorVariants
|
|
2971
3055
|
],
|
|
2972
3056
|
styleOverrides: {
|
|
2973
|
-
root: {
|
|
3057
|
+
root: ({ theme, ownerState }) => ({
|
|
2974
3058
|
textTransform: "none",
|
|
2975
3059
|
fontWeight: 500,
|
|
2976
|
-
borderRadius: 6
|
|
2977
|
-
|
|
3060
|
+
borderRadius: 6,
|
|
3061
|
+
// Theme-aware neutral button colors
|
|
3062
|
+
...ownerState.color === "neutral" && ownerState.variant === "contained" && {
|
|
3063
|
+
backgroundColor: colors.neutral[700],
|
|
3064
|
+
color: "#FFFFFF",
|
|
3065
|
+
"&:hover": { backgroundColor: colors.neutral[800] }
|
|
3066
|
+
},
|
|
3067
|
+
...ownerState.color === "neutral" && ownerState.variant === "outlined" && {
|
|
3068
|
+
borderColor: theme.palette.mode === "dark" ? colors.neutral[500] : colors.neutral[300],
|
|
3069
|
+
color: theme.palette.mode === "dark" ? colors.neutral[100] : colors.neutral[900],
|
|
3070
|
+
"&:hover": {
|
|
3071
|
+
borderColor: theme.palette.mode === "dark" ? colors.neutral[400] : colors.neutral[400],
|
|
3072
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[100]
|
|
3073
|
+
}
|
|
3074
|
+
},
|
|
3075
|
+
...ownerState.color === "neutral" && ownerState.variant === "text" && {
|
|
3076
|
+
color: theme.palette.mode === "dark" ? colors.neutral[200] : colors.neutral[700],
|
|
3077
|
+
"&:hover": {
|
|
3078
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[100]
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
}),
|
|
2978
3082
|
sizeSmall: {
|
|
2979
3083
|
padding: "0.25rem 0.75rem",
|
|
2980
3084
|
fontSize: "0.875rem"
|
|
@@ -3001,11 +3105,11 @@ var componentOverrides = {
|
|
|
3001
3105
|
}
|
|
3002
3106
|
},
|
|
3003
3107
|
// Text variant (ghost in Chakra)
|
|
3004
|
-
text: {
|
|
3108
|
+
text: ({ theme }) => ({
|
|
3005
3109
|
"&:hover": {
|
|
3006
|
-
backgroundColor: "rgba(0, 0, 0, 0.04)"
|
|
3110
|
+
backgroundColor: theme.palette.mode === "dark" ? "rgba(255, 255, 255, 0.08)" : "rgba(0, 0, 0, 0.04)"
|
|
3007
3111
|
}
|
|
3008
|
-
}
|
|
3112
|
+
})
|
|
3009
3113
|
}
|
|
3010
3114
|
},
|
|
3011
3115
|
// IconButton overrides
|
|
@@ -3052,9 +3156,9 @@ var componentOverrides = {
|
|
|
3052
3156
|
borderWidth: 2
|
|
3053
3157
|
}
|
|
3054
3158
|
},
|
|
3055
|
-
notchedOutline: {
|
|
3056
|
-
borderColor: colors.neutral[300]
|
|
3057
|
-
}
|
|
3159
|
+
notchedOutline: ({ theme }) => ({
|
|
3160
|
+
borderColor: theme.palette.mode === "dark" ? colors.neutral[600] : colors.neutral[300]
|
|
3161
|
+
})
|
|
3058
3162
|
}
|
|
3059
3163
|
},
|
|
3060
3164
|
// Checkbox overrides
|
|
@@ -3101,19 +3205,19 @@ var componentOverrides = {
|
|
|
3101
3205
|
},
|
|
3102
3206
|
MuiMenuItem: {
|
|
3103
3207
|
styleOverrides: {
|
|
3104
|
-
root: {
|
|
3208
|
+
root: ({ theme }) => ({
|
|
3105
3209
|
fontSize: "0.875rem",
|
|
3106
3210
|
padding: "0.5rem 0.75rem",
|
|
3107
3211
|
"&:hover": {
|
|
3108
|
-
backgroundColor: colors.neutral[100]
|
|
3212
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.neutral[600] : colors.neutral[100]
|
|
3109
3213
|
},
|
|
3110
3214
|
"&.Mui-selected": {
|
|
3111
|
-
backgroundColor: colors.iochmara[50],
|
|
3215
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.iochmara[900] : colors.iochmara[50],
|
|
3112
3216
|
"&:hover": {
|
|
3113
|
-
backgroundColor: colors.iochmara[100]
|
|
3217
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.iochmara[800] : colors.iochmara[100]
|
|
3114
3218
|
}
|
|
3115
3219
|
}
|
|
3116
|
-
}
|
|
3220
|
+
})
|
|
3117
3221
|
}
|
|
3118
3222
|
},
|
|
3119
3223
|
// Chip overrides (Tag in Chakra)
|
|
@@ -3148,15 +3252,15 @@ var componentOverrides = {
|
|
|
3148
3252
|
// Tooltip overrides
|
|
3149
3253
|
MuiTooltip: {
|
|
3150
3254
|
styleOverrides: {
|
|
3151
|
-
tooltip: {
|
|
3152
|
-
backgroundColor: colors.neutral[800],
|
|
3255
|
+
tooltip: ({ theme }) => ({
|
|
3256
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[800],
|
|
3153
3257
|
fontSize: "0.75rem",
|
|
3154
3258
|
padding: "0.25rem 0.5rem",
|
|
3155
3259
|
borderRadius: 4
|
|
3156
|
-
},
|
|
3157
|
-
arrow: {
|
|
3158
|
-
color: colors.neutral[800]
|
|
3159
|
-
}
|
|
3260
|
+
}),
|
|
3261
|
+
arrow: ({ theme }) => ({
|
|
3262
|
+
color: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[800]
|
|
3263
|
+
})
|
|
3160
3264
|
}
|
|
3161
3265
|
},
|
|
3162
3266
|
// Alert overrides
|
|
@@ -3165,22 +3269,22 @@ var componentOverrides = {
|
|
|
3165
3269
|
root: {
|
|
3166
3270
|
borderRadius: 6
|
|
3167
3271
|
},
|
|
3168
|
-
standardSuccess: {
|
|
3169
|
-
backgroundColor: colors.green[50],
|
|
3170
|
-
color: colors.green[800]
|
|
3171
|
-
},
|
|
3172
|
-
standardWarning: {
|
|
3173
|
-
backgroundColor: colors.amber[50],
|
|
3174
|
-
color: colors.amber[800]
|
|
3175
|
-
},
|
|
3176
|
-
standardError: {
|
|
3177
|
-
backgroundColor: colors.red[50],
|
|
3178
|
-
color: colors.red[800]
|
|
3179
|
-
},
|
|
3180
|
-
standardInfo: {
|
|
3181
|
-
backgroundColor: colors.iochmara[50],
|
|
3182
|
-
color: colors.iochmara[800]
|
|
3183
|
-
}
|
|
3272
|
+
standardSuccess: ({ theme }) => ({
|
|
3273
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.green[900] : colors.green[50],
|
|
3274
|
+
color: theme.palette.mode === "dark" ? colors.green[200] : colors.green[800]
|
|
3275
|
+
}),
|
|
3276
|
+
standardWarning: ({ theme }) => ({
|
|
3277
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.amber[900] : colors.amber[50],
|
|
3278
|
+
color: theme.palette.mode === "dark" ? colors.amber[200] : colors.amber[800]
|
|
3279
|
+
}),
|
|
3280
|
+
standardError: ({ theme }) => ({
|
|
3281
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.red[900] : colors.red[50],
|
|
3282
|
+
color: theme.palette.mode === "dark" ? colors.red[200] : colors.red[800]
|
|
3283
|
+
}),
|
|
3284
|
+
standardInfo: ({ theme }) => ({
|
|
3285
|
+
backgroundColor: theme.palette.mode === "dark" ? colors.iochmara[900] : colors.iochmara[50],
|
|
3286
|
+
color: theme.palette.mode === "dark" ? colors.iochmara[200] : colors.iochmara[800]
|
|
3287
|
+
})
|
|
3184
3288
|
}
|
|
3185
3289
|
},
|
|
3186
3290
|
// Tabs overrides
|
|
@@ -3261,17 +3365,17 @@ var componentOverrides = {
|
|
|
3261
3365
|
// Divider overrides
|
|
3262
3366
|
MuiDivider: {
|
|
3263
3367
|
styleOverrides: {
|
|
3264
|
-
root: {
|
|
3265
|
-
borderColor: colors.neutral[200]
|
|
3266
|
-
}
|
|
3368
|
+
root: ({ theme }) => ({
|
|
3369
|
+
borderColor: theme.palette.mode === "dark" ? colors.neutral[700] : colors.neutral[200]
|
|
3370
|
+
})
|
|
3267
3371
|
}
|
|
3268
3372
|
},
|
|
3269
3373
|
// Breadcrumbs overrides
|
|
3270
3374
|
MuiBreadcrumbs: {
|
|
3271
3375
|
styleOverrides: {
|
|
3272
|
-
separator: {
|
|
3273
|
-
color: colors.neutral[400]
|
|
3274
|
-
}
|
|
3376
|
+
separator: ({ theme }) => ({
|
|
3377
|
+
color: theme.palette.mode === "dark" ? colors.neutral[500] : colors.neutral[400]
|
|
3378
|
+
})
|
|
3275
3379
|
}
|
|
3276
3380
|
}
|
|
3277
3381
|
};
|
|
@@ -3511,39 +3615,38 @@ function CopyControl({
|
|
|
3511
3615
|
grayOut,
|
|
3512
3616
|
isHovered
|
|
3513
3617
|
}) {
|
|
3514
|
-
const [
|
|
3515
|
-
const
|
|
3516
|
-
if (noCopy || grayOut) {
|
|
3618
|
+
const [, copyToClipboard] = useCopyToClipboard();
|
|
3619
|
+
const { successToast } = useClipBoardToast();
|
|
3620
|
+
if (noCopy || grayOut || !isHovered) {
|
|
3517
3621
|
return /* @__PURE__ */ jsx(Fragment, {});
|
|
3518
3622
|
}
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
}
|
|
3525
|
-
return /* @__PURE__ */ jsx(
|
|
3623
|
+
const handleCopy = () => {
|
|
3624
|
+
copyToClipboard(value);
|
|
3625
|
+
successToast(`${value} copied`);
|
|
3626
|
+
};
|
|
3627
|
+
return /* @__PURE__ */ jsx(Tooltip2, { title: "Copy Value", children: /* @__PURE__ */ jsx(
|
|
3526
3628
|
IconButton3,
|
|
3527
3629
|
{
|
|
3528
3630
|
"aria-label": "Copy",
|
|
3529
3631
|
size: "small",
|
|
3530
|
-
onClick:
|
|
3632
|
+
onClick: handleCopy,
|
|
3531
3633
|
sx: {
|
|
3532
|
-
minWidth: "
|
|
3533
|
-
height: "
|
|
3634
|
+
minWidth: "0.625rem",
|
|
3635
|
+
height: "0.625rem",
|
|
3534
3636
|
display: "flex",
|
|
3535
3637
|
alignItems: "center",
|
|
3536
3638
|
justifyContent: "center",
|
|
3537
|
-
p: 0
|
|
3639
|
+
p: 0,
|
|
3640
|
+
color: "inherit"
|
|
3538
3641
|
},
|
|
3539
|
-
children: /* @__PURE__ */ jsx(PiCopy, { size: "
|
|
3642
|
+
children: /* @__PURE__ */ jsx(PiCopy, { size: "0.625rem" })
|
|
3540
3643
|
}
|
|
3541
|
-
);
|
|
3644
|
+
) });
|
|
3542
3645
|
}
|
|
3543
3646
|
var inlineRenderCell = (params) => {
|
|
3544
3647
|
const colDef = params.colDef;
|
|
3545
|
-
const columnType = colDef?.columnType;
|
|
3546
|
-
const columnRenderMode = colDef?.columnRenderMode;
|
|
3648
|
+
const columnType = colDef?.context?.columnType;
|
|
3649
|
+
const columnRenderMode = colDef?.context?.columnRenderMode;
|
|
3547
3650
|
const columnKey = colDef?.field ?? "";
|
|
3548
3651
|
if (!params.data) {
|
|
3549
3652
|
return null;
|
|
@@ -3728,8 +3831,7 @@ function toDiffColumn(config) {
|
|
|
3728
3831
|
headerClass: headerCellClass,
|
|
3729
3832
|
headerComponent,
|
|
3730
3833
|
cellRenderer: inlineRenderCell,
|
|
3731
|
-
columnType,
|
|
3732
|
-
columnRenderMode
|
|
3834
|
+
context: { columnType, columnRenderMode }
|
|
3733
3835
|
};
|
|
3734
3836
|
}
|
|
3735
3837
|
const cellClassBase = createCellClassBase(name, columnStatus);
|
|
@@ -3738,8 +3840,7 @@ function toDiffColumn(config) {
|
|
|
3738
3840
|
headerName: name,
|
|
3739
3841
|
headerClass: headerCellClass,
|
|
3740
3842
|
headerGroupComponent: headerComponent,
|
|
3741
|
-
columnType,
|
|
3742
|
-
columnRenderMode,
|
|
3843
|
+
context: { columnType, columnRenderMode },
|
|
3743
3844
|
children: [
|
|
3744
3845
|
{
|
|
3745
3846
|
field: `base__${name}`,
|
|
@@ -3747,8 +3848,7 @@ function toDiffColumn(config) {
|
|
|
3747
3848
|
headerClass: headerCellClass,
|
|
3748
3849
|
cellClass: cellClassBase,
|
|
3749
3850
|
cellRenderer: defaultRenderCell,
|
|
3750
|
-
columnType,
|
|
3751
|
-
columnRenderMode
|
|
3851
|
+
context: { columnType, columnRenderMode }
|
|
3752
3852
|
},
|
|
3753
3853
|
{
|
|
3754
3854
|
field: `current__${name}`,
|
|
@@ -3756,8 +3856,7 @@ function toDiffColumn(config) {
|
|
|
3756
3856
|
headerClass: headerCellClass,
|
|
3757
3857
|
cellClass: cellClassCurrent,
|
|
3758
3858
|
cellRenderer: defaultRenderCell,
|
|
3759
|
-
columnType,
|
|
3760
|
-
columnRenderMode
|
|
3859
|
+
context: { columnType, columnRenderMode }
|
|
3761
3860
|
}
|
|
3762
3861
|
]
|
|
3763
3862
|
};
|
|
@@ -3795,8 +3894,7 @@ function createPrimaryKeyColumn(config, headerProps) {
|
|
|
3795
3894
|
return void 0;
|
|
3796
3895
|
},
|
|
3797
3896
|
cellRenderer: defaultRenderCell,
|
|
3798
|
-
columnType,
|
|
3799
|
-
columnRenderMode
|
|
3897
|
+
context: { columnType, columnRenderMode }
|
|
3800
3898
|
};
|
|
3801
3899
|
}
|
|
3802
3900
|
function createDiffColumn(config, displayMode, headerProps, baseTitle, currentTitle) {
|
|
@@ -3985,8 +4083,7 @@ function createPrimaryKeyColumn2(config, headerProps) {
|
|
|
3985
4083
|
),
|
|
3986
4084
|
pinned: "left",
|
|
3987
4085
|
cellRenderer: defaultRenderCell,
|
|
3988
|
-
columnType,
|
|
3989
|
-
columnRenderMode
|
|
4086
|
+
context: { columnType, columnRenderMode }
|
|
3990
4087
|
};
|
|
3991
4088
|
}
|
|
3992
4089
|
function createRegularColumn(config, headerProps) {
|
|
@@ -4005,8 +4102,7 @@ function createRegularColumn(config, headerProps) {
|
|
|
4005
4102
|
}
|
|
4006
4103
|
),
|
|
4007
4104
|
cellRenderer: defaultRenderCell,
|
|
4008
|
-
columnType,
|
|
4009
|
-
columnRenderMode
|
|
4105
|
+
context: { columnType, columnRenderMode }
|
|
4010
4106
|
};
|
|
4011
4107
|
}
|
|
4012
4108
|
function buildSimpleColumnDefinitions(config) {
|
|
@@ -4515,7 +4611,7 @@ function renderIndexCell(params) {
|
|
|
4515
4611
|
const value = isRemoved ? baseIndex !== void 0 ? baseIndex : "-" : currentIndex !== void 0 ? currentIndex : "-";
|
|
4516
4612
|
return /* @__PURE__ */ jsx("span", { children: value });
|
|
4517
4613
|
}
|
|
4518
|
-
var MemoizedRenderIndexCell =
|
|
4614
|
+
var MemoizedRenderIndexCell = React12.memo(renderIndexCell);
|
|
4519
4615
|
MemoizedRenderIndexCell.displayName = "MemoizedRenderIndexCell";
|
|
4520
4616
|
function renderTypeCell(params) {
|
|
4521
4617
|
if (!params.data) {
|
|
@@ -4548,7 +4644,7 @@ function renderTypeCell(params) {
|
|
|
4548
4644
|
}
|
|
4549
4645
|
return /* @__PURE__ */ jsx("span", { children: isRemoved ? baseType : currentType });
|
|
4550
4646
|
}
|
|
4551
|
-
var MemoizedRenderTypeCell =
|
|
4647
|
+
var MemoizedRenderTypeCell = React12.memo(renderTypeCell);
|
|
4552
4648
|
MemoizedRenderTypeCell.displayName = "MemoizedRenderTypeCell";
|
|
4553
4649
|
function PrimaryKeyIndicatorCell({
|
|
4554
4650
|
columnName,
|
|
@@ -4970,7 +5066,7 @@ var recceGridThemeLight = themeQuartz.withParams({
|
|
|
4970
5066
|
headerFontWeight: 700,
|
|
4971
5067
|
cellHorizontalPadding: 8
|
|
4972
5068
|
});
|
|
4973
|
-
themeQuartz.withParams({
|
|
5069
|
+
var recceGridThemeDark = themeQuartz.withParams({
|
|
4974
5070
|
backgroundColor: "#1e1e1e",
|
|
4975
5071
|
headerBackgroundColor: "#252526",
|
|
4976
5072
|
rowHoverColor: "#1e1e1e",
|
|
@@ -5026,7 +5122,11 @@ function _ScreenshotDataGrid({
|
|
|
5026
5122
|
}),
|
|
5027
5123
|
[]
|
|
5028
5124
|
);
|
|
5029
|
-
const
|
|
5125
|
+
const muiTheme = useTheme();
|
|
5126
|
+
const gridTheme = useMemo(
|
|
5127
|
+
() => muiTheme.palette.mode === "dark" ? recceGridThemeDark : recceGridThemeLight,
|
|
5128
|
+
[muiTheme.palette.mode]
|
|
5129
|
+
);
|
|
5030
5130
|
const resolvedColumnDefs = columnDefs ?? columns;
|
|
5031
5131
|
const resolvedRowData = rowData ?? rows;
|
|
5032
5132
|
const resolvedDefaultColDef = defaultColDef ?? defaultColumnOptions;
|
|
@@ -5088,18 +5188,18 @@ function _ScreenshotDataGrid({
|
|
|
5088
5188
|
"& .ag-header-cell": {
|
|
5089
5189
|
borderRight: "1px solid var(--ag-border-color)"
|
|
5090
5190
|
},
|
|
5091
|
-
// Diff cell styling
|
|
5191
|
+
// Diff cell styling - theme-aware colors
|
|
5092
5192
|
"& .diff-cell-added": {
|
|
5093
|
-
backgroundColor: "#cefece !important",
|
|
5094
|
-
color:
|
|
5193
|
+
backgroundColor: muiTheme.palette.mode === "dark" ? "#1a4d1a !important" : "#cefece !important",
|
|
5194
|
+
color: muiTheme.palette.text.primary
|
|
5095
5195
|
},
|
|
5096
5196
|
"& .diff-cell-removed": {
|
|
5097
|
-
backgroundColor: "#ffc5c5 !important",
|
|
5098
|
-
color:
|
|
5197
|
+
backgroundColor: muiTheme.palette.mode === "dark" ? "#5c1f1f !important" : "#ffc5c5 !important",
|
|
5198
|
+
color: muiTheme.palette.text.primary
|
|
5099
5199
|
},
|
|
5100
5200
|
"& .diff-cell-modified": {
|
|
5101
|
-
backgroundColor: "#ffc5c5 !important",
|
|
5102
|
-
color:
|
|
5201
|
+
backgroundColor: muiTheme.palette.mode === "dark" ? "#5c1f1f !important" : "#ffc5c5 !important",
|
|
5202
|
+
color: muiTheme.palette.text.primary
|
|
5103
5203
|
},
|
|
5104
5204
|
// Diff header styling
|
|
5105
5205
|
"& .diff-header-added": {
|
|
@@ -5112,18 +5212,18 @@ function _ScreenshotDataGrid({
|
|
|
5112
5212
|
},
|
|
5113
5213
|
// Index column styling
|
|
5114
5214
|
"& .index-column": {
|
|
5115
|
-
color:
|
|
5215
|
+
color: muiTheme.palette.text.secondary,
|
|
5116
5216
|
textAlign: "right"
|
|
5117
5217
|
},
|
|
5118
5218
|
// Frozen/pinned column styling
|
|
5119
5219
|
"& .ag-pinned-left-cols-container .ag-cell": {
|
|
5120
|
-
backgroundColor: "#f5f5f5"
|
|
5220
|
+
backgroundColor: muiTheme.palette.mode === "dark" ? "#2d2d2d" : "#f5f5f5"
|
|
5121
5221
|
}
|
|
5122
5222
|
},
|
|
5123
5223
|
children: /* @__PURE__ */ jsx(
|
|
5124
5224
|
AgGridReact,
|
|
5125
5225
|
{
|
|
5126
|
-
theme,
|
|
5226
|
+
theme: gridTheme,
|
|
5127
5227
|
columnDefs: resolvedColumnDefs,
|
|
5128
5228
|
rowData: resolvedRowData,
|
|
5129
5229
|
getRowId: resolvedGetRowId,
|
|
@@ -5225,17 +5325,22 @@ var RunToolbar = ({
|
|
|
5225
5325
|
warnings,
|
|
5226
5326
|
children
|
|
5227
5327
|
}) => {
|
|
5328
|
+
const theme = useTheme();
|
|
5329
|
+
const isDark = theme.palette.mode === "dark";
|
|
5330
|
+
const hasWarnings = warnings && warnings.length > 0;
|
|
5228
5331
|
return /* @__PURE__ */ jsxs(
|
|
5229
5332
|
Box21,
|
|
5230
5333
|
{
|
|
5231
5334
|
sx: {
|
|
5232
5335
|
display: "flex",
|
|
5233
|
-
borderBottom: "1px solid
|
|
5336
|
+
borderBottom: "1px solid",
|
|
5337
|
+
borderColor: "divider",
|
|
5234
5338
|
justifyContent: "flex-end",
|
|
5235
5339
|
gap: "5px",
|
|
5236
5340
|
alignItems: "center",
|
|
5237
5341
|
px: "10px",
|
|
5238
|
-
bgcolor:
|
|
5342
|
+
bgcolor: hasWarnings ? isDark ? colors.amber[900] : colors.amber[100] : "inherit",
|
|
5343
|
+
color: hasWarnings ? isDark ? colors.amber[200] : colors.amber[800] : "inherit"
|
|
5239
5344
|
},
|
|
5240
5345
|
children: [
|
|
5241
5346
|
/* @__PURE__ */ jsx(
|
|
@@ -5248,8 +5353,13 @@ var RunToolbar = ({
|
|
|
5248
5353
|
gap: 0
|
|
5249
5354
|
},
|
|
5250
5355
|
children: warnings?.map((warning) => /* @__PURE__ */ jsxs(Box21, { children: [
|
|
5251
|
-
/* @__PURE__ */ jsx(
|
|
5252
|
-
|
|
5356
|
+
/* @__PURE__ */ jsx(
|
|
5357
|
+
PiWarning,
|
|
5358
|
+
{
|
|
5359
|
+
color: isDark ? colors.amber[400] : colors.amber[600],
|
|
5360
|
+
style: { verticalAlign: "middle", marginRight: 4 }
|
|
5361
|
+
}
|
|
5362
|
+
),
|
|
5253
5363
|
warning
|
|
5254
5364
|
] }, _3.uniqueId(`-${warning}`)))
|
|
5255
5365
|
}
|
|
@@ -5261,6 +5371,8 @@ var RunToolbar = ({
|
|
|
5261
5371
|
);
|
|
5262
5372
|
};
|
|
5263
5373
|
var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged }, ref) => {
|
|
5374
|
+
const theme = useTheme();
|
|
5375
|
+
const isDark = theme.palette.mode === "dark";
|
|
5264
5376
|
if (!isProfileDiffRun(run)) {
|
|
5265
5377
|
throw new Error("Only run type profile_diff is supported");
|
|
5266
5378
|
}
|
|
@@ -5336,7 +5448,7 @@ var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged },
|
|
|
5336
5448
|
sx: {
|
|
5337
5449
|
display: "flex",
|
|
5338
5450
|
flexDirection: "column",
|
|
5339
|
-
bgcolor: "
|
|
5451
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
5340
5452
|
height: "100%"
|
|
5341
5453
|
},
|
|
5342
5454
|
children: [
|
|
@@ -5370,6 +5482,8 @@ var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged },
|
|
|
5370
5482
|
);
|
|
5371
5483
|
};
|
|
5372
5484
|
var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref) => {
|
|
5485
|
+
const theme = useTheme();
|
|
5486
|
+
const isDark = theme.palette.mode === "dark";
|
|
5373
5487
|
if (!isProfileRun(run)) {
|
|
5374
5488
|
throw new Error("Only run type profile_diff is supported");
|
|
5375
5489
|
}
|
|
@@ -5439,7 +5553,7 @@ var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref)
|
|
|
5439
5553
|
sx: {
|
|
5440
5554
|
display: "flex",
|
|
5441
5555
|
flexDirection: "column",
|
|
5442
|
-
bgcolor: "
|
|
5556
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
5443
5557
|
height: "100%"
|
|
5444
5558
|
},
|
|
5445
5559
|
children: /* @__PURE__ */ jsx(
|
|
@@ -5490,6 +5604,8 @@ var PrivateQueryDiffResultView = ({
|
|
|
5490
5604
|
baseTitle,
|
|
5491
5605
|
currentTitle
|
|
5492
5606
|
}, ref) => {
|
|
5607
|
+
const theme = useTheme();
|
|
5608
|
+
const isDark = theme.palette.mode === "dark";
|
|
5493
5609
|
const primaryKeys = useMemo(
|
|
5494
5610
|
() => viewOptions?.primary_keys ?? [],
|
|
5495
5611
|
[viewOptions]
|
|
@@ -5604,7 +5720,7 @@ var PrivateQueryDiffResultView = ({
|
|
|
5604
5720
|
sx: {
|
|
5605
5721
|
display: "flex",
|
|
5606
5722
|
flexDirection: "column",
|
|
5607
|
-
bgcolor: "
|
|
5723
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
5608
5724
|
height: "100%"
|
|
5609
5725
|
},
|
|
5610
5726
|
children: [
|
|
@@ -5677,6 +5793,8 @@ var PrivateQueryDiffJoinResultView = ({
|
|
|
5677
5793
|
baseTitle,
|
|
5678
5794
|
currentTitle
|
|
5679
5795
|
}, ref) => {
|
|
5796
|
+
const theme = useTheme();
|
|
5797
|
+
const isDark = theme.palette.mode === "dark";
|
|
5680
5798
|
if (run.type !== "query_diff") {
|
|
5681
5799
|
throw new Error("QueryDiffResult view should be rendered as query_diff");
|
|
5682
5800
|
}
|
|
@@ -5765,7 +5883,7 @@ var PrivateQueryDiffJoinResultView = ({
|
|
|
5765
5883
|
sx: {
|
|
5766
5884
|
display: "flex",
|
|
5767
5885
|
flexDirection: "column",
|
|
5768
|
-
bgcolor: "
|
|
5886
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
5769
5887
|
height: "100%"
|
|
5770
5888
|
},
|
|
5771
5889
|
children: [
|
|
@@ -5800,7 +5918,7 @@ var PrivateQueryDiffJoinResultView = ({
|
|
|
5800
5918
|
sx: {
|
|
5801
5919
|
display: "flex",
|
|
5802
5920
|
flexDirection: "column",
|
|
5803
|
-
bgcolor: "
|
|
5921
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
5804
5922
|
height: "100%"
|
|
5805
5923
|
},
|
|
5806
5924
|
children: [
|
|
@@ -5907,6 +6025,8 @@ var PrivateQueryResultView = ({
|
|
|
5907
6025
|
onViewOptionsChanged,
|
|
5908
6026
|
onAddToChecklist
|
|
5909
6027
|
}, ref) => {
|
|
6028
|
+
const theme = useTheme();
|
|
6029
|
+
const isDark = theme.palette.mode === "dark";
|
|
5910
6030
|
if (!(isQueryRun(run) || isQueryBaseRun(run))) {
|
|
5911
6031
|
throw new Error("run type must be query");
|
|
5912
6032
|
}
|
|
@@ -5970,25 +6090,27 @@ var PrivateQueryResultView = ({
|
|
|
5970
6090
|
const limit = dataframe ? dataframe.limit ?? 0 : 0;
|
|
5971
6091
|
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;
|
|
5972
6092
|
const showTopBar = onAddToChecklist ?? warning;
|
|
5973
|
-
return /* @__PURE__ */ jsxs(Stack5, { sx: { bgcolor: "
|
|
6093
|
+
return /* @__PURE__ */ jsxs(Stack5, { sx: { bgcolor: isDark ? "grey.900" : "grey.50", height: "100%" }, children: [
|
|
5974
6094
|
showTopBar && /* @__PURE__ */ jsxs(
|
|
5975
6095
|
Stack5,
|
|
5976
6096
|
{
|
|
5977
6097
|
direction: "row",
|
|
5978
6098
|
sx: {
|
|
5979
|
-
borderBottom: "1px solid
|
|
6099
|
+
borderBottom: "1px solid",
|
|
6100
|
+
borderBottomColor: "divider",
|
|
5980
6101
|
alignItems: "center",
|
|
5981
6102
|
gap: "5px",
|
|
5982
6103
|
px: "10px",
|
|
5983
|
-
bgcolor: warning ?
|
|
6104
|
+
bgcolor: warning ? isDark ? colors.amber[900] : colors.amber[100] : "inherit",
|
|
6105
|
+
color: warning ? isDark ? colors.amber[200] : colors.amber[800] : "inherit"
|
|
5984
6106
|
},
|
|
5985
6107
|
children: [
|
|
5986
6108
|
warning && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5987
6109
|
/* @__PURE__ */ jsx(
|
|
5988
|
-
|
|
6110
|
+
PiWarning,
|
|
5989
6111
|
{
|
|
5990
|
-
|
|
5991
|
-
|
|
6112
|
+
color: isDark ? colors.amber[400] : colors.amber[600],
|
|
6113
|
+
style: { alignSelf: "center" }
|
|
5992
6114
|
}
|
|
5993
6115
|
),
|
|
5994
6116
|
" ",
|
|
@@ -6024,13 +6146,15 @@ var PrivateQueryResultView = ({
|
|
|
6024
6146
|
maxWidth: 800,
|
|
6025
6147
|
minWidth: 35
|
|
6026
6148
|
},
|
|
6027
|
-
className: "rdg-light"
|
|
6149
|
+
className: isDark ? "rdg-dark" : "rdg-light"
|
|
6028
6150
|
}
|
|
6029
6151
|
)
|
|
6030
6152
|
] });
|
|
6031
6153
|
};
|
|
6032
6154
|
var QueryResultView = forwardRef(PrivateQueryResultView);
|
|
6033
6155
|
function _RowCountGridView({ run, typeGuard, expectedType }, ref) {
|
|
6156
|
+
const theme = useTheme();
|
|
6157
|
+
const isDark = theme.palette.mode === "dark";
|
|
6034
6158
|
if (!typeGuard(run)) {
|
|
6035
6159
|
throw new Error(`Run type must be ${expectedType}`);
|
|
6036
6160
|
}
|
|
@@ -6045,7 +6169,7 @@ function _RowCountGridView({ run, typeGuard, expectedType }, ref) {
|
|
|
6045
6169
|
display: "flex",
|
|
6046
6170
|
alignItems: "center",
|
|
6047
6171
|
justifyContent: "center",
|
|
6048
|
-
bgcolor: "
|
|
6172
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
6049
6173
|
height: "100%"
|
|
6050
6174
|
},
|
|
6051
6175
|
children: "No nodes matched"
|
|
@@ -6129,7 +6253,7 @@ function TopKDiffForm({
|
|
|
6129
6253
|
)
|
|
6130
6254
|
] }) });
|
|
6131
6255
|
}
|
|
6132
|
-
var
|
|
6256
|
+
var INFO_VAL_COLOR2 = "#63B3ED";
|
|
6133
6257
|
function prepareSummaryList(topK, isDisplayTopTen) {
|
|
6134
6258
|
const endAtIndex = isDisplayTopTen ? 10 : topK.counts.length;
|
|
6135
6259
|
const counts = topK.counts.slice(0, endAtIndex);
|
|
@@ -6165,6 +6289,7 @@ function prepareSummaryList(topK, isDisplayTopTen) {
|
|
|
6165
6289
|
function TopKChartTooltip({
|
|
6166
6290
|
base,
|
|
6167
6291
|
current,
|
|
6292
|
+
barColors,
|
|
6168
6293
|
children
|
|
6169
6294
|
}) {
|
|
6170
6295
|
return /* @__PURE__ */ jsx(
|
|
@@ -6172,7 +6297,7 @@ function TopKChartTooltip({
|
|
|
6172
6297
|
{
|
|
6173
6298
|
title: /* @__PURE__ */ jsxs(Box21, { children: [
|
|
6174
6299
|
/* @__PURE__ */ jsxs(Typography9, { children: [
|
|
6175
|
-
/* @__PURE__ */ jsx(SquareIcon, { color:
|
|
6300
|
+
/* @__PURE__ */ jsx(SquareIcon, { color: barColors.current }),
|
|
6176
6301
|
"Current: ",
|
|
6177
6302
|
current.count,
|
|
6178
6303
|
" (",
|
|
@@ -6180,7 +6305,7 @@ function TopKChartTooltip({
|
|
|
6180
6305
|
")"
|
|
6181
6306
|
] }),
|
|
6182
6307
|
/* @__PURE__ */ jsxs(Typography9, { children: [
|
|
6183
|
-
/* @__PURE__ */ jsx(SquareIcon, { color:
|
|
6308
|
+
/* @__PURE__ */ jsx(SquareIcon, { color: barColors.base }),
|
|
6184
6309
|
"Base: ",
|
|
6185
6310
|
base.count,
|
|
6186
6311
|
" (",
|
|
@@ -6197,6 +6322,9 @@ function TopKSummaryBarChart({
|
|
|
6197
6322
|
topKDiff,
|
|
6198
6323
|
isDisplayTopTen
|
|
6199
6324
|
}) {
|
|
6325
|
+
const theme = useTheme();
|
|
6326
|
+
const isDark = theme.palette.mode === "dark";
|
|
6327
|
+
const barColors = getBarColors(isDark);
|
|
6200
6328
|
const currents = prepareSummaryList(topKDiff.current, isDisplayTopTen);
|
|
6201
6329
|
const bases = prepareSummaryList(topKDiff.base, isDisplayTopTen);
|
|
6202
6330
|
return /* @__PURE__ */ jsxs(Box21, { sx: { width: "100%", px: 20, py: 2 }, children: [
|
|
@@ -6206,9 +6334,9 @@ function TopKSummaryBarChart({
|
|
|
6206
6334
|
Typography9,
|
|
6207
6335
|
{
|
|
6208
6336
|
component: "h3",
|
|
6209
|
-
sx: { fontSize: "0.875rem", p: 1, color: "
|
|
6337
|
+
sx: { fontSize: "0.875rem", p: 1, color: "text.secondary" },
|
|
6210
6338
|
children: [
|
|
6211
|
-
/* @__PURE__ */ jsx(SquareIcon, { color:
|
|
6339
|
+
/* @__PURE__ */ jsx(SquareIcon, { color: barColors.base }),
|
|
6212
6340
|
" Base"
|
|
6213
6341
|
]
|
|
6214
6342
|
}
|
|
@@ -6217,9 +6345,9 @@ function TopKSummaryBarChart({
|
|
|
6217
6345
|
Typography9,
|
|
6218
6346
|
{
|
|
6219
6347
|
component: "h3",
|
|
6220
|
-
sx: { fontSize: "0.875rem", p: 1, color: "
|
|
6348
|
+
sx: { fontSize: "0.875rem", p: 1, color: "text.secondary" },
|
|
6221
6349
|
children: [
|
|
6222
|
-
/* @__PURE__ */ jsx(SquareIcon, { color:
|
|
6350
|
+
/* @__PURE__ */ jsx(SquareIcon, { color: barColors.current }),
|
|
6223
6351
|
" Current"
|
|
6224
6352
|
]
|
|
6225
6353
|
}
|
|
@@ -6232,114 +6360,124 @@ function TopKSummaryBarChart({
|
|
|
6232
6360
|
return /* @__PURE__ */ jsx(Fragment, {});
|
|
6233
6361
|
}
|
|
6234
6362
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
6235
|
-
/* @__PURE__ */ jsx(
|
|
6236
|
-
|
|
6363
|
+
/* @__PURE__ */ jsx(
|
|
6364
|
+
TopKChartTooltip,
|
|
6237
6365
|
{
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6366
|
+
base,
|
|
6367
|
+
current,
|
|
6368
|
+
barColors,
|
|
6369
|
+
children: /* @__PURE__ */ jsxs(
|
|
6370
|
+
Box21,
|
|
6371
|
+
{
|
|
6372
|
+
sx: {
|
|
6373
|
+
display: "flex",
|
|
6374
|
+
alignItems: "center",
|
|
6375
|
+
width: "100%",
|
|
6376
|
+
"&:hover": { bgcolor: "action.hover" },
|
|
6377
|
+
px: 2
|
|
6378
|
+
},
|
|
6379
|
+
children: [
|
|
6380
|
+
/* @__PURE__ */ jsx(
|
|
6381
|
+
Typography9,
|
|
6382
|
+
{
|
|
6383
|
+
sx: {
|
|
6384
|
+
width: "10em",
|
|
6385
|
+
fontSize: "0.875rem",
|
|
6386
|
+
color: current.isSpecialLabel ? "grey.400" : "inherit",
|
|
6387
|
+
overflow: "hidden",
|
|
6388
|
+
textOverflow: "ellipsis",
|
|
6389
|
+
whiteSpace: "nowrap"
|
|
6390
|
+
},
|
|
6391
|
+
children: current.label
|
|
6392
|
+
}
|
|
6393
|
+
),
|
|
6394
|
+
/* @__PURE__ */ jsxs(
|
|
6395
|
+
Box21,
|
|
6396
|
+
{
|
|
6397
|
+
sx: {
|
|
6398
|
+
display: "flex",
|
|
6399
|
+
width: "70%",
|
|
6400
|
+
flexDirection: "column"
|
|
6401
|
+
},
|
|
6402
|
+
children: [
|
|
6403
|
+
/* @__PURE__ */ jsxs(Box21, { sx: { display: "flex", height: "1em" }, children: [
|
|
6404
|
+
/* @__PURE__ */ jsx(
|
|
6405
|
+
CategoricalBarChart,
|
|
6406
|
+
{
|
|
6407
|
+
topkCount: current.count,
|
|
6408
|
+
topkLabel: current.label,
|
|
6409
|
+
valids: topKDiff.current.valids,
|
|
6410
|
+
color: barColors.current,
|
|
6411
|
+
isDark
|
|
6412
|
+
}
|
|
6413
|
+
),
|
|
6414
|
+
/* @__PURE__ */ jsx(
|
|
6415
|
+
Typography9,
|
|
6416
|
+
{
|
|
6417
|
+
sx: {
|
|
6418
|
+
ml: 2.5,
|
|
6419
|
+
mr: 1,
|
|
6420
|
+
fontSize: "0.875rem",
|
|
6421
|
+
width: "6em"
|
|
6422
|
+
},
|
|
6423
|
+
children: current.displayCount
|
|
6424
|
+
}
|
|
6425
|
+
),
|
|
6426
|
+
/* @__PURE__ */ jsx(
|
|
6427
|
+
Typography9,
|
|
6428
|
+
{
|
|
6429
|
+
sx: {
|
|
6430
|
+
color: "grey.400",
|
|
6431
|
+
fontSize: "0.875rem",
|
|
6432
|
+
width: "4em"
|
|
6433
|
+
},
|
|
6434
|
+
children: current.displayRatio
|
|
6435
|
+
}
|
|
6436
|
+
)
|
|
6437
|
+
] }),
|
|
6438
|
+
/* @__PURE__ */ jsxs(Box21, { sx: { display: "flex", height: "1em" }, children: [
|
|
6439
|
+
/* @__PURE__ */ jsx(
|
|
6440
|
+
CategoricalBarChart,
|
|
6441
|
+
{
|
|
6442
|
+
topkCount: base.count,
|
|
6443
|
+
topkLabel: base.label,
|
|
6444
|
+
valids: topKDiff.base.valids,
|
|
6445
|
+
color: barColors.base,
|
|
6446
|
+
isDark
|
|
6447
|
+
}
|
|
6448
|
+
),
|
|
6449
|
+
/* @__PURE__ */ jsx(
|
|
6450
|
+
Typography9,
|
|
6451
|
+
{
|
|
6452
|
+
sx: {
|
|
6453
|
+
ml: 2.5,
|
|
6454
|
+
mr: 1,
|
|
6455
|
+
fontSize: "0.875rem",
|
|
6456
|
+
width: "6em"
|
|
6457
|
+
},
|
|
6458
|
+
children: base.displayCount
|
|
6459
|
+
}
|
|
6460
|
+
),
|
|
6461
|
+
/* @__PURE__ */ jsx(
|
|
6462
|
+
Typography9,
|
|
6463
|
+
{
|
|
6464
|
+
sx: {
|
|
6465
|
+
color: "grey.400",
|
|
6466
|
+
fontSize: "0.875rem",
|
|
6467
|
+
width: "4em"
|
|
6468
|
+
},
|
|
6469
|
+
children: base.displayRatio
|
|
6470
|
+
}
|
|
6471
|
+
)
|
|
6472
|
+
] })
|
|
6473
|
+
]
|
|
6474
|
+
}
|
|
6475
|
+
)
|
|
6476
|
+
]
|
|
6477
|
+
}
|
|
6478
|
+
)
|
|
6341
6479
|
}
|
|
6342
|
-
)
|
|
6480
|
+
),
|
|
6343
6481
|
/* @__PURE__ */ jsx(Divider, {})
|
|
6344
6482
|
] }, current.label);
|
|
6345
6483
|
})
|
|
@@ -6350,10 +6488,13 @@ function CategoricalBarChart({
|
|
|
6350
6488
|
topkLabel,
|
|
6351
6489
|
valids,
|
|
6352
6490
|
animation = false,
|
|
6353
|
-
color =
|
|
6491
|
+
color = INFO_VAL_COLOR2,
|
|
6492
|
+
isDark = false
|
|
6354
6493
|
}) {
|
|
6355
6494
|
Chart.register(CategoryScale, BarElement, LinearScale);
|
|
6356
|
-
const chartOptions = getCatBarChartOptions(topkCount, valids, {
|
|
6495
|
+
const chartOptions = getCatBarChartOptions(topkCount, valids, isDark, {
|
|
6496
|
+
animation
|
|
6497
|
+
});
|
|
6357
6498
|
const chartData = getCatBarChartData({
|
|
6358
6499
|
topkCount,
|
|
6359
6500
|
topkLabel,
|
|
@@ -6361,7 +6502,8 @@ function CategoricalBarChart({
|
|
|
6361
6502
|
});
|
|
6362
6503
|
return /* @__PURE__ */ jsx(Bar, { data: chartData, options: chartOptions, plugins: [] });
|
|
6363
6504
|
}
|
|
6364
|
-
function getCatBarChartOptions(
|
|
6505
|
+
function getCatBarChartOptions(_count, valids, isDark = false, { ...configOverrides } = {}) {
|
|
6506
|
+
const themeColors = getChartThemeColors(isDark);
|
|
6365
6507
|
return {
|
|
6366
6508
|
responsive: true,
|
|
6367
6509
|
maintainAspectRatio: false,
|
|
@@ -6370,10 +6512,12 @@ function getCatBarChartOptions(count, valids, { ...configOverrides } = {}) {
|
|
|
6370
6512
|
x: {
|
|
6371
6513
|
display: false,
|
|
6372
6514
|
max: valids,
|
|
6373
|
-
grid: { display: false }
|
|
6515
|
+
grid: { display: false },
|
|
6516
|
+
ticks: { color: themeColors.textColor }
|
|
6374
6517
|
},
|
|
6375
6518
|
y: {
|
|
6376
|
-
display: false
|
|
6519
|
+
display: false,
|
|
6520
|
+
ticks: { color: themeColors.textColor }
|
|
6377
6521
|
}
|
|
6378
6522
|
},
|
|
6379
6523
|
plugins: {
|
|
@@ -6387,7 +6531,7 @@ function getCatBarChartOptions(count, valids, { ...configOverrides } = {}) {
|
|
|
6387
6531
|
function getCatBarChartData({
|
|
6388
6532
|
topkLabel,
|
|
6389
6533
|
topkCount,
|
|
6390
|
-
color =
|
|
6534
|
+
color = INFO_VAL_COLOR2
|
|
6391
6535
|
}) {
|
|
6392
6536
|
return {
|
|
6393
6537
|
labels: [topkLabel],
|
|
@@ -6408,39 +6552,53 @@ function getCatBarChartData({
|
|
|
6408
6552
|
};
|
|
6409
6553
|
}
|
|
6410
6554
|
var PrivateTopKDiffResultView = ({ run }, ref) => {
|
|
6555
|
+
const theme = useTheme();
|
|
6556
|
+
const isDark = theme.palette.mode === "dark";
|
|
6411
6557
|
const [isDisplayTopTen, setIsDisplayTopTen] = useState(true);
|
|
6412
6558
|
const result = run.result;
|
|
6413
6559
|
const params = run.params;
|
|
6414
6560
|
const baseTopK = result.base;
|
|
6415
6561
|
const currentTopK = result.current;
|
|
6416
6562
|
return /* @__PURE__ */ jsxs(Box21, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
6417
|
-
/* @__PURE__ */ jsxs(
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6563
|
+
/* @__PURE__ */ jsxs(
|
|
6564
|
+
ScreenshotBox,
|
|
6565
|
+
{
|
|
6566
|
+
ref,
|
|
6567
|
+
blockSize: "auto",
|
|
6568
|
+
backgroundColor: isDark ? "#1f2937" : "white",
|
|
6569
|
+
children: [
|
|
6570
|
+
/* @__PURE__ */ jsxs(
|
|
6571
|
+
Typography9,
|
|
6572
|
+
{
|
|
6573
|
+
variant: "h5",
|
|
6574
|
+
sx: {
|
|
6575
|
+
pt: 4,
|
|
6576
|
+
textAlign: "center",
|
|
6577
|
+
color: isDark ? "grey.200" : "grey.600"
|
|
6578
|
+
},
|
|
6579
|
+
children: [
|
|
6580
|
+
"Model ",
|
|
6581
|
+
params.model,
|
|
6582
|
+
".",
|
|
6583
|
+
params.column_name
|
|
6584
|
+
]
|
|
6585
|
+
}
|
|
6586
|
+
),
|
|
6587
|
+
/* @__PURE__ */ jsxs(Stack5, { direction: "row", alignItems: "center", children: [
|
|
6588
|
+
/* @__PURE__ */ jsx(Box21, { sx: { flex: 1 } }),
|
|
6589
|
+
/* @__PURE__ */ jsx(
|
|
6590
|
+
TopKSummaryBarChart,
|
|
6591
|
+
{
|
|
6592
|
+
topKDiff: result,
|
|
6593
|
+
valids: currentTopK.valids || 0,
|
|
6594
|
+
isDisplayTopTen
|
|
6595
|
+
}
|
|
6596
|
+
),
|
|
6597
|
+
/* @__PURE__ */ jsx(Box21, { sx: { flex: 1 } })
|
|
6598
|
+
] })
|
|
6599
|
+
]
|
|
6600
|
+
}
|
|
6601
|
+
),
|
|
6444
6602
|
/* @__PURE__ */ jsx(Box21, { sx: { flex: 1 } }),
|
|
6445
6603
|
(baseTopK.values.length > 10 || currentTopK.values.length > 10) && /* @__PURE__ */ jsx(Box21, { sx: { display: "flex", p: 5, justifyContent: "start" }, children: /* @__PURE__ */ jsx(
|
|
6446
6604
|
Link,
|
|
@@ -6462,6 +6620,8 @@ var PrivateValueDiffDetailResultView = ({
|
|
|
6462
6620
|
viewOptions,
|
|
6463
6621
|
onViewOptionsChanged
|
|
6464
6622
|
}, ref) => {
|
|
6623
|
+
const theme = useTheme();
|
|
6624
|
+
const isDark = theme.palette.mode === "dark";
|
|
6465
6625
|
if (!isValueDiffDetailRun(run)) {
|
|
6466
6626
|
throw new Error("run type must be value_diff_detail");
|
|
6467
6627
|
}
|
|
@@ -6546,7 +6706,7 @@ var PrivateValueDiffDetailResultView = ({
|
|
|
6546
6706
|
sx: {
|
|
6547
6707
|
display: "flex",
|
|
6548
6708
|
flexDirection: "column",
|
|
6549
|
-
bgcolor: "
|
|
6709
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
6550
6710
|
height: "100%"
|
|
6551
6711
|
},
|
|
6552
6712
|
children: [
|
|
@@ -6581,7 +6741,7 @@ var PrivateValueDiffDetailResultView = ({
|
|
|
6581
6741
|
sx: {
|
|
6582
6742
|
display: "flex",
|
|
6583
6743
|
flexDirection: "column",
|
|
6584
|
-
bgcolor: "
|
|
6744
|
+
bgcolor: isDark ? "grey.900" : "grey.50",
|
|
6585
6745
|
height: "100%"
|
|
6586
6746
|
},
|
|
6587
6747
|
children: [
|
|
@@ -6651,11 +6811,65 @@ function ValueDiffForm({
|
|
|
6651
6811
|
onParamsChanged,
|
|
6652
6812
|
setIsReadyToExecute
|
|
6653
6813
|
}) {
|
|
6814
|
+
const theme = useTheme();
|
|
6815
|
+
const isDark = theme.palette.mode === "dark";
|
|
6654
6816
|
const [allColumns, setAllColumns] = useState(
|
|
6655
6817
|
!params.columns || params.columns.length === 0
|
|
6656
6818
|
);
|
|
6657
6819
|
const model = params.model;
|
|
6658
6820
|
const primaryKey = params.primary_key;
|
|
6821
|
+
const selectStyles = useMemo(
|
|
6822
|
+
() => ({
|
|
6823
|
+
container: (base) => ({
|
|
6824
|
+
...base,
|
|
6825
|
+
width: "100%"
|
|
6826
|
+
}),
|
|
6827
|
+
control: (base) => ({
|
|
6828
|
+
...base,
|
|
6829
|
+
minHeight: "40px",
|
|
6830
|
+
backgroundColor: isDark ? colors.neutral[700] : base.backgroundColor,
|
|
6831
|
+
borderColor: isDark ? colors.neutral[600] : base.borderColor
|
|
6832
|
+
}),
|
|
6833
|
+
menu: (base) => ({
|
|
6834
|
+
...base,
|
|
6835
|
+
backgroundColor: isDark ? colors.neutral[700] : base.backgroundColor
|
|
6836
|
+
}),
|
|
6837
|
+
option: (base, state) => ({
|
|
6838
|
+
...base,
|
|
6839
|
+
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,
|
|
6840
|
+
color: isDark ? colors.neutral[200] : base.color
|
|
6841
|
+
}),
|
|
6842
|
+
multiValue: (base) => ({
|
|
6843
|
+
...base,
|
|
6844
|
+
backgroundColor: isDark ? colors.neutral[600] : base.backgroundColor
|
|
6845
|
+
}),
|
|
6846
|
+
multiValueLabel: (base) => ({
|
|
6847
|
+
...base,
|
|
6848
|
+
color: isDark ? colors.neutral[200] : base.color
|
|
6849
|
+
}),
|
|
6850
|
+
multiValueRemove: (base) => ({
|
|
6851
|
+
...base,
|
|
6852
|
+
color: isDark ? colors.neutral[400] : base.color,
|
|
6853
|
+
"&:hover": {
|
|
6854
|
+
backgroundColor: isDark ? colors.neutral[500] : colors.red[200],
|
|
6855
|
+
color: isDark ? colors.neutral[200] : colors.red[600]
|
|
6856
|
+
}
|
|
6857
|
+
}),
|
|
6858
|
+
input: (base) => ({
|
|
6859
|
+
...base,
|
|
6860
|
+
color: isDark ? colors.neutral[200] : base.color
|
|
6861
|
+
}),
|
|
6862
|
+
singleValue: (base) => ({
|
|
6863
|
+
...base,
|
|
6864
|
+
color: isDark ? colors.neutral[200] : base.color
|
|
6865
|
+
}),
|
|
6866
|
+
placeholder: (base) => ({
|
|
6867
|
+
...base,
|
|
6868
|
+
color: isDark ? colors.neutral[400] : base.color
|
|
6869
|
+
})
|
|
6870
|
+
}),
|
|
6871
|
+
[isDark]
|
|
6872
|
+
);
|
|
6659
6873
|
const {
|
|
6660
6874
|
columns,
|
|
6661
6875
|
primaryKey: nodePrimaryKey,
|
|
@@ -6715,16 +6929,7 @@ function ValueDiffForm({
|
|
|
6715
6929
|
primary_key: optionsArray.length == 1 ? optionsArray[0].value : optionsArray.map((v) => v.value)
|
|
6716
6930
|
});
|
|
6717
6931
|
},
|
|
6718
|
-
styles:
|
|
6719
|
-
container: (base) => ({
|
|
6720
|
-
...base,
|
|
6721
|
-
width: "100%"
|
|
6722
|
-
}),
|
|
6723
|
-
control: (base) => ({
|
|
6724
|
-
...base,
|
|
6725
|
-
minHeight: "40px"
|
|
6726
|
-
})
|
|
6727
|
-
}
|
|
6932
|
+
styles: selectStyles
|
|
6728
6933
|
}
|
|
6729
6934
|
)
|
|
6730
6935
|
] }),
|
|
@@ -6775,16 +6980,7 @@ function ValueDiffForm({
|
|
|
6775
6980
|
columns: cols
|
|
6776
6981
|
});
|
|
6777
6982
|
},
|
|
6778
|
-
styles:
|
|
6779
|
-
container: (base) => ({
|
|
6780
|
-
...base,
|
|
6781
|
-
width: "100%"
|
|
6782
|
-
}),
|
|
6783
|
-
control: (base) => ({
|
|
6784
|
-
...base,
|
|
6785
|
-
minHeight: "40px"
|
|
6786
|
-
})
|
|
6787
|
-
}
|
|
6983
|
+
styles: selectStyles
|
|
6788
6984
|
}
|
|
6789
6985
|
)
|
|
6790
6986
|
] })
|
|
@@ -6827,20 +7023,28 @@ function _ValueDiffResultView({ run }, ref) {
|
|
|
6827
7023
|
" removed)"
|
|
6828
7024
|
] }),
|
|
6829
7025
|
/* @__PURE__ */ jsx(
|
|
6830
|
-
|
|
7026
|
+
Box21,
|
|
6831
7027
|
{
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
7028
|
+
sx: {
|
|
7029
|
+
flex: 1,
|
|
7030
|
+
minHeight: 0,
|
|
6835
7031
|
maxHeight: "100%",
|
|
6836
7032
|
overflow: "auto",
|
|
6837
|
-
|
|
7033
|
+
borderTop: "1px solid",
|
|
7034
|
+
borderBottom: "1px solid",
|
|
7035
|
+
borderColor: "divider"
|
|
6838
7036
|
},
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
7037
|
+
children: /* @__PURE__ */ jsx(
|
|
7038
|
+
ScreenshotDataGrid,
|
|
7039
|
+
{
|
|
7040
|
+
ref,
|
|
7041
|
+
columns,
|
|
7042
|
+
rows,
|
|
7043
|
+
renderers: { noRowsFallback: /* @__PURE__ */ jsx(EmptyRowsRenderer, {}) },
|
|
7044
|
+
defaultColumnOptions: { resizable: true },
|
|
7045
|
+
className: "rdg-light"
|
|
7046
|
+
}
|
|
7047
|
+
)
|
|
6844
7048
|
}
|
|
6845
7049
|
)
|
|
6846
7050
|
]
|
|
@@ -7123,7 +7327,7 @@ var RecceCheckContext = createContext({
|
|
|
7123
7327
|
}
|
|
7124
7328
|
});
|
|
7125
7329
|
function RecceCheckContextProvider({ children }) {
|
|
7126
|
-
const [selectCheckId, setSelectCheckId] =
|
|
7330
|
+
const [selectCheckId, setSelectCheckId] = React12.useState("");
|
|
7127
7331
|
return /* @__PURE__ */ jsx(
|
|
7128
7332
|
RecceCheckContext.Provider,
|
|
7129
7333
|
{
|
|
@@ -7157,10 +7361,10 @@ var defaultQueryContext = {
|
|
|
7157
7361
|
};
|
|
7158
7362
|
var RecceQueryContext = createContext(defaultQueryContext);
|
|
7159
7363
|
function RecceQueryContextProvider({ children }) {
|
|
7160
|
-
const [sqlQuery, setSqlQuery] =
|
|
7161
|
-
const [baseSqlQuery, setBaseSqlQuery] =
|
|
7162
|
-
const [isCustomQueries, setCustomQueries] =
|
|
7163
|
-
const [primaryKeys, setPrimaryKeys] =
|
|
7364
|
+
const [sqlQuery, setSqlQuery] = React12.useState(defaultSqlQuery);
|
|
7365
|
+
const [baseSqlQuery, setBaseSqlQuery] = React12.useState(defaultSqlQuery);
|
|
7366
|
+
const [isCustomQueries, setCustomQueries] = React12.useState(false);
|
|
7367
|
+
const [primaryKeys, setPrimaryKeys] = React12.useState();
|
|
7164
7368
|
return /* @__PURE__ */ jsx(
|
|
7165
7369
|
RecceQueryContext.Provider,
|
|
7166
7370
|
{
|
|
@@ -7189,7 +7393,7 @@ var RowCountStateContext = createContext(defaultRowCountStateContext);
|
|
|
7189
7393
|
function RowCountStateContextProvider({
|
|
7190
7394
|
children
|
|
7191
7395
|
}) {
|
|
7192
|
-
const [isNodesFetching, setIsNodesFetching] =
|
|
7396
|
+
const [isNodesFetching, setIsNodesFetching] = React12.useState([]);
|
|
7193
7397
|
return /* @__PURE__ */ jsx(
|
|
7194
7398
|
RowCountStateContext.Provider,
|
|
7195
7399
|
{
|