@localstack/appinspector-ui 1.0.17 → 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.js CHANGED
@@ -149,7 +149,7 @@ var ResponsiveTimestampCell = ({ locale, value }) => {
149
149
  };
150
150
 
151
151
  // src/components/cells/service-cell.tsx
152
- import { Box as Box3, Typography } from "@mui/material";
152
+ import { Box as Box3, Divider, Typography } from "@mui/material";
153
153
 
154
154
  // src/components/aws-service-icon/aws-service-icon.tsx
155
155
  import { Tooltip as Tooltip2 } from "@mui/material";
@@ -2498,11 +2498,9 @@ var AwsServiceIcon = ({ hideTooltip, service, size = "medium", title }) => {
2498
2498
  // src/components/cells/pill-cell.tsx
2499
2499
  import { Box as Box2 } from "@mui/material";
2500
2500
  import { jsx as jsx123 } from "react/jsx-runtime";
2501
- var defaultBackgroundColor = "background.paper";
2502
- var defaultBorderColor = "palette.divider";
2503
2501
  var PillCell = ({
2504
- backgroundColor = defaultBackgroundColor,
2505
- borderColor = defaultBorderColor,
2502
+ backgroundColor,
2503
+ borderColor,
2506
2504
  borderWidth = "1px",
2507
2505
  children,
2508
2506
  height = "24px",
@@ -2514,8 +2512,8 @@ var PillCell = ({
2514
2512
  {
2515
2513
  sx: {
2516
2514
  alignItems: "center",
2517
- backgroundColor,
2518
- borderColor,
2515
+ backgroundColor: backgroundColor ?? ((theme) => theme.palette.background.paper),
2516
+ borderColor: borderColor ?? ((theme) => theme.palette.divider),
2519
2517
  borderRadius: "16px",
2520
2518
  borderStyle: "solid",
2521
2519
  borderWidth,
@@ -2532,10 +2530,10 @@ var PillCell = ({
2532
2530
  };
2533
2531
 
2534
2532
  // src/components/cells/service-cell.tsx
2535
- import { jsx as jsx124, jsxs as jsxs119 } from "react/jsx-runtime";
2533
+ import { Fragment as Fragment2, jsx as jsx124, jsxs as jsxs119 } from "react/jsx-runtime";
2536
2534
  var truncateName = (inputString, truncateLength = 15) => inputString.length > truncateLength ? `${inputString.slice(0, truncateLength - 3)}...` : inputString;
2537
2535
  var ServiceCell = ({
2538
- borderColor = defaultBorderColor,
2536
+ borderColor,
2539
2537
  borderWidth,
2540
2538
  height = "24px",
2541
2539
  resource,
@@ -2545,31 +2543,28 @@ var ServiceCell = ({
2545
2543
  width = "32px"
2546
2544
  }) => {
2547
2545
  return /* @__PURE__ */ jsx124(Box3, { sx: { width: "100%" }, children: /* @__PURE__ */ jsxs119(PillCell, { borderColor, borderWidth, height, children: [
2548
- showIcon ? /* @__PURE__ */ jsx124(
2549
- Box3,
2550
- {
2551
- sx: {
2552
- alignItems: "center",
2553
- borderRightColor: borderColor,
2554
- borderRightStyle: "solid",
2555
- borderRightWidth: `1px`,
2556
- display: "flex",
2557
- height,
2558
- justifyContent: "center",
2559
- overflow: "hidden",
2560
- padding: 0,
2561
- width
2562
- },
2563
- children: /* @__PURE__ */ jsx124(AwsServiceIcon, { hideTooltip: true, service, size: "large" })
2564
- }
2565
- ) : void 0,
2546
+ showIcon ? /* @__PURE__ */ jsxs119(Fragment2, { children: [
2547
+ /* @__PURE__ */ jsx124(
2548
+ Box3,
2549
+ {
2550
+ sx: {
2551
+ alignItems: "center",
2552
+ display: "flex",
2553
+ height,
2554
+ justifyContent: "center",
2555
+ overflow: "hidden",
2556
+ padding: 0,
2557
+ width
2558
+ },
2559
+ children: /* @__PURE__ */ jsx124(AwsServiceIcon, { hideTooltip: true, service, size: "large" })
2560
+ }
2561
+ ),
2562
+ /* @__PURE__ */ jsx124(Divider, { orientation: "vertical" })
2563
+ ] }) : void 0,
2566
2564
  /* @__PURE__ */ jsx124(
2567
2565
  Typography,
2568
2566
  {
2569
2567
  sx: {
2570
- borderRightColor: resource ? borderColor : "none",
2571
- borderRightStyle: resource ? "solid" : "none",
2572
- borderRightWidth: resource ? "1px" : "none",
2573
2568
  fontWeight: "bold",
2574
2569
  overflow: "hidden",
2575
2570
  padding: "1px 8px",
@@ -2588,21 +2583,24 @@ var ServiceCell = ({
2588
2583
  children: service
2589
2584
  }
2590
2585
  ),
2591
- resource ? /* @__PURE__ */ jsx124(
2592
- Typography,
2593
- {
2594
- sx: {
2595
- borderBottomRightRadius: "15px",
2596
- borderTopRightRadius: "15px",
2597
- overflow: "hidden",
2598
- padding: "1px 8px",
2599
- textOverflow: "ellipsis",
2600
- whiteSpace: "nowrap"
2601
- },
2602
- variant: "body2",
2603
- children: truncateName(resource, truncateLength)
2604
- }
2605
- ) : void 0
2586
+ resource ? /* @__PURE__ */ jsxs119(Fragment2, { children: [
2587
+ /* @__PURE__ */ jsx124(Box3, { sx: { height: "100%", paddingY: 0.5 }, children: /* @__PURE__ */ jsx124(Divider, { orientation: "vertical" }) }),
2588
+ /* @__PURE__ */ jsx124(
2589
+ Typography,
2590
+ {
2591
+ sx: {
2592
+ borderBottomRightRadius: "15px",
2593
+ borderTopRightRadius: "15px",
2594
+ overflow: "hidden",
2595
+ padding: "1px 8px",
2596
+ textOverflow: "ellipsis",
2597
+ whiteSpace: "nowrap"
2598
+ },
2599
+ variant: "body2",
2600
+ children: truncateName(resource, truncateLength)
2601
+ }
2602
+ )
2603
+ ] }) : void 0
2606
2604
  ] }) });
2607
2605
  };
2608
2606
  ServiceCell.displayName = "ServiceCell";
@@ -2677,7 +2675,7 @@ var searchInObject = (object, searchTerm, skipKeys = []) => {
2677
2675
  };
2678
2676
 
2679
2677
  // src/components/spans-list/spans-data-grid.tsx
2680
- import { Fragment as Fragment2, jsx as jsx125, jsxs as jsxs120 } from "react/jsx-runtime";
2678
+ import { Fragment as Fragment3, jsx as jsx125, jsxs as jsxs120 } from "react/jsx-runtime";
2681
2679
  var resourceNameComparator = (v1 = "", v2 = "") => {
2682
2680
  return v1.localeCompare(v2);
2683
2681
  };
@@ -2800,7 +2798,7 @@ var SpansDataGrid = ({
2800
2798
  () => rows.filter((row) => filtersToApply.every((filter) => filter(row))),
2801
2799
  [filtersToApply, rows]
2802
2800
  );
2803
- return /* @__PURE__ */ jsxs120(Fragment2, { children: [
2801
+ return /* @__PURE__ */ jsxs120(Fragment3, { children: [
2804
2802
  /* @__PURE__ */ jsx125(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxs120(Box4, { sx: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
2805
2803
  /* @__PURE__ */ jsx125(
2806
2804
  TextField,
@@ -2965,7 +2963,7 @@ var getAppInspectorApiUrl = (localstackEndpoint, endpoint) => {
2965
2963
  };
2966
2964
 
2967
2965
  // src/components/status-message/status-message.tsx
2968
- import { Fragment as Fragment3, jsx as jsx127, jsxs as jsxs122 } from "react/jsx-runtime";
2966
+ import { Fragment as Fragment4, jsx as jsx127, jsxs as jsxs122 } from "react/jsx-runtime";
2969
2967
  var StatusMessage = ({
2970
2968
  error,
2971
2969
  onRetry,
@@ -3214,7 +3212,7 @@ var StatusMessage = ({
3214
3212
  }
3215
3213
  );
3216
3214
  }
3217
- return /* @__PURE__ */ jsx127(Fragment3, {});
3215
+ return /* @__PURE__ */ jsx127(Fragment4, {});
3218
3216
  };
3219
3217
 
3220
3218
  // src/context.tsx
@@ -3596,7 +3594,7 @@ import { useCallback as useCallback8, useEffect as useEffect7, useState as useSt
3596
3594
  import { useNavigate as useNavigate2, useParams, useSearchParams } from "react-router-dom";
3597
3595
 
3598
3596
  // src/components/event-details/event-details.tsx
3599
- import { Box as Box15, Chip as Chip3, Divider, Stack as Stack2, Typography as Typography9 } from "@mui/material";
3597
+ import { Box as Box15, Chip as Chip3, Divider as Divider2, Stack as Stack2, Typography as Typography9 } from "@mui/material";
3600
3598
 
3601
3599
  // src/utils/iam-utils.ts
3602
3600
  function determinePermissionStatus(payload) {
@@ -4040,7 +4038,7 @@ var IAMPermissionItem = ({ event }) => {
4040
4038
  var IAMPermissionDetail = ({ events }) => /* @__PURE__ */ jsx133(Box11, { sx: { mt: 2 }, children: events.map((event) => /* @__PURE__ */ jsx133(IAMPermissionItem, { event }, `${event.span_id}-${event.event_id}`)) });
4041
4039
 
4042
4040
  // src/components/event-details/event-detail.tsx
4043
- import { Fragment as Fragment4, jsx as jsx134, jsxs as jsxs126 } from "react/jsx-runtime";
4041
+ import { Fragment as Fragment5, jsx as jsx134, jsxs as jsxs126 } from "react/jsx-runtime";
4044
4042
  var DetailRow2 = ({ content, label }) => /* @__PURE__ */ jsxs126(Grid3, { container: true, spacing: 0, sx: { mb: 1 }, children: [
4045
4043
  /* @__PURE__ */ jsx134(Grid3, { item: true, sx: { pr: 1 }, xs: 3, children: /* @__PURE__ */ jsx134(
4046
4044
  Typography7,
@@ -4126,7 +4124,7 @@ var EventMessage = ({ event }) => {
4126
4124
  }
4127
4125
  )
4128
4126
  ] }),
4129
- isOpen && /* @__PURE__ */ jsx134(Box12, { sx: { ml: 4, mt: 1 }, children: isIAMPolicyEvent ? /* @__PURE__ */ jsx134(IAMEventDetail, { event }) : /* @__PURE__ */ jsxs126(Fragment4, { children: [
4127
+ isOpen && /* @__PURE__ */ jsx134(Box12, { sx: { ml: 4, mt: 1 }, children: isIAMPolicyEvent ? /* @__PURE__ */ jsx134(IAMEventDetail, { event }) : /* @__PURE__ */ jsxs126(Fragment5, { children: [
4130
4128
  Boolean(parsedMessage.message) && /* @__PURE__ */ jsx134(DetailRow2, { content: parsedMessage.message, label: "Message:" }),
4131
4129
  Boolean(parsedMessage.details) && /* @__PURE__ */ jsx134(DetailRow2, { content: parsedMessage.details, label: "Details:" })
4132
4130
  ] }) })
@@ -4311,7 +4309,7 @@ var EventSection = ({
4311
4309
  ] }) });
4312
4310
 
4313
4311
  // src/components/event-details/event-details.tsx
4314
- import { Fragment as Fragment5, jsx as jsx137, jsxs as jsxs129 } from "react/jsx-runtime";
4312
+ import { Fragment as Fragment6, jsx as jsx137, jsxs as jsxs129 } from "react/jsx-runtime";
4315
4313
  var EventDetails = ({ onClose, selectedEvent }) => {
4316
4314
  if (!selectedEvent) {
4317
4315
  return /* @__PURE__ */ jsx137(Box15, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "body2", children: "Select an event to view details" }) });
@@ -4333,7 +4331,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4333
4331
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.operation_name })
4334
4332
  ] })
4335
4333
  ] }) }),
4336
- /* @__PURE__ */ jsx137(Divider, {}),
4334
+ /* @__PURE__ */ jsx137(Divider2, {}),
4337
4335
  /* @__PURE__ */ jsx137(ToggleSection, { headline: "Service Information", children: /* @__PURE__ */ jsxs129(Stack2, { spacing: 1, children: [
4338
4336
  /* @__PURE__ */ jsxs129(Box15, { children: [
4339
4337
  /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Service" }),
@@ -4348,7 +4346,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4348
4346
  /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.region })
4349
4347
  ] })
4350
4348
  ] }) }),
4351
- /* @__PURE__ */ jsx137(Divider, {}),
4349
+ /* @__PURE__ */ jsx137(Divider2, {}),
4352
4350
  /* @__PURE__ */ jsx137(ToggleSection, { headline: "Timing", children: /* @__PURE__ */ jsxs129(Stack2, { spacing: 1, children: [
4353
4351
  /* @__PURE__ */ jsxs129(Box15, { children: [
4354
4352
  /* @__PURE__ */ jsx137(Typography9, { color: "text.secondary", variant: "caption", children: "Start Time" }),
@@ -4363,7 +4361,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4363
4361
  ] })
4364
4362
  ] })
4365
4363
  ] }) }),
4366
- /* @__PURE__ */ jsx137(Divider, {}),
4364
+ /* @__PURE__ */ jsx137(Divider2, {}),
4367
4365
  /* @__PURE__ */ jsx137(ToggleSection, { headline: "Status", children: /* @__PURE__ */ jsxs129(Stack2, { direction: "row", spacing: 1, children: [
4368
4366
  /* @__PURE__ */ jsx137(
4369
4367
  Chip3,
@@ -4375,8 +4373,8 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4375
4373
  ),
4376
4374
  Boolean(selectedEvent.status_message) && /* @__PURE__ */ jsx137(Typography9, { variant: "body2", children: selectedEvent.status_message })
4377
4375
  ] }) }),
4378
- selectedEvent.events.length > 0 && /* @__PURE__ */ jsxs129(Fragment5, { children: [
4379
- /* @__PURE__ */ jsx137(Divider, {}),
4376
+ selectedEvent.events.length > 0 && /* @__PURE__ */ jsxs129(Fragment6, { children: [
4377
+ /* @__PURE__ */ jsx137(Divider2, {}),
4380
4378
  /* @__PURE__ */ jsx137(
4381
4379
  EventSection,
4382
4380
  {
@@ -4385,8 +4383,8 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4385
4383
  }
4386
4384
  )
4387
4385
  ] }),
4388
- selectedEvent.attributes && Object.keys(selectedEvent.attributes).length > 0 && /* @__PURE__ */ jsxs129(Fragment5, { children: [
4389
- /* @__PURE__ */ jsx137(Divider, {}),
4386
+ selectedEvent.attributes && Object.keys(selectedEvent.attributes).length > 0 && /* @__PURE__ */ jsxs129(Fragment6, { children: [
4387
+ /* @__PURE__ */ jsx137(Divider2, {}),
4390
4388
  /* @__PURE__ */ jsx137(ToggleSection, { headline: "Attributes", children: /* @__PURE__ */ jsx137(Box15, { sx: { backgroundColor: "#f5f5f5", borderRadius: 1, p: 1 }, children: /* @__PURE__ */ jsx137("pre", { style: { fontSize: "0.85rem", margin: 0, overflow: "auto" }, children: JSON.stringify(selectedEvent.attributes, void 0, 2) }) }) })
4391
4389
  ] })
4392
4390
  ] }) })
@@ -4699,13 +4697,12 @@ function shallow$1(objA, objB) {
4699
4697
  // src/components/trace-graph/xyflow/controls.tsx
4700
4698
  import { jsx as jsx140, jsxs as jsxs131 } from "react/jsx-runtime";
4701
4699
  var selector = (s) => ({
4702
- ariaLabelConfig: s.ariaLabelConfig,
4703
4700
  isInteractive: s.nodesDraggable || s.nodesConnectable || s.elementsSelectable,
4704
4701
  maxZoomReached: s.transform[2] >= s.maxZoom,
4705
4702
  minZoomReached: s.transform[2] <= s.minZoom
4706
4703
  });
4707
4704
  var Controls = memo2(() => {
4708
- const { ariaLabelConfig, maxZoomReached, minZoomReached } = useStore(selector, shallow$1);
4705
+ const { maxZoomReached, minZoomReached } = useStore(selector, shallow$1);
4709
4706
  const { fitView, zoomIn, zoomOut } = useReactFlow();
4710
4707
  const onZoomInHandler = () => {
4711
4708
  void zoomIn();
@@ -4719,7 +4716,6 @@ var Controls = memo2(() => {
4719
4716
  return /* @__PURE__ */ jsxs131(
4720
4717
  Box18,
4721
4718
  {
4722
- "aria-label": ariaLabelConfig["controls.ariaLabel"],
4723
4719
  sx: {
4724
4720
  bottom: 0,
4725
4721
  display: "flex",
@@ -4734,35 +4730,29 @@ var Controls = memo2(() => {
4734
4730
  /* @__PURE__ */ jsx140(
4735
4731
  IconButton4,
4736
4732
  {
4737
- "aria-label": ariaLabelConfig["controls.zoomIn.ariaLabel"],
4738
4733
  className: "react-flow__controls-zoomin",
4739
4734
  disabled: maxZoomReached,
4740
4735
  onClick: onZoomInHandler,
4741
4736
  size: "small",
4742
- title: ariaLabelConfig["controls.zoomIn.ariaLabel"],
4743
4737
  children: /* @__PURE__ */ jsx140(Add, {})
4744
4738
  }
4745
4739
  ),
4746
4740
  /* @__PURE__ */ jsx140(
4747
4741
  IconButton4,
4748
4742
  {
4749
- "aria-label": ariaLabelConfig["controls.zoomOut.ariaLabel"],
4750
4743
  className: "react-flow__controls-zoomout",
4751
4744
  disabled: minZoomReached,
4752
4745
  onClick: onZoomOutHandler,
4753
4746
  size: "small",
4754
- title: ariaLabelConfig["controls.zoomOut.ariaLabel"],
4755
4747
  children: /* @__PURE__ */ jsx140(Remove, {})
4756
4748
  }
4757
4749
  ),
4758
4750
  /* @__PURE__ */ jsx140(
4759
4751
  IconButton4,
4760
4752
  {
4761
- "aria-label": ariaLabelConfig["controls.fitView.ariaLabel"],
4762
4753
  className: "react-flow__controls-fitview",
4763
4754
  onClick: onFitViewHandler,
4764
4755
  size: "small",
4765
- title: ariaLabelConfig["controls.fitView.ariaLabel"],
4766
4756
  children: /* @__PURE__ */ jsx140(FitScreen, {})
4767
4757
  }
4768
4758
  )
@@ -4772,7 +4762,7 @@ var Controls = memo2(() => {
4772
4762
  });
4773
4763
 
4774
4764
  // src/components/trace-graph/trace-graph.tsx
4775
- import { Fragment as Fragment6, jsx as jsx141, jsxs as jsxs132 } from "react/jsx-runtime";
4765
+ import { Fragment as Fragment7, jsx as jsx141, jsxs as jsxs132 } from "react/jsx-runtime";
4776
4766
  var nodeTypes = {
4777
4767
  service: ServiceNode
4778
4768
  };
@@ -4861,7 +4851,7 @@ var TraceGraph = ({
4861
4851
  onEventSelect(node.data.event);
4862
4852
  updateSelectedNode(node.id);
4863
4853
  }, [onEventSelect, updateSelectedNode]);
4864
- return /* @__PURE__ */ jsxs132(Fragment6, { children: [
4854
+ return /* @__PURE__ */ jsxs132(Fragment7, { children: [
4865
4855
  spans.error && /* @__PURE__ */ jsxs132(
4866
4856
  Alert3,
4867
4857
  {
@@ -4899,7 +4889,7 @@ var TraceGraph = ({
4899
4889
  };
4900
4890
 
4901
4891
  // src/pages/trace-graph-page.tsx
4902
- import { Fragment as Fragment7, jsx as jsx142, jsxs as jsxs133 } from "react/jsx-runtime";
4892
+ import { Fragment as Fragment8, jsx as jsx142, jsxs as jsxs133 } from "react/jsx-runtime";
4903
4893
  var HEADER_HEIGHT = 56;
4904
4894
  var DRAWER_WIDTH = "35%";
4905
4895
  var Main = styled("main", { shouldForwardProp: (property) => property !== "open" })(({ open, theme }) => ({
@@ -4933,6 +4923,7 @@ var StyledDrawer = styled(Drawer)(() => ({
4933
4923
  var TraceGraphView = ({
4934
4924
  fetchError,
4935
4925
  fetchSpans,
4926
+ handleClose,
4936
4927
  handleEventSelect,
4937
4928
  handleRetry,
4938
4929
  loading,
@@ -4983,7 +4974,7 @@ var TraceGraphView = ({
4983
4974
  onRetry: handleRetry,
4984
4975
  status
4985
4976
  }
4986
- ) : /* @__PURE__ */ jsxs133(Fragment7, { children: [
4977
+ ) : /* @__PURE__ */ jsxs133(Fragment8, { children: [
4987
4978
  /* @__PURE__ */ jsx142(Main, { open, children: /* @__PURE__ */ jsx142(
4988
4979
  Box19,
4989
4980
  {
@@ -5009,7 +5000,7 @@ var TraceGraphView = ({
5009
5000
  ) })
5010
5001
  }
5011
5002
  ) }),
5012
- /* @__PURE__ */ jsx142(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ jsx142(EventDetails, { selectedEvent }) })
5003
+ /* @__PURE__ */ jsx142(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ jsx142(EventDetails, { onClose: handleClose, selectedEvent }) })
5013
5004
  ] })
5014
5005
  }
5015
5006
  )
@@ -5087,6 +5078,9 @@ var TraceGraphPage = () => {
5087
5078
  {
5088
5079
  fetchError,
5089
5080
  fetchSpans: () => void fetchSpans(),
5081
+ handleClose: () => {
5082
+ setOpen(false);
5083
+ },
5090
5084
  handleEventSelect,
5091
5085
  handleRetry,
5092
5086
  loading,