@ethisyscore/plugin-ui 1.104.0 → 1.106.0
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 +29 -3
- 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 +29 -4
- package/dist/components/connectors/index.js.map +1 -1
- package/dist/connector-mappings/index.cjs.map +1 -1
- package/dist/connector-mappings/index.d.cts +2 -2
- package/dist/connector-mappings/index.d.ts +2 -2
- package/dist/connector-mappings/index.js.map +1 -1
- package/dist/{mappingQueryKeys-KONuceBb.d.cts → mappingQueryKeys-T-gPzJk1.d.cts} +21 -1
- package/dist/{mappingQueryKeys-KONuceBb.d.ts → mappingQueryKeys-T-gPzJk1.d.ts} +21 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ConnectorCanonicalField } from '../../mappingQueryKeys-
|
|
2
|
-
export { a as CONNECTOR_CONTROL_LABEL, b as ConnectorCanonicalFieldKind, c as ConnectorMappingSuggestionResult, d as ConnectorMappingTranslationEditorProps, e as ConnectorMappingTranslationEditorView, M as MappingCompletenessBanner, f as MappingCompletenessBannerProps, g as MappingCompletenessItem, h as MappingCompletenessResult, i as MappingReadiness, P as PLUGIN_PROVIDER_CONTROL_LABEL, j as PROVIDER_CONTROL_LABEL, k as PROVIDER_OPTION_LABEL, S as SUPPRESS_REQUEST_FIELD_VALUE, T as TestToolMappingExtractedField, l as TestToolMappingRequest, m as TestToolMappingResult, n as connectorMappingCompletenessQueryKey, o as connectorMappingsQueryKey, p as connectorMappingsRootQueryKey, q as pluginTargetMappingsQueryKey, s as selectIncompleteOperations, r as selectMappingReadiness, t as selectOptionalIncompleteOperations, u as selectRequiredIncompleteOperations } from '../../mappingQueryKeys-
|
|
1
|
+
import { C as ConnectorCanonicalField } from '../../mappingQueryKeys-T-gPzJk1.cjs';
|
|
2
|
+
export { a as CONNECTOR_CONTROL_LABEL, b as ConnectorCanonicalFieldKind, c as ConnectorMappingSuggestionResult, d as ConnectorMappingTranslationEditorProps, e as ConnectorMappingTranslationEditorView, M as MappingCompletenessBanner, f as MappingCompletenessBannerProps, g as MappingCompletenessItem, h as MappingCompletenessResult, i as MappingReadiness, P as PLUGIN_PROVIDER_CONTROL_LABEL, j as PROVIDER_CONTROL_LABEL, k as PROVIDER_OPTION_LABEL, S as SUPPRESS_REQUEST_FIELD_VALUE, T as TestToolMappingExtractedField, l as TestToolMappingRequest, m as TestToolMappingResult, n as connectorMappingCompletenessQueryKey, o as connectorMappingsQueryKey, p as connectorMappingsRootQueryKey, q as pluginTargetMappingsQueryKey, s as selectIncompleteOperations, r as selectMappingReadiness, t as selectOptionalIncompleteOperations, u as selectRequiredIncompleteOperations, v as selectRequiredUnmappedOperations } from '../../mappingQueryKeys-T-gPzJk1.cjs';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ConnectorCanonicalField } from '../../mappingQueryKeys-
|
|
2
|
-
export { a as CONNECTOR_CONTROL_LABEL, b as ConnectorCanonicalFieldKind, c as ConnectorMappingSuggestionResult, d as ConnectorMappingTranslationEditorProps, e as ConnectorMappingTranslationEditorView, M as MappingCompletenessBanner, f as MappingCompletenessBannerProps, g as MappingCompletenessItem, h as MappingCompletenessResult, i as MappingReadiness, P as PLUGIN_PROVIDER_CONTROL_LABEL, j as PROVIDER_CONTROL_LABEL, k as PROVIDER_OPTION_LABEL, S as SUPPRESS_REQUEST_FIELD_VALUE, T as TestToolMappingExtractedField, l as TestToolMappingRequest, m as TestToolMappingResult, n as connectorMappingCompletenessQueryKey, o as connectorMappingsQueryKey, p as connectorMappingsRootQueryKey, q as pluginTargetMappingsQueryKey, s as selectIncompleteOperations, r as selectMappingReadiness, t as selectOptionalIncompleteOperations, u as selectRequiredIncompleteOperations } from '../../mappingQueryKeys-
|
|
1
|
+
import { C as ConnectorCanonicalField } from '../../mappingQueryKeys-T-gPzJk1.js';
|
|
2
|
+
export { a as CONNECTOR_CONTROL_LABEL, b as ConnectorCanonicalFieldKind, c as ConnectorMappingSuggestionResult, d as ConnectorMappingTranslationEditorProps, e as ConnectorMappingTranslationEditorView, M as MappingCompletenessBanner, f as MappingCompletenessBannerProps, g as MappingCompletenessItem, h as MappingCompletenessResult, i as MappingReadiness, P as PLUGIN_PROVIDER_CONTROL_LABEL, j as PROVIDER_CONTROL_LABEL, k as PROVIDER_OPTION_LABEL, S as SUPPRESS_REQUEST_FIELD_VALUE, T as TestToolMappingExtractedField, l as TestToolMappingRequest, m as TestToolMappingResult, n as connectorMappingCompletenessQueryKey, o as connectorMappingsQueryKey, p as connectorMappingsRootQueryKey, q as pluginTargetMappingsQueryKey, s as selectIncompleteOperations, r as selectMappingReadiness, t as selectOptionalIncompleteOperations, u as selectRequiredIncompleteOperations, v as selectRequiredUnmappedOperations } from '../../mappingQueryKeys-T-gPzJk1.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
@@ -1111,6 +1111,9 @@ function hasUnmappedRequiredField(op) {
|
|
|
1111
1111
|
function selectIncompleteOperations(operations) {
|
|
1112
1112
|
return operations.filter(hasUnmappedRequiredField);
|
|
1113
1113
|
}
|
|
1114
|
+
function selectRequiredUnmappedOperations(operations) {
|
|
1115
|
+
return operations.filter((op) => op.isRequired && !op.isToolMapped);
|
|
1116
|
+
}
|
|
1114
1117
|
function selectRequiredIncompleteOperations(operations) {
|
|
1115
1118
|
return operations.filter((op) => op.isRequired && hasUnmappedRequiredField(op));
|
|
1116
1119
|
}
|
|
@@ -1146,9 +1149,15 @@ function MappingCompletenessBanner({
|
|
|
1146
1149
|
disableSuggest = false,
|
|
1147
1150
|
isProviderUnconfigured = false
|
|
1148
1151
|
}) {
|
|
1149
|
-
const
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1152
|
+
const unmapped = selectRequiredUnmappedOperations(operations);
|
|
1153
|
+
const unmappedKeys = new Set(unmapped.map((op) => op.operationKey));
|
|
1154
|
+
const required = selectRequiredIncompleteOperations(operations).filter(
|
|
1155
|
+
(op) => !unmappedKeys.has(op.operationKey)
|
|
1156
|
+
);
|
|
1157
|
+
const optional = selectOptionalIncompleteOperations(operations).filter(
|
|
1158
|
+
(op) => !unmappedKeys.has(op.operationKey)
|
|
1159
|
+
);
|
|
1160
|
+
if (!isProviderUnconfigured && unmapped.length === 0 && required.length === 0 && optional.length === 0) {
|
|
1152
1161
|
return null;
|
|
1153
1162
|
}
|
|
1154
1163
|
const renderRow = (op) => {
|
|
@@ -1223,6 +1232,22 @@ function MappingCompletenessBanner({
|
|
|
1223
1232
|
]
|
|
1224
1233
|
}
|
|
1225
1234
|
),
|
|
1235
|
+
unmapped.length > 0 && /* @__PURE__ */ jsxs(
|
|
1236
|
+
Alert,
|
|
1237
|
+
{
|
|
1238
|
+
severity: "error",
|
|
1239
|
+
sx: { mb: required.length > 0 || optional.length > 0 ? 2 : 0 },
|
|
1240
|
+
"data-testid": "required-unmapped-alert",
|
|
1241
|
+
children: [
|
|
1242
|
+
/* @__PURE__ */ jsx(AlertTitle, { children: unmapped.length === 1 ? "A required operation has no tool mapped" : "Required operations have no tool mapped" }),
|
|
1243
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
|
|
1244
|
+
unmapped.length === 1 ? "This operation has nothing to call, so the module cannot do its job until a tool is chosen for it. " : `${unmapped.length} required operations have nothing to call, so the module cannot do its job until a tool is chosen for each. `,
|
|
1245
|
+
"Pick one on the row below. If this connector exposes nothing suitable, the module needs a different connector rather than a translation."
|
|
1246
|
+
] }),
|
|
1247
|
+
/* @__PURE__ */ jsx(Box, { sx: { mt: 1 }, children: unmapped.map(renderRow) })
|
|
1248
|
+
]
|
|
1249
|
+
}
|
|
1250
|
+
),
|
|
1226
1251
|
required.length > 0 && /* @__PURE__ */ jsxs(Alert, { severity: "warning", sx: { mb: optional.length > 0 ? 2 : 0 }, children: [
|
|
1227
1252
|
/* @__PURE__ */ jsx(AlertTitle, { children: "Required operations are missing request-field mappings" }),
|
|
1228
1253
|
/* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
|
|
@@ -2077,6 +2102,6 @@ function connectorMappingCompletenessQueryKey(connectorId, moduleKey) {
|
|
|
2077
2102
|
return [...connectorMappingsQueryKey(connectorId, moduleKey), "completeness"];
|
|
2078
2103
|
}
|
|
2079
2104
|
|
|
2080
|
-
export { CONNECTOR_CONTROL_LABEL, ConnectorMappingTranslationEditorView, ConnectorMappingView, MappingCompletenessBanner, PLUGIN_PROVIDER_CONTROL_LABEL, PROVIDER_CONTROL_LABEL, PROVIDER_OPTION_LABEL, SUPPRESS_REQUEST_FIELD_VALUE, connectorMappingCompletenessQueryKey, connectorMappingsQueryKey, connectorMappingsRootQueryKey, pluginTargetMappingsQueryKey, selectIncompleteOperations, selectMappingReadiness, selectOptionalIncompleteOperations, selectRequiredIncompleteOperations };
|
|
2105
|
+
export { CONNECTOR_CONTROL_LABEL, ConnectorMappingTranslationEditorView, ConnectorMappingView, MappingCompletenessBanner, PLUGIN_PROVIDER_CONTROL_LABEL, PROVIDER_CONTROL_LABEL, PROVIDER_OPTION_LABEL, SUPPRESS_REQUEST_FIELD_VALUE, connectorMappingCompletenessQueryKey, connectorMappingsQueryKey, connectorMappingsRootQueryKey, pluginTargetMappingsQueryKey, selectIncompleteOperations, selectMappingReadiness, selectOptionalIncompleteOperations, selectRequiredIncompleteOperations, selectRequiredUnmappedOperations };
|
|
2081
2106
|
//# sourceMappingURL=index.js.map
|
|
2082
2107
|
//# sourceMappingURL=index.js.map
|