synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
62 lines (61 loc) • 1.95 kB
JavaScript
import { jsxs as f, jsx as t } from "react/jsx-runtime";
import h from "../../../../components/DataGrid/components/GridSessionSelectionField.js";
import { GRID_PAGE_SESSION_ID_QUERY_PARAM as d, GRID_PAGE_TASK_ID_QUERY_PARAM as s, GRID_PAGE_AGENT_REGISTRATION_ID_QUERY_PARAM as o } from "../../../../utils/SynapseConstants.js";
import _ from "@mui/material/Button";
import n from "@mui/material/Grid";
import I from "@mui/material/TextField";
import { useState as l } from "react";
import { useSearchParams as A } from "react-router";
function T() {
const [r, m] = A(), [u, c] = l(
r.get(d) || ""
), [a, g] = l(
r.get(s) || ""
), [i, p] = l(
r.get(o) || ""
);
return /* @__PURE__ */ f(n, { container: !0, spacing: 2, sx: { borderBottomColor: "grey.300" }, children: [
/* @__PURE__ */ t(n, { size: { xs: 4 }, children: /* @__PURE__ */ t(
h,
{
inputValue: u,
onInputValueChange: (e) => c(e)
}
) }),
/* @__PURE__ */ t(n, { size: { xs: 4 }, children: /* @__PURE__ */ t(
I,
{
fullWidth: !0,
label: "Task ID (Optional)",
value: a,
onChange: (e) => g(e.target.value)
}
) }),
/* @__PURE__ */ t(n, { size: { xs: 4 }, children: /* @__PURE__ */ t(
I,
{
fullWidth: !0,
label: "Agent Registration ID (Optional)",
value: i,
onChange: (e) => p(e.target.value)
}
) }),
/* @__PURE__ */ t(n, { container: !0, size: 12, justifyContent: "flex-end", children: /* @__PURE__ */ t(
_,
{
variant: "outlined",
onClick: () => {
m((e) => (e.set(d, u), a ? e.set(s, a) : e.delete(s), i ? e.set(
o,
i
) : e.delete(o), e));
},
children: "Update Search Params (for testing)"
}
) })
] });
}
export {
T as UpdateGridPageSearchParamsForm
};
//# sourceMappingURL=UpdateGridPageSearchParamsForm.js.map