@datarecce/ui 0.1.6 → 0.1.9
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/hooks.js +7078 -34
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +7026 -21
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.js +1375 -314
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1094 -54
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.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 React12 = 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');
|
|
@@ -20,14 +20,15 @@ var reactQuery = require('@tanstack/react-query');
|
|
|
20
20
|
var axios = require('axios');
|
|
21
21
|
var fi = require('react-icons/fi');
|
|
22
22
|
var unified = require('@amplitude/unified');
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
23
|
+
var MuiDialog = require('@mui/material/Dialog');
|
|
24
|
+
var DialogActions = require('@mui/material/DialogActions');
|
|
25
|
+
var DialogContent = require('@mui/material/DialogContent');
|
|
26
|
+
var DialogTitle = require('@mui/material/DialogTitle');
|
|
27
27
|
var IconButton2 = require('@mui/material/IconButton');
|
|
28
|
+
var path = require('path');
|
|
28
29
|
var io5 = require('react-icons/io5');
|
|
29
|
-
require('next/link');
|
|
30
|
-
require('lodash/throttle');
|
|
30
|
+
var NextLink = require('next/link');
|
|
31
|
+
var throttle = require('lodash/throttle');
|
|
31
32
|
var navigation = require('next/navigation');
|
|
32
33
|
var Link = require('@mui/material/Link');
|
|
33
34
|
var MuiPopover = require('@mui/material/Popover');
|
|
@@ -116,7 +117,7 @@ var CardHeader = require('@mui/material/CardHeader');
|
|
|
116
117
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
117
118
|
|
|
118
119
|
var CssBaseline__default = /*#__PURE__*/_interopDefault(CssBaseline);
|
|
119
|
-
var
|
|
120
|
+
var React12__default = /*#__PURE__*/_interopDefault(React12);
|
|
120
121
|
var MuiAlert__default = /*#__PURE__*/_interopDefault(MuiAlert);
|
|
121
122
|
var CircularProgress4__default = /*#__PURE__*/_interopDefault(CircularProgress4);
|
|
122
123
|
var Snackbar__default = /*#__PURE__*/_interopDefault(Snackbar);
|
|
@@ -127,11 +128,14 @@ var Button10__default = /*#__PURE__*/_interopDefault(Button10);
|
|
|
127
128
|
var Divider__default = /*#__PURE__*/_interopDefault(Divider);
|
|
128
129
|
var dagre__default = /*#__PURE__*/_interopDefault(dagre);
|
|
129
130
|
var axios__default = /*#__PURE__*/_interopDefault(axios);
|
|
130
|
-
var
|
|
131
|
-
var
|
|
132
|
-
var
|
|
133
|
-
var
|
|
131
|
+
var MuiDialog__default = /*#__PURE__*/_interopDefault(MuiDialog);
|
|
132
|
+
var DialogActions__default = /*#__PURE__*/_interopDefault(DialogActions);
|
|
133
|
+
var DialogContent__default = /*#__PURE__*/_interopDefault(DialogContent);
|
|
134
|
+
var DialogTitle__default = /*#__PURE__*/_interopDefault(DialogTitle);
|
|
134
135
|
var IconButton2__default = /*#__PURE__*/_interopDefault(IconButton2);
|
|
136
|
+
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
137
|
+
var NextLink__default = /*#__PURE__*/_interopDefault(NextLink);
|
|
138
|
+
var throttle__default = /*#__PURE__*/_interopDefault(throttle);
|
|
135
139
|
var Link__default = /*#__PURE__*/_interopDefault(Link);
|
|
136
140
|
var MuiPopover__default = /*#__PURE__*/_interopDefault(MuiPopover);
|
|
137
141
|
var FormControl__default = /*#__PURE__*/_interopDefault(FormControl);
|
|
@@ -968,8 +972,8 @@ var colorAliases = {
|
|
|
968
972
|
gray: "neutral"
|
|
969
973
|
// Gray is an alias for neutral
|
|
970
974
|
};
|
|
971
|
-
function token(
|
|
972
|
-
const parts =
|
|
975
|
+
function token(path2) {
|
|
976
|
+
const parts = path2.split(".");
|
|
973
977
|
if (parts[0] === "colors" && parts.length >= 3) {
|
|
974
978
|
let colorName = parts[1];
|
|
975
979
|
const variant = parts[2];
|
|
@@ -1005,7 +1009,7 @@ function MuiProvider({
|
|
|
1005
1009
|
enableCssBaseline = false
|
|
1006
1010
|
}) {
|
|
1007
1011
|
const { resolvedTheme } = nextThemes.useTheme();
|
|
1008
|
-
const theme =
|
|
1012
|
+
const theme = React12.useMemo(() => {
|
|
1009
1013
|
const mode = forcedTheme ?? resolvedTheme;
|
|
1010
1014
|
return mode === "dark" ? darkTheme : lightTheme;
|
|
1011
1015
|
}, [forcedTheme, resolvedTheme]);
|
|
@@ -1015,11 +1019,11 @@ function MuiProvider({
|
|
|
1015
1019
|
] });
|
|
1016
1020
|
}
|
|
1017
1021
|
var mui_provider_default = MuiProvider;
|
|
1018
|
-
var ToasterContext =
|
|
1022
|
+
var ToasterContext = React12.createContext(null);
|
|
1019
1023
|
var toastIdCounter = 0;
|
|
1020
1024
|
function ToasterProvider({ children }) {
|
|
1021
|
-
const [toasts, setToasts] =
|
|
1022
|
-
const createToast =
|
|
1025
|
+
const [toasts, setToasts] = React12.useState([]);
|
|
1026
|
+
const createToast = React12.useCallback((options) => {
|
|
1023
1027
|
const id = options.id || `toast-${++toastIdCounter}`;
|
|
1024
1028
|
const newToast = {
|
|
1025
1029
|
id,
|
|
@@ -1034,7 +1038,7 @@ function ToasterProvider({ children }) {
|
|
|
1034
1038
|
});
|
|
1035
1039
|
return id;
|
|
1036
1040
|
}, []);
|
|
1037
|
-
const dismiss =
|
|
1041
|
+
const dismiss = React12.useCallback((id) => {
|
|
1038
1042
|
setToasts(
|
|
1039
1043
|
(prev) => prev.map((t) => t.id === id ? { ...t, open: false } : t)
|
|
1040
1044
|
);
|
|
@@ -1042,7 +1046,7 @@ function ToasterProvider({ children }) {
|
|
|
1042
1046
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
1043
1047
|
}, 300);
|
|
1044
1048
|
}, []);
|
|
1045
|
-
const update =
|
|
1049
|
+
const update = React12.useCallback((id, options) => {
|
|
1046
1050
|
setToasts(
|
|
1047
1051
|
(prev) => prev.map((t) => t.id === id ? { ...t, ...options } : t)
|
|
1048
1052
|
);
|
|
@@ -1085,7 +1089,7 @@ function ToasterProvider({ children }) {
|
|
|
1085
1089
|
] });
|
|
1086
1090
|
}
|
|
1087
1091
|
function useToaster() {
|
|
1088
|
-
const context =
|
|
1092
|
+
const context = React12.useContext(ToasterContext);
|
|
1089
1093
|
if (!context) {
|
|
1090
1094
|
throw new Error("useToaster must be used within ToasterProvider");
|
|
1091
1095
|
}
|
|
@@ -1121,8 +1125,8 @@ var toaster = {
|
|
|
1121
1125
|
}
|
|
1122
1126
|
};
|
|
1123
1127
|
function Toaster() {
|
|
1124
|
-
const [toasts, setToasts] =
|
|
1125
|
-
|
|
1128
|
+
const [toasts, setToasts] = React12.useState([]);
|
|
1129
|
+
React12.useState(() => {
|
|
1126
1130
|
const unsubscribe = toaster.subscribe((event) => {
|
|
1127
1131
|
if (event.type === "create" && event.options) {
|
|
1128
1132
|
const newToast = {
|
|
@@ -1226,6 +1230,146 @@ function isLineageGraphNode(node) {
|
|
|
1226
1230
|
function isLineageGraphColumnNode(node) {
|
|
1227
1231
|
return node.type === "lineageGraphColumnNode";
|
|
1228
1232
|
}
|
|
1233
|
+
function buildLineageGraph(base, current, diff) {
|
|
1234
|
+
const nodes = {};
|
|
1235
|
+
const edges = {};
|
|
1236
|
+
const buildNode = (key, from) => {
|
|
1237
|
+
return {
|
|
1238
|
+
id: key,
|
|
1239
|
+
data: {
|
|
1240
|
+
id: key,
|
|
1241
|
+
name: key,
|
|
1242
|
+
from,
|
|
1243
|
+
data: {
|
|
1244
|
+
base: void 0,
|
|
1245
|
+
current: void 0
|
|
1246
|
+
},
|
|
1247
|
+
parents: {},
|
|
1248
|
+
children: {}
|
|
1249
|
+
},
|
|
1250
|
+
type: "lineageGraphNode"
|
|
1251
|
+
// Return as LineageGraphNode for now
|
|
1252
|
+
};
|
|
1253
|
+
};
|
|
1254
|
+
for (const [key, nodeData] of Object.entries(base.nodes)) {
|
|
1255
|
+
nodes[key] = buildNode(key, "base");
|
|
1256
|
+
if (nodeData) {
|
|
1257
|
+
nodes[key].data.data.base = nodeData;
|
|
1258
|
+
nodes[key].data.name = nodeData.name;
|
|
1259
|
+
nodes[key].data.resourceType = nodeData.resource_type;
|
|
1260
|
+
nodes[key].data.packageName = nodeData.package_name;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
for (const [key, nodeData] of Object.entries(current.nodes)) {
|
|
1264
|
+
if (nodes[key]) {
|
|
1265
|
+
nodes[key].data.from = "both";
|
|
1266
|
+
} else {
|
|
1267
|
+
nodes[key] = buildNode(key, "current");
|
|
1268
|
+
}
|
|
1269
|
+
if (nodeData) {
|
|
1270
|
+
nodes[key].data.data.current = current.nodes[key];
|
|
1271
|
+
nodes[key].data.name = nodeData.name;
|
|
1272
|
+
nodes[key].data.resourceType = nodeData.resource_type;
|
|
1273
|
+
nodes[key].data.packageName = nodeData.package_name;
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
for (const [child, parents] of Object.entries(base.parent_map)) {
|
|
1277
|
+
for (const parent of parents) {
|
|
1278
|
+
const childNode = nodes[child];
|
|
1279
|
+
const parentNode = nodes[parent];
|
|
1280
|
+
const id = `${parent}_${child}`;
|
|
1281
|
+
if (!childNode || !parentNode) {
|
|
1282
|
+
continue;
|
|
1283
|
+
}
|
|
1284
|
+
edges[id] = {
|
|
1285
|
+
id,
|
|
1286
|
+
source: parentNode.id,
|
|
1287
|
+
target: childNode.id,
|
|
1288
|
+
data: {
|
|
1289
|
+
from: "base"
|
|
1290
|
+
}
|
|
1291
|
+
};
|
|
1292
|
+
const edge = edges[id];
|
|
1293
|
+
childNode.data.parents[parent] = edge;
|
|
1294
|
+
parentNode.data.children[child] = edge;
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
for (const [child, parents] of Object.entries(current.parent_map)) {
|
|
1298
|
+
for (const parent of parents) {
|
|
1299
|
+
const childNode = nodes[child];
|
|
1300
|
+
const parentNode = nodes[parent];
|
|
1301
|
+
const id = `${parent}_${child}`;
|
|
1302
|
+
if (!childNode || !parentNode) {
|
|
1303
|
+
continue;
|
|
1304
|
+
}
|
|
1305
|
+
const existingEdge = edges[id];
|
|
1306
|
+
if (existingEdge?.data && edges[id].data) {
|
|
1307
|
+
edges[id].data.from = "both";
|
|
1308
|
+
} else {
|
|
1309
|
+
edges[id] = {
|
|
1310
|
+
id,
|
|
1311
|
+
source: parentNode.id,
|
|
1312
|
+
target: childNode.id,
|
|
1313
|
+
data: {
|
|
1314
|
+
from: "current"
|
|
1315
|
+
}
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
const edge = edges[id];
|
|
1319
|
+
childNode.data.parents[parent] = edge;
|
|
1320
|
+
parentNode.data.children[child] = edge;
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
const modifiedSet = [];
|
|
1324
|
+
for (const [key, node] of Object.entries(nodes)) {
|
|
1325
|
+
const diffNode = diff?.[key];
|
|
1326
|
+
if (diffNode) {
|
|
1327
|
+
node.data.changeStatus = diffNode.change_status;
|
|
1328
|
+
if (diffNode.change) {
|
|
1329
|
+
node.data.change = {
|
|
1330
|
+
category: diffNode.change.category,
|
|
1331
|
+
columns: diffNode.change.columns
|
|
1332
|
+
};
|
|
1333
|
+
}
|
|
1334
|
+
modifiedSet.push(key);
|
|
1335
|
+
} else if (node.data.from === "base") {
|
|
1336
|
+
node.data.changeStatus = "removed";
|
|
1337
|
+
modifiedSet.push(node.id);
|
|
1338
|
+
} else if (node.data.from === "current") {
|
|
1339
|
+
node.data.changeStatus = "added";
|
|
1340
|
+
modifiedSet.push(node.id);
|
|
1341
|
+
} else {
|
|
1342
|
+
const checksum1 = node.data.data.base?.checksum?.checksum;
|
|
1343
|
+
const checksum2 = node.data.data.current?.checksum?.checksum;
|
|
1344
|
+
if (checksum1 && checksum2 && checksum1 !== checksum2) {
|
|
1345
|
+
node.data.changeStatus = "modified";
|
|
1346
|
+
modifiedSet.push(node.id);
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
for (const [, edge] of Object.entries(edges)) {
|
|
1351
|
+
if (edge.data) {
|
|
1352
|
+
if (edge.data.from === "base") {
|
|
1353
|
+
edge.data.changeStatus = "removed";
|
|
1354
|
+
} else if (edge.data.from === "current") {
|
|
1355
|
+
edge.data.changeStatus = "added";
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
return {
|
|
1360
|
+
nodes,
|
|
1361
|
+
edges,
|
|
1362
|
+
modifiedSet,
|
|
1363
|
+
manifestMetadata: {
|
|
1364
|
+
base: base.manifest_metadata ?? void 0,
|
|
1365
|
+
current: current.manifest_metadata ?? void 0
|
|
1366
|
+
},
|
|
1367
|
+
catalogMetadata: {
|
|
1368
|
+
base: base.catalog_metadata ?? void 0,
|
|
1369
|
+
current: current.catalog_metadata ?? void 0
|
|
1370
|
+
}
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1229
1373
|
function selectUpstream(lineageGraph, nodeIds, degree = 1e3) {
|
|
1230
1374
|
return getNeighborSet(
|
|
1231
1375
|
nodeIds,
|
|
@@ -1581,6 +1725,100 @@ function isHistogramDiffRun(run) {
|
|
|
1581
1725
|
// recce-source/js/src/constants/urls.ts
|
|
1582
1726
|
var RECCE_SUPPORT_CALENDAR_URL = "https://cal.com/team/recce/chat";
|
|
1583
1727
|
|
|
1728
|
+
// recce-source/js/src/lib/utils/formatTime.ts
|
|
1729
|
+
function getTimeComponents(totalSeconds) {
|
|
1730
|
+
const seconds = Math.floor(totalSeconds);
|
|
1731
|
+
return {
|
|
1732
|
+
hours: Math.floor(seconds / 3600),
|
|
1733
|
+
minutes: Math.floor(seconds % 3600 / 60),
|
|
1734
|
+
seconds: seconds % 60
|
|
1735
|
+
};
|
|
1736
|
+
}
|
|
1737
|
+
function formatCompact({ hours, minutes, seconds }) {
|
|
1738
|
+
if (hours > 0) {
|
|
1739
|
+
return `${hours}:${minutes.toString().padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
|
|
1740
|
+
}
|
|
1741
|
+
return `${minutes}:${seconds.toString().padStart(2, "0")}`;
|
|
1742
|
+
}
|
|
1743
|
+
function formatVerbose({ hours, minutes, seconds }) {
|
|
1744
|
+
const parts = [];
|
|
1745
|
+
if (hours > 0) {
|
|
1746
|
+
parts.push(`${hours} hour${hours !== 1 ? "s" : ""}`);
|
|
1747
|
+
}
|
|
1748
|
+
if (minutes > 0) {
|
|
1749
|
+
parts.push(`${minutes} min${minutes !== 1 ? "s" : ""}`);
|
|
1750
|
+
}
|
|
1751
|
+
if (hours === 0 && (parts.length === 0 || seconds > 0)) {
|
|
1752
|
+
parts.push(`${seconds} second${seconds !== 1 ? "s" : ""}`);
|
|
1753
|
+
}
|
|
1754
|
+
return parts.join(" ");
|
|
1755
|
+
}
|
|
1756
|
+
function formatDuration(totalSeconds, style = "verbose") {
|
|
1757
|
+
const components = getTimeComponents(totalSeconds);
|
|
1758
|
+
if (style === "compact") {
|
|
1759
|
+
return formatCompact(components);
|
|
1760
|
+
}
|
|
1761
|
+
return formatVerbose(components);
|
|
1762
|
+
}
|
|
1763
|
+
function ServerDisconnectedModalContent({
|
|
1764
|
+
connect,
|
|
1765
|
+
idleSeconds
|
|
1766
|
+
}) {
|
|
1767
|
+
const isIdleTimeout = idleSeconds !== void 0 && idleSeconds !== null && idleSeconds > 0;
|
|
1768
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1769
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle__default.default, { children: "Server Disconnected" }),
|
|
1770
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogContent__default.default, { children: isIdleTimeout ? /* @__PURE__ */ jsxRuntime.jsxs(Typography28__default.default, { children: [
|
|
1771
|
+
"The server has been idle for ",
|
|
1772
|
+
formatDuration(idleSeconds),
|
|
1773
|
+
" and was automatically stopped. Please restart the Recce server to continue."
|
|
1774
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { children: "The server connection has been lost. Please restart the Recce server and try again." }) }),
|
|
1775
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogActions__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1776
|
+
Button10__default.default,
|
|
1777
|
+
{
|
|
1778
|
+
color: "iochmara",
|
|
1779
|
+
variant: "contained",
|
|
1780
|
+
onClick: () => {
|
|
1781
|
+
connect();
|
|
1782
|
+
},
|
|
1783
|
+
children: "Retry"
|
|
1784
|
+
}
|
|
1785
|
+
) })
|
|
1786
|
+
] });
|
|
1787
|
+
}
|
|
1788
|
+
function RecceInstanceDisconnectedModalContent({
|
|
1789
|
+
shareUrl,
|
|
1790
|
+
mode
|
|
1791
|
+
}) {
|
|
1792
|
+
const contents = {
|
|
1793
|
+
"read only": {
|
|
1794
|
+
title: "Share Instance Expired",
|
|
1795
|
+
body: "This Share Instance has expired. Please restart the share instance.",
|
|
1796
|
+
action: "Restart",
|
|
1797
|
+
link: shareUrl
|
|
1798
|
+
},
|
|
1799
|
+
"metadata only": {
|
|
1800
|
+
title: "Preview Instance Expired",
|
|
1801
|
+
body: "This Preview Instance has expired. To browse more, please book a meeting with us.",
|
|
1802
|
+
action: "Contact us",
|
|
1803
|
+
link: RECCE_SUPPORT_CALENDAR_URL
|
|
1804
|
+
}
|
|
1805
|
+
};
|
|
1806
|
+
const content = contents[mode];
|
|
1807
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1808
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle__default.default, { children: content.title }),
|
|
1809
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogContent__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { children: content.body }) }),
|
|
1810
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogActions__default.default, { children: mode === "read only" ? /* @__PURE__ */ jsxRuntime.jsx(NextLink__default.default, { href: content.link, passHref: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button10__default.default, { color: "iochmara", variant: "contained", children: content.action }) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1811
|
+
Button10__default.default,
|
|
1812
|
+
{
|
|
1813
|
+
color: "iochmara",
|
|
1814
|
+
variant: "contained",
|
|
1815
|
+
onClick: () => window.open(content.link, "_blank"),
|
|
1816
|
+
children: content.action
|
|
1817
|
+
}
|
|
1818
|
+
) })
|
|
1819
|
+
] });
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1584
1822
|
// recce-source/js/src/lib/api/cacheKeys.ts
|
|
1585
1823
|
var cacheKeys = {
|
|
1586
1824
|
rowCount: (model) => ["row_count", model],
|
|
@@ -1629,8 +1867,77 @@ var defaultValue = {
|
|
|
1629
1867
|
shareUrl: void 0,
|
|
1630
1868
|
sessionId: void 0
|
|
1631
1869
|
};
|
|
1632
|
-
var InstanceInfo =
|
|
1633
|
-
|
|
1870
|
+
var InstanceInfo = React12.createContext(defaultValue);
|
|
1871
|
+
function RecceInstanceInfoProvider({
|
|
1872
|
+
children
|
|
1873
|
+
}) {
|
|
1874
|
+
const { data: instanceInfo, isLoading } = useRecceInstanceInfo();
|
|
1875
|
+
const [featureToggles, setFeatureToggles] = React12.useState(
|
|
1876
|
+
defaultFeatureToggles
|
|
1877
|
+
);
|
|
1878
|
+
const [singleEnv, setSingleEnv] = React12.useState(false);
|
|
1879
|
+
const [authed, setAuthed] = React12.useState(false);
|
|
1880
|
+
const [lifetimeExpiredAt, setLifetimeExpiredAt] = React12.useState();
|
|
1881
|
+
const [shareUrl, setShareUrl] = React12.useState();
|
|
1882
|
+
const [sessionId, setSessionId] = React12.useState();
|
|
1883
|
+
const [prevInstanceInfo, setPrevInstanceInfo] = React12.useState(instanceInfo);
|
|
1884
|
+
if (!isLoading && instanceInfo && instanceInfo !== prevInstanceInfo) {
|
|
1885
|
+
setPrevInstanceInfo(instanceInfo);
|
|
1886
|
+
setSingleEnv(instanceInfo.single_env);
|
|
1887
|
+
setAuthed(instanceInfo.authed);
|
|
1888
|
+
setShareUrl(instanceInfo.share_url);
|
|
1889
|
+
setSessionId(instanceInfo.session_id);
|
|
1890
|
+
if (instanceInfo.lifetime_expired_at) {
|
|
1891
|
+
setLifetimeExpiredAt(new Date(instanceInfo.lifetime_expired_at));
|
|
1892
|
+
console.log("lifetime expired at", instanceInfo.lifetime_expired_at);
|
|
1893
|
+
}
|
|
1894
|
+
const toggles = { ...defaultFeatureToggles };
|
|
1895
|
+
if (instanceInfo.server_mode === "read-only") {
|
|
1896
|
+
toggles.mode = "read only";
|
|
1897
|
+
toggles.disableSaveToFile = true;
|
|
1898
|
+
toggles.disableExportStateFile = true;
|
|
1899
|
+
toggles.disableImportStateFile = true;
|
|
1900
|
+
toggles.disableUpdateChecklist = true;
|
|
1901
|
+
toggles.disableDatabaseQuery = true;
|
|
1902
|
+
toggles.disableViewActionDropdown = true;
|
|
1903
|
+
toggles.disableNodeActionDropdown = true;
|
|
1904
|
+
toggles.disableShare = true;
|
|
1905
|
+
} else if (instanceInfo.server_mode === "preview") {
|
|
1906
|
+
toggles.mode = "metadata only";
|
|
1907
|
+
toggles.disableSaveToFile = true;
|
|
1908
|
+
toggles.disableExportStateFile = true;
|
|
1909
|
+
toggles.disableImportStateFile = true;
|
|
1910
|
+
toggles.disableUpdateChecklist = false;
|
|
1911
|
+
toggles.disableDatabaseQuery = true;
|
|
1912
|
+
toggles.disableViewActionDropdown = false;
|
|
1913
|
+
toggles.disableNodeActionDropdown = false;
|
|
1914
|
+
toggles.disableShare = true;
|
|
1915
|
+
}
|
|
1916
|
+
if (instanceInfo.single_env) {
|
|
1917
|
+
toggles.disableUpdateChecklist = true;
|
|
1918
|
+
toggles.disableShare = true;
|
|
1919
|
+
}
|
|
1920
|
+
if (instanceInfo.cloud_instance) {
|
|
1921
|
+
toggles.disableShare = true;
|
|
1922
|
+
}
|
|
1923
|
+
setFeatureToggles(toggles);
|
|
1924
|
+
}
|
|
1925
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1926
|
+
InstanceInfo.Provider,
|
|
1927
|
+
{
|
|
1928
|
+
value: {
|
|
1929
|
+
featureToggles,
|
|
1930
|
+
singleEnv,
|
|
1931
|
+
authed,
|
|
1932
|
+
lifetimeExpiredAt,
|
|
1933
|
+
shareUrl,
|
|
1934
|
+
sessionId
|
|
1935
|
+
},
|
|
1936
|
+
children
|
|
1937
|
+
}
|
|
1938
|
+
);
|
|
1939
|
+
}
|
|
1940
|
+
var useRecceInstanceContext = () => React12.useContext(InstanceInfo);
|
|
1634
1941
|
|
|
1635
1942
|
// recce-source/js/src/lib/api/flag.ts
|
|
1636
1943
|
async function getServerFlag() {
|
|
@@ -1774,9 +2081,246 @@ async function aggregateRuns() {
|
|
|
1774
2081
|
const response = await axiosClient.post(`/api/runs/aggregate`, {});
|
|
1775
2082
|
return response.data;
|
|
1776
2083
|
}
|
|
1777
|
-
|
|
2084
|
+
|
|
2085
|
+
// recce-source/js/src/lib/api/keepAlive.ts
|
|
2086
|
+
function isDebugEnabled() {
|
|
2087
|
+
return typeof window !== "undefined" && !!window.RECCE_DEBUG_IDLE;
|
|
2088
|
+
}
|
|
2089
|
+
var MIN_KEEP_ALIVE_INTERVAL_MS = 3 * 1e3;
|
|
2090
|
+
var lastKeepAliveTime = 0;
|
|
2091
|
+
var isSending = false;
|
|
2092
|
+
var onKeepAliveSuccess = null;
|
|
2093
|
+
function setKeepAliveCallback(callback) {
|
|
2094
|
+
onKeepAliveSuccess = callback;
|
|
2095
|
+
}
|
|
2096
|
+
async function sendKeepAlive() {
|
|
2097
|
+
const now = Date.now();
|
|
2098
|
+
const elapsed = now - lastKeepAliveTime;
|
|
2099
|
+
if (elapsed < MIN_KEEP_ALIVE_INTERVAL_MS) {
|
|
2100
|
+
return false;
|
|
2101
|
+
}
|
|
2102
|
+
if (isSending) {
|
|
2103
|
+
return false;
|
|
2104
|
+
}
|
|
2105
|
+
try {
|
|
2106
|
+
isSending = true;
|
|
2107
|
+
await axiosClient.post("/api/keep-alive");
|
|
2108
|
+
lastKeepAliveTime = Date.now();
|
|
2109
|
+
if (onKeepAliveSuccess) {
|
|
2110
|
+
onKeepAliveSuccess(lastKeepAliveTime);
|
|
2111
|
+
}
|
|
2112
|
+
return true;
|
|
2113
|
+
} catch (error) {
|
|
2114
|
+
if (isDebugEnabled()) {
|
|
2115
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
2116
|
+
console.log("[Keep-Alive] Failed to send", {
|
|
2117
|
+
error: errorMessage,
|
|
2118
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2119
|
+
willRetryOnNextActivity: true
|
|
2120
|
+
});
|
|
2121
|
+
}
|
|
2122
|
+
return false;
|
|
2123
|
+
} finally {
|
|
2124
|
+
isSending = false;
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
function getLastKeepAliveTime() {
|
|
2128
|
+
return lastKeepAliveTime;
|
|
2129
|
+
}
|
|
2130
|
+
function isDebugEnabled2() {
|
|
2131
|
+
return typeof window !== "undefined" && !!window.RECCE_DEBUG_IDLE;
|
|
2132
|
+
}
|
|
2133
|
+
function debugLog(message, data) {
|
|
2134
|
+
if (isDebugEnabled2()) {
|
|
2135
|
+
if (data) {
|
|
2136
|
+
console.log(message, data);
|
|
2137
|
+
} else {
|
|
2138
|
+
console.log(message);
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
var IDLE_DETECTION_CONFIG = {
|
|
2143
|
+
/** Events to listen for user activity */
|
|
2144
|
+
ACTIVITY_EVENTS: ["focus", "mousemove", "keydown", "scroll"],
|
|
2145
|
+
/**
|
|
2146
|
+
* Throttle event handler execution to reduce JS overhead (150ms).
|
|
2147
|
+
* Uses lodash.throttle with { leading: true, trailing: true } to ensure
|
|
2148
|
+
* immediate response on first activity (leading) and also capture the final
|
|
2149
|
+
* event in a burst (trailing), which is important for user experience.
|
|
2150
|
+
*/
|
|
2151
|
+
EVENT_THROTTLE_MS: 150
|
|
2152
|
+
};
|
|
2153
|
+
function useIdleDetection() {
|
|
2154
|
+
const { data: instanceInfo, isLoading, isError } = useRecceInstanceInfo();
|
|
2155
|
+
const idleTimeoutContext = useIdleTimeoutSafe();
|
|
2156
|
+
const isDisconnected = idleTimeoutContext?.isDisconnected ?? false;
|
|
2157
|
+
const idleTimeout = instanceInfo?.idle_timeout;
|
|
2158
|
+
const isEnabled = idleTimeout !== void 0 && idleTimeout > 0 && !isDisconnected;
|
|
2159
|
+
debugLog("[Idle Detection] Instance info", {
|
|
2160
|
+
isLoading,
|
|
2161
|
+
isError,
|
|
2162
|
+
hasIdleTimeout: idleTimeout !== void 0,
|
|
2163
|
+
idleTimeout: idleTimeout !== void 0 ? `${idleTimeout}s` : "not configured",
|
|
2164
|
+
isDisconnected,
|
|
2165
|
+
isEnabled
|
|
2166
|
+
});
|
|
2167
|
+
const sendKeepAliveNow = React12.useCallback(async () => {
|
|
2168
|
+
if (document.hidden) return;
|
|
2169
|
+
const sent = await sendKeepAlive();
|
|
2170
|
+
if (sent) {
|
|
2171
|
+
debugLog("[Idle Detection] Keep-alive sent successfully", {
|
|
2172
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
2173
|
+
});
|
|
2174
|
+
}
|
|
2175
|
+
}, []);
|
|
2176
|
+
const handleActivity = React12.useCallback(
|
|
2177
|
+
(event) => {
|
|
2178
|
+
if (isEnabled && !document.hidden) {
|
|
2179
|
+
debugLog("[Idle Detection] Activity detected", {
|
|
2180
|
+
event: event.type,
|
|
2181
|
+
tabActive: !document.hidden
|
|
2182
|
+
});
|
|
2183
|
+
void sendKeepAliveNow();
|
|
2184
|
+
}
|
|
2185
|
+
},
|
|
2186
|
+
[isEnabled, sendKeepAliveNow]
|
|
2187
|
+
);
|
|
2188
|
+
const handleVisibilityChange = React12.useCallback(() => {
|
|
2189
|
+
if (!isEnabled) return;
|
|
2190
|
+
if (!document.hidden) {
|
|
2191
|
+
debugLog("[Idle Detection] Tab became active", {
|
|
2192
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
2193
|
+
});
|
|
2194
|
+
void sendKeepAliveNow();
|
|
2195
|
+
}
|
|
2196
|
+
}, [isEnabled, sendKeepAliveNow]);
|
|
2197
|
+
const throttledHandler = React12.useMemo(
|
|
2198
|
+
() => throttle__default.default(handleActivity, IDLE_DETECTION_CONFIG.EVENT_THROTTLE_MS, {
|
|
2199
|
+
leading: true,
|
|
2200
|
+
trailing: true
|
|
2201
|
+
}),
|
|
2202
|
+
[handleActivity]
|
|
2203
|
+
);
|
|
2204
|
+
React12.useEffect(() => {
|
|
2205
|
+
if (!isEnabled) {
|
|
2206
|
+
debugLog("[Idle Detection] Disabled", {
|
|
2207
|
+
idleTimeout,
|
|
2208
|
+
reason: idleTimeout === void 0 ? "idle_timeout not configured on server" : idleTimeout === 0 ? "idle_timeout is 0" : "disconnected"
|
|
2209
|
+
});
|
|
2210
|
+
return;
|
|
2211
|
+
}
|
|
2212
|
+
debugLog("[Idle Detection] Initialized", {
|
|
2213
|
+
enabled: true,
|
|
2214
|
+
idleTimeout: `${idleTimeout}s`,
|
|
2215
|
+
eventThrottle: `${IDLE_DETECTION_CONFIG.EVENT_THROTTLE_MS}ms`,
|
|
2216
|
+
apiThrottle: "3s (axios layer)",
|
|
2217
|
+
monitoredEvents: IDLE_DETECTION_CONFIG.ACTIVITY_EVENTS.join(", ")
|
|
2218
|
+
});
|
|
2219
|
+
IDLE_DETECTION_CONFIG.ACTIVITY_EVENTS.forEach((eventType) => {
|
|
2220
|
+
window.addEventListener(eventType, throttledHandler, { passive: true });
|
|
2221
|
+
});
|
|
2222
|
+
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
2223
|
+
return () => {
|
|
2224
|
+
debugLog("[Idle Detection] Cleanup - removing event listeners");
|
|
2225
|
+
IDLE_DETECTION_CONFIG.ACTIVITY_EVENTS.forEach((eventType) => {
|
|
2226
|
+
window.removeEventListener(eventType, throttledHandler);
|
|
2227
|
+
});
|
|
2228
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
2229
|
+
throttledHandler.cancel();
|
|
2230
|
+
};
|
|
2231
|
+
}, [isEnabled, throttledHandler, handleVisibilityChange, idleTimeout]);
|
|
2232
|
+
}
|
|
2233
|
+
var IdleTimeoutContext = React12.createContext(
|
|
1778
2234
|
void 0
|
|
1779
2235
|
);
|
|
2236
|
+
function IdleTimeoutProvider({ children }) {
|
|
2237
|
+
const { data: instanceInfo } = useRecceInstanceInfo();
|
|
2238
|
+
const lastServerSyncRef = React12.useRef(Date.now());
|
|
2239
|
+
const [remainingSeconds, setRemainingSeconds] = React12.useState(null);
|
|
2240
|
+
const [isDisconnected, setIsDisconnected] = React12.useState(false);
|
|
2241
|
+
const idleTimeout = instanceInfo?.idle_timeout ?? null;
|
|
2242
|
+
const isEnabled = idleTimeout !== null && idleTimeout > 0;
|
|
2243
|
+
const isEnabledRef = React12.useRef(isEnabled);
|
|
2244
|
+
React12.useEffect(() => {
|
|
2245
|
+
isEnabledRef.current = isEnabled;
|
|
2246
|
+
}, [isEnabled]);
|
|
2247
|
+
React12.useEffect(() => {
|
|
2248
|
+
if (!isEnabled) {
|
|
2249
|
+
setKeepAliveCallback(null);
|
|
2250
|
+
return;
|
|
2251
|
+
}
|
|
2252
|
+
setKeepAliveCallback((timestamp) => {
|
|
2253
|
+
if (isEnabledRef.current) {
|
|
2254
|
+
lastServerSyncRef.current = timestamp;
|
|
2255
|
+
}
|
|
2256
|
+
});
|
|
2257
|
+
const currentTime = getLastKeepAliveTime();
|
|
2258
|
+
if (currentTime > 0) {
|
|
2259
|
+
lastServerSyncRef.current = currentTime;
|
|
2260
|
+
}
|
|
2261
|
+
return () => {
|
|
2262
|
+
setKeepAliveCallback(null);
|
|
2263
|
+
};
|
|
2264
|
+
}, [isEnabled]);
|
|
2265
|
+
const setDisconnected = React12.useCallback(() => {
|
|
2266
|
+
setIsDisconnected(true);
|
|
2267
|
+
}, []);
|
|
2268
|
+
const resetConnection = React12.useCallback(() => {
|
|
2269
|
+
setIsDisconnected(false);
|
|
2270
|
+
lastServerSyncRef.current = Date.now();
|
|
2271
|
+
}, []);
|
|
2272
|
+
React12.useEffect(() => {
|
|
2273
|
+
if (!isEnabled || idleTimeout === null) {
|
|
2274
|
+
setRemainingSeconds(null);
|
|
2275
|
+
return;
|
|
2276
|
+
}
|
|
2277
|
+
if (isDisconnected) {
|
|
2278
|
+
return;
|
|
2279
|
+
}
|
|
2280
|
+
const updateCountdown = () => {
|
|
2281
|
+
const now = Date.now();
|
|
2282
|
+
const elapsedSeconds = (now - lastServerSyncRef.current) / 1e3;
|
|
2283
|
+
const remaining = Math.max(0, idleTimeout - elapsedSeconds);
|
|
2284
|
+
setRemainingSeconds(remaining);
|
|
2285
|
+
};
|
|
2286
|
+
updateCountdown();
|
|
2287
|
+
const intervalId = setInterval(updateCountdown, 1e3);
|
|
2288
|
+
return () => {
|
|
2289
|
+
clearInterval(intervalId);
|
|
2290
|
+
};
|
|
2291
|
+
}, [isEnabled, idleTimeout, isDisconnected]);
|
|
2292
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2293
|
+
IdleTimeoutContext.Provider,
|
|
2294
|
+
{
|
|
2295
|
+
value: {
|
|
2296
|
+
remainingSeconds,
|
|
2297
|
+
idleTimeout,
|
|
2298
|
+
isEnabled,
|
|
2299
|
+
setDisconnected,
|
|
2300
|
+
resetConnection,
|
|
2301
|
+
isDisconnected
|
|
2302
|
+
},
|
|
2303
|
+
children: [
|
|
2304
|
+
/* @__PURE__ */ jsxRuntime.jsx(IdleDetector, {}),
|
|
2305
|
+
children
|
|
2306
|
+
]
|
|
2307
|
+
}
|
|
2308
|
+
);
|
|
2309
|
+
}
|
|
2310
|
+
function IdleDetector() {
|
|
2311
|
+
useIdleDetection();
|
|
2312
|
+
return null;
|
|
2313
|
+
}
|
|
2314
|
+
function useIdleTimeout() {
|
|
2315
|
+
const context = React12.useContext(IdleTimeoutContext);
|
|
2316
|
+
if (!context) {
|
|
2317
|
+
throw new Error("useIdleTimeout must be used within IdleTimeoutProvider");
|
|
2318
|
+
}
|
|
2319
|
+
return context;
|
|
2320
|
+
}
|
|
2321
|
+
function useIdleTimeoutSafe() {
|
|
2322
|
+
return React12.useContext(IdleTimeoutContext) ?? null;
|
|
2323
|
+
}
|
|
1780
2324
|
var useRecceServerFlag = () => {
|
|
1781
2325
|
return reactQuery.useQuery({
|
|
1782
2326
|
queryKey: cacheKeys.flag(),
|
|
@@ -1787,8 +2331,284 @@ var defaultLineageGraphsContext = {
|
|
|
1787
2331
|
isActionAvailable: () => true,
|
|
1788
2332
|
isDemoSite: false
|
|
1789
2333
|
};
|
|
1790
|
-
var LineageGraphContext =
|
|
1791
|
-
|
|
2334
|
+
var LineageGraphContext = React12.createContext(defaultLineageGraphsContext);
|
|
2335
|
+
function useLineageWatcher() {
|
|
2336
|
+
const [artifactsUpdatedToastId, setArtifactsUpdatedToastId] = React12.useState(void 0);
|
|
2337
|
+
const ref = React12.useRef({
|
|
2338
|
+
ws: void 0,
|
|
2339
|
+
status: "pending",
|
|
2340
|
+
artifactsUpdatedToastId: void 0
|
|
2341
|
+
});
|
|
2342
|
+
const [status, setStatus] = React12.useState("pending");
|
|
2343
|
+
const [envStatus, setEnvStatus] = React12.useState(void 0);
|
|
2344
|
+
React12.useEffect(() => {
|
|
2345
|
+
ref.current.status = status;
|
|
2346
|
+
}, [status]);
|
|
2347
|
+
React12.useEffect(() => {
|
|
2348
|
+
ref.current.artifactsUpdatedToastId = artifactsUpdatedToastId;
|
|
2349
|
+
}, [artifactsUpdatedToastId]);
|
|
2350
|
+
const queryClient = reactQuery.useQueryClient();
|
|
2351
|
+
const invalidateCaches = React12.useCallback(() => {
|
|
2352
|
+
void queryClient.invalidateQueries({ queryKey: cacheKeys.lineage() });
|
|
2353
|
+
void queryClient.invalidateQueries({ queryKey: cacheKeys.checks() });
|
|
2354
|
+
void queryClient.invalidateQueries({ queryKey: cacheKeys.runs() });
|
|
2355
|
+
}, [queryClient]);
|
|
2356
|
+
const connect = React12.useCallback(() => {
|
|
2357
|
+
function httpUrlToWebSocketUrl(url) {
|
|
2358
|
+
return url.replace(/(http)(s)?:\/\//, "ws$2://");
|
|
2359
|
+
}
|
|
2360
|
+
const ws = new WebSocket(`${httpUrlToWebSocketUrl(PUBLIC_API_URL)}/api/ws`);
|
|
2361
|
+
ref.current.ws = ws;
|
|
2362
|
+
ws.onopen = () => {
|
|
2363
|
+
ws.send("ping");
|
|
2364
|
+
};
|
|
2365
|
+
ws.onmessage = (event) => {
|
|
2366
|
+
if (event.data === "pong") {
|
|
2367
|
+
if (ref.current.status === "disconnected") {
|
|
2368
|
+
invalidateCaches();
|
|
2369
|
+
}
|
|
2370
|
+
setStatus("connected");
|
|
2371
|
+
return;
|
|
2372
|
+
}
|
|
2373
|
+
try {
|
|
2374
|
+
const data = JSON.parse(event.data);
|
|
2375
|
+
if (data.command === "refresh") {
|
|
2376
|
+
const { eventType, srcPath } = data.event;
|
|
2377
|
+
const [targetName, fileName] = srcPath.split("/").slice(-2);
|
|
2378
|
+
const name = path__default.default.parse(fileName).name;
|
|
2379
|
+
const eventId = `${targetName}-${name}-${eventType}`;
|
|
2380
|
+
if (ref.current.artifactsUpdatedToastId == null) {
|
|
2381
|
+
setArtifactsUpdatedToastId(
|
|
2382
|
+
toaster.create({
|
|
2383
|
+
id: eventId,
|
|
2384
|
+
description: `Detected ${targetName} ${name} ${eventType}`,
|
|
2385
|
+
type: "info",
|
|
2386
|
+
duration: 5e3,
|
|
2387
|
+
closable: true
|
|
2388
|
+
})
|
|
2389
|
+
);
|
|
2390
|
+
}
|
|
2391
|
+
invalidateCaches();
|
|
2392
|
+
} else if (data.command === "relaunch") {
|
|
2393
|
+
setEnvStatus("relaunch");
|
|
2394
|
+
} else {
|
|
2395
|
+
const { id, title, description, status: status2, duration } = data.event;
|
|
2396
|
+
setArtifactsUpdatedToastId(
|
|
2397
|
+
toaster.create({
|
|
2398
|
+
id: id || "broadcast",
|
|
2399
|
+
title,
|
|
2400
|
+
description,
|
|
2401
|
+
type: status2 ?? "info",
|
|
2402
|
+
duration: duration ?? 5e3,
|
|
2403
|
+
closable: true
|
|
2404
|
+
})
|
|
2405
|
+
);
|
|
2406
|
+
}
|
|
2407
|
+
} catch (err) {
|
|
2408
|
+
console.error(err);
|
|
2409
|
+
}
|
|
2410
|
+
};
|
|
2411
|
+
ws.onerror = (err) => {
|
|
2412
|
+
console.error("An error occurred during Handling WebSockets", err);
|
|
2413
|
+
};
|
|
2414
|
+
ws.onclose = () => {
|
|
2415
|
+
setStatus((status2) => {
|
|
2416
|
+
if (status2 === "connected") {
|
|
2417
|
+
return "disconnected";
|
|
2418
|
+
}
|
|
2419
|
+
return status2;
|
|
2420
|
+
});
|
|
2421
|
+
ref.current.ws = void 0;
|
|
2422
|
+
};
|
|
2423
|
+
}, [invalidateCaches]);
|
|
2424
|
+
React12.useEffect(() => {
|
|
2425
|
+
const refObj = ref.current;
|
|
2426
|
+
connect();
|
|
2427
|
+
return () => {
|
|
2428
|
+
if (refObj.ws) {
|
|
2429
|
+
refObj.ws.close();
|
|
2430
|
+
}
|
|
2431
|
+
};
|
|
2432
|
+
}, [connect]);
|
|
2433
|
+
return {
|
|
2434
|
+
connectionStatus: status,
|
|
2435
|
+
connect,
|
|
2436
|
+
envStatus
|
|
2437
|
+
};
|
|
2438
|
+
}
|
|
2439
|
+
function LineageGraphContextProvider({ children }) {
|
|
2440
|
+
const {
|
|
2441
|
+
idleTimeout,
|
|
2442
|
+
remainingSeconds,
|
|
2443
|
+
isEnabled,
|
|
2444
|
+
setDisconnected,
|
|
2445
|
+
resetConnection
|
|
2446
|
+
} = useIdleTimeout();
|
|
2447
|
+
const queryServerInfo = reactQuery.useQuery({
|
|
2448
|
+
queryKey: cacheKeys.lineage(),
|
|
2449
|
+
queryFn: getServerInfo
|
|
2450
|
+
});
|
|
2451
|
+
const queryRunAggregated = reactQuery.useQuery({
|
|
2452
|
+
queryKey: cacheKeys.runsAggregated(),
|
|
2453
|
+
queryFn: aggregateRuns
|
|
2454
|
+
});
|
|
2455
|
+
const lineageGraph = React12.useMemo(() => {
|
|
2456
|
+
const lineage2 = queryServerInfo.data?.lineage;
|
|
2457
|
+
if (!lineage2?.base) {
|
|
2458
|
+
return void 0;
|
|
2459
|
+
}
|
|
2460
|
+
return buildLineageGraph(lineage2.base, lineage2.current, lineage2.diff);
|
|
2461
|
+
}, [queryServerInfo.data]);
|
|
2462
|
+
const errorMessage = queryServerInfo.error?.message;
|
|
2463
|
+
const {
|
|
2464
|
+
state_metadata: stateMetadata2,
|
|
2465
|
+
lineage,
|
|
2466
|
+
sqlmesh,
|
|
2467
|
+
demo: isDemoSite,
|
|
2468
|
+
codespace: isCodespace,
|
|
2469
|
+
review_mode: reviewMode,
|
|
2470
|
+
cloud_mode: cloudMode,
|
|
2471
|
+
file_mode: fileMode,
|
|
2472
|
+
filename: fileName,
|
|
2473
|
+
adapter_type: adapterType,
|
|
2474
|
+
git,
|
|
2475
|
+
pull_request: pullRequest,
|
|
2476
|
+
support_tasks: supportTasks
|
|
2477
|
+
} = queryServerInfo.data ?? {
|
|
2478
|
+
demo: false
|
|
2479
|
+
};
|
|
2480
|
+
const dbtBase = lineage?.base.manifest_metadata;
|
|
2481
|
+
const dbtCurrent = lineage?.current.manifest_metadata;
|
|
2482
|
+
const envInfo = {
|
|
2483
|
+
stateMetadata: stateMetadata2,
|
|
2484
|
+
adapterType,
|
|
2485
|
+
git,
|
|
2486
|
+
pullRequest,
|
|
2487
|
+
dbt: {
|
|
2488
|
+
base: dbtBase,
|
|
2489
|
+
current: dbtCurrent
|
|
2490
|
+
},
|
|
2491
|
+
sqlmesh
|
|
2492
|
+
};
|
|
2493
|
+
const { connectionStatus, connect, envStatus } = useLineageWatcher();
|
|
2494
|
+
React12.useEffect(() => {
|
|
2495
|
+
if (connectionStatus === "disconnected") {
|
|
2496
|
+
setDisconnected();
|
|
2497
|
+
} else if (connectionStatus === "connected") {
|
|
2498
|
+
resetConnection();
|
|
2499
|
+
}
|
|
2500
|
+
}, [connectionStatus, setDisconnected, resetConnection]);
|
|
2501
|
+
const { data: flags, isLoading } = useRecceServerFlag();
|
|
2502
|
+
const { featureToggles, shareUrl } = useRecceInstanceContext();
|
|
2503
|
+
const [relaunchHintOpen, setRelaunchHintOpen] = React12.useState(false);
|
|
2504
|
+
const [prevRelaunchCondition, setPrevRelaunchCondition] = React12.useState(false);
|
|
2505
|
+
const queryClient = reactQuery.useQueryClient();
|
|
2506
|
+
const isActionAvailable = React12.useCallback(
|
|
2507
|
+
(name) => {
|
|
2508
|
+
if (supportTasks) {
|
|
2509
|
+
return supportTasks[name] ?? true;
|
|
2510
|
+
}
|
|
2511
|
+
return true;
|
|
2512
|
+
},
|
|
2513
|
+
[supportTasks]
|
|
2514
|
+
);
|
|
2515
|
+
const shouldShowRelaunch = !isLoading && envStatus === "relaunch" && flags?.single_env_onboarding === true && flags.show_relaunch_hint;
|
|
2516
|
+
if (shouldShowRelaunch !== prevRelaunchCondition) {
|
|
2517
|
+
setPrevRelaunchCondition(shouldShowRelaunch);
|
|
2518
|
+
setRelaunchHintOpen(shouldShowRelaunch);
|
|
2519
|
+
}
|
|
2520
|
+
React12.useEffect(() => {
|
|
2521
|
+
if (shouldShowRelaunch && relaunchHintOpen) {
|
|
2522
|
+
trackSingleEnvironment({ action: "target_base_added" });
|
|
2523
|
+
}
|
|
2524
|
+
}, [shouldShowRelaunch, relaunchHintOpen]);
|
|
2525
|
+
const handleRelaunchClose = () => {
|
|
2526
|
+
setRelaunchHintOpen(false);
|
|
2527
|
+
void markRelaunchHintCompleted();
|
|
2528
|
+
void queryClient.invalidateQueries({ queryKey: cacheKeys.flag() });
|
|
2529
|
+
};
|
|
2530
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2531
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2532
|
+
LineageGraphContext.Provider,
|
|
2533
|
+
{
|
|
2534
|
+
value: {
|
|
2535
|
+
lineageGraph,
|
|
2536
|
+
retchLineageGraph: () => {
|
|
2537
|
+
void queryRunAggregated.refetch();
|
|
2538
|
+
},
|
|
2539
|
+
envInfo,
|
|
2540
|
+
reviewMode,
|
|
2541
|
+
cloudMode,
|
|
2542
|
+
fileMode,
|
|
2543
|
+
fileName,
|
|
2544
|
+
isDemoSite,
|
|
2545
|
+
isCodespace,
|
|
2546
|
+
error: errorMessage,
|
|
2547
|
+
supportTasks,
|
|
2548
|
+
isActionAvailable,
|
|
2549
|
+
isLoading: queryServerInfo.isLoading,
|
|
2550
|
+
runsAggregated: queryRunAggregated.data,
|
|
2551
|
+
refetchRunsAggregated: () => {
|
|
2552
|
+
void queryRunAggregated.refetch();
|
|
2553
|
+
}
|
|
2554
|
+
},
|
|
2555
|
+
children
|
|
2556
|
+
}
|
|
2557
|
+
),
|
|
2558
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2559
|
+
MuiDialog__default.default,
|
|
2560
|
+
{
|
|
2561
|
+
open: connectionStatus === "disconnected",
|
|
2562
|
+
onClose: () => void 0,
|
|
2563
|
+
children: shareUrl && featureToggles.mode !== null ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2564
|
+
RecceInstanceDisconnectedModalContent,
|
|
2565
|
+
{
|
|
2566
|
+
shareUrl,
|
|
2567
|
+
mode: featureToggles.mode
|
|
2568
|
+
}
|
|
2569
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2570
|
+
ServerDisconnectedModalContent,
|
|
2571
|
+
{
|
|
2572
|
+
connect,
|
|
2573
|
+
idleSeconds: (
|
|
2574
|
+
// Only show idle time if disconnected due to idle timeout
|
|
2575
|
+
// (idle timeout enabled AND remaining time was near zero)
|
|
2576
|
+
isEnabled && idleTimeout !== null && remainingSeconds !== null && remainingSeconds <= 5 ? idleTimeout - Math.max(0, remainingSeconds) : void 0
|
|
2577
|
+
)
|
|
2578
|
+
}
|
|
2579
|
+
)
|
|
2580
|
+
}
|
|
2581
|
+
),
|
|
2582
|
+
flags?.single_env_onboarding && /* @__PURE__ */ jsxRuntime.jsxs(MuiDialog__default.default, { open: relaunchHintOpen, onClose: handleRelaunchClose, children: [
|
|
2583
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle__default.default, { children: "Target-base Added" }),
|
|
2584
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2585
|
+
IconButton2__default.default,
|
|
2586
|
+
{
|
|
2587
|
+
"aria-label": "close",
|
|
2588
|
+
onClick: handleRelaunchClose,
|
|
2589
|
+
sx: {
|
|
2590
|
+
position: "absolute",
|
|
2591
|
+
right: 8,
|
|
2592
|
+
top: 8,
|
|
2593
|
+
color: "grey.500"
|
|
2594
|
+
},
|
|
2595
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(io5.IoClose, {})
|
|
2596
|
+
}
|
|
2597
|
+
),
|
|
2598
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogContent__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { children: "Please restart the Recce server." }) }),
|
|
2599
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogActions__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2600
|
+
Button10__default.default,
|
|
2601
|
+
{
|
|
2602
|
+
color: "iochmara",
|
|
2603
|
+
variant: "contained",
|
|
2604
|
+
onClick: handleRelaunchClose,
|
|
2605
|
+
children: "Got it!"
|
|
2606
|
+
}
|
|
2607
|
+
) })
|
|
2608
|
+
] })
|
|
2609
|
+
] });
|
|
2610
|
+
}
|
|
2611
|
+
var useLineageGraphContext = () => React12.useContext(LineageGraphContext);
|
|
1792
2612
|
var useRunsAggregated = () => {
|
|
1793
2613
|
const { runsAggregated, refetchRunsAggregated } = useLineageGraphContext();
|
|
1794
2614
|
return [runsAggregated, refetchRunsAggregated];
|
|
@@ -1958,13 +2778,13 @@ var RunModal = ({
|
|
|
1958
2778
|
params: defaultParams,
|
|
1959
2779
|
RunForm
|
|
1960
2780
|
}) => {
|
|
1961
|
-
const [params, setParams] =
|
|
2781
|
+
const [params, setParams] = React12.useState(
|
|
1962
2782
|
defaultParams ?? {}
|
|
1963
2783
|
);
|
|
1964
|
-
const [anchorEl, setAnchorEl] =
|
|
1965
|
-
const [isReadyToExecute, setIsReadyToExecute] =
|
|
2784
|
+
const [anchorEl, setAnchorEl] = React12.useState(null);
|
|
2785
|
+
const [isReadyToExecute, setIsReadyToExecute] = React12.useState(false);
|
|
1966
2786
|
const documentationUrl = getDocumentationUrl(type);
|
|
1967
|
-
const executeClicked =
|
|
2787
|
+
const executeClicked = React12.useRef(false);
|
|
1968
2788
|
const handleClose = () => {
|
|
1969
2789
|
if (!executeClicked.current && isExploreAction(type)) {
|
|
1970
2790
|
trackExploreActionForm({
|
|
@@ -1976,7 +2796,7 @@ var RunModal = ({
|
|
|
1976
2796
|
onClose();
|
|
1977
2797
|
};
|
|
1978
2798
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1979
|
-
|
|
2799
|
+
MuiDialog__default.default,
|
|
1980
2800
|
{
|
|
1981
2801
|
open: isOpen,
|
|
1982
2802
|
onClose: handleClose,
|
|
@@ -1987,7 +2807,7 @@ var RunModal = ({
|
|
|
1987
2807
|
paper: { sx: { height: "75%", minHeight: "400px" } }
|
|
1988
2808
|
},
|
|
1989
2809
|
children: [
|
|
1990
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2810
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogTitle__default.default, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
1991
2811
|
title,
|
|
1992
2812
|
" ",
|
|
1993
2813
|
documentationUrl && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -2061,7 +2881,7 @@ var RunModal = ({
|
|
|
2061
2881
|
}
|
|
2062
2882
|
),
|
|
2063
2883
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2064
|
-
|
|
2884
|
+
DialogContent__default.default,
|
|
2065
2885
|
{
|
|
2066
2886
|
sx: {
|
|
2067
2887
|
p: 0,
|
|
@@ -2079,7 +2899,7 @@ var RunModal = ({
|
|
|
2079
2899
|
) })
|
|
2080
2900
|
}
|
|
2081
2901
|
),
|
|
2082
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2902
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogActions__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx(Stack24__default.default, { direction: "row", spacing: "10px", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2083
2903
|
Button10__default.default,
|
|
2084
2904
|
{
|
|
2085
2905
|
disabled: !isReadyToExecute,
|
|
@@ -2131,17 +2951,17 @@ var useModelColumns = (model) => {
|
|
|
2131
2951
|
name: model
|
|
2132
2952
|
}
|
|
2133
2953
|
});
|
|
2134
|
-
const nodeColumns =
|
|
2954
|
+
const nodeColumns = React12.useMemo(() => {
|
|
2135
2955
|
return node ? extractColumns(node) : [];
|
|
2136
2956
|
}, [node]);
|
|
2137
|
-
const [columns, setColumns] =
|
|
2138
|
-
const [primaryKey, setPrimaryKey] =
|
|
2139
|
-
const [isLoading, setIsLoading] =
|
|
2140
|
-
const [error, setError] =
|
|
2141
|
-
const [prevNodeColumns, setPrevNodeColumns] =
|
|
2142
|
-
const [prevNodeId, setPrevNodeId] =
|
|
2957
|
+
const [columns, setColumns] = React12.useState([]);
|
|
2958
|
+
const [primaryKey, setPrimaryKey] = React12.useState();
|
|
2959
|
+
const [isLoading, setIsLoading] = React12.useState(true);
|
|
2960
|
+
const [error, setError] = React12.useState(null);
|
|
2961
|
+
const [prevNodeColumns, setPrevNodeColumns] = React12.useState([]);
|
|
2962
|
+
const [prevNodeId, setPrevNodeId] = React12.useState(node?.id);
|
|
2143
2963
|
const nodePrimaryKey = node ? node.data.data.current?.primary_key : void 0;
|
|
2144
|
-
const fetchData =
|
|
2964
|
+
const fetchData = React12.useCallback(async () => {
|
|
2145
2965
|
if (!node) {
|
|
2146
2966
|
return;
|
|
2147
2967
|
}
|
|
@@ -2172,7 +2992,7 @@ var useModelColumns = (model) => {
|
|
|
2172
2992
|
setIsLoading(false);
|
|
2173
2993
|
}
|
|
2174
2994
|
}
|
|
2175
|
-
|
|
2995
|
+
React12.useEffect(() => {
|
|
2176
2996
|
if (nodeColumns.length === 0 && node?.id !== void 0) {
|
|
2177
2997
|
fetchData().catch((e) => {
|
|
2178
2998
|
console.error(e);
|
|
@@ -2556,7 +3376,7 @@ function formatDisplayedBinItem(binEdges, currentIndex) {
|
|
|
2556
3376
|
const formattedEnd = formatAsAbbreviatedNumber(endEdge);
|
|
2557
3377
|
return `${formattedStart} - ${formattedEnd}`;
|
|
2558
3378
|
}
|
|
2559
|
-
var ScreenshotBox =
|
|
3379
|
+
var ScreenshotBox = React12.forwardRef(
|
|
2560
3380
|
({
|
|
2561
3381
|
backgroundColor = "white",
|
|
2562
3382
|
blockSize,
|
|
@@ -2616,18 +3436,18 @@ function _HistogramDiffResultView({ run }, ref) {
|
|
|
2616
3436
|
/* @__PURE__ */ jsxRuntime.jsx(Box34__default.default, { sx: { flex: 1 } })
|
|
2617
3437
|
] }) }) });
|
|
2618
3438
|
}
|
|
2619
|
-
var HistogramDiffResultView =
|
|
3439
|
+
var HistogramDiffResultView = React12.forwardRef(_HistogramDiffResultView);
|
|
2620
3440
|
function ProfileDiffForm({
|
|
2621
3441
|
params,
|
|
2622
3442
|
onParamsChanged,
|
|
2623
3443
|
setIsReadyToExecute
|
|
2624
3444
|
}) {
|
|
2625
|
-
const [allColumns, setAllColumns] =
|
|
3445
|
+
const [allColumns, setAllColumns] = React12.useState(
|
|
2626
3446
|
!params.columns || params.columns.length === 0
|
|
2627
3447
|
);
|
|
2628
3448
|
const model = params.model;
|
|
2629
3449
|
const { columns, isLoading, error } = useModelColumns_default(params.model);
|
|
2630
|
-
|
|
3450
|
+
React12.useEffect(() => {
|
|
2631
3451
|
setIsReadyToExecute(!!model);
|
|
2632
3452
|
}, [model, setIsReadyToExecute]);
|
|
2633
3453
|
const columnNames = columns.map((c) => c.name);
|
|
@@ -2897,7 +3717,7 @@ function DataFrameColumnGroupHeader({
|
|
|
2897
3717
|
onPinnedColumnsChange,
|
|
2898
3718
|
onColumnsRenderModeChanged
|
|
2899
3719
|
}) {
|
|
2900
|
-
const [anchorEl, setAnchorEl] =
|
|
3720
|
+
const [anchorEl, setAnchorEl] = React12.useState(null);
|
|
2901
3721
|
const menuOpen = Boolean(anchorEl);
|
|
2902
3722
|
const handleMenuClick = (event) => {
|
|
2903
3723
|
setAnchorEl(event.currentTarget);
|
|
@@ -3020,7 +3840,7 @@ function DataFrameColumnHeader({
|
|
|
3020
3840
|
columnType,
|
|
3021
3841
|
onColumnsRenderModeChanged
|
|
3022
3842
|
}) {
|
|
3023
|
-
const [anchorEl, setAnchorEl] =
|
|
3843
|
+
const [anchorEl, setAnchorEl] = React12.useState(null);
|
|
3024
3844
|
const menuOpen = Boolean(anchorEl);
|
|
3025
3845
|
const handleMenuClick = (event) => {
|
|
3026
3846
|
setAnchorEl(event.currentTarget);
|
|
@@ -3367,7 +4187,7 @@ var DiffText = ({
|
|
|
3367
4187
|
noCopy,
|
|
3368
4188
|
fontSize
|
|
3369
4189
|
}) => {
|
|
3370
|
-
const [isHovered, setIsHovered] =
|
|
4190
|
+
const [isHovered, setIsHovered] = React12.useState(false);
|
|
3371
4191
|
const textColor = colors[colorPalette][800];
|
|
3372
4192
|
const bgColor = colors[colorPalette][100];
|
|
3373
4193
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4419,9 +5239,9 @@ function toRowCountDiffDataGrid(result) {
|
|
|
4419
5239
|
];
|
|
4420
5240
|
return { columns, rows };
|
|
4421
5241
|
}
|
|
4422
|
-
var LineageViewContext =
|
|
5242
|
+
var LineageViewContext = React12.createContext(void 0);
|
|
4423
5243
|
var useLineageViewContextSafe = () => {
|
|
4424
|
-
const context =
|
|
5244
|
+
const context = React12.useContext(LineageViewContext);
|
|
4425
5245
|
if (!context) {
|
|
4426
5246
|
throw new Error(
|
|
4427
5247
|
"useLineageViewContext must be used within a LineageViewProvider"
|
|
@@ -4430,7 +5250,7 @@ var useLineageViewContextSafe = () => {
|
|
|
4430
5250
|
return context;
|
|
4431
5251
|
};
|
|
4432
5252
|
var useLineageViewContext = () => {
|
|
4433
|
-
return
|
|
5253
|
+
return React12.useContext(LineageViewContext);
|
|
4434
5254
|
};
|
|
4435
5255
|
function ColumnNameCell({
|
|
4436
5256
|
model,
|
|
@@ -4444,7 +5264,7 @@ function ColumnNameCell({
|
|
|
4444
5264
|
const { featureToggles } = useRecceInstanceContext();
|
|
4445
5265
|
const { name, baseType, currentType, baseIndex, currentIndex } = row;
|
|
4446
5266
|
const columnType = currentType ?? baseType;
|
|
4447
|
-
const [anchorEl, setAnchorEl] =
|
|
5267
|
+
const [anchorEl, setAnchorEl] = React12.useState(null);
|
|
4448
5268
|
const menuOpen = Boolean(anchorEl);
|
|
4449
5269
|
const handleMenuClick = (event) => {
|
|
4450
5270
|
event.stopPropagation();
|
|
@@ -4643,7 +5463,7 @@ function renderIndexCell(params) {
|
|
|
4643
5463
|
const value = isRemoved ? baseIndex !== void 0 ? baseIndex : "-" : currentIndex !== void 0 ? currentIndex : "-";
|
|
4644
5464
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: value });
|
|
4645
5465
|
}
|
|
4646
|
-
var MemoizedRenderIndexCell =
|
|
5466
|
+
var MemoizedRenderIndexCell = React12__default.default.memo(renderIndexCell);
|
|
4647
5467
|
MemoizedRenderIndexCell.displayName = "MemoizedRenderIndexCell";
|
|
4648
5468
|
function renderTypeCell(params) {
|
|
4649
5469
|
if (!params.data) {
|
|
@@ -4676,7 +5496,7 @@ function renderTypeCell(params) {
|
|
|
4676
5496
|
}
|
|
4677
5497
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: isRemoved ? baseType : currentType });
|
|
4678
5498
|
}
|
|
4679
|
-
var MemoizedRenderTypeCell =
|
|
5499
|
+
var MemoizedRenderTypeCell = React12__default.default.memo(renderTypeCell);
|
|
4680
5500
|
MemoizedRenderTypeCell.displayName = "MemoizedRenderTypeCell";
|
|
4681
5501
|
|
|
4682
5502
|
// recce-source/js/src/lib/dataGrid/generators/toSchemaDataGrid.ts
|
|
@@ -4809,7 +5629,7 @@ function ValueDiffColumnNameCell({
|
|
|
4809
5629
|
}) {
|
|
4810
5630
|
const { runAction } = useRecceActionContext();
|
|
4811
5631
|
const { featureToggles } = useRecceInstanceContext();
|
|
4812
|
-
const [anchorEl, setAnchorEl] =
|
|
5632
|
+
const [anchorEl, setAnchorEl] = React12.useState(null);
|
|
4813
5633
|
const menuOpen = Boolean(anchorEl);
|
|
4814
5634
|
const handleMenuClick = (event) => {
|
|
4815
5635
|
setAnchorEl(event.currentTarget);
|
|
@@ -5281,9 +6101,9 @@ function _ScreenshotDataGrid({
|
|
|
5281
6101
|
renderers,
|
|
5282
6102
|
...props
|
|
5283
6103
|
}, ref) {
|
|
5284
|
-
const containerRef =
|
|
5285
|
-
const gridApiRef =
|
|
5286
|
-
|
|
6104
|
+
const containerRef = React12.useRef(null);
|
|
6105
|
+
const gridApiRef = React12.useRef(null);
|
|
6106
|
+
React12.useImperativeHandle(
|
|
5287
6107
|
ref,
|
|
5288
6108
|
() => ({
|
|
5289
6109
|
api: gridApiRef.current,
|
|
@@ -5291,11 +6111,11 @@ function _ScreenshotDataGrid({
|
|
|
5291
6111
|
}),
|
|
5292
6112
|
[]
|
|
5293
6113
|
);
|
|
5294
|
-
const theme =
|
|
6114
|
+
const theme = React12.useMemo(() => recceGridThemeLight, []);
|
|
5295
6115
|
const resolvedColumnDefs = columnDefs ?? columns;
|
|
5296
6116
|
const resolvedRowData = rowData ?? rows;
|
|
5297
6117
|
const resolvedDefaultColDef = defaultColDef ?? defaultColumnOptions;
|
|
5298
|
-
const mergedDefaultColDef =
|
|
6118
|
+
const mergedDefaultColDef = React12.useMemo(
|
|
5299
6119
|
() => ({
|
|
5300
6120
|
resizable: true,
|
|
5301
6121
|
suppressMovable: true,
|
|
@@ -5303,11 +6123,11 @@ function _ScreenshotDataGrid({
|
|
|
5303
6123
|
}),
|
|
5304
6124
|
[resolvedDefaultColDef]
|
|
5305
6125
|
);
|
|
5306
|
-
const noRowsOverlayComponent =
|
|
6126
|
+
const noRowsOverlayComponent = React12.useMemo(() => {
|
|
5307
6127
|
if (!renderers?.noRowsFallback) return void 0;
|
|
5308
6128
|
return () => renderers.noRowsFallback;
|
|
5309
6129
|
}, [renderers?.noRowsFallback]);
|
|
5310
|
-
const resolvedGetRowId =
|
|
6130
|
+
const resolvedGetRowId = React12.useMemo(() => {
|
|
5311
6131
|
if (getRowId) return getRowId;
|
|
5312
6132
|
return (params) => {
|
|
5313
6133
|
const data = params.data;
|
|
@@ -5318,7 +6138,7 @@ function _ScreenshotDataGrid({
|
|
|
5318
6138
|
return String(index ?? Math.random());
|
|
5319
6139
|
};
|
|
5320
6140
|
}, [getRowId]);
|
|
5321
|
-
const gridKey =
|
|
6141
|
+
const gridKey = React12.useMemo(() => {
|
|
5322
6142
|
if (!resolvedColumnDefs) return "grid";
|
|
5323
6143
|
const pinnedFields = resolvedColumnDefs.filter(
|
|
5324
6144
|
(col) => "field" in col && col.pinned === "left"
|
|
@@ -5410,7 +6230,7 @@ function _ScreenshotDataGrid({
|
|
|
5410
6230
|
}
|
|
5411
6231
|
);
|
|
5412
6232
|
}
|
|
5413
|
-
var ScreenshotDataGrid =
|
|
6233
|
+
var ScreenshotDataGrid = React12.forwardRef(_ScreenshotDataGrid);
|
|
5414
6234
|
var ToggleSwitch = ({
|
|
5415
6235
|
value,
|
|
5416
6236
|
onChange,
|
|
@@ -5529,15 +6349,15 @@ var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged },
|
|
|
5529
6349
|
if (!isProfileDiffRun(run)) {
|
|
5530
6350
|
throw new Error("Only run type profile_diff is supported");
|
|
5531
6351
|
}
|
|
5532
|
-
const pinnedColumns =
|
|
6352
|
+
const pinnedColumns = React12.useMemo(
|
|
5533
6353
|
() => viewOptions?.pinned_columns ?? [],
|
|
5534
6354
|
[viewOptions]
|
|
5535
6355
|
);
|
|
5536
|
-
const displayMode =
|
|
6356
|
+
const displayMode = React12.useMemo(
|
|
5537
6357
|
() => viewOptions?.display_mode ?? "inline",
|
|
5538
6358
|
[viewOptions]
|
|
5539
6359
|
);
|
|
5540
|
-
const columnsRenderMode =
|
|
6360
|
+
const columnsRenderMode = React12.useMemo(
|
|
5541
6361
|
() => ({
|
|
5542
6362
|
distinct_proportion: "percent",
|
|
5543
6363
|
not_null_proportion: "percent",
|
|
@@ -5545,7 +6365,7 @@ var PrivateProfileDiffResultView = ({ run, viewOptions, onViewOptionsChanged },
|
|
|
5545
6365
|
}),
|
|
5546
6366
|
[viewOptions]
|
|
5547
6367
|
);
|
|
5548
|
-
const gridData =
|
|
6368
|
+
const gridData = React12.useMemo(() => {
|
|
5549
6369
|
const onColumnsRenderModeChanged = (cols) => {
|
|
5550
6370
|
const newRenderModes = {
|
|
5551
6371
|
...viewOptions?.columnsRenderMode ?? {},
|
|
@@ -5638,11 +6458,11 @@ var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref)
|
|
|
5638
6458
|
if (!isProfileRun(run)) {
|
|
5639
6459
|
throw new Error("Only run type profile_diff is supported");
|
|
5640
6460
|
}
|
|
5641
|
-
const pinnedColumns =
|
|
6461
|
+
const pinnedColumns = React12.useMemo(
|
|
5642
6462
|
() => viewOptions?.pinned_columns ?? [],
|
|
5643
6463
|
[viewOptions]
|
|
5644
6464
|
);
|
|
5645
|
-
const columnsRenderMode =
|
|
6465
|
+
const columnsRenderMode = React12.useMemo(
|
|
5646
6466
|
() => ({
|
|
5647
6467
|
distinct_proportion: "percent",
|
|
5648
6468
|
not_null_proportion: "percent",
|
|
@@ -5650,7 +6470,7 @@ var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref)
|
|
|
5650
6470
|
}),
|
|
5651
6471
|
[viewOptions]
|
|
5652
6472
|
);
|
|
5653
|
-
const gridData =
|
|
6473
|
+
const gridData = React12.useMemo(() => {
|
|
5654
6474
|
const onColumnsRenderModeChanged = (cols) => {
|
|
5655
6475
|
const newRenderModes = {
|
|
5656
6476
|
...viewOptions?.columnsRenderMode ?? {},
|
|
@@ -5721,8 +6541,8 @@ var PrivateProfileResultView = ({ run, viewOptions, onViewOptionsChanged }, ref)
|
|
|
5721
6541
|
}
|
|
5722
6542
|
);
|
|
5723
6543
|
};
|
|
5724
|
-
var ProfileDiffResultView =
|
|
5725
|
-
var ProfileResultView =
|
|
6544
|
+
var ProfileDiffResultView = React12.forwardRef(PrivateProfileDiffResultView);
|
|
6545
|
+
var ProfileResultView = React12.forwardRef(PrivateProfileResultView);
|
|
5726
6546
|
var ChangedOnlyCheckbox = ({
|
|
5727
6547
|
changedOnly,
|
|
5728
6548
|
onChange
|
|
@@ -5755,30 +6575,30 @@ var PrivateQueryDiffResultView = ({
|
|
|
5755
6575
|
baseTitle,
|
|
5756
6576
|
currentTitle
|
|
5757
6577
|
}, ref) => {
|
|
5758
|
-
const primaryKeys =
|
|
6578
|
+
const primaryKeys = React12.useMemo(
|
|
5759
6579
|
() => viewOptions?.primary_keys ?? [],
|
|
5760
6580
|
[viewOptions]
|
|
5761
6581
|
);
|
|
5762
|
-
const changedOnly =
|
|
6582
|
+
const changedOnly = React12.useMemo(
|
|
5763
6583
|
() => viewOptions?.changed_only ?? false,
|
|
5764
6584
|
[viewOptions]
|
|
5765
6585
|
);
|
|
5766
|
-
const pinnedColumns =
|
|
6586
|
+
const pinnedColumns = React12.useMemo(
|
|
5767
6587
|
() => viewOptions?.pinned_columns ?? [],
|
|
5768
6588
|
[viewOptions]
|
|
5769
6589
|
);
|
|
5770
|
-
const displayMode =
|
|
6590
|
+
const displayMode = React12.useMemo(
|
|
5771
6591
|
() => viewOptions?.display_mode ?? "inline",
|
|
5772
6592
|
[viewOptions]
|
|
5773
6593
|
);
|
|
5774
|
-
const columnsRenderMode =
|
|
6594
|
+
const columnsRenderMode = React12.useMemo(
|
|
5775
6595
|
() => viewOptions?.columnsRenderMode ?? {},
|
|
5776
6596
|
[viewOptions]
|
|
5777
6597
|
);
|
|
5778
6598
|
if (run.type !== "query_diff") {
|
|
5779
6599
|
throw new Error("QueryDiffResult view should be rendered as query_diff");
|
|
5780
6600
|
}
|
|
5781
|
-
const gridData =
|
|
6601
|
+
const gridData = React12.useMemo(() => {
|
|
5782
6602
|
const onColumnsRenderModeChanged = (cols) => {
|
|
5783
6603
|
const newRenderModes = {
|
|
5784
6604
|
...viewOptions?.columnsRenderMode ?? {},
|
|
@@ -5830,7 +6650,7 @@ var PrivateQueryDiffResultView = ({
|
|
|
5830
6650
|
currentTitle,
|
|
5831
6651
|
columnsRenderMode
|
|
5832
6652
|
]);
|
|
5833
|
-
const warningPKey =
|
|
6653
|
+
const warningPKey = React12.useMemo(() => {
|
|
5834
6654
|
const pkName = primaryKeys.join(", ");
|
|
5835
6655
|
if (gridData.invalidPKeyBase && gridData.invalidPKeyCurrent) {
|
|
5836
6656
|
return `Warning: The primary key '${pkName}' is not unique in the base and current environments`;
|
|
@@ -5945,23 +6765,23 @@ var PrivateQueryDiffJoinResultView = ({
|
|
|
5945
6765
|
if (run.type !== "query_diff") {
|
|
5946
6766
|
throw new Error("QueryDiffResult view should be rendered as query_diff");
|
|
5947
6767
|
}
|
|
5948
|
-
const changedOnly =
|
|
6768
|
+
const changedOnly = React12.useMemo(
|
|
5949
6769
|
() => viewOptions?.changed_only ?? false,
|
|
5950
6770
|
[viewOptions]
|
|
5951
6771
|
);
|
|
5952
|
-
const pinnedColumns =
|
|
6772
|
+
const pinnedColumns = React12.useMemo(
|
|
5953
6773
|
() => viewOptions?.pinned_columns ?? [],
|
|
5954
6774
|
[viewOptions]
|
|
5955
6775
|
);
|
|
5956
|
-
const displayMode =
|
|
6776
|
+
const displayMode = React12.useMemo(
|
|
5957
6777
|
() => viewOptions?.display_mode ?? "inline",
|
|
5958
6778
|
[viewOptions]
|
|
5959
6779
|
);
|
|
5960
|
-
const columnsRenderMode =
|
|
6780
|
+
const columnsRenderMode = React12.useMemo(
|
|
5961
6781
|
() => viewOptions?.columnsRenderMode ?? {},
|
|
5962
6782
|
[viewOptions]
|
|
5963
6783
|
);
|
|
5964
|
-
const gridData =
|
|
6784
|
+
const gridData = React12.useMemo(() => {
|
|
5965
6785
|
const onColumnsRenderModeChanged = (cols) => {
|
|
5966
6786
|
const newRenderModes = {
|
|
5967
6787
|
...viewOptions?.columnsRenderMode ?? {},
|
|
@@ -6131,11 +6951,11 @@ var PrivateQueryDiffJoinResultView = ({
|
|
|
6131
6951
|
}
|
|
6132
6952
|
);
|
|
6133
6953
|
};
|
|
6134
|
-
var QueryDiffResultViewWithRef =
|
|
6135
|
-
var QueryDiffJoinResultViewWithRef =
|
|
6954
|
+
var QueryDiffResultViewWithRef = React12.forwardRef(PrivateQueryDiffResultView);
|
|
6955
|
+
var QueryDiffJoinResultViewWithRef = React12.forwardRef(
|
|
6136
6956
|
PrivateQueryDiffJoinResultView
|
|
6137
6957
|
);
|
|
6138
|
-
var QueryDiffResultView =
|
|
6958
|
+
var QueryDiffResultView = React12.forwardRef(
|
|
6139
6959
|
(props, ref) => {
|
|
6140
6960
|
let baseTitle;
|
|
6141
6961
|
let currentTitle;
|
|
@@ -6175,16 +6995,16 @@ var PrivateQueryResultView = ({
|
|
|
6175
6995
|
if (!(isQueryRun(run) || isQueryBaseRun(run))) {
|
|
6176
6996
|
throw new Error("run type must be query");
|
|
6177
6997
|
}
|
|
6178
|
-
const pinnedColumns =
|
|
6998
|
+
const pinnedColumns = React12.useMemo(
|
|
6179
6999
|
() => viewOptions?.pinned_columns ?? [],
|
|
6180
7000
|
[viewOptions]
|
|
6181
7001
|
);
|
|
6182
|
-
const columnsRenderMode =
|
|
7002
|
+
const columnsRenderMode = React12.useMemo(
|
|
6183
7003
|
() => viewOptions?.columnsRenderMode ?? {},
|
|
6184
7004
|
[viewOptions]
|
|
6185
7005
|
);
|
|
6186
7006
|
const dataframe = run.result;
|
|
6187
|
-
const gridData =
|
|
7007
|
+
const gridData = React12.useMemo(() => {
|
|
6188
7008
|
const onColumnsRenderModeChanged = (cols) => {
|
|
6189
7009
|
const newRenderModes = {
|
|
6190
7010
|
...viewOptions?.columnsRenderMode ?? {},
|
|
@@ -6294,12 +7114,12 @@ var PrivateQueryResultView = ({
|
|
|
6294
7114
|
)
|
|
6295
7115
|
] });
|
|
6296
7116
|
};
|
|
6297
|
-
var QueryResultView =
|
|
7117
|
+
var QueryResultView = React12.forwardRef(PrivateQueryResultView);
|
|
6298
7118
|
function _RowCountGridView({ run, typeGuard, expectedType }, ref) {
|
|
6299
7119
|
if (!typeGuard(run)) {
|
|
6300
7120
|
throw new Error(`Run type must be ${expectedType}`);
|
|
6301
7121
|
}
|
|
6302
|
-
const gridData =
|
|
7122
|
+
const gridData = React12.useMemo(() => {
|
|
6303
7123
|
return createDataGrid(run) ?? { columns: [], rows: [] };
|
|
6304
7124
|
}, [run]);
|
|
6305
7125
|
if (gridData.rows.length === 0) {
|
|
@@ -6335,7 +7155,7 @@ function _RowCountGridView({ run, typeGuard, expectedType }, ref) {
|
|
|
6335
7155
|
}
|
|
6336
7156
|
) });
|
|
6337
7157
|
}
|
|
6338
|
-
var RowCountGridView =
|
|
7158
|
+
var RowCountGridView = React12.forwardRef(_RowCountGridView);
|
|
6339
7159
|
function _RowCountDiffResultView({ run }, ref) {
|
|
6340
7160
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6341
7161
|
RowCountGridView,
|
|
@@ -6358,8 +7178,8 @@ function _RowCountResultView({ run }, ref) {
|
|
|
6358
7178
|
}
|
|
6359
7179
|
);
|
|
6360
7180
|
}
|
|
6361
|
-
var RowCountDiffResultView =
|
|
6362
|
-
var RowCountResultView =
|
|
7181
|
+
var RowCountDiffResultView = React12.forwardRef(_RowCountDiffResultView);
|
|
7182
|
+
var RowCountResultView = React12.forwardRef(_RowCountResultView);
|
|
6363
7183
|
function TopKDiffForm({
|
|
6364
7184
|
params,
|
|
6365
7185
|
onParamsChanged,
|
|
@@ -6367,7 +7187,7 @@ function TopKDiffForm({
|
|
|
6367
7187
|
}) {
|
|
6368
7188
|
const { columns, isLoading, error } = useModelColumns_default(params.model);
|
|
6369
7189
|
const columnNames = columns.map((c) => c.name);
|
|
6370
|
-
|
|
7190
|
+
React12.useEffect(() => {
|
|
6371
7191
|
setIsReadyToExecute(!!params.column_name);
|
|
6372
7192
|
}, [params, setIsReadyToExecute]);
|
|
6373
7193
|
if (isLoading) {
|
|
@@ -6496,7 +7316,7 @@ function TopKSummaryBarChart({
|
|
|
6496
7316
|
if (current.isLastItemOthers && current.count === 0 && base.count === 0) {
|
|
6497
7317
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
6498
7318
|
}
|
|
6499
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7319
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React12.Fragment, { children: [
|
|
6500
7320
|
/* @__PURE__ */ jsxRuntime.jsx(TopKChartTooltip, { base, current, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6501
7321
|
Box34__default.default,
|
|
6502
7322
|
{
|
|
@@ -6621,7 +7441,7 @@ function TopKSummaryList({ topk, valids, isDisplayTopTen }) {
|
|
|
6621
7441
|
const topkLabel = isLastItemOthers ? "(others)" : catName || "(empty)";
|
|
6622
7442
|
const displayTopkCount = formatAsAbbreviatedNumber(topkCount);
|
|
6623
7443
|
const displayTopkRatio = formatIntervalMinMax(topkCount / valids);
|
|
6624
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7444
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React12.Fragment, { children: !isLastItemOthers || topkCount > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6625
7445
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6626
7446
|
Box34__default.default,
|
|
6627
7447
|
{
|
|
@@ -6751,7 +7571,7 @@ function getCatBarChartData({
|
|
|
6751
7571
|
};
|
|
6752
7572
|
}
|
|
6753
7573
|
var PrivateTopKDiffResultView = ({ run }, ref) => {
|
|
6754
|
-
const [isDisplayTopTen, setIsDisplayTopTen] =
|
|
7574
|
+
const [isDisplayTopTen, setIsDisplayTopTen] = React12.useState(true);
|
|
6755
7575
|
const result = run.result;
|
|
6756
7576
|
const params = run.params;
|
|
6757
7577
|
const baseTopK = result.base;
|
|
@@ -6798,7 +7618,7 @@ var PrivateTopKDiffResultView = ({ run }, ref) => {
|
|
|
6798
7618
|
) })
|
|
6799
7619
|
] });
|
|
6800
7620
|
};
|
|
6801
|
-
var TopKDiffResultView =
|
|
7621
|
+
var TopKDiffResultView = React12.forwardRef(PrivateTopKDiffResultView);
|
|
6802
7622
|
var PrivateValueDiffDetailResultView = ({
|
|
6803
7623
|
run,
|
|
6804
7624
|
onAddToChecklist,
|
|
@@ -6808,23 +7628,23 @@ var PrivateValueDiffDetailResultView = ({
|
|
|
6808
7628
|
if (!isValueDiffDetailRun(run)) {
|
|
6809
7629
|
throw new Error("run type must be value_diff_detail");
|
|
6810
7630
|
}
|
|
6811
|
-
const changedOnly =
|
|
7631
|
+
const changedOnly = React12.useMemo(
|
|
6812
7632
|
() => viewOptions?.changed_only ?? false,
|
|
6813
7633
|
[viewOptions]
|
|
6814
7634
|
);
|
|
6815
|
-
const pinnedColumns =
|
|
7635
|
+
const pinnedColumns = React12.useMemo(
|
|
6816
7636
|
() => viewOptions?.pinned_columns ?? [],
|
|
6817
7637
|
[viewOptions]
|
|
6818
7638
|
);
|
|
6819
|
-
const displayMode =
|
|
7639
|
+
const displayMode = React12.useMemo(
|
|
6820
7640
|
() => viewOptions?.display_mode ?? "inline",
|
|
6821
7641
|
[viewOptions]
|
|
6822
7642
|
);
|
|
6823
|
-
const columnsRenderMode =
|
|
7643
|
+
const columnsRenderMode = React12.useMemo(
|
|
6824
7644
|
() => viewOptions?.columnsRenderMode ?? {},
|
|
6825
7645
|
[viewOptions]
|
|
6826
7646
|
);
|
|
6827
|
-
const gridData =
|
|
7647
|
+
const gridData = React12.useMemo(() => {
|
|
6828
7648
|
const onColumnsRenderModeChanged = (cols) => {
|
|
6829
7649
|
const newRenderModes = {
|
|
6830
7650
|
...viewOptions?.columnsRenderMode ?? {},
|
|
@@ -6986,7 +7806,7 @@ var PrivateValueDiffDetailResultView = ({
|
|
|
6986
7806
|
}
|
|
6987
7807
|
);
|
|
6988
7808
|
};
|
|
6989
|
-
var ValueDiffDetailResultView =
|
|
7809
|
+
var ValueDiffDetailResultView = React12.forwardRef(
|
|
6990
7810
|
PrivateValueDiffDetailResultView
|
|
6991
7811
|
);
|
|
6992
7812
|
function ValueDiffForm({
|
|
@@ -6994,7 +7814,7 @@ function ValueDiffForm({
|
|
|
6994
7814
|
onParamsChanged,
|
|
6995
7815
|
setIsReadyToExecute
|
|
6996
7816
|
}) {
|
|
6997
|
-
const [allColumns, setAllColumns] =
|
|
7817
|
+
const [allColumns, setAllColumns] = React12.useState(
|
|
6998
7818
|
!params.columns || params.columns.length === 0
|
|
6999
7819
|
);
|
|
7000
7820
|
const model = params.model;
|
|
@@ -7005,7 +7825,7 @@ function ValueDiffForm({
|
|
|
7005
7825
|
isLoading,
|
|
7006
7826
|
error
|
|
7007
7827
|
} = useModelColumns_default(params.model);
|
|
7008
|
-
|
|
7828
|
+
React12.useEffect(() => {
|
|
7009
7829
|
if (!primaryKey && nodePrimaryKey) {
|
|
7010
7830
|
onParamsChanged({
|
|
7011
7831
|
...params,
|
|
@@ -7013,7 +7833,7 @@ function ValueDiffForm({
|
|
|
7013
7833
|
});
|
|
7014
7834
|
}
|
|
7015
7835
|
}, [primaryKey, nodePrimaryKey, params, onParamsChanged]);
|
|
7016
|
-
|
|
7836
|
+
React12.useEffect(() => {
|
|
7017
7837
|
setIsReadyToExecute(!!(primaryKey && model));
|
|
7018
7838
|
}, [primaryKey, model, setIsReadyToExecute]);
|
|
7019
7839
|
const columnNames = columns.map((c) => c.name);
|
|
@@ -7190,7 +8010,7 @@ function _ValueDiffResultView({ run }, ref) {
|
|
|
7190
8010
|
}
|
|
7191
8011
|
);
|
|
7192
8012
|
}
|
|
7193
|
-
var ValueDiffResultView =
|
|
8013
|
+
var ValueDiffResultView = React12.forwardRef(_ValueDiffResultView);
|
|
7194
8014
|
|
|
7195
8015
|
// recce-source/js/src/components/run/registry.ts
|
|
7196
8016
|
function runTypeHasRef(runType) {
|
|
@@ -7296,7 +8116,7 @@ var findByRunType = (runType) => {
|
|
|
7296
8116
|
function useAppLocation() {
|
|
7297
8117
|
const router = navigation.useRouter();
|
|
7298
8118
|
const pathname = navigation.usePathname();
|
|
7299
|
-
const setLocation =
|
|
8119
|
+
const setLocation = React12.useCallback(
|
|
7300
8120
|
(to, options) => {
|
|
7301
8121
|
if (options?.replace) {
|
|
7302
8122
|
router.replace(to, { scroll: options?.scroll ?? true });
|
|
@@ -7308,7 +8128,7 @@ function useAppLocation() {
|
|
|
7308
8128
|
);
|
|
7309
8129
|
return [pathname, setLocation];
|
|
7310
8130
|
}
|
|
7311
|
-
var RecceActionContext =
|
|
8131
|
+
var RecceActionContext = React12.createContext({
|
|
7312
8132
|
runAction: () => {
|
|
7313
8133
|
return void 0;
|
|
7314
8134
|
},
|
|
@@ -7333,7 +8153,148 @@ var RecceActionContext = React3.createContext({
|
|
|
7333
8153
|
return void 0;
|
|
7334
8154
|
}
|
|
7335
8155
|
});
|
|
7336
|
-
var
|
|
8156
|
+
var useCloseModalEffect = (onClose) => {
|
|
8157
|
+
const pathname = navigation.usePathname();
|
|
8158
|
+
React12.useEffect(() => {
|
|
8159
|
+
onClose();
|
|
8160
|
+
}, [onClose, pathname]);
|
|
8161
|
+
};
|
|
8162
|
+
function RecceActionContextProvider({
|
|
8163
|
+
children
|
|
8164
|
+
}) {
|
|
8165
|
+
const [action, setAction] = React12.useState();
|
|
8166
|
+
const [isModalOpen, setModalOpen] = React12.useState(false);
|
|
8167
|
+
const onModalOpen = React12.useCallback(() => setModalOpen(true), []);
|
|
8168
|
+
const onModalClose = React12.useCallback(() => setModalOpen(false), []);
|
|
8169
|
+
const [isRunResultOpen, setRunResultOpen] = React12.useState(false);
|
|
8170
|
+
const onResultPaneOpen = React12.useCallback(() => setRunResultOpen(true), []);
|
|
8171
|
+
const closeRunResult = React12.useCallback(() => setRunResultOpen(false), []);
|
|
8172
|
+
const [isHistoryOpen, setHistoryOpen] = React12.useState(false);
|
|
8173
|
+
const showHistory = React12.useCallback(() => setHistoryOpen(true), []);
|
|
8174
|
+
const closeHistory = React12.useCallback(() => setHistoryOpen(false), []);
|
|
8175
|
+
const [runId, setRunId] = React12.useState();
|
|
8176
|
+
const [location, setLocation] = useAppLocation();
|
|
8177
|
+
const queryClient = reactQuery.useQueryClient();
|
|
8178
|
+
const showRunId = React12.useCallback(
|
|
8179
|
+
async (runId2, refreshHistory) => {
|
|
8180
|
+
setRunId(runId2);
|
|
8181
|
+
onResultPaneOpen();
|
|
8182
|
+
if (refreshHistory !== false) {
|
|
8183
|
+
await queryClient.invalidateQueries({ queryKey: cacheKeys.runs() });
|
|
8184
|
+
}
|
|
8185
|
+
},
|
|
8186
|
+
[onResultPaneOpen, queryClient]
|
|
8187
|
+
);
|
|
8188
|
+
const clearRunResult = React12.useCallback(() => {
|
|
8189
|
+
setRunId(void 0);
|
|
8190
|
+
closeRunResult();
|
|
8191
|
+
}, [closeRunResult]);
|
|
8192
|
+
const runAction = React12.useCallback(
|
|
8193
|
+
async (type, params, options) => {
|
|
8194
|
+
try {
|
|
8195
|
+
const session = (/* @__PURE__ */ new Date()).getTime().toString();
|
|
8196
|
+
let lastRun = void 0;
|
|
8197
|
+
if (options?.showLast) {
|
|
8198
|
+
const runs = await searchRuns(type, params, 1);
|
|
8199
|
+
if (runs.length === 1) {
|
|
8200
|
+
lastRun = runs[0];
|
|
8201
|
+
}
|
|
8202
|
+
}
|
|
8203
|
+
const run = findByRunType(type);
|
|
8204
|
+
const RunResultView = run.RunResultView;
|
|
8205
|
+
const { title, RunForm } = run;
|
|
8206
|
+
if (RunResultView === void 0) {
|
|
8207
|
+
throw new Error(`Run type ${type} does not have a result view`);
|
|
8208
|
+
}
|
|
8209
|
+
if (RunForm == void 0 || !options?.showForm) {
|
|
8210
|
+
const { run_id } = await submitRun(type, params, {
|
|
8211
|
+
nowait: true,
|
|
8212
|
+
trackProps: options?.trackProps
|
|
8213
|
+
});
|
|
8214
|
+
await showRunId(run_id);
|
|
8215
|
+
await queryClient.invalidateQueries({ queryKey: cacheKeys.runs() });
|
|
8216
|
+
if (location.startsWith("/lineage")) {
|
|
8217
|
+
setLocation("/lineage");
|
|
8218
|
+
}
|
|
8219
|
+
} else {
|
|
8220
|
+
setAction({
|
|
8221
|
+
session,
|
|
8222
|
+
title,
|
|
8223
|
+
type,
|
|
8224
|
+
params,
|
|
8225
|
+
lastRun,
|
|
8226
|
+
options,
|
|
8227
|
+
RunForm
|
|
8228
|
+
});
|
|
8229
|
+
onModalOpen();
|
|
8230
|
+
}
|
|
8231
|
+
} catch (e) {
|
|
8232
|
+
toaster.create({
|
|
8233
|
+
title: "Failed to submit a run",
|
|
8234
|
+
description: e instanceof Error ? e.message : void 0,
|
|
8235
|
+
type: "error",
|
|
8236
|
+
duration: 5e3,
|
|
8237
|
+
closable: true
|
|
8238
|
+
});
|
|
8239
|
+
}
|
|
8240
|
+
},
|
|
8241
|
+
[onModalOpen, showRunId, location, setLocation, queryClient]
|
|
8242
|
+
);
|
|
8243
|
+
useCloseModalEffect(onModalClose);
|
|
8244
|
+
const handleExecute = async (type, params) => {
|
|
8245
|
+
try {
|
|
8246
|
+
onModalClose();
|
|
8247
|
+
const { run_id } = await submitRun(type, params, {
|
|
8248
|
+
nowait: true,
|
|
8249
|
+
trackProps: action?.options?.trackProps
|
|
8250
|
+
});
|
|
8251
|
+
await showRunId(run_id);
|
|
8252
|
+
} catch (e) {
|
|
8253
|
+
toaster.create({
|
|
8254
|
+
title: "Failed to submit a run",
|
|
8255
|
+
description: e instanceof Error ? e.message : void 0,
|
|
8256
|
+
type: "error",
|
|
8257
|
+
duration: 5e3,
|
|
8258
|
+
closable: true
|
|
8259
|
+
});
|
|
8260
|
+
}
|
|
8261
|
+
};
|
|
8262
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8263
|
+
RecceActionContext.Provider,
|
|
8264
|
+
{
|
|
8265
|
+
value: {
|
|
8266
|
+
runAction,
|
|
8267
|
+
runId,
|
|
8268
|
+
showRunId,
|
|
8269
|
+
isRunResultOpen,
|
|
8270
|
+
closeRunResult,
|
|
8271
|
+
isHistoryOpen,
|
|
8272
|
+
closeHistory,
|
|
8273
|
+
showHistory,
|
|
8274
|
+
setHistoryOpen,
|
|
8275
|
+
clearRunResult
|
|
8276
|
+
},
|
|
8277
|
+
children: [
|
|
8278
|
+
action && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8279
|
+
RunModal,
|
|
8280
|
+
{
|
|
8281
|
+
isOpen: isModalOpen,
|
|
8282
|
+
onClose: onModalClose,
|
|
8283
|
+
onExecute: handleExecute,
|
|
8284
|
+
title: action.title,
|
|
8285
|
+
type: action.type,
|
|
8286
|
+
params: action.params,
|
|
8287
|
+
initialRun: action.lastRun,
|
|
8288
|
+
RunForm: action.options?.showForm && action.RunForm ? action.RunForm : void 0
|
|
8289
|
+
},
|
|
8290
|
+
action.session
|
|
8291
|
+
),
|
|
8292
|
+
children
|
|
8293
|
+
]
|
|
8294
|
+
}
|
|
8295
|
+
);
|
|
8296
|
+
}
|
|
8297
|
+
var useRecceActionContext = () => React12.useContext(RecceActionContext);
|
|
7337
8298
|
|
|
7338
8299
|
// recce-source/js/src/lib/hooks/useClipBoardToast.tsx
|
|
7339
8300
|
function useClipBoardToast() {
|
|
@@ -7383,8 +8344,8 @@ function useCopyToClipboard2({
|
|
|
7383
8344
|
onError,
|
|
7384
8345
|
ignoreElements
|
|
7385
8346
|
}) {
|
|
7386
|
-
const [status, setStatus] =
|
|
7387
|
-
const ref =
|
|
8347
|
+
const [status, setStatus] = React12.useState("idle");
|
|
8348
|
+
const ref = React12.useRef(null);
|
|
7388
8349
|
const { onOpen, setImgBlob, ImageDownloadModal } = useImageDownloadModal();
|
|
7389
8350
|
const toImage = async () => {
|
|
7390
8351
|
if (!ref.current) {
|
|
@@ -7511,7 +8472,7 @@ function useCopyToClipboardButton(options) {
|
|
|
7511
8472
|
failToast("Failed to copy image to clipboard", error);
|
|
7512
8473
|
}
|
|
7513
8474
|
});
|
|
7514
|
-
const onMouseEnter =
|
|
8475
|
+
const onMouseEnter = React12.useCallback(() => {
|
|
7515
8476
|
if (ref.current) {
|
|
7516
8477
|
const nodeToUse = getHTMLElementFromRef(ref.current);
|
|
7517
8478
|
if (nodeToUse) {
|
|
@@ -7520,7 +8481,7 @@ function useCopyToClipboardButton(options) {
|
|
|
7520
8481
|
}
|
|
7521
8482
|
}
|
|
7522
8483
|
}, [ref]);
|
|
7523
|
-
const onMouseLeave =
|
|
8484
|
+
const onMouseLeave = React12.useCallback(() => {
|
|
7524
8485
|
if (ref.current) {
|
|
7525
8486
|
const nodeToUse = getHTMLElementFromRef(ref.current);
|
|
7526
8487
|
if (nodeToUse) {
|
|
@@ -7528,7 +8489,7 @@ function useCopyToClipboardButton(options) {
|
|
|
7528
8489
|
}
|
|
7529
8490
|
}
|
|
7530
8491
|
}, [ref]);
|
|
7531
|
-
const onCopyToClipboard =
|
|
8492
|
+
const onCopyToClipboard = React12.useCallback(async () => {
|
|
7532
8493
|
if (ref.current) {
|
|
7533
8494
|
await copyToClipboard();
|
|
7534
8495
|
const nodeToUse = getHTMLElementFromRef(ref.current);
|
|
@@ -7569,13 +8530,13 @@ function useCopyToClipboardButton(options) {
|
|
|
7569
8530
|
};
|
|
7570
8531
|
}
|
|
7571
8532
|
function useImageDownloadModal() {
|
|
7572
|
-
const [open, setOpen] =
|
|
7573
|
-
const [imgBlob, setImgBlob] =
|
|
8533
|
+
const [open, setOpen] = React12.useState(false);
|
|
8534
|
+
const [imgBlob, setImgBlob] = React12.useState();
|
|
7574
8535
|
const onOpen = () => setOpen(true);
|
|
7575
8536
|
const onClose = () => setOpen(false);
|
|
7576
8537
|
function ImageDownloadModal() {
|
|
7577
|
-
const [base64Img, setBase64Img] =
|
|
7578
|
-
|
|
8538
|
+
const [base64Img, setBase64Img] = React12.useState();
|
|
8539
|
+
React12.useEffect(() => {
|
|
7579
8540
|
if (!imgBlob) {
|
|
7580
8541
|
return;
|
|
7581
8542
|
}
|
|
@@ -7596,8 +8557,8 @@ function useImageDownloadModal() {
|
|
|
7596
8557
|
saveAs__default.default(imgBlob, fileName);
|
|
7597
8558
|
onClose();
|
|
7598
8559
|
};
|
|
7599
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7600
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8560
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(MuiDialog__default.default, { open, onClose, maxWidth: "sm", fullWidth: true, children: [
|
|
8561
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle__default.default, { children: "Screenshot Preview" }),
|
|
7601
8562
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7602
8563
|
IconButton2__default.default,
|
|
7603
8564
|
{
|
|
@@ -7612,7 +8573,7 @@ function useImageDownloadModal() {
|
|
|
7612
8573
|
children: /* @__PURE__ */ jsxRuntime.jsx(io5.IoClose, {})
|
|
7613
8574
|
}
|
|
7614
8575
|
),
|
|
7615
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8576
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogContent__default.default, { children: [
|
|
7616
8577
|
/* @__PURE__ */ jsxRuntime.jsxs(Stack24__default.default, { sx: { px: "10px", gap: "10px" }, children: [
|
|
7617
8578
|
/* @__PURE__ */ jsxRuntime.jsxs(Stack24__default.default, { direction: "row", alignItems: "center", spacing: "5px", children: [
|
|
7618
8579
|
/* @__PURE__ */ jsxRuntime.jsx(Box34__default.default, { component: pi.PiInfo, sx: { color: "error.main" } }),
|
|
@@ -7632,7 +8593,7 @@ function useImageDownloadModal() {
|
|
|
7632
8593
|
}
|
|
7633
8594
|
)
|
|
7634
8595
|
] }),
|
|
7635
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8596
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogActions__default.default, { children: [
|
|
7636
8597
|
/* @__PURE__ */ jsxRuntime.jsx(Button10__default.default, { sx: { mr: 1.5 }, onClick: onClose, children: "Close" }),
|
|
7637
8598
|
/* @__PURE__ */ jsxRuntime.jsx(Button10__default.default, { color: "iochmara", variant: "contained", onClick: onDownload, children: "Download" })
|
|
7638
8599
|
] })
|
|
@@ -7645,8 +8606,8 @@ function useImageDownloadModal() {
|
|
|
7645
8606
|
};
|
|
7646
8607
|
}
|
|
7647
8608
|
var useRun = (runId) => {
|
|
7648
|
-
const [isRunning, setIsRunning] =
|
|
7649
|
-
const [aborting, setAborting] =
|
|
8609
|
+
const [isRunning, setIsRunning] = React12.useState(false);
|
|
8610
|
+
const [aborting, setAborting] = React12.useState(false);
|
|
7650
8611
|
const [, refetchRunsAggregated] = useRunsAggregated();
|
|
7651
8612
|
const { error, data: run } = reactQuery.useQuery({
|
|
7652
8613
|
queryKey: cacheKeys.run(runId ?? ""),
|
|
@@ -7657,8 +8618,8 @@ var useRun = (runId) => {
|
|
|
7657
8618
|
refetchInterval: isRunning ? 50 : false,
|
|
7658
8619
|
retry: false
|
|
7659
8620
|
});
|
|
7660
|
-
const [prevRun, setPrevRun] =
|
|
7661
|
-
const [prevError, setPrevError] =
|
|
8621
|
+
const [prevRun, setPrevRun] = React12.useState(run);
|
|
8622
|
+
const [prevError, setPrevError] = React12.useState(error);
|
|
7662
8623
|
if (run !== prevRun || error !== prevError) {
|
|
7663
8624
|
setPrevRun(run);
|
|
7664
8625
|
setPrevError(error);
|
|
@@ -7668,12 +8629,12 @@ var useRun = (runId) => {
|
|
|
7668
8629
|
setIsRunning(true);
|
|
7669
8630
|
}
|
|
7670
8631
|
}
|
|
7671
|
-
|
|
8632
|
+
React12.useEffect(() => {
|
|
7672
8633
|
if ((error || run?.result || run?.error) && (run?.type === "row_count_diff" || run?.type === "row_count")) {
|
|
7673
8634
|
refetchRunsAggregated();
|
|
7674
8635
|
}
|
|
7675
8636
|
}, [run, error, refetchRunsAggregated]);
|
|
7676
|
-
const onCancel =
|
|
8637
|
+
const onCancel = React12.useCallback(async () => {
|
|
7677
8638
|
setAborting(true);
|
|
7678
8639
|
if (!runId) {
|
|
7679
8640
|
return;
|
|
@@ -8169,7 +9130,7 @@ function GraphColumnNode(nodeProps) {
|
|
|
8169
9130
|
const selectedNode = viewOptions.column_level_lineage?.node_id;
|
|
8170
9131
|
const selectedColumn = viewOptions.column_level_lineage?.column;
|
|
8171
9132
|
const isFocus = column === selectedColumn && nodeId === selectedNode;
|
|
8172
|
-
const [isHovered, setIsHovered] =
|
|
9133
|
+
const [isHovered, setIsHovered] = React12__default.default.useState(false);
|
|
8173
9134
|
const isHighlighted = isNodeHighlighted(columnNodeId);
|
|
8174
9135
|
const isShowingChangeAnalysis = isNodeShowingChangeAnalysis(nodeId);
|
|
8175
9136
|
if (!showContent) {
|
|
@@ -8388,17 +9349,17 @@ function SetupConnectionPopover({
|
|
|
8388
9349
|
children,
|
|
8389
9350
|
display
|
|
8390
9351
|
}) {
|
|
8391
|
-
const [hovered, setHovered] =
|
|
8392
|
-
const timeoutRef =
|
|
8393
|
-
const anchorRef =
|
|
8394
|
-
const handleMouseEnter =
|
|
9352
|
+
const [hovered, setHovered] = React12.useState(false);
|
|
9353
|
+
const timeoutRef = React12.useRef(null);
|
|
9354
|
+
const anchorRef = React12.useRef(null);
|
|
9355
|
+
const handleMouseEnter = React12.useCallback(() => {
|
|
8395
9356
|
if (timeoutRef.current) {
|
|
8396
9357
|
clearTimeout(timeoutRef.current);
|
|
8397
9358
|
timeoutRef.current = null;
|
|
8398
9359
|
}
|
|
8399
9360
|
setHovered(true);
|
|
8400
9361
|
}, []);
|
|
8401
|
-
const handleMouseLeave =
|
|
9362
|
+
const handleMouseLeave = React12.useCallback(() => {
|
|
8402
9363
|
timeoutRef.current = setTimeout(() => {
|
|
8403
9364
|
setHovered(false);
|
|
8404
9365
|
}, 100);
|
|
@@ -8863,7 +9824,7 @@ function GraphNode(nodeProps) {
|
|
|
8863
9824
|
const { id, resourceType, changeStatus } = data;
|
|
8864
9825
|
const showContent = react$1.useStore((s) => s.transform[2] > 0.3);
|
|
8865
9826
|
const { icon: ResourceIcon } = getIconForResourceType(resourceType);
|
|
8866
|
-
const [isHovered, setIsHovered] =
|
|
9827
|
+
const [isHovered, setIsHovered] = React12.useState(false);
|
|
8867
9828
|
const {
|
|
8868
9829
|
interactive,
|
|
8869
9830
|
selectNode,
|
|
@@ -9264,15 +10225,50 @@ var defaultQueryContext = {
|
|
|
9264
10225
|
return void 0;
|
|
9265
10226
|
}
|
|
9266
10227
|
};
|
|
9267
|
-
var RecceQueryContext =
|
|
9268
|
-
|
|
10228
|
+
var RecceQueryContext = React12.createContext(defaultQueryContext);
|
|
10229
|
+
function RecceQueryContextProvider({ children }) {
|
|
10230
|
+
const [sqlQuery, setSqlQuery] = React12__default.default.useState(defaultSqlQuery);
|
|
10231
|
+
const [baseSqlQuery, setBaseSqlQuery] = React12__default.default.useState(defaultSqlQuery);
|
|
10232
|
+
const [isCustomQueries, setCustomQueries] = React12__default.default.useState(false);
|
|
10233
|
+
const [primaryKeys, setPrimaryKeys] = React12__default.default.useState();
|
|
10234
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10235
|
+
RecceQueryContext.Provider,
|
|
10236
|
+
{
|
|
10237
|
+
value: {
|
|
10238
|
+
setSqlQuery,
|
|
10239
|
+
sqlQuery,
|
|
10240
|
+
setPrimaryKeys,
|
|
10241
|
+
primaryKeys,
|
|
10242
|
+
isCustomQueries,
|
|
10243
|
+
setCustomQueries,
|
|
10244
|
+
baseSqlQuery,
|
|
10245
|
+
setBaseSqlQuery
|
|
10246
|
+
},
|
|
10247
|
+
children
|
|
10248
|
+
}
|
|
10249
|
+
);
|
|
10250
|
+
}
|
|
10251
|
+
var useRecceQueryContext = () => React12.useContext(RecceQueryContext);
|
|
9269
10252
|
var defaultRowCountStateContext = {
|
|
9270
10253
|
isNodesFetching: [],
|
|
9271
10254
|
setIsNodesFetching: () => {
|
|
9272
10255
|
return void 0;
|
|
9273
10256
|
}
|
|
9274
10257
|
};
|
|
9275
|
-
|
|
10258
|
+
var RowCountStateContext = React12.createContext(defaultRowCountStateContext);
|
|
10259
|
+
function RowCountStateContextProvider({
|
|
10260
|
+
children
|
|
10261
|
+
}) {
|
|
10262
|
+
const [isNodesFetching, setIsNodesFetching] = React12__default.default.useState([]);
|
|
10263
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10264
|
+
RowCountStateContext.Provider,
|
|
10265
|
+
{
|
|
10266
|
+
value: { isNodesFetching, setIsNodesFetching },
|
|
10267
|
+
children
|
|
10268
|
+
}
|
|
10269
|
+
);
|
|
10270
|
+
}
|
|
10271
|
+
var useRowCountStateContext = () => React12.useContext(RowCountStateContext);
|
|
9276
10272
|
var ContextMenu = ({ menuItems, open, onClose, x, y }) => {
|
|
9277
10273
|
const { featureToggles } = useRecceInstanceContext();
|
|
9278
10274
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9754,14 +10750,14 @@ var LineageViewContextMenu = ({
|
|
|
9754
10750
|
}
|
|
9755
10751
|
};
|
|
9756
10752
|
var useLineageViewContextMenu = () => {
|
|
9757
|
-
const [open, setOpen] =
|
|
10753
|
+
const [open, setOpen] = React12.useState(false);
|
|
9758
10754
|
const onOpen = () => setOpen(true);
|
|
9759
10755
|
const onClose = () => setOpen(false);
|
|
9760
|
-
const [position, setPosition] =
|
|
10756
|
+
const [position, setPosition] = React12.useState({
|
|
9761
10757
|
x: 0,
|
|
9762
10758
|
y: 0
|
|
9763
10759
|
});
|
|
9764
|
-
const [node, setNode] =
|
|
10760
|
+
const [node, setNode] = React12.useState();
|
|
9765
10761
|
const showContextMenu = (x, y, node2) => {
|
|
9766
10762
|
setPosition({ x, y });
|
|
9767
10763
|
setNode(node2);
|
|
@@ -9799,7 +10795,7 @@ function LineageViewNotification({
|
|
|
9799
10795
|
type
|
|
9800
10796
|
}) {
|
|
9801
10797
|
const notificationKey = sessionStorageKeys.lineageNotificationDismissed;
|
|
9802
|
-
const [visible, setVisible] =
|
|
10798
|
+
const [visible, setVisible] = React12.useState(() => {
|
|
9803
10799
|
const dismissed = sessionStorage.getItem(notificationKey);
|
|
9804
10800
|
return dismissed !== "true";
|
|
9805
10801
|
});
|
|
@@ -9942,7 +10938,7 @@ var SelectFilterTooltip = () => {
|
|
|
9942
10938
|
] });
|
|
9943
10939
|
};
|
|
9944
10940
|
var ViewModeSelectMenu = ({ isDisabled }) => {
|
|
9945
|
-
const [anchorEl, setAnchorEl] =
|
|
10941
|
+
const [anchorEl, setAnchorEl] = React12.useState(null);
|
|
9946
10942
|
const open = Boolean(anchorEl);
|
|
9947
10943
|
const { viewOptions, onViewOptionsChanged } = useLineageViewContextSafe();
|
|
9948
10944
|
const viewMode = viewOptions.view_mode ?? "changed_models";
|
|
@@ -10002,7 +10998,7 @@ var ViewModeSelectMenu = ({ isDisabled }) => {
|
|
|
10002
10998
|
] });
|
|
10003
10999
|
};
|
|
10004
11000
|
var PackageSelectMenu = ({ isDisabled }) => {
|
|
10005
|
-
const [anchorEl, setAnchorEl] =
|
|
11001
|
+
const [anchorEl, setAnchorEl] = React12.useState(null);
|
|
10006
11002
|
const open = Boolean(anchorEl);
|
|
10007
11003
|
const { lineageGraph } = useLineageGraphContext();
|
|
10008
11004
|
const { viewOptions, onViewOptionsChanged } = useLineageViewContextSafe();
|
|
@@ -10087,10 +11083,10 @@ var PackageSelectMenu = ({ isDisabled }) => {
|
|
|
10087
11083
|
] });
|
|
10088
11084
|
};
|
|
10089
11085
|
var NodeSelectionInput = (props) => {
|
|
10090
|
-
const [inputValue, setInputValue] =
|
|
11086
|
+
const [inputValue, setInputValue] = React12.useState(props.value);
|
|
10091
11087
|
const { data: flags } = useRecceServerFlag();
|
|
10092
|
-
const inputRef =
|
|
10093
|
-
|
|
11088
|
+
const inputRef = React12.useRef(null);
|
|
11089
|
+
React12.useEffect(() => {
|
|
10094
11090
|
if (inputRef.current) {
|
|
10095
11091
|
inputRef.current.value = props.value;
|
|
10096
11092
|
}
|
|
@@ -10198,7 +11194,7 @@ var LineageViewTopBar = () => {
|
|
|
10198
11194
|
const { featureToggles } = useRecceInstanceContext();
|
|
10199
11195
|
const { data: flags } = useRecceServerFlag();
|
|
10200
11196
|
const isSingleEnvOnboarding = flags?.single_env_onboarding;
|
|
10201
|
-
const [actionsAnchorEl, setActionsAnchorEl] =
|
|
11197
|
+
const [actionsAnchorEl, setActionsAnchorEl] = React12.useState(
|
|
10202
11198
|
null
|
|
10203
11199
|
);
|
|
10204
11200
|
const actionsOpen = Boolean(actionsAnchorEl);
|
|
@@ -10469,11 +11465,11 @@ var LearnHowLink = () => {
|
|
|
10469
11465
|
};
|
|
10470
11466
|
function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
10471
11467
|
const lineageViewContext = useLineageViewContext();
|
|
10472
|
-
const [gridApi, setGridApi] =
|
|
10473
|
-
const [cllRunningMap, setCllRunningMap] =
|
|
11468
|
+
const [gridApi, setGridApi] = React12.useState(null);
|
|
11469
|
+
const [cllRunningMap, setCllRunningMap] = React12.useState(
|
|
10474
11470
|
/* @__PURE__ */ new Map()
|
|
10475
11471
|
);
|
|
10476
|
-
const { columns, rows } =
|
|
11472
|
+
const { columns, rows } = React12.useMemo(() => {
|
|
10477
11473
|
return createDataGridFromData(
|
|
10478
11474
|
{ type: "schema_single", columns: current?.columns },
|
|
10479
11475
|
{ node: current, cllRunningMap, showMenu }
|
|
@@ -10502,7 +11498,7 @@ function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
|
10502
11498
|
}
|
|
10503
11499
|
setCllRunningMap((prev) => new Map(prev).set(columnName, false));
|
|
10504
11500
|
};
|
|
10505
|
-
const getRowId =
|
|
11501
|
+
const getRowId = React12.useCallback(
|
|
10506
11502
|
(params) => {
|
|
10507
11503
|
const modelId = current?.id;
|
|
10508
11504
|
return `${modelId}-${params.data.name}`;
|
|
@@ -10511,7 +11507,7 @@ function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
|
10511
11507
|
);
|
|
10512
11508
|
const cll = lineageViewContext?.viewOptions.column_level_lineage;
|
|
10513
11509
|
const selectedRowId = cll ? `${cll.node_id}-${cll.column}` : null;
|
|
10514
|
-
|
|
11510
|
+
React12.useEffect(() => {
|
|
10515
11511
|
if (!gridApi) return;
|
|
10516
11512
|
gridApi.deselectAll();
|
|
10517
11513
|
if (selectedRowId) {
|
|
@@ -10521,7 +11517,7 @@ function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
|
10521
11517
|
}
|
|
10522
11518
|
}
|
|
10523
11519
|
}, [gridApi, selectedRowId]);
|
|
10524
|
-
const handleGridReady =
|
|
11520
|
+
const handleGridReady = React12.useCallback((event) => {
|
|
10525
11521
|
setGridApi(event.api);
|
|
10526
11522
|
}, []);
|
|
10527
11523
|
const getRowClass = (_params) => {
|
|
@@ -10568,11 +11564,11 @@ function PrivateSingleEnvSchemaView({ current, showMenu = true }, ref) {
|
|
|
10568
11564
|
}
|
|
10569
11565
|
function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
10570
11566
|
const lineageViewContext = useLineageViewContext();
|
|
10571
|
-
const [gridApi, setGridApi] =
|
|
10572
|
-
const [cllRunningMap, setCllRunningMap] =
|
|
11567
|
+
const [gridApi, setGridApi] = React12.useState(null);
|
|
11568
|
+
const [cllRunningMap, setCllRunningMap] = React12.useState(
|
|
10573
11569
|
/* @__PURE__ */ new Map()
|
|
10574
11570
|
);
|
|
10575
|
-
const { columns, rows } =
|
|
11571
|
+
const { columns, rows } = React12.useMemo(() => {
|
|
10576
11572
|
const resourceType = current?.resource_type ?? base?.resource_type;
|
|
10577
11573
|
const node = resourceType && ["model", "seed", "snapshot", "source"].includes(resourceType) ? current ?? base : void 0;
|
|
10578
11574
|
return createDataGridFromData(
|
|
@@ -10613,7 +11609,7 @@ function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
|
10613
11609
|
}
|
|
10614
11610
|
setCllRunningMap((prev) => new Map(prev).set(columnName, false));
|
|
10615
11611
|
};
|
|
10616
|
-
const getRowId =
|
|
11612
|
+
const getRowId = React12.useCallback(
|
|
10617
11613
|
(params) => {
|
|
10618
11614
|
const modelId = current?.id ?? base?.id;
|
|
10619
11615
|
return `${modelId}-${params.data.name}`;
|
|
@@ -10622,7 +11618,7 @@ function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
|
10622
11618
|
);
|
|
10623
11619
|
const cll = lineageViewContext?.viewOptions.column_level_lineage;
|
|
10624
11620
|
const selectedRowId = cll ? `${cll.node_id}-${cll.column}` : null;
|
|
10625
|
-
|
|
11621
|
+
React12.useEffect(() => {
|
|
10626
11622
|
if (!gridApi) return;
|
|
10627
11623
|
gridApi.deselectAll();
|
|
10628
11624
|
if (selectedRowId) {
|
|
@@ -10632,7 +11628,7 @@ function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
|
10632
11628
|
}
|
|
10633
11629
|
}
|
|
10634
11630
|
}, [gridApi, selectedRowId]);
|
|
10635
|
-
const handleGridReady =
|
|
11631
|
+
const handleGridReady = React12.useCallback(
|
|
10636
11632
|
(event) => {
|
|
10637
11633
|
setGridApi(event.api);
|
|
10638
11634
|
},
|
|
@@ -10693,8 +11689,8 @@ function PrivateSchemaView({ base, current, showMenu = true }, ref) {
|
|
|
10693
11689
|
)
|
|
10694
11690
|
] });
|
|
10695
11691
|
}
|
|
10696
|
-
var SchemaView =
|
|
10697
|
-
var SingleEnvSchemaView =
|
|
11692
|
+
var SchemaView = React12.forwardRef(PrivateSchemaView);
|
|
11693
|
+
var SingleEnvSchemaView = React12.forwardRef(PrivateSingleEnvSchemaView);
|
|
10698
11694
|
var getLanguageExtension = (language) => {
|
|
10699
11695
|
switch (language) {
|
|
10700
11696
|
case "sql":
|
|
@@ -10718,7 +11714,7 @@ function CodeEditor({
|
|
|
10718
11714
|
theme = "light",
|
|
10719
11715
|
keyBindings = []
|
|
10720
11716
|
}) {
|
|
10721
|
-
const extensions =
|
|
11717
|
+
const extensions = React12.useMemo(() => {
|
|
10722
11718
|
const exts = [
|
|
10723
11719
|
getLanguageExtension(language),
|
|
10724
11720
|
view.EditorView.theme({
|
|
@@ -10735,7 +11731,7 @@ function CodeEditor({
|
|
|
10735
11731
|
}
|
|
10736
11732
|
return exts;
|
|
10737
11733
|
}, [language, fontSize, wordWrap, keyBindings]);
|
|
10738
|
-
const themeExtension =
|
|
11734
|
+
const themeExtension = React12.useMemo(() => {
|
|
10739
11735
|
return theme === "dark" ? codemirrorThemeGithub.githubDark : codemirrorThemeGithub.githubLight;
|
|
10740
11736
|
}, [theme]);
|
|
10741
11737
|
const handleChange = (val) => {
|
|
@@ -10788,16 +11784,16 @@ function DiffEditor({
|
|
|
10788
11784
|
theme = "light",
|
|
10789
11785
|
onModifiedChange
|
|
10790
11786
|
}) {
|
|
10791
|
-
const containerRef =
|
|
10792
|
-
const viewRef =
|
|
10793
|
-
const extensions =
|
|
11787
|
+
const containerRef = React12.useRef(null);
|
|
11788
|
+
const viewRef = React12.useRef(null);
|
|
11789
|
+
const extensions = React12.useMemo(() => {
|
|
10794
11790
|
const exts = [getLanguageExtension2(language), getThemeExtension(theme)];
|
|
10795
11791
|
if (lineNumbers) {
|
|
10796
11792
|
exts.push(view.lineNumbers());
|
|
10797
11793
|
}
|
|
10798
11794
|
return exts;
|
|
10799
11795
|
}, [language, theme, lineNumbers]);
|
|
10800
|
-
|
|
11796
|
+
React12.useEffect(() => {
|
|
10801
11797
|
if (!containerRef.current) return;
|
|
10802
11798
|
if (viewRef.current) {
|
|
10803
11799
|
viewRef.current.destroy();
|
|
@@ -10879,8 +11875,8 @@ function DiffEditor({
|
|
|
10879
11875
|
);
|
|
10880
11876
|
}
|
|
10881
11877
|
var NodeSqlView = ({ node }) => {
|
|
10882
|
-
const [isOpen, setIsOpen] =
|
|
10883
|
-
const [isHovered, setIsHovered] =
|
|
11878
|
+
const [isOpen, setIsOpen] = React12.useState(false);
|
|
11879
|
+
const [isHovered, setIsHovered] = React12.useState(false);
|
|
10884
11880
|
const { data: flags, isLoading } = useRecceServerFlag();
|
|
10885
11881
|
const isSingleEnvOnboarding = flags?.single_env_onboarding;
|
|
10886
11882
|
if (isLoading) {
|
|
@@ -10942,7 +11938,7 @@ var NodeSqlView = ({ node }) => {
|
|
|
10942
11938
|
}
|
|
10943
11939
|
),
|
|
10944
11940
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10945
|
-
|
|
11941
|
+
MuiDialog__default.default,
|
|
10946
11942
|
{
|
|
10947
11943
|
open: isOpen,
|
|
10948
11944
|
onClose: () => setIsOpen(false),
|
|
@@ -10952,7 +11948,7 @@ var NodeSqlView = ({ node }) => {
|
|
|
10952
11948
|
paper: { sx: { height: "75%", overflowY: "auto" } }
|
|
10953
11949
|
},
|
|
10954
11950
|
children: [
|
|
10955
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11951
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogTitle__default.default, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
10956
11952
|
isSingleEnvOnboarding ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10957
11953
|
/* @__PURE__ */ jsxRuntime.jsx("code", { children: modelName }),
|
|
10958
11954
|
"\xA0Model Code"
|
|
@@ -10963,7 +11959,7 @@ var NodeSqlView = ({ node }) => {
|
|
|
10963
11959
|
/* @__PURE__ */ jsxRuntime.jsx(Box34__default.default, { sx: { flex: 1 } }),
|
|
10964
11960
|
/* @__PURE__ */ jsxRuntime.jsx(IconButton2__default.default, { size: "small", onClick: () => setIsOpen(false), children: /* @__PURE__ */ jsxRuntime.jsx(io5.IoClose, {}) })
|
|
10965
11961
|
] }),
|
|
10966
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11962
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogContent__default.default, { children: isSingleEnvOnboarding ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10967
11963
|
CodeEditor,
|
|
10968
11964
|
{
|
|
10969
11965
|
language: "sql",
|
|
@@ -11079,7 +12075,7 @@ function useFeedbackCollectionToast(options) {
|
|
|
11079
12075
|
externalLink,
|
|
11080
12076
|
externalLinkText
|
|
11081
12077
|
} = options;
|
|
11082
|
-
const [toastId, setToastId] =
|
|
12078
|
+
const [toastId, setToastId] = React12.useState(void 0);
|
|
11083
12079
|
function feedBackCollectionToast(skipBypassFeedback = false) {
|
|
11084
12080
|
const isSkipFeedback = localStorage.getItem(feedbackId);
|
|
11085
12081
|
if (toastId != null) {
|
|
@@ -11125,7 +12121,7 @@ function useFeedbackCollectionToast(options) {
|
|
|
11125
12121
|
};
|
|
11126
12122
|
}
|
|
11127
12123
|
function useGuideToast(options) {
|
|
11128
|
-
const [toastId, setToastId] =
|
|
12124
|
+
const [toastId, setToastId] = React12.useState(void 0);
|
|
11129
12125
|
const { guideId, description, externalLinkText, onExternalLinkClick } = options;
|
|
11130
12126
|
function guideToast() {
|
|
11131
12127
|
if (toastId != null) {
|
|
@@ -11182,11 +12178,11 @@ function extractSchemas(lineageGraph) {
|
|
|
11182
12178
|
}
|
|
11183
12179
|
var DropdownValuesInput = (props) => {
|
|
11184
12180
|
const { defaultValues, suggestionList, onValuesChange, className } = props;
|
|
11185
|
-
const [values, setValues] =
|
|
11186
|
-
const [filter, setFilter] =
|
|
11187
|
-
const [isTyping, setIsTyping] =
|
|
11188
|
-
const [anchorEl, setAnchorEl] =
|
|
11189
|
-
const inputRef =
|
|
12181
|
+
const [values, setValues] = React12.useState(defaultValues ?? []);
|
|
12182
|
+
const [filter, setFilter] = React12.useState("");
|
|
12183
|
+
const [isTyping, setIsTyping] = React12.useState(false);
|
|
12184
|
+
const [anchorEl, setAnchorEl] = React12.useState(null);
|
|
12185
|
+
const inputRef = React12.useRef(null);
|
|
11190
12186
|
const open = Boolean(anchorEl);
|
|
11191
12187
|
const showNumberOfValuesSelected = (tags) => {
|
|
11192
12188
|
if (tags.length > 1) {
|
|
@@ -11456,7 +12452,7 @@ var QueryForm = ({
|
|
|
11456
12452
|
}) => {
|
|
11457
12453
|
const { lineageGraph, isActionAvailable } = useLineageGraphContext();
|
|
11458
12454
|
const labelInfo = "Provide a primary key to perform query diff in data warehouse and only return changed rows.";
|
|
11459
|
-
const availableColumns =
|
|
12455
|
+
const availableColumns = React12.useMemo(() => {
|
|
11460
12456
|
if (!lineageGraph) {
|
|
11461
12457
|
return [];
|
|
11462
12458
|
}
|
|
@@ -11523,9 +12519,9 @@ function AuthModal({
|
|
|
11523
12519
|
variant = "auth"
|
|
11524
12520
|
}) {
|
|
11525
12521
|
const { authed } = useRecceInstanceContext();
|
|
11526
|
-
const [open, setOpen] =
|
|
12522
|
+
const [open, setOpen] = React12.useState(parentOpen || !authed);
|
|
11527
12523
|
const authStateCookieValue = Cookies__default.default.get("authState") ?? "pending";
|
|
11528
|
-
const [authState, setAuthState] =
|
|
12524
|
+
const [authState, setAuthState] = React12.useState(
|
|
11529
12525
|
ignoreCookie ? "pending" : authStateCookieValue
|
|
11530
12526
|
);
|
|
11531
12527
|
if (authState === "ignored" && !ignoreCookie) {
|
|
@@ -11556,7 +12552,7 @@ function AuthModal({
|
|
|
11556
12552
|
}
|
|
11557
12553
|
};
|
|
11558
12554
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11559
|
-
|
|
12555
|
+
MuiDialog__default.default,
|
|
11560
12556
|
{
|
|
11561
12557
|
open,
|
|
11562
12558
|
onClose: handleClose,
|
|
@@ -11566,9 +12562,9 @@ function AuthModal({
|
|
|
11566
12562
|
paper: { sx: { borderRadius: "1rem" } }
|
|
11567
12563
|
},
|
|
11568
12564
|
children: [
|
|
11569
|
-
authState !== "authenticating" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12565
|
+
authState !== "authenticating" && /* @__PURE__ */ jsxRuntime.jsx(DialogTitle__default.default, { sx: { textAlign: "center", fontSize: "1.5rem" }, children: content.title }),
|
|
11570
12566
|
authState !== "authenticating" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11571
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12567
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogContent__default.default, { className: "space-y-2 font-light", children: [
|
|
11572
12568
|
/* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { children: "To enable sharing, get your token from Recce Cloud and launch your local instance with it." }),
|
|
11573
12569
|
/* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "list-inside list-disc", children: [
|
|
11574
12570
|
/* @__PURE__ */ jsxRuntime.jsx("li", { children: "Share your instance with teammates via Recce Cloud." }),
|
|
@@ -11595,7 +12591,7 @@ function AuthModal({
|
|
|
11595
12591
|
)
|
|
11596
12592
|
] })
|
|
11597
12593
|
] }),
|
|
11598
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12594
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogActions__default.default, { sx: { flexDirection: "column", gap: 1, px: 3, pb: 3 }, children: [
|
|
11599
12595
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11600
12596
|
Button10__default.default,
|
|
11601
12597
|
{
|
|
@@ -11646,7 +12642,7 @@ function AuthModal({
|
|
|
11646
12642
|
)
|
|
11647
12643
|
] })
|
|
11648
12644
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11649
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12645
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogContent__default.default, { className: "space-y-2 self-center font-light", children: /* @__PURE__ */ jsxRuntime.jsxs(Stack24__default.default, { spacing: 2, alignItems: "center", sx: { pt: "1rem" }, children: [
|
|
11650
12646
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11651
12647
|
Box34__default.default,
|
|
11652
12648
|
{
|
|
@@ -11659,7 +12655,7 @@ function AuthModal({
|
|
|
11659
12655
|
/* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { sx: { fontSize: "1.5rem", fontWeight: 500 }, children: "Reload to Finish" }),
|
|
11660
12656
|
/* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { children: "Reload to complete connection to Recce Cloud" })
|
|
11661
12657
|
] }) }),
|
|
11662
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12658
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogActions__default.default, { sx: { px: 3, pb: 3 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11663
12659
|
Button10__default.default,
|
|
11664
12660
|
{
|
|
11665
12661
|
fullWidth: true,
|
|
@@ -11776,9 +12772,40 @@ async function shareState() {
|
|
|
11776
12772
|
"/api/share"
|
|
11777
12773
|
)).data;
|
|
11778
12774
|
}
|
|
11779
|
-
var ShareState =
|
|
12775
|
+
var ShareState = React12.createContext(void 0);
|
|
12776
|
+
function RecceShareStateContextProvider({
|
|
12777
|
+
children
|
|
12778
|
+
}) {
|
|
12779
|
+
const [shareUrl, setShareUrl] = React12.useState();
|
|
12780
|
+
const [isLoading, setIsLoading] = React12.useState(false);
|
|
12781
|
+
const [error, setError] = React12.useState();
|
|
12782
|
+
const handleShareClick = async () => {
|
|
12783
|
+
setIsLoading(true);
|
|
12784
|
+
setError(void 0);
|
|
12785
|
+
setShareUrl(void 0);
|
|
12786
|
+
try {
|
|
12787
|
+
const response = await shareState();
|
|
12788
|
+
if (response.status !== "success") {
|
|
12789
|
+
setError(response.message);
|
|
12790
|
+
return;
|
|
12791
|
+
}
|
|
12792
|
+
setShareUrl(response.share_url);
|
|
12793
|
+
} catch (err) {
|
|
12794
|
+
setError(err.message);
|
|
12795
|
+
} finally {
|
|
12796
|
+
setIsLoading(false);
|
|
12797
|
+
}
|
|
12798
|
+
};
|
|
12799
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12800
|
+
ShareState.Provider,
|
|
12801
|
+
{
|
|
12802
|
+
value: { shareUrl, isLoading, error, handleShareClick },
|
|
12803
|
+
children
|
|
12804
|
+
}
|
|
12805
|
+
);
|
|
12806
|
+
}
|
|
11780
12807
|
var useRecceShareStateContext = () => {
|
|
11781
|
-
const context =
|
|
12808
|
+
const context = React12.useContext(ShareState);
|
|
11782
12809
|
if (!context) {
|
|
11783
12810
|
throw new Error(
|
|
11784
12811
|
"useRecceShareStateContext must be used within a RecceShareStateContextProvider"
|
|
@@ -11809,7 +12836,7 @@ function SqlEditor({
|
|
|
11809
12836
|
if (manifestData) {
|
|
11810
12837
|
timestamp = manifestData.generated_at ? formatTimeToNow(manifestData.generated_at) : "";
|
|
11811
12838
|
}
|
|
11812
|
-
const keyBindings =
|
|
12839
|
+
const keyBindings = React12.useMemo(() => {
|
|
11813
12840
|
const bindings = [];
|
|
11814
12841
|
if (onRun) {
|
|
11815
12842
|
bindings.push({
|
|
@@ -12130,7 +13157,7 @@ var ResultErrorFallback = (errorData) => {
|
|
|
12130
13157
|
return /* @__PURE__ */ jsxRuntime.jsx(MuiAlert__default.default, { severity: "error", children: String(errorData.error) });
|
|
12131
13158
|
};
|
|
12132
13159
|
var ResultErrorFallback_default = ResultErrorFallback;
|
|
12133
|
-
var RunView =
|
|
13160
|
+
var RunView = React12.forwardRef(
|
|
12134
13161
|
({
|
|
12135
13162
|
isRunning,
|
|
12136
13163
|
isAborting,
|
|
@@ -12282,7 +13309,7 @@ var _ParamView = (data) => {
|
|
|
12282
13309
|
var SingleEnvironmentSetupNotification = ({
|
|
12283
13310
|
runType
|
|
12284
13311
|
}) => {
|
|
12285
|
-
const [open, setOpen] =
|
|
13312
|
+
const [open, setOpen] = React12.useState(true);
|
|
12286
13313
|
if (!open) {
|
|
12287
13314
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
12288
13315
|
}
|
|
@@ -12311,8 +13338,8 @@ var RunResultShareMenu = ({
|
|
|
12311
13338
|
}) => {
|
|
12312
13339
|
const { authed } = useRecceInstanceContext();
|
|
12313
13340
|
const { handleShareClick } = useRecceShareStateContext();
|
|
12314
|
-
const [showModal, setShowModal] =
|
|
12315
|
-
const [anchorEl, setAnchorEl] =
|
|
13341
|
+
const [showModal, setShowModal] = React12.useState(false);
|
|
13342
|
+
const [anchorEl, setAnchorEl] = React12.useState(null);
|
|
12316
13343
|
const open = Boolean(anchorEl);
|
|
12317
13344
|
const handleClick = (event) => {
|
|
12318
13345
|
setAnchorEl(event.currentTarget);
|
|
@@ -12397,14 +13424,14 @@ var PrivateLoadableRunView = ({
|
|
|
12397
13424
|
const { featureToggles } = useRecceInstanceContext();
|
|
12398
13425
|
const { runAction } = useRecceActionContext();
|
|
12399
13426
|
const { error, run, onCancel, isRunning } = useRun(runId);
|
|
12400
|
-
const [viewOptions, setViewOptions] =
|
|
12401
|
-
const [tabValue, setTabValue] =
|
|
13427
|
+
const [viewOptions, setViewOptions] = React12.useState();
|
|
13428
|
+
const [tabValue, setTabValue] = React12.useState("result");
|
|
12402
13429
|
const showSingleEnvironmentSetupNotification = isSingleEnvironment;
|
|
12403
13430
|
let RunResultView;
|
|
12404
13431
|
if (run && runTypeHasRef(run.type)) {
|
|
12405
13432
|
RunResultView = findByRunType(run.type).RunResultView;
|
|
12406
13433
|
}
|
|
12407
|
-
const handleRerun =
|
|
13434
|
+
const handleRerun = React12.useCallback(() => {
|
|
12408
13435
|
if (run) {
|
|
12409
13436
|
runAction(run.type, run.params);
|
|
12410
13437
|
}
|
|
@@ -12566,13 +13593,13 @@ function AddToCheckButton({
|
|
|
12566
13593
|
const queryClient = reactQuery.useQueryClient();
|
|
12567
13594
|
const [, setLocation] = useAppLocation();
|
|
12568
13595
|
const checkId = run?.check_id;
|
|
12569
|
-
const handleGoToCheck =
|
|
13596
|
+
const handleGoToCheck = React12.useCallback(() => {
|
|
12570
13597
|
if (!checkId) {
|
|
12571
13598
|
return;
|
|
12572
13599
|
}
|
|
12573
13600
|
setLocation(`/checks/?id=${checkId}`);
|
|
12574
13601
|
}, [checkId, setLocation]);
|
|
12575
|
-
const handleAddToChecklist =
|
|
13602
|
+
const handleAddToChecklist = React12.useCallback(async () => {
|
|
12576
13603
|
if (!runId) {
|
|
12577
13604
|
return;
|
|
12578
13605
|
}
|
|
@@ -12741,11 +13768,11 @@ function SqlPreview({ current, onChange }) {
|
|
|
12741
13768
|
);
|
|
12742
13769
|
}
|
|
12743
13770
|
function SandboxView({ isOpen, onClose, current }) {
|
|
12744
|
-
const [isRunResultOpen, setIsRunResultOpen] =
|
|
12745
|
-
const [modifiedCode, setModifiedCode] =
|
|
13771
|
+
const [isRunResultOpen, setIsRunResultOpen] = React12.useState(false);
|
|
13772
|
+
const [modifiedCode, setModifiedCode] = React12.useState(
|
|
12746
13773
|
current?.raw_code ?? ""
|
|
12747
13774
|
);
|
|
12748
|
-
const [prevIsOpen, setPrevIsOpen] =
|
|
13775
|
+
const [prevIsOpen, setPrevIsOpen] = React12.useState(isOpen);
|
|
12749
13776
|
const { showRunId, clearRunResult } = useRecceActionContext();
|
|
12750
13777
|
const { primaryKeys, setPrimaryKeys } = useRecceQueryContext();
|
|
12751
13778
|
const { data: flags, isLoading } = useRecceServerFlag();
|
|
@@ -12839,7 +13866,7 @@ function SandboxView({ isOpen, onClose, current }) {
|
|
|
12839
13866
|
trackPreviewChange({ action: "close", node: current?.name });
|
|
12840
13867
|
};
|
|
12841
13868
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12842
|
-
|
|
13869
|
+
MuiDialog__default.default,
|
|
12843
13870
|
{
|
|
12844
13871
|
open: isOpen,
|
|
12845
13872
|
onClose: handleClose,
|
|
@@ -12931,7 +13958,7 @@ function SandboxView({ isOpen, onClose, current }) {
|
|
|
12931
13958
|
]
|
|
12932
13959
|
}
|
|
12933
13960
|
),
|
|
12934
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13961
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogContent__default.default, { sx: { p: 0 }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12935
13962
|
VSplit,
|
|
12936
13963
|
{
|
|
12937
13964
|
sizes: isRunResultOpen ? [50, 50] : [100, 0],
|
|
@@ -12995,9 +14022,9 @@ function TabPanel({ children, value, index }) {
|
|
|
12995
14022
|
}
|
|
12996
14023
|
function NodeView({ node, onCloseNode }) {
|
|
12997
14024
|
const withColumns = node.data.resourceType === "model" || node.data.resourceType === "seed" || node.data.resourceType === "source" || node.data.resourceType === "snapshot";
|
|
12998
|
-
const [isSandboxOpen, setIsSandboxOpen] =
|
|
12999
|
-
const [isNotificationOpen, setIsNotificationOpen] =
|
|
13000
|
-
const [tabValue, setTabValue] =
|
|
14025
|
+
const [isSandboxOpen, setIsSandboxOpen] = React12.useState(false);
|
|
14026
|
+
const [isNotificationOpen, setIsNotificationOpen] = React12.useState(true);
|
|
14027
|
+
const [tabValue, setTabValue] = React12.useState(0);
|
|
13001
14028
|
const { runAction } = useRecceActionContext();
|
|
13002
14029
|
const { isActionAvailable } = useLineageGraphContext();
|
|
13003
14030
|
const refetchRowCount = () => {
|
|
@@ -13143,7 +14170,7 @@ function SingleEnvironmentMenuButton({
|
|
|
13143
14170
|
refetchRowCount,
|
|
13144
14171
|
disableReason
|
|
13145
14172
|
}) {
|
|
13146
|
-
const [anchorEl, setAnchorEl] =
|
|
14173
|
+
const [anchorEl, setAnchorEl] = React12.useState(null);
|
|
13147
14174
|
const open = Boolean(anchorEl);
|
|
13148
14175
|
const [, setLocation] = useAppLocation();
|
|
13149
14176
|
const { setSqlQuery } = useRecceQueryContext();
|
|
@@ -13254,7 +14281,7 @@ function ExploreChangeMenuButton({
|
|
|
13254
14281
|
onSandboxOpen,
|
|
13255
14282
|
refetchRowCountDiff
|
|
13256
14283
|
}) {
|
|
13257
|
-
const [anchorEl, setAnchorEl] =
|
|
14284
|
+
const [anchorEl, setAnchorEl] = React12.useState(null);
|
|
13258
14285
|
const open = Boolean(anchorEl);
|
|
13259
14286
|
const [, setLocation] = useAppLocation();
|
|
13260
14287
|
const { runAction } = useRecceActionContext();
|
|
@@ -13264,7 +14291,7 @@ function ExploreChangeMenuButton({
|
|
|
13264
14291
|
const { primaryKey } = useModelColumns_default(node.data.name);
|
|
13265
14292
|
const metadataOnly = featureToggles.mode === "metadata only";
|
|
13266
14293
|
const isAddedOrRemoved = node.data.changeStatus === "added" || node.data.changeStatus === "removed";
|
|
13267
|
-
const addSchemaCheck =
|
|
14294
|
+
const addSchemaCheck = React12.useCallback(async () => {
|
|
13268
14295
|
const nodeId = node.id;
|
|
13269
14296
|
const check = await createSchemaDiffCheck({ node_id: nodeId });
|
|
13270
14297
|
setLocation(`/checks/?id=${check.check_id}`);
|
|
@@ -13699,7 +14726,7 @@ var useMultiNodesAction = (nodes, {
|
|
|
13699
14726
|
onActionNodeUpdated,
|
|
13700
14727
|
onActionCompleted
|
|
13701
14728
|
}) => {
|
|
13702
|
-
const actionState =
|
|
14729
|
+
const actionState = React12.useRef({
|
|
13703
14730
|
...initValue
|
|
13704
14731
|
}).current;
|
|
13705
14732
|
const { showRunId } = useRecceActionContext();
|
|
@@ -13933,11 +14960,11 @@ var useMultiNodesAction = (nodes, {
|
|
|
13933
14960
|
};
|
|
13934
14961
|
};
|
|
13935
14962
|
function useValueDiffAlertDialog() {
|
|
13936
|
-
const [open, setOpen] =
|
|
13937
|
-
const [nodeCount, setNodeCount] =
|
|
13938
|
-
const [resolvePromise, setResolvePromise] =
|
|
13939
|
-
const cancelRef =
|
|
13940
|
-
const confirm =
|
|
14963
|
+
const [open, setOpen] = React12.useState(false);
|
|
14964
|
+
const [nodeCount, setNodeCount] = React12.useState(0);
|
|
14965
|
+
const [resolvePromise, setResolvePromise] = React12.useState();
|
|
14966
|
+
const cancelRef = React12.useRef(null);
|
|
14967
|
+
const confirm = React12.useCallback((nodeCount2) => {
|
|
13941
14968
|
setNodeCount(nodeCount2);
|
|
13942
14969
|
return new Promise((resolve) => {
|
|
13943
14970
|
setResolvePromise(() => resolve);
|
|
@@ -13961,7 +14988,7 @@ function useValueDiffAlertDialog() {
|
|
|
13961
14988
|
setOpen(false);
|
|
13962
14989
|
};
|
|
13963
14990
|
const ValueDiffAlertDialog = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13964
|
-
|
|
14991
|
+
MuiDialog__default.default,
|
|
13965
14992
|
{
|
|
13966
14993
|
open,
|
|
13967
14994
|
onClose: handleCancel,
|
|
@@ -13970,7 +14997,7 @@ function useValueDiffAlertDialog() {
|
|
|
13970
14997
|
"aria-labelledby": "value-diff-alert-dialog-title",
|
|
13971
14998
|
children: [
|
|
13972
14999
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13973
|
-
|
|
15000
|
+
DialogTitle__default.default,
|
|
13974
15001
|
{
|
|
13975
15002
|
id: "value-diff-alert-dialog-title",
|
|
13976
15003
|
sx: { fontSize: "1.125rem", fontWeight: "bold" },
|
|
@@ -13995,12 +15022,12 @@ function useValueDiffAlertDialog() {
|
|
|
13995
15022
|
children: /* @__PURE__ */ jsxRuntime.jsx(io5.IoClose, {})
|
|
13996
15023
|
}
|
|
13997
15024
|
),
|
|
13998
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15025
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogContent__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx(Stack24__default.default, { spacing: "20px", children: /* @__PURE__ */ jsxRuntime.jsxs(Box34__default.default, { children: [
|
|
13999
15026
|
"Value diff will be executed on ",
|
|
14000
15027
|
nodeCount,
|
|
14001
15028
|
" nodes in the Lineage, which can add extra costs to your bill."
|
|
14002
15029
|
] }) }) }),
|
|
14003
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15030
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogActions__default.default, { sx: { gap: 0.5 }, children: [
|
|
14004
15031
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14005
15032
|
Button10__default.default,
|
|
14006
15033
|
{
|
|
@@ -14040,11 +15067,11 @@ var nodeColor = (node) => {
|
|
|
14040
15067
|
return node.data.changeStatus ? getIconForChangeStatus(node.data.changeStatus).hexColor : "lightgray";
|
|
14041
15068
|
};
|
|
14042
15069
|
var useResizeObserver = (ref, handler) => {
|
|
14043
|
-
const size =
|
|
15070
|
+
const size = React12.useRef({
|
|
14044
15071
|
width: 0,
|
|
14045
15072
|
height: 0
|
|
14046
15073
|
});
|
|
14047
|
-
|
|
15074
|
+
React12.useEffect(() => {
|
|
14048
15075
|
const target = ref.current;
|
|
14049
15076
|
const handleResize = (entries) => {
|
|
14050
15077
|
for (const entry of entries) {
|
|
@@ -14074,7 +15101,7 @@ var useResizeObserver = (ref, handler) => {
|
|
|
14074
15101
|
};
|
|
14075
15102
|
var useNavToCheck = () => {
|
|
14076
15103
|
const [, setLocation] = useAppLocation();
|
|
14077
|
-
return
|
|
15104
|
+
return React12.useCallback(
|
|
14078
15105
|
(check) => {
|
|
14079
15106
|
if (check.check_id) {
|
|
14080
15107
|
setLocation(`/checks/?id=${check.check_id}`);
|
|
@@ -14085,7 +15112,7 @@ var useNavToCheck = () => {
|
|
|
14085
15112
|
};
|
|
14086
15113
|
function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
14087
15114
|
const reactFlow = react$1.useReactFlow();
|
|
14088
|
-
const refResize =
|
|
15115
|
+
const refResize = React12.useRef(null);
|
|
14089
15116
|
const { successToast, failToast } = useClipBoardToast();
|
|
14090
15117
|
const {
|
|
14091
15118
|
copyToClipboard,
|
|
@@ -14126,10 +15153,10 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
14126
15153
|
const { featureToggles, singleEnv } = useRecceInstanceContext();
|
|
14127
15154
|
const { runId, showRunId, closeRunResult, runAction, isRunResultOpen } = useRecceActionContext();
|
|
14128
15155
|
const { run } = useRun(runId);
|
|
14129
|
-
const [viewOptions, setViewOptions] =
|
|
15156
|
+
const [viewOptions, setViewOptions] = React12.useState({
|
|
14130
15157
|
...props.viewOptions
|
|
14131
15158
|
});
|
|
14132
|
-
const trackLineageRender =
|
|
15159
|
+
const trackLineageRender = React12.useCallback(
|
|
14133
15160
|
(nodes2, currentViewMode, impactRadiusEnabled, cllColumnActive, rightSidebarOpen) => {
|
|
14134
15161
|
const lineageGraphNodesOnly = nodes2.filter(isLineageGraphNode);
|
|
14135
15162
|
const grouped = Object.groupBy(
|
|
@@ -14156,41 +15183,41 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
14156
15183
|
},
|
|
14157
15184
|
[]
|
|
14158
15185
|
);
|
|
14159
|
-
const cllHistory =
|
|
14160
|
-
const [cll, setCll] =
|
|
15186
|
+
const cllHistory = React12.useRef([]).current;
|
|
15187
|
+
const [cll, setCll] = React12.useState(void 0);
|
|
14161
15188
|
const actionGetCll = reactQuery.useMutation({
|
|
14162
15189
|
mutationFn: getCll
|
|
14163
15190
|
});
|
|
14164
|
-
const [nodeColumnSetMap, setNodeColumSetMap] =
|
|
14165
|
-
const findNodeByName =
|
|
15191
|
+
const [nodeColumnSetMap, setNodeColumSetMap] = React12.useState({});
|
|
15192
|
+
const findNodeByName = React12.useCallback(
|
|
14166
15193
|
(name) => {
|
|
14167
15194
|
return nodes.filter(isLineageGraphNode).find((n) => n.data.name === name);
|
|
14168
15195
|
},
|
|
14169
15196
|
[nodes]
|
|
14170
15197
|
);
|
|
14171
|
-
|
|
15198
|
+
React12.useImperativeHandle(ref, () => ({
|
|
14172
15199
|
copyToClipboard
|
|
14173
15200
|
}));
|
|
14174
|
-
const isModelsChanged =
|
|
15201
|
+
const isModelsChanged = React12.useMemo(() => {
|
|
14175
15202
|
return !!(lineageGraph && lineageGraph.modifiedSet.length > 0);
|
|
14176
15203
|
}, [lineageGraph]);
|
|
14177
15204
|
const viewMode = viewOptions.view_mode ?? "changed_models";
|
|
14178
|
-
const filteredNodeIds =
|
|
15205
|
+
const filteredNodeIds = React12.useMemo(() => {
|
|
14179
15206
|
return nodes.filter((node) => node.type === "lineageGraphNode").map((node) => node.id);
|
|
14180
15207
|
}, [nodes]);
|
|
14181
|
-
const filteredNodes =
|
|
15208
|
+
const filteredNodes = React12.useMemo(() => {
|
|
14182
15209
|
if (!lineageGraph) {
|
|
14183
15210
|
return [];
|
|
14184
15211
|
}
|
|
14185
15212
|
return filteredNodeIds.map((nodeId) => lineageGraph.nodes[nodeId]);
|
|
14186
15213
|
}, [lineageGraph, filteredNodeIds]);
|
|
14187
|
-
const [focusedNodeId, setFocusedNodeId] =
|
|
15214
|
+
const [focusedNodeId, setFocusedNodeId] = React12.useState();
|
|
14188
15215
|
const focusedNode = focusedNodeId ? lineageGraph?.nodes[focusedNodeId] : void 0;
|
|
14189
|
-
const [selectMode, setSelectMode] =
|
|
14190
|
-
const [selectedNodeIds, setSelectedNodeIds] =
|
|
15216
|
+
const [selectMode, setSelectMode] = React12.useState();
|
|
15217
|
+
const [selectedNodeIds, setSelectedNodeIds] = React12.useState(
|
|
14191
15218
|
/* @__PURE__ */ new Set()
|
|
14192
15219
|
);
|
|
14193
|
-
const selectedNodes =
|
|
15220
|
+
const selectedNodes = React12.useMemo(() => {
|
|
14194
15221
|
if (!lineageGraph) {
|
|
14195
15222
|
return [];
|
|
14196
15223
|
}
|
|
@@ -14220,7 +15247,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
14220
15247
|
}
|
|
14221
15248
|
}
|
|
14222
15249
|
);
|
|
14223
|
-
const highlighted =
|
|
15250
|
+
const highlighted = React12.useMemo(() => {
|
|
14224
15251
|
if (!lineageGraph) {
|
|
14225
15252
|
return /* @__PURE__ */ new Set();
|
|
14226
15253
|
}
|
|
@@ -14264,7 +15291,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
14264
15291
|
const closeContextMenu = () => {
|
|
14265
15292
|
lineageViewContextMenu.closeContextMenu();
|
|
14266
15293
|
};
|
|
14267
|
-
|
|
15294
|
+
React12.useLayoutEffect(() => {
|
|
14268
15295
|
const t = async () => {
|
|
14269
15296
|
let filteredNodeIds2 = void 0;
|
|
14270
15297
|
if (!lineageGraph) {
|
|
@@ -14534,7 +15561,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
14534
15561
|
});
|
|
14535
15562
|
};
|
|
14536
15563
|
const valueDiffAlertDialog = useValueDiffAlertDialog_default();
|
|
14537
|
-
|
|
15564
|
+
React12.useEffect(() => {
|
|
14538
15565
|
const runResultType = run?.type;
|
|
14539
15566
|
if (!interactive) {
|
|
14540
15567
|
return;
|
|
@@ -15031,7 +16058,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
15031
16058
|
valueDiffAlertDialog.AlertDialog
|
|
15032
16059
|
] });
|
|
15033
16060
|
}
|
|
15034
|
-
var LineageView =
|
|
16061
|
+
var LineageView = React12.forwardRef(
|
|
15035
16062
|
PrivateLineageView
|
|
15036
16063
|
);
|
|
15037
16064
|
function LineagePage() {
|
|
@@ -15167,7 +16194,7 @@ ${sqlQuery}`;
|
|
|
15167
16194
|
const { mutate: runQuery, isPending } = reactQuery.useMutation({
|
|
15168
16195
|
mutationFn: queryFn
|
|
15169
16196
|
});
|
|
15170
|
-
const currentSchema =
|
|
16197
|
+
const currentSchema = React12.useMemo(() => {
|
|
15171
16198
|
const initialValue = "N/A";
|
|
15172
16199
|
const countMap = {};
|
|
15173
16200
|
if (!lineageGraph) {
|
|
@@ -15443,9 +16470,9 @@ var CheckList = ({
|
|
|
15443
16470
|
onCheckSelected,
|
|
15444
16471
|
onChecksReordered
|
|
15445
16472
|
}) => {
|
|
15446
|
-
const [bypassModal, setBypassModal] =
|
|
15447
|
-
const [open, setOpen] =
|
|
15448
|
-
const [pendingApprovalCheckId, setPendingApprovalCheckId] =
|
|
16473
|
+
const [bypassModal, setBypassModal] = React12.useState(false);
|
|
16474
|
+
const [open, setOpen] = React12.useState(false);
|
|
16475
|
+
const [pendingApprovalCheckId, setPendingApprovalCheckId] = React12.useState(null);
|
|
15449
16476
|
const queryClient = reactQuery.useQueryClient();
|
|
15450
16477
|
const { mutate: markCheckedByID } = reactQuery.useMutation({
|
|
15451
16478
|
mutationFn: (checkId) => updateCheck(checkId, { is_checked: true }),
|
|
@@ -15548,14 +16575,14 @@ var CheckList = ({
|
|
|
15548
16575
|
]
|
|
15549
16576
|
}
|
|
15550
16577
|
) }) }),
|
|
15551
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15552
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16578
|
+
/* @__PURE__ */ jsxRuntime.jsxs(MuiDialog__default.default, { open, onClose: handleClose, maxWidth: "xs", fullWidth: true, children: [
|
|
16579
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogTitle__default.default, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
15553
16580
|
"Mark as Approved?",
|
|
15554
16581
|
/* @__PURE__ */ jsxRuntime.jsx(Box34__default.default, { sx: { flexGrow: 1 } }),
|
|
15555
16582
|
/* @__PURE__ */ jsxRuntime.jsx(IconButton2__default.default, { size: "small", onClick: handleClose, children: /* @__PURE__ */ jsxRuntime.jsx(io5.IoClose, {}) })
|
|
15556
16583
|
] }),
|
|
15557
16584
|
/* @__PURE__ */ jsxRuntime.jsx(Divider__default.default, {}),
|
|
15558
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16585
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogContent__default.default, { sx: { fontSize: "0.875rem" }, children: [
|
|
15559
16586
|
/* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { children: "Please ensure you have reviewed the contents of this check before marking it as approved." }),
|
|
15560
16587
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15561
16588
|
FormControlLabel4__default.default,
|
|
@@ -15575,7 +16602,7 @@ var CheckList = ({
|
|
|
15575
16602
|
)
|
|
15576
16603
|
] }),
|
|
15577
16604
|
/* @__PURE__ */ jsxRuntime.jsx(Divider__default.default, {}),
|
|
15578
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16605
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogActions__default.default, { sx: { gap: 0 }, children: [
|
|
15579
16606
|
/* @__PURE__ */ jsxRuntime.jsx(Button10__default.default, { variant: "outlined", size: "small", onClick: handleClose, children: "Cancel" }),
|
|
15580
16607
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15581
16608
|
Button10__default.default,
|
|
@@ -15715,7 +16742,7 @@ function CommentInput({
|
|
|
15715
16742
|
isSubmitting = false,
|
|
15716
16743
|
placeholder = "Add a comment..."
|
|
15717
16744
|
}) {
|
|
15718
|
-
const [content, setContent] =
|
|
16745
|
+
const [content, setContent] = React12.useState("");
|
|
15719
16746
|
const handleSubmit = () => {
|
|
15720
16747
|
const trimmed = content.trim();
|
|
15721
16748
|
if (trimmed) {
|
|
@@ -15774,13 +16801,13 @@ function truncateUrl(url, maxLength = 60) {
|
|
|
15774
16801
|
try {
|
|
15775
16802
|
const urlObj = new URL(url);
|
|
15776
16803
|
const domain = urlObj.hostname;
|
|
15777
|
-
const
|
|
16804
|
+
const path2 = urlObj.pathname + urlObj.search + urlObj.hash;
|
|
15778
16805
|
if (domain.length >= maxLength - 3) {
|
|
15779
16806
|
return domain.substring(0, maxLength - 3) + "...";
|
|
15780
16807
|
}
|
|
15781
16808
|
const remainingLength = maxLength - domain.length - 3;
|
|
15782
|
-
if (
|
|
15783
|
-
return `${domain}${
|
|
16809
|
+
if (path2.length > remainingLength) {
|
|
16810
|
+
return `${domain}${path2.substring(0, remainingLength)}...`;
|
|
15784
16811
|
}
|
|
15785
16812
|
return url;
|
|
15786
16813
|
} catch {
|
|
@@ -15793,9 +16820,9 @@ function ExternalLinkConfirmDialog({
|
|
|
15793
16820
|
onConfirm,
|
|
15794
16821
|
onCancel
|
|
15795
16822
|
}) {
|
|
15796
|
-
const cancelRef =
|
|
16823
|
+
const cancelRef = React12.useRef(null);
|
|
15797
16824
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15798
|
-
|
|
16825
|
+
MuiDialog__default.default,
|
|
15799
16826
|
{
|
|
15800
16827
|
open: isOpen,
|
|
15801
16828
|
onClose: onCancel,
|
|
@@ -15804,7 +16831,7 @@ function ExternalLinkConfirmDialog({
|
|
|
15804
16831
|
"aria-labelledby": "external-link-dialog-title",
|
|
15805
16832
|
children: [
|
|
15806
16833
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15807
|
-
|
|
16834
|
+
DialogTitle__default.default,
|
|
15808
16835
|
{
|
|
15809
16836
|
id: "external-link-dialog-title",
|
|
15810
16837
|
sx: { display: "flex", alignItems: "center", gap: 1 },
|
|
@@ -15828,7 +16855,7 @@ function ExternalLinkConfirmDialog({
|
|
|
15828
16855
|
children: /* @__PURE__ */ jsxRuntime.jsx(io5.IoClose, {})
|
|
15829
16856
|
}
|
|
15830
16857
|
),
|
|
15831
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16858
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogContent__default.default, { children: [
|
|
15832
16859
|
/* @__PURE__ */ jsxRuntime.jsx(Typography28__default.default, { sx: { mb: 1.5 }, children: "This link will take you to an external website outside of Recce. Are you sure you want to continue?" }),
|
|
15833
16860
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15834
16861
|
Box34__default.default,
|
|
@@ -15857,7 +16884,7 @@ function ExternalLinkConfirmDialog({
|
|
|
15857
16884
|
}
|
|
15858
16885
|
)
|
|
15859
16886
|
] }),
|
|
15860
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16887
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogActions__default.default, { sx: { gap: 1 }, children: [
|
|
15861
16888
|
/* @__PURE__ */ jsxRuntime.jsx(Button10__default.default, { ref: cancelRef, variant: "outlined", onClick: onCancel, children: "Cancel" }),
|
|
15862
16889
|
/* @__PURE__ */ jsxRuntime.jsx(Button10__default.default, { color: "iochmara", variant: "contained", onClick: onConfirm, children: "Open Link" })
|
|
15863
16890
|
] })
|
|
@@ -15884,8 +16911,8 @@ function MarkdownLink({
|
|
|
15884
16911
|
children,
|
|
15885
16912
|
internalDomains
|
|
15886
16913
|
}) {
|
|
15887
|
-
const [showConfirm, setShowConfirm] =
|
|
15888
|
-
const [pendingUrl, setPendingUrl] =
|
|
16914
|
+
const [showConfirm, setShowConfirm] = React12.useState(false);
|
|
16915
|
+
const [pendingUrl, setPendingUrl] = React12.useState(null);
|
|
15889
16916
|
const handleClick = (e) => {
|
|
15890
16917
|
if (!href) return;
|
|
15891
16918
|
if (isExternalUrl(href, internalDomains)) {
|
|
@@ -16191,11 +17218,11 @@ function CommentEvent({
|
|
|
16191
17218
|
onEdit,
|
|
16192
17219
|
onDelete
|
|
16193
17220
|
}) {
|
|
16194
|
-
const [isEditing, setIsEditing] =
|
|
16195
|
-
const [editContent, setEditContent] =
|
|
16196
|
-
const [isSubmitting, setIsSubmitting] =
|
|
16197
|
-
const [isDeleting, setIsDeleting] =
|
|
16198
|
-
const [deleteAnchorEl, setDeleteAnchorEl] =
|
|
17221
|
+
const [isEditing, setIsEditing] = React12.useState(false);
|
|
17222
|
+
const [editContent, setEditContent] = React12.useState(event.content || "");
|
|
17223
|
+
const [isSubmitting, setIsSubmitting] = React12.useState(false);
|
|
17224
|
+
const [isDeleting, setIsDeleting] = React12.useState(false);
|
|
17225
|
+
const [deleteAnchorEl, setDeleteAnchorEl] = React12.useState(
|
|
16199
17226
|
null
|
|
16200
17227
|
);
|
|
16201
17228
|
const isDeletePopoverOpen = Boolean(deleteAnchorEl);
|
|
@@ -16594,22 +17621,35 @@ function CheckTimeline({ checkId }) {
|
|
|
16594
17621
|
}
|
|
16595
17622
|
);
|
|
16596
17623
|
}
|
|
16597
|
-
var RecceCheckContext =
|
|
17624
|
+
var RecceCheckContext = React12.createContext({
|
|
16598
17625
|
latestSelectedCheckId: "",
|
|
16599
17626
|
setLatestSelectedCheckId: () => {
|
|
16600
17627
|
return void 0;
|
|
16601
17628
|
}
|
|
16602
17629
|
});
|
|
16603
|
-
|
|
17630
|
+
function RecceCheckContextProvider({ children }) {
|
|
17631
|
+
const [selectCheckId, setSelectCheckId] = React12__default.default.useState("");
|
|
17632
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17633
|
+
RecceCheckContext.Provider,
|
|
17634
|
+
{
|
|
17635
|
+
value: {
|
|
17636
|
+
setLatestSelectedCheckId: setSelectCheckId,
|
|
17637
|
+
latestSelectedCheckId: selectCheckId
|
|
17638
|
+
},
|
|
17639
|
+
children
|
|
17640
|
+
}
|
|
17641
|
+
);
|
|
17642
|
+
}
|
|
17643
|
+
var useRecceCheckContext = () => React12.useContext(RecceCheckContext);
|
|
16604
17644
|
function CheckBreadcrumb({ name, setName }) {
|
|
16605
|
-
const [isEditing, setIsEditing] =
|
|
16606
|
-
const [editValue, setEditValue] =
|
|
16607
|
-
const editInputRef =
|
|
17645
|
+
const [isEditing, setIsEditing] = React12.useState(false);
|
|
17646
|
+
const [editValue, setEditValue] = React12.useState(name);
|
|
17647
|
+
const editInputRef = React12.useRef(null);
|
|
16608
17648
|
const handleClick = () => {
|
|
16609
17649
|
setEditValue(name);
|
|
16610
17650
|
setIsEditing(true);
|
|
16611
17651
|
};
|
|
16612
|
-
const handleCommit =
|
|
17652
|
+
const handleCommit = React12.useCallback(() => {
|
|
16613
17653
|
setName(editValue);
|
|
16614
17654
|
setIsEditing(false);
|
|
16615
17655
|
}, [setName, editValue]);
|
|
@@ -16625,7 +17665,7 @@ function CheckBreadcrumb({ name, setName }) {
|
|
|
16625
17665
|
const handleChange = (event) => {
|
|
16626
17666
|
setEditValue(event.target.value);
|
|
16627
17667
|
};
|
|
16628
|
-
|
|
17668
|
+
React12.useEffect(() => {
|
|
16629
17669
|
const handleClickOutside = (event) => {
|
|
16630
17670
|
if (editInputRef.current && !editInputRef.current.contains(event.target)) {
|
|
16631
17671
|
handleCommit();
|
|
@@ -16677,9 +17717,9 @@ function CheckBreadcrumb({ name, setName }) {
|
|
|
16677
17717
|
}
|
|
16678
17718
|
function CheckDescription({ value, onChange }) {
|
|
16679
17719
|
const { featureToggles } = useRecceInstanceContext();
|
|
16680
|
-
const [editing, setEditing] =
|
|
16681
|
-
const [tempValue, setTempValue] =
|
|
16682
|
-
const textareaRef =
|
|
17720
|
+
const [editing, setEditing] = React12.useState(false);
|
|
17721
|
+
const [tempValue, setTempValue] = React12.useState();
|
|
17722
|
+
const textareaRef = React12.useRef(null);
|
|
16683
17723
|
const handleEdit = () => {
|
|
16684
17724
|
setTempValue(value ?? "");
|
|
16685
17725
|
setEditing(true);
|
|
@@ -16708,7 +17748,7 @@ function CheckDescription({ value, onChange }) {
|
|
|
16708
17748
|
const handleChange = (event) => {
|
|
16709
17749
|
setTempValue(event.target.value);
|
|
16710
17750
|
};
|
|
16711
|
-
|
|
17751
|
+
React12.useEffect(() => {
|
|
16712
17752
|
if (editing && textareaRef.current) {
|
|
16713
17753
|
const element = textareaRef.current;
|
|
16714
17754
|
element.focus();
|
|
@@ -16811,7 +17851,7 @@ function _LineageDiffView({ check }, ref) {
|
|
|
16811
17851
|
};
|
|
16812
17852
|
return /* @__PURE__ */ jsxRuntime.jsx(Box34__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 }) }) });
|
|
16813
17853
|
}
|
|
16814
|
-
var LineageDiffView =
|
|
17854
|
+
var LineageDiffView = React12.forwardRef(
|
|
16815
17855
|
_LineageDiffView
|
|
16816
17856
|
);
|
|
16817
17857
|
function generateCheckTemplate({
|
|
@@ -16916,7 +17956,7 @@ function PrivateSchemaDiffView({ check }, ref) {
|
|
|
16916
17956
|
refetchOnMount: true,
|
|
16917
17957
|
enabled: !params.node_id
|
|
16918
17958
|
});
|
|
16919
|
-
const [nodes, changedNodes] =
|
|
17959
|
+
const [nodes, changedNodes] = React12.useMemo(() => {
|
|
16920
17960
|
const selectedNodes = [];
|
|
16921
17961
|
const changedNodes2 = [];
|
|
16922
17962
|
const addedNodes = [];
|
|
@@ -16975,7 +18015,7 @@ function PrivateSchemaDiffView({ check }, ref) {
|
|
|
16975
18015
|
});
|
|
16976
18016
|
return [filteredNodes, changedNodes2];
|
|
16977
18017
|
}, [params.node_id, data?.nodes, lineageGraph]);
|
|
16978
|
-
const [selected, setSelected] =
|
|
18018
|
+
const [selected, setSelected] = React12.useState(0);
|
|
16979
18019
|
if (isLoading) {
|
|
16980
18020
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16981
18021
|
Box34__default.default,
|
|
@@ -17061,7 +18101,7 @@ function PrivateSchemaDiffView({ check }, ref) {
|
|
|
17061
18101
|
}
|
|
17062
18102
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
17063
18103
|
}
|
|
17064
|
-
var SchemaDiffView =
|
|
18104
|
+
var SchemaDiffView = React12.forwardRef(PrivateSchemaDiffView);
|
|
17065
18105
|
function CheckDetail({
|
|
17066
18106
|
checkId,
|
|
17067
18107
|
refreshCheckList
|
|
@@ -17073,11 +18113,11 @@ function CheckDetail({
|
|
|
17073
18113
|
const [, setLocation] = useAppLocation();
|
|
17074
18114
|
const { successToast, failToast } = useClipBoardToast();
|
|
17075
18115
|
const { markedAsApprovedToast } = useCheckToast();
|
|
17076
|
-
const [submittedRunId, setSubmittedRunId] =
|
|
17077
|
-
const [progress] =
|
|
17078
|
-
const [isAborting, setAborting] =
|
|
17079
|
-
const [isPresetCheckTemplateOpen, setIsPresetCheckTemplateOpen] =
|
|
17080
|
-
const [menuAnchorEl, setMenuAnchorEl] =
|
|
18116
|
+
const [submittedRunId, setSubmittedRunId] = React12.useState();
|
|
18117
|
+
const [progress] = React12.useState();
|
|
18118
|
+
const [isAborting, setAborting] = React12.useState(false);
|
|
18119
|
+
const [isPresetCheckTemplateOpen, setIsPresetCheckTemplateOpen] = React12.useState(false);
|
|
18120
|
+
const [menuAnchorEl, setMenuAnchorEl] = React12.useState(null);
|
|
17081
18121
|
const menuOpen = Boolean(menuAnchorEl);
|
|
17082
18122
|
const {
|
|
17083
18123
|
isLoading,
|
|
@@ -17097,7 +18137,7 @@ function CheckDetail({
|
|
|
17097
18137
|
RunResultView = runTypeEntry.RunResultView;
|
|
17098
18138
|
}
|
|
17099
18139
|
const isPresetCheck = check?.is_preset ?? false;
|
|
17100
|
-
const lineageViewRef =
|
|
18140
|
+
const lineageViewRef = React12.useRef(null);
|
|
17101
18141
|
const { mutate } = reactQuery.useMutation({
|
|
17102
18142
|
mutationFn: (check2) => updateCheck(checkId, check2),
|
|
17103
18143
|
onSuccess: async () => {
|
|
@@ -17132,7 +18172,7 @@ function CheckDetail({
|
|
|
17132
18172
|
failToast("Failed to mark check as preset", error2);
|
|
17133
18173
|
}
|
|
17134
18174
|
});
|
|
17135
|
-
const handleRerun =
|
|
18175
|
+
const handleRerun = React12.useCallback(async () => {
|
|
17136
18176
|
const type = check?.type;
|
|
17137
18177
|
if (!type) {
|
|
17138
18178
|
return;
|
|
@@ -17142,7 +18182,7 @@ function CheckDetail({
|
|
|
17142
18182
|
await queryClient.invalidateQueries({ queryKey: cacheKeys.check(checkId) });
|
|
17143
18183
|
if (refreshCheckList) refreshCheckList();
|
|
17144
18184
|
}, [check, checkId, queryClient, refreshCheckList]);
|
|
17145
|
-
const handleCancel =
|
|
18185
|
+
const handleCancel = React12.useCallback(async () => {
|
|
17146
18186
|
setAborting(true);
|
|
17147
18187
|
if (!trackedRunId) {
|
|
17148
18188
|
return;
|
|
@@ -17170,7 +18210,7 @@ function CheckDetail({
|
|
|
17170
18210
|
failToast("Failed to copy the check to clipboard", err);
|
|
17171
18211
|
}
|
|
17172
18212
|
};
|
|
17173
|
-
const handleApproveCheck =
|
|
18213
|
+
const handleApproveCheck = React12.useCallback(() => {
|
|
17174
18214
|
const isChecked = check?.is_checked;
|
|
17175
18215
|
mutate({ is_checked: !isChecked });
|
|
17176
18216
|
if (!isChecked) {
|
|
@@ -17189,7 +18229,7 @@ function CheckDetail({
|
|
|
17189
18229
|
const handleMenuClose = () => {
|
|
17190
18230
|
setMenuAnchorEl(null);
|
|
17191
18231
|
};
|
|
17192
|
-
const [tabValue, setTabValue] =
|
|
18232
|
+
const [tabValue, setTabValue] = React12.useState("result");
|
|
17193
18233
|
const { ref, onCopyToClipboard, onMouseEnter, onMouseLeave } = useCopyToClipboardButton();
|
|
17194
18234
|
const presetCheckTemplate = generateCheckTemplate({
|
|
17195
18235
|
name: check?.name ?? "",
|
|
@@ -17640,15 +18680,15 @@ function CheckDetail({
|
|
|
17640
18680
|
}
|
|
17641
18681
|
) }),
|
|
17642
18682
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17643
|
-
|
|
18683
|
+
MuiDialog__default.default,
|
|
17644
18684
|
{
|
|
17645
18685
|
open: isPresetCheckTemplateOpen,
|
|
17646
18686
|
onClose: () => setIsPresetCheckTemplateOpen(false),
|
|
17647
18687
|
maxWidth: "md",
|
|
17648
18688
|
fullWidth: true,
|
|
17649
18689
|
children: [
|
|
17650
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17651
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
18690
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle__default.default, { children: "Preset Check Template" }),
|
|
18691
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogContent__default.default, { children: [
|
|
17652
18692
|
/* @__PURE__ */ jsxRuntime.jsxs(Typography28__default.default, { variant: "subtitle2", fontWeight: "bold", sx: { mb: 2 }, children: [
|
|
17653
18693
|
"Please",
|
|
17654
18694
|
" ",
|
|
@@ -17684,7 +18724,7 @@ function CheckDetail({
|
|
|
17684
18724
|
] }),
|
|
17685
18725
|
/* @__PURE__ */ jsxRuntime.jsx(PresetCheckTemplateView, { yamlTemplate: presetCheckTemplate })
|
|
17686
18726
|
] }),
|
|
17687
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18727
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogActions__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17688
18728
|
IconButton2__default.default,
|
|
17689
18729
|
{
|
|
17690
18730
|
size: "small",
|
|
@@ -17949,7 +18989,7 @@ function DateDividedRunHistoryItem({
|
|
|
17949
18989
|
trackHistoryAction({ name: "click_run" });
|
|
17950
18990
|
showRunId(runId2, false);
|
|
17951
18991
|
};
|
|
17952
|
-
const handleAddToChecklist =
|
|
18992
|
+
const handleAddToChecklist = React12.useCallback(
|
|
17953
18993
|
async (clickedRunId) => {
|
|
17954
18994
|
const check = await createCheckByRun(clickedRunId);
|
|
17955
18995
|
await queryClient.invalidateQueries({ queryKey: cacheKeys.checks() });
|
|
@@ -17957,14 +18997,14 @@ function DateDividedRunHistoryItem({
|
|
|
17957
18997
|
},
|
|
17958
18998
|
[setLocation, queryClient]
|
|
17959
18999
|
);
|
|
17960
|
-
const handleGoToCheck =
|
|
19000
|
+
const handleGoToCheck = React12.useCallback(
|
|
17961
19001
|
(checkId) => {
|
|
17962
19002
|
trackHistoryAction({ name: "go_to_check" });
|
|
17963
19003
|
setLocation(`/checks/?id=${checkId}`);
|
|
17964
19004
|
},
|
|
17965
19005
|
[setLocation]
|
|
17966
19006
|
);
|
|
17967
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19007
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React12__default.default.Fragment, { children: [
|
|
17968
19008
|
shouldRenderDateSegment && /* @__PURE__ */ jsxRuntime.jsx(DateSegmentItem, { runAt: run.run_at }, currentDate),
|
|
17969
19009
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17970
19010
|
RunListItem,
|
|
@@ -18201,8 +19241,8 @@ function listChangedNodes(lineageGraph) {
|
|
|
18201
19241
|
return changedNodes;
|
|
18202
19242
|
}
|
|
18203
19243
|
function SchemaSummary({ lineageGraph }) {
|
|
18204
|
-
const [changedNodes, setChangedNodes] =
|
|
18205
|
-
|
|
19244
|
+
const [changedNodes, setChangedNodes] = React12.useState([]);
|
|
19245
|
+
React12.useEffect(() => {
|
|
18206
19246
|
setChangedNodes(listChangedNodes(lineageGraph));
|
|
18207
19247
|
}, [lineageGraph]);
|
|
18208
19248
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -18299,9 +19339,9 @@ async function submitValueDiffDetail(params, options) {
|
|
|
18299
19339
|
return await submitRun("value_diff_detail", params, options);
|
|
18300
19340
|
}
|
|
18301
19341
|
function useVersionNumber() {
|
|
18302
|
-
const [version, setVersion] =
|
|
18303
|
-
const [latestVersion, setLatestVersion] =
|
|
18304
|
-
|
|
19342
|
+
const [version, setVersion] = React12.useState("");
|
|
19343
|
+
const [latestVersion, setLatestVersion] = React12.useState("");
|
|
19344
|
+
React12.useEffect(() => {
|
|
18305
19345
|
async function fetchVersion() {
|
|
18306
19346
|
try {
|
|
18307
19347
|
const { version: version2, latestVersion: latestVersion2 } = (await axiosClient.get(
|
|
@@ -18317,6 +19357,9 @@ function useVersionNumber() {
|
|
|
18317
19357
|
}, []);
|
|
18318
19358
|
return { version, latestVersion };
|
|
18319
19359
|
}
|
|
19360
|
+
function RecceContextProvider({ children }) {
|
|
19361
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RecceInstanceInfoProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(RecceShareStateContextProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(RecceQueryContextProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(LineageGraphContextProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(RowCountStateContextProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(RecceActionContextProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(RecceCheckContextProvider, { children }) }) }) }) }) }) });
|
|
19362
|
+
}
|
|
18320
19363
|
|
|
18321
19364
|
// src/index.ts
|
|
18322
19365
|
var VERSION = "0.1.0";
|
|
@@ -18343,7 +19386,9 @@ exports.IconImport = IconImport;
|
|
|
18343
19386
|
exports.IconInfo = IconInfo;
|
|
18344
19387
|
exports.IconSave = IconSave;
|
|
18345
19388
|
exports.IconSync = IconSync;
|
|
19389
|
+
exports.IdleTimeoutProvider = IdleTimeoutProvider;
|
|
18346
19390
|
exports.LineageDiffView = LineageDiffView;
|
|
19391
|
+
exports.LineageGraphContextProvider = LineageGraphContextProvider;
|
|
18347
19392
|
exports.LineagePage = LineagePage;
|
|
18348
19393
|
exports.LineageView = LineageView;
|
|
18349
19394
|
exports.LineageViewContext = LineageViewContext;
|
|
@@ -18362,9 +19407,16 @@ exports.QueryForm = QueryForm;
|
|
|
18362
19407
|
exports.QueryPage = QueryPage;
|
|
18363
19408
|
exports.QueryResultView = QueryResultView;
|
|
18364
19409
|
exports.RECCE_SUPPORT_CALENDAR_URL = RECCE_SUPPORT_CALENDAR_URL;
|
|
19410
|
+
exports.RecceActionContextProvider = RecceActionContextProvider;
|
|
19411
|
+
exports.RecceCheckContextProvider = RecceCheckContextProvider;
|
|
19412
|
+
exports.RecceContextProvider = RecceContextProvider;
|
|
19413
|
+
exports.RecceInstanceInfoProvider = RecceInstanceInfoProvider;
|
|
19414
|
+
exports.RecceQueryContextProvider = RecceQueryContextProvider;
|
|
19415
|
+
exports.RecceShareStateContextProvider = RecceShareStateContextProvider;
|
|
18365
19416
|
exports.ResourceTypeTag = ResourceTypeTag;
|
|
18366
19417
|
exports.RowCountDiffResultView = RowCountDiffResultView;
|
|
18367
19418
|
exports.RowCountDiffTag = RowCountDiffTag;
|
|
19419
|
+
exports.RowCountStateContextProvider = RowCountStateContextProvider;
|
|
18368
19420
|
exports.RunList = RunList;
|
|
18369
19421
|
exports.RunModal = RunModal;
|
|
18370
19422
|
exports.RunPage = RunPage;
|
|
@@ -18441,8 +19493,17 @@ exports.updateCheck = updateCheck;
|
|
|
18441
19493
|
exports.useCheckToast = useCheckToast;
|
|
18442
19494
|
exports.useChecks = useChecks;
|
|
18443
19495
|
exports.useClipBoardToast = useClipBoardToast;
|
|
19496
|
+
exports.useIdleTimeout = useIdleTimeout;
|
|
19497
|
+
exports.useLineageGraphContext = useLineageGraphContext;
|
|
18444
19498
|
exports.useLineageViewContext = useLineageViewContext;
|
|
19499
|
+
exports.useRecceActionContext = useRecceActionContext;
|
|
19500
|
+
exports.useRecceCheckContext = useRecceCheckContext;
|
|
19501
|
+
exports.useRecceInstanceContext = useRecceInstanceContext;
|
|
18445
19502
|
exports.useRecceInstanceInfo = useRecceInstanceInfo;
|
|
19503
|
+
exports.useRecceQueryContext = useRecceQueryContext;
|
|
19504
|
+
exports.useRecceShareStateContext = useRecceShareStateContext;
|
|
19505
|
+
exports.useRowCountStateContext = useRowCountStateContext;
|
|
19506
|
+
exports.useRunsAggregated = useRunsAggregated;
|
|
18446
19507
|
exports.useToaster = useToaster;
|
|
18447
19508
|
exports.useValueDiffAlertDialog = useValueDiffAlertDialog_default;
|
|
18448
19509
|
exports.useVersionNumber = useVersionNumber;
|