@evergis/react 3.1.36 → 3.1.37

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
@@ -5960,6 +5960,7 @@ const ChartContainer = React.memo(({ elementConfig, isVisible, type, renderEleme
5960
5960
  const { twoColumns, hideEmpty } = options || {};
5961
5961
  const aliasElement = children.find(({ id }) => id === "alias");
5962
5962
  const chartElement = children.find(({ id }) => id === "chart");
5963
+ const legendElement = children.find(({ id }) => id === "legend");
5963
5964
  const { data, loading } = useChartData({
5964
5965
  element: chartElement,
5965
5966
  type,
@@ -5970,7 +5971,7 @@ const ChartContainer = React.memo(({ elementConfig, isVisible, type, renderEleme
5970
5971
  const hasItems = !!data[0]?.items?.length;
5971
5972
  if (!loading && !hasItems && hideEmpty)
5972
5973
  return null;
5973
- return (jsxRuntime.jsxs(uilibGl.FlexSpan, { flexDirection: "column", children: [jsxRuntime.jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsxRuntime.jsxs(Container, { isColumn: true, children: [aliasElement && jsxRuntime.jsx(ContainerAlias, { hasBottomMargin: true, children: renderElement({ id: "alias" }) }), jsxRuntime.jsx(ContainerValue, { column: !twoColumns, alignItems: "center", children: hasItems ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ContainerChart, { children: renderElement({ id: "chart" }) }), jsxRuntime.jsx(ContainerLegend, { children: renderElement({ id: "legend" }) })] })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: "\u2014" })) })] }))] }));
5974
+ return (jsxRuntime.jsxs(uilibGl.FlexSpan, { flexDirection: "column", children: [jsxRuntime.jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsxRuntime.jsxs(Container, { isColumn: true, children: [aliasElement && jsxRuntime.jsx(ContainerAlias, { hasBottomMargin: true, children: renderElement({ id: "alias" }) }), jsxRuntime.jsx(ContainerValue, { column: !twoColumns, alignItems: "center", children: hasItems ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ContainerChart, { children: renderElement({ id: "chart" }) }), jsxRuntime.jsx(ContainerLegend, { justifyContent: legendElement?.options?.center ? "center" : "flex-start", children: renderElement({ id: "legend" }) })] })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: "\u2014" })) })] }))] }));
5974
5975
  });
5975
5976
 
5976
5977
  const PagesContainer = React.memo(({ type = exports.WidgetType.Dashboard, noBorders }) => {