@localstack/appinspector-ui 1.0.18 → 1.0.19

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
@@ -2535,11 +2535,9 @@ var AwsServiceIcon = ({ hideTooltip, service, size = "medium", title }) => {
2535
2535
  // src/components/cells/pill-cell.tsx
2536
2536
  var import_material3 = require("@mui/material");
2537
2537
  var import_jsx_runtime123 = require("react/jsx-runtime");
2538
- var defaultBackgroundColor = "background.paper";
2539
- var defaultBorderColor = "palette.divider";
2540
2538
  var PillCell = ({
2541
- backgroundColor = defaultBackgroundColor,
2542
- borderColor = defaultBorderColor,
2539
+ backgroundColor,
2540
+ borderColor,
2543
2541
  borderWidth = "1px",
2544
2542
  children,
2545
2543
  height = "24px",
@@ -2551,8 +2549,8 @@ var PillCell = ({
2551
2549
  {
2552
2550
  sx: {
2553
2551
  alignItems: "center",
2554
- backgroundColor,
2555
- borderColor,
2552
+ backgroundColor: backgroundColor ?? ((theme) => theme.palette.background.paper),
2553
+ borderColor: borderColor ?? ((theme) => theme.palette.divider),
2556
2554
  borderRadius: "16px",
2557
2555
  borderStyle: "solid",
2558
2556
  borderWidth,
@@ -2572,7 +2570,7 @@ var PillCell = ({
2572
2570
  var import_jsx_runtime124 = require("react/jsx-runtime");
2573
2571
  var truncateName = (inputString, truncateLength = 15) => inputString.length > truncateLength ? `${inputString.slice(0, truncateLength - 3)}...` : inputString;
2574
2572
  var ServiceCell = ({
2575
- borderColor = defaultBorderColor,
2573
+ borderColor,
2576
2574
  borderWidth,
2577
2575
  height = "24px",
2578
2576
  resource,
@@ -2582,31 +2580,28 @@ var ServiceCell = ({
2582
2580
  width = "32px"
2583
2581
  }) => {
2584
2582
  return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material4.Box, { sx: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(PillCell, { borderColor, borderWidth, height, children: [
2585
- showIcon ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
2586
- import_material4.Box,
2587
- {
2588
- sx: {
2589
- alignItems: "center",
2590
- borderRightColor: borderColor,
2591
- borderRightStyle: "solid",
2592
- borderRightWidth: `1px`,
2593
- display: "flex",
2594
- height,
2595
- justifyContent: "center",
2596
- overflow: "hidden",
2597
- padding: 0,
2598
- width
2599
- },
2600
- children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(AwsServiceIcon, { hideTooltip: true, service, size: "large" })
2601
- }
2602
- ) : void 0,
2583
+ showIcon ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
2584
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
2585
+ import_material4.Box,
2586
+ {
2587
+ sx: {
2588
+ alignItems: "center",
2589
+ display: "flex",
2590
+ height,
2591
+ justifyContent: "center",
2592
+ overflow: "hidden",
2593
+ padding: 0,
2594
+ width
2595
+ },
2596
+ children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(AwsServiceIcon, { hideTooltip: true, service, size: "large" })
2597
+ }
2598
+ ),
2599
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material4.Divider, { orientation: "vertical" })
2600
+ ] }) : void 0,
2603
2601
  /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
2604
2602
  import_material4.Typography,
2605
2603
  {
2606
2604
  sx: {
2607
- borderRightColor: resource ? borderColor : "none",
2608
- borderRightStyle: resource ? "solid" : "none",
2609
- borderRightWidth: resource ? "1px" : "none",
2610
2605
  fontWeight: "bold",
2611
2606
  overflow: "hidden",
2612
2607
  padding: "1px 8px",
@@ -2625,21 +2620,24 @@ var ServiceCell = ({
2625
2620
  children: service
2626
2621
  }
2627
2622
  ),
2628
- resource ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
2629
- import_material4.Typography,
2630
- {
2631
- sx: {
2632
- borderBottomRightRadius: "15px",
2633
- borderTopRightRadius: "15px",
2634
- overflow: "hidden",
2635
- padding: "1px 8px",
2636
- textOverflow: "ellipsis",
2637
- whiteSpace: "nowrap"
2638
- },
2639
- variant: "body2",
2640
- children: truncateName(resource, truncateLength)
2641
- }
2642
- ) : void 0
2623
+ resource ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
2624
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material4.Box, { sx: { height: "100%", paddingY: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material4.Divider, { orientation: "vertical" }) }),
2625
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
2626
+ import_material4.Typography,
2627
+ {
2628
+ sx: {
2629
+ borderBottomRightRadius: "15px",
2630
+ borderTopRightRadius: "15px",
2631
+ overflow: "hidden",
2632
+ padding: "1px 8px",
2633
+ textOverflow: "ellipsis",
2634
+ whiteSpace: "nowrap"
2635
+ },
2636
+ variant: "body2",
2637
+ children: truncateName(resource, truncateLength)
2638
+ }
2639
+ )
2640
+ ] }) : void 0
2643
2641
  ] }) });
2644
2642
  };
2645
2643
  ServiceCell.displayName = "ServiceCell";
@@ -4962,6 +4960,7 @@ var StyledDrawer = (0, import_styles.styled)(import_material21.Drawer)(() => ({
4962
4960
  var TraceGraphView = ({
4963
4961
  fetchError,
4964
4962
  fetchSpans,
4963
+ handleClose,
4965
4964
  handleEventSelect,
4966
4965
  handleRetry,
4967
4966
  loading,
@@ -5038,7 +5037,7 @@ var TraceGraphView = ({
5038
5037
  ) })
5039
5038
  }
5040
5039
  ) }),
5041
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(EventDetails, { selectedEvent }) })
5040
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(EventDetails, { onClose: handleClose, selectedEvent }) })
5042
5041
  ] })
5043
5042
  }
5044
5043
  )
@@ -5116,6 +5115,9 @@ var TraceGraphPage = () => {
5116
5115
  {
5117
5116
  fetchError,
5118
5117
  fetchSpans: () => void fetchSpans(),
5118
+ handleClose: () => {
5119
+ setOpen(false);
5120
+ },
5119
5121
  handleEventSelect,
5120
5122
  handleRetry,
5121
5123
  loading,