@localstack/appinspector-ui 1.0.190 → 1.0.192

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/index.cjs CHANGED
@@ -13104,7 +13104,7 @@ var ResponsiveTimestampCell = (0, import_react31.memo)(({ date }) => {
13104
13104
 
13105
13105
  // src/dev-settings.tsx
13106
13106
  var React5 = __toESM(require("react"), 1);
13107
- var DEFAULT_DEV_SETTINGS = { requestTerms: "on", warningIcon: "iam shield", waterfallIssueBackgrounds: "on", waterfallLayout: "tree", waterfallStatusIcons: "first column" };
13107
+ var DEFAULT_DEV_SETTINGS = { requestTerms: "on", waterfallIssueBackgrounds: "on", waterfallLayout: "tree", waterfallStatusIcons: "first column" };
13108
13108
  var DevSettingsContext = React5.createContext(DEFAULT_DEV_SETTINGS);
13109
13109
  var useDevSettings = () => React5.useContext(DevSettingsContext);
13110
13110
 
@@ -15515,13 +15515,11 @@ var buildTooltipContent = (span) => {
15515
15515
  ] });
15516
15516
  };
15517
15517
  var StatusIconWithTooltip = ({ span }) => {
15518
- const { warningIcon } = useDevSettings();
15519
15518
  const { error, warning: warning2 } = getSpanIssues(span);
15520
15519
  if (!error && !warning2) return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_jsx_runtime125.Fragment, {});
15521
- const iamLevel = getIamSummary(span).level;
15522
15520
  return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Tooltip, { title: buildTooltipContent(span), children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_material5.Box, { sx: { alignItems: "center", cursor: "default", display: "flex" }, children: [
15523
- error && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Box, { "aria-label": "Error", role: "img", sx: { display: "flex" }, children: iamLevel === "error" ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_icons_material2.GppBad, { sx: { color: "error.main" } }) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_icons_material2.Cancel, { sx: { color: "error.main" } }) }),
15524
- warning2 && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Box, { "aria-label": "Warning", role: "img", sx: { display: "flex" }, children: iamLevel === "warning" && warningIcon === "iam shield" ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_icons_material2.GppBad, { sx: { color: "warning.main" } }) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_icons_material2.Error, { sx: { color: "warning.main" } }) })
15521
+ error && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Box, { "aria-label": "Error", role: "img", sx: { display: "flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_icons_material2.Cancel, { sx: { color: "error.main" } }) }),
15522
+ warning2 && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Box, { "aria-label": "Warning", role: "img", sx: { display: "flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_icons_material2.Error, { sx: { color: "warning.main" } }) })
15525
15523
  ] }) });
15526
15524
  };
15527
15525
 
@@ -16869,9 +16867,7 @@ var StatusIcon = ({ errorLevel }) => {
16869
16867
  case EventLevel.LevelInfo: {
16870
16868
  return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material8.Info, { sx: { color: "gray" } });
16871
16869
  }
16872
- case EventLevel.LevelPermission: {
16873
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material8.RemoveCircle, { sx: { color: "blue" } });
16874
- }
16870
+ case EventLevel.LevelPermission:
16875
16871
  case EventLevel.LevelWarning: {
16876
16872
  return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material8.Error, { sx: { color: "orange" } });
16877
16873
  }
@@ -31498,7 +31494,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
31498
31494
  variant: "scrollable",
31499
31495
  children: [
31500
31496
  /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Tab, { "data-testid": DETAIL_TAB_DETAILS_TEST_ID, label: "Details", value: "details" }),
31501
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Tab, { "data-testid": DETAIL_TAB_REQUEST_TEST_ID, label: "Request", value: "request" }),
31497
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Tab, { "data-testid": DETAIL_TAB_REQUEST_TEST_ID, label: "Payload", value: "request" }),
31502
31498
  /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Tab, { "data-testid": DETAIL_TAB_RESPONSE_TEST_ID, label: "Response", value: "response" }),
31503
31499
  showError && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Tab, { "data-testid": DETAIL_TAB_ERROR_TEST_ID, icon: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material11.Cancel, { color: "error", fontSize: "small" }), iconPosition: "end", label: "Error", value: "error" }),
31504
31500
  showPermissions && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Tab, { "data-testid": DETAIL_TAB_PERMISSIONS_TEST_ID, icon: permissionsIcon, iconPosition: "end", label: "Permissions", value: "permissions" }),
@@ -31611,9 +31607,8 @@ var handleStyle = {
31611
31607
  borderColor: "lightgray",
31612
31608
  opacity: 0
31613
31609
  };
31614
- var NodeContent = ({ event, expanded, iamLevel, issues }) => {
31610
+ var NodeContent = ({ event, expanded, issues }) => {
31615
31611
  const theme = (0, import_material20.useTheme)();
31616
- const { warningIcon } = useDevSettings();
31617
31612
  return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, { children: [
31618
31613
  /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react52.Handle, { position: import_react52.Position.Left, style: handleStyle, type: "target" }),
31619
31614
  /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react52.Handle, { position: import_react52.Position.Right, style: handleStyle, type: "source" }),
@@ -31668,8 +31663,8 @@ var NodeContent = ({ event, expanded, iamLevel, issues }) => {
31668
31663
  width: "38px"
31669
31664
  },
31670
31665
  children: [
31671
- issues.error && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Tooltip, { arrow: true, title: issues.errorType, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Box, { "aria-label": "Error", role: "img", sx: { display: "flex" }, children: iamLevel === "error" ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material12.GppBad, { sx: { color: theme.palette.error.main, fontSize: "16px" } }) : /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material12.Cancel, { sx: { color: theme.palette.error.main, fontSize: "16px" } }) }) }),
31672
- issues.warning && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Tooltip, { arrow: true, title: issues.warningType, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Box, { "aria-label": "Warning", role: "img", sx: { display: "flex" }, children: iamLevel === "warning" && warningIcon === "iam shield" ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material12.GppBad, { sx: { color: theme.palette.warning.main, fontSize: "16px" } }) : /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material12.Error, { sx: { color: theme.palette.warning.main, fontSize: "16px" } }) }) })
31666
+ issues.error && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Tooltip, { arrow: true, title: issues.errorType, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Box, { "aria-label": "Error", role: "img", sx: { display: "flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material12.Cancel, { sx: { color: theme.palette.error.main, fontSize: "16px" } }) }) }),
31667
+ issues.warning && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Tooltip, { arrow: true, title: issues.warningType, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material20.Box, { "aria-label": "Warning", role: "img", sx: { display: "flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material12.Error, { sx: { color: theme.palette.warning.main, fontSize: "16px" } }) }) })
31673
31668
  ]
31674
31669
  }
31675
31670
  ),
@@ -31693,17 +31688,20 @@ var ServiceNode = (0, import_react53.memo)(({ data, selected }) => {
31693
31688
  const [isHovered, setIsHovered] = (0, import_react53.useState)(false);
31694
31689
  const nodeRef = (0, import_react53.useRef)(null);
31695
31690
  const issues = getSpanIssues(data.event);
31696
- const iamLevel = getIamSummary(data.event).level;
31697
31691
  const outlineColor = issues.error ? theme.palette.error.main : issues.warning ? theme.palette.warning.main : void 0;
31692
+ const paper = theme.palette.background.paper;
31693
+ const edgeSx = issues.error && issues.warning ? {
31694
+ background: `linear-gradient(135deg, ${theme.palette.error.main} calc(50% - 1px), ${paper} calc(50% - 1px) calc(50% + 1px), ${theme.palette.warning.main} calc(50% + 1px)) left / 3px 100% no-repeat border-box, linear-gradient(${paper}, ${paper}) padding-box`,
31695
+ borderLeft: "3px solid transparent"
31696
+ } : { backgroundColor: paper, borderLeft: `3px solid ${outlineColor ?? "transparent"}` };
31698
31697
  const sharedBoxSx = {
31699
- backgroundColor: theme.palette.background.paper,
31700
- borderLeft: `3px solid ${outlineColor ?? "transparent"}`,
31698
+ ...edgeSx,
31701
31699
  borderRadius: 1,
31702
31700
  cursor: "pointer",
31703
31701
  minWidth: 140,
31704
31702
  outline: selected ? `2px solid ${outlineColor ?? theme.palette.primary.main}` : `1px solid ${theme.palette.divider}`
31705
31703
  };
31706
- const contentProps = { event: data.event, iamLevel, issues };
31704
+ const contentProps = { event: data.event, issues };
31707
31705
  const handleMouseEnter = () => {
31708
31706
  setIsHovered(true);
31709
31707
  const xyNode = nodeRef.current?.closest(".react-flow__node");