@ethisyscore/plugin-ui 1.100.2 → 1.100.4
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/components/connectors/index.cjs +56 -10
- package/dist/components/connectors/index.cjs.map +1 -1
- package/dist/components/connectors/index.d.cts +2 -2
- package/dist/components/connectors/index.d.ts +2 -2
- package/dist/components/connectors/index.js +57 -12
- package/dist/components/connectors/index.js.map +1 -1
- package/dist/components/ui/index.cjs +4 -0
- package/dist/components/ui/index.d.cts +1 -1
- package/dist/components/ui/index.d.ts +1 -1
- package/dist/components/ui/index.js +1 -1
- package/dist/connector-mappings/index.d.cts +2 -2
- package/dist/connector-mappings/index.d.ts +2 -2
- package/dist/{mappingQueryKeys-BcbA0TGy.d.cts → mappingQueryKeys-KONuceBb.d.cts} +22 -1
- package/dist/{mappingQueryKeys-BcbA0TGy.d.ts → mappingQueryKeys-KONuceBb.d.ts} +22 -1
- package/dist/platform-react/index.cjs +70 -24
- package/dist/platform-react/index.cjs.map +1 -1
- package/dist/platform-react/index.d.cts +45 -2
- package/dist/platform-react/index.d.ts +45 -2
- package/dist/platform-react/index.js +71 -26
- package/dist/platform-react/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1583,6 +1583,10 @@ function ConnectorMappingView({
|
|
|
1583
1583
|
] }) })
|
|
1584
1584
|
] });
|
|
1585
1585
|
}
|
|
1586
|
+
var SUPPRESS_REQUEST_FIELD_VALUE = "(suppress)";
|
|
1587
|
+
function isSuppressed(value) {
|
|
1588
|
+
return value?.trim().toLowerCase() === SUPPRESS_REQUEST_FIELD_VALUE;
|
|
1589
|
+
}
|
|
1586
1590
|
function ConnectorMappingTranslationEditorView({
|
|
1587
1591
|
open,
|
|
1588
1592
|
operationLabel,
|
|
@@ -1626,6 +1630,12 @@ function ConnectorMappingTranslationEditorView({
|
|
|
1626
1630
|
const handleRequestChange = (canonicalName, value) => {
|
|
1627
1631
|
setRequestValues((prev) => ({ ...prev, [canonicalName]: value }));
|
|
1628
1632
|
};
|
|
1633
|
+
const handleRequestSuppressToggle = (canonicalName, suppress) => {
|
|
1634
|
+
setRequestValues((prev) => ({
|
|
1635
|
+
...prev,
|
|
1636
|
+
[canonicalName]: suppress ? SUPPRESS_REQUEST_FIELD_VALUE : ""
|
|
1637
|
+
}));
|
|
1638
|
+
};
|
|
1629
1639
|
const handleResponseChange = (canonicalName, value) => {
|
|
1630
1640
|
setResponseValues((prev) => ({ ...prev, [canonicalName]: value }));
|
|
1631
1641
|
};
|
|
@@ -1719,7 +1729,11 @@ function ConnectorMappingTranslationEditorView({
|
|
|
1719
1729
|
children: [
|
|
1720
1730
|
/* @__PURE__ */ jsxRuntime.jsxs(material.Box, { children: [
|
|
1721
1731
|
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "h6", component: "h2", className: "mb-3", children: "Request fields" }),
|
|
1722
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1732
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.Typography, { variant: "caption", className: "text-text-secondary mb-2 block", children: [
|
|
1733
|
+
"Map each canonical request field to the tool's actual input field name. If the tool has no property for a field, tick ",
|
|
1734
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "Do not send this field" }),
|
|
1735
|
+
" \u2014 many tools reject a whole call for one argument they do not recognise."
|
|
1736
|
+
] }),
|
|
1723
1737
|
canonicalRequestFields.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", className: "text-text-disabled italic", children: "No request fields declared." }) : /* @__PURE__ */ jsxRuntime.jsx(material.Box, { className: "flex flex-col gap-3", children: canonicalRequestFields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1724
1738
|
FieldRow,
|
|
1725
1739
|
{
|
|
@@ -1727,7 +1741,8 @@ function ConnectorMappingTranslationEditorView({
|
|
|
1727
1741
|
value: requestValues[field.name] ?? "",
|
|
1728
1742
|
onChange: (v) => handleRequestChange(field.name, v),
|
|
1729
1743
|
placeholder: "Same as canonical",
|
|
1730
|
-
inputLabel: "Tool field name"
|
|
1744
|
+
inputLabel: "Tool field name",
|
|
1745
|
+
onSuppressToggle: (v) => handleRequestSuppressToggle(field.name, v)
|
|
1731
1746
|
},
|
|
1732
1747
|
field.name
|
|
1733
1748
|
)) })
|
|
@@ -1978,7 +1993,15 @@ function ConnectorMappingTranslationEditorView({
|
|
|
1978
1993
|
] })
|
|
1979
1994
|
] });
|
|
1980
1995
|
}
|
|
1981
|
-
function FieldRow({
|
|
1996
|
+
function FieldRow({
|
|
1997
|
+
field,
|
|
1998
|
+
value,
|
|
1999
|
+
onChange,
|
|
2000
|
+
placeholder,
|
|
2001
|
+
inputLabel,
|
|
2002
|
+
onSuppressToggle
|
|
2003
|
+
}) {
|
|
2004
|
+
const suppressed = isSuppressed(value);
|
|
1982
2005
|
return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { className: "flex flex-row items-start gap-3", children: [
|
|
1983
2006
|
/* @__PURE__ */ jsxRuntime.jsxs(material.Box, { className: "flex flex-col gap-1", sx: { width: 200, flexShrink: 0 }, children: [
|
|
1984
2007
|
/* @__PURE__ */ jsxRuntime.jsxs(material.Box, { className: "flex items-center gap-1.5", children: [
|
|
@@ -1987,14 +2010,36 @@ function FieldRow({ field, value, onChange, placeholder, inputLabel }) {
|
|
|
1987
2010
|
] }),
|
|
1988
2011
|
/* @__PURE__ */ jsxRuntime.jsx(material.Chip, { label: field.kind, size: "small", variant: "outlined", sx: { alignSelf: "flex-start" } })
|
|
1989
2012
|
] }),
|
|
1990
|
-
/* @__PURE__ */ jsxRuntime.jsxs(material.
|
|
1991
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1992
|
-
|
|
1993
|
-
|
|
2013
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.Box, { className: "flex flex-1 flex-col", children: [
|
|
2014
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.FormControl, { variant: "filled", size: "medium", className: "surface mb-0 flex-1", children: [
|
|
2015
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.InputLabel, { children: inputLabel }),
|
|
2016
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2017
|
+
material.FilledInput,
|
|
2018
|
+
{
|
|
2019
|
+
value: suppressed ? "" : value,
|
|
2020
|
+
onChange: (e) => onChange(e.target.value),
|
|
2021
|
+
placeholder: suppressed ? "Not sent" : placeholder,
|
|
2022
|
+
disabled: suppressed
|
|
2023
|
+
}
|
|
2024
|
+
)
|
|
2025
|
+
] }),
|
|
2026
|
+
onSuppressToggle && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2027
|
+
material.FormControlLabel,
|
|
1994
2028
|
{
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
2029
|
+
className: "mt-1",
|
|
2030
|
+
control: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2031
|
+
material.Checkbox,
|
|
2032
|
+
{
|
|
2033
|
+
size: "small",
|
|
2034
|
+
checked: suppressed,
|
|
2035
|
+
onChange: (e) => onSuppressToggle(e.target.checked),
|
|
2036
|
+
inputProps: { "aria-label": `Do not send ${field.name}` }
|
|
2037
|
+
}
|
|
2038
|
+
),
|
|
2039
|
+
label: /* @__PURE__ */ jsxRuntime.jsxs(material.Typography, { variant: "caption", className: "text-text-secondary", children: [
|
|
2040
|
+
"Do not send this field",
|
|
2041
|
+
field.isRequired ? " (this operation declares it as required)" : ""
|
|
2042
|
+
] })
|
|
1998
2043
|
}
|
|
1999
2044
|
)
|
|
2000
2045
|
] })
|
|
@@ -2041,6 +2086,7 @@ exports.MappingCompletenessBanner = MappingCompletenessBanner;
|
|
|
2041
2086
|
exports.PLUGIN_PROVIDER_CONTROL_LABEL = PLUGIN_PROVIDER_CONTROL_LABEL;
|
|
2042
2087
|
exports.PROVIDER_CONTROL_LABEL = PROVIDER_CONTROL_LABEL;
|
|
2043
2088
|
exports.PROVIDER_OPTION_LABEL = PROVIDER_OPTION_LABEL;
|
|
2089
|
+
exports.SUPPRESS_REQUEST_FIELD_VALUE = SUPPRESS_REQUEST_FIELD_VALUE;
|
|
2044
2090
|
exports.connectorMappingCompletenessQueryKey = connectorMappingCompletenessQueryKey;
|
|
2045
2091
|
exports.connectorMappingsQueryKey = connectorMappingsQueryKey;
|
|
2046
2092
|
exports.connectorMappingsRootQueryKey = connectorMappingsRootQueryKey;
|