@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.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";
@@ -4736,13 +4734,12 @@ function shallow$1(objA, objB) {
4736
4734
  // src/components/trace-graph/xyflow/controls.tsx
4737
4735
  var import_jsx_runtime140 = require("react/jsx-runtime");
4738
4736
  var selector = (s) => ({
4739
- ariaLabelConfig: s.ariaLabelConfig,
4740
4737
  isInteractive: s.nodesDraggable || s.nodesConnectable || s.elementsSelectable,
4741
4738
  maxZoomReached: s.transform[2] >= s.maxZoom,
4742
4739
  minZoomReached: s.transform[2] <= s.minZoom
4743
4740
  });
4744
4741
  var Controls = (0, import_react17.memo)(() => {
4745
- const { ariaLabelConfig, maxZoomReached, minZoomReached } = (0, import_react16.useStore)(selector, shallow$1);
4742
+ const { maxZoomReached, minZoomReached } = (0, import_react16.useStore)(selector, shallow$1);
4746
4743
  const { fitView, zoomIn, zoomOut } = (0, import_react16.useReactFlow)();
4747
4744
  const onZoomInHandler = () => {
4748
4745
  void zoomIn();
@@ -4756,7 +4753,6 @@ var Controls = (0, import_react17.memo)(() => {
4756
4753
  return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
4757
4754
  import_material19.Box,
4758
4755
  {
4759
- "aria-label": ariaLabelConfig["controls.ariaLabel"],
4760
4756
  sx: {
4761
4757
  bottom: 0,
4762
4758
  display: "flex",
@@ -4771,35 +4767,29 @@ var Controls = (0, import_react17.memo)(() => {
4771
4767
  /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
4772
4768
  import_material19.IconButton,
4773
4769
  {
4774
- "aria-label": ariaLabelConfig["controls.zoomIn.ariaLabel"],
4775
4770
  className: "react-flow__controls-zoomin",
4776
4771
  disabled: maxZoomReached,
4777
4772
  onClick: onZoomInHandler,
4778
4773
  size: "small",
4779
- title: ariaLabelConfig["controls.zoomIn.ariaLabel"],
4780
4774
  children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material10.Add, {})
4781
4775
  }
4782
4776
  ),
4783
4777
  /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
4784
4778
  import_material19.IconButton,
4785
4779
  {
4786
- "aria-label": ariaLabelConfig["controls.zoomOut.ariaLabel"],
4787
4780
  className: "react-flow__controls-zoomout",
4788
4781
  disabled: minZoomReached,
4789
4782
  onClick: onZoomOutHandler,
4790
4783
  size: "small",
4791
- title: ariaLabelConfig["controls.zoomOut.ariaLabel"],
4792
4784
  children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material10.Remove, {})
4793
4785
  }
4794
4786
  ),
4795
4787
  /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
4796
4788
  import_material19.IconButton,
4797
4789
  {
4798
- "aria-label": ariaLabelConfig["controls.fitView.ariaLabel"],
4799
4790
  className: "react-flow__controls-fitview",
4800
4791
  onClick: onFitViewHandler,
4801
4792
  size: "small",
4802
- title: ariaLabelConfig["controls.fitView.ariaLabel"],
4803
4793
  children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material10.FitScreen, {})
4804
4794
  }
4805
4795
  )
@@ -4970,6 +4960,7 @@ var StyledDrawer = (0, import_styles.styled)(import_material21.Drawer)(() => ({
4970
4960
  var TraceGraphView = ({
4971
4961
  fetchError,
4972
4962
  fetchSpans,
4963
+ handleClose,
4973
4964
  handleEventSelect,
4974
4965
  handleRetry,
4975
4966
  loading,
@@ -5046,7 +5037,7 @@ var TraceGraphView = ({
5046
5037
  ) })
5047
5038
  }
5048
5039
  ) }),
5049
- /* @__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 }) })
5050
5041
  ] })
5051
5042
  }
5052
5043
  )
@@ -5124,6 +5115,9 @@ var TraceGraphPage = () => {
5124
5115
  {
5125
5116
  fetchError,
5126
5117
  fetchSpans: () => void fetchSpans(),
5118
+ handleClose: () => {
5119
+ setOpen(false);
5120
+ },
5127
5121
  handleEventSelect,
5128
5122
  handleRetry,
5129
5123
  loading,