@cloudscape-design/components 3.0.472 → 3.0.473

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.
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (6a6c6bf8)";
2
+ export var PACKAGE_VERSION = "3.0.0 (d35e94bf)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (6a6c6bf8)",
3
+ "PACKAGE_VERSION": "3.0.0 (d35e94bf)",
4
4
  "THEME": "default",
5
5
  "ALWAYS_VISUAL_REFRESH": false
6
6
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "6a6c6bf8dac915ff5aadce9c1fe196554aede58a"
2
+ "commit": "d35e94bf5b52e0c6fa86b200b6e4752362d69de5"
3
3
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { ChartDataTypes, InternalChartSeries, MixedLineBarChartProps, ScaleType } from './interfaces';
3
3
  import { ScaledPoint } from './make-scaled-series';
4
4
  import { CartesianChartProps } from '../internal/components/cartesian-chart/interfaces';
@@ -30,8 +30,7 @@ export interface ChartContainerProps<T extends ChartDataTypes> {
30
30
  ariaLabelledby: MixedLineBarChartProps<T>['ariaLabelledby'];
31
31
  ariaDescription: MixedLineBarChartProps<T>['ariaDescription'];
32
32
  i18nStrings: MixedLineBarChartProps<T>['i18nStrings'];
33
- plotContainerRef: React.RefObject<HTMLDivElement>;
34
33
  detailPopoverSeriesContent?: MixedLineBarChartProps.DetailPopoverSeriesContent<T>;
35
34
  }
36
- export default function ChartContainer<T extends ChartDataTypes>({ fitHeight, height: explicitPlotHeight, series, visibleSeries, highlightedSeries, onHighlightChange, highlightedPoint, setHighlightedPoint, highlightedGroupIndex, setHighlightedGroupIndex, detailPopoverFooter, detailPopoverSize, stackedBars, horizontalBars, xScaleType, yScaleType, xTickFormatter, yTickFormatter, emphasizeBaselineAxis, xTitle, yTitle, ariaLabel, ariaLabelledby, ariaDescription, i18nStrings, plotContainerRef, detailPopoverSeriesContent, ...props }: ChartContainerProps<T>): JSX.Element;
35
+ export default function ChartContainer<T extends ChartDataTypes>({ fitHeight, height: explicitPlotHeight, series, visibleSeries, highlightedSeries, onHighlightChange, highlightedPoint, setHighlightedPoint, highlightedGroupIndex, setHighlightedGroupIndex, detailPopoverFooter, detailPopoverSize, stackedBars, horizontalBars, xScaleType, yScaleType, xTickFormatter, yTickFormatter, emphasizeBaselineAxis, xTitle, yTitle, ariaLabel, ariaLabelledby, ariaDescription, i18nStrings, detailPopoverSeriesContent, ...props }: ChartContainerProps<T>): JSX.Element;
37
36
  //# sourceMappingURL=chart-container.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chart-container.d.ts","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/chart-container.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAgBlG,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,SAAS,EAAmB,MAAM,cAAc,CAAC;AAGvH,OAAyB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAYxF,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,cAAc;IAC3D,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9C,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IAErD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAClE,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sBAAsB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC9D,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IAEtD,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAElD,0BAA0B,CAAC,EAAE,sBAAsB,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;CACnF;AAuBD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,SAAS,cAAc,EAAE,EAC/D,SAAS,EACT,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,iBAA4B,EAC5B,WAAmB,EACnB,cAAsB,EACtB,UAAU,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,MAAM,EACN,MAAM,EACN,SAAS,EACT,cAAc,EACd,eAAe,EACf,WAAgB,EAChB,gBAAgB,EAChB,0BAA0B,EAC1B,GAAG,KAAK,EACT,EAAE,mBAAmB,CAAC,CAAC,CAAC,eA6gBxB"}
1
+ {"version":3,"file":"chart-container.d.ts","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/chart-container.tsx"],"names":[],"mappings":";AAkBA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,SAAS,EAAmB,MAAM,cAAc,CAAC;AAGvH,OAAyB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAYxF,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,cAAc;IAC3D,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9C,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC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AAS,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAClD,cAAc,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC5D,eAAe,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC9D,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IAEtD,0BAA0B,CAAC,EAAE,sBAAsB,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;CACnF;AAuBD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,SAAS,cAAc,EAAE,EAC/D,SAAS,EACT,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,iBAA4B,EAC5B,WAAmB,EACnB,cAAsB,EACtB,UAAU,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,MAAM,EACN,MAAM,EACN,SAAS,EACT,cAAc,EACd,eAAe,EACf,WAAgB,EAChB,0BAA0B,EAC1B,GAAG,KAAK,EACT,EAAE,mBAAmB,CAAC,CAAC,CAAC,eA0gBxB"}
@@ -35,7 +35,7 @@ const BOTTOM_LABELS_OFFSET = 12;
35
35
  const fallbackContainerWidth = 500;
36
36
  export default function ChartContainer(_a) {
37
37
  var _b, _c;
38
- var { fitHeight, height: explicitPlotHeight, series, visibleSeries, highlightedSeries, onHighlightChange, highlightedPoint, setHighlightedPoint, highlightedGroupIndex, setHighlightedGroupIndex, detailPopoverFooter, detailPopoverSize = 'medium', stackedBars = false, horizontalBars = false, xScaleType, yScaleType, xTickFormatter, yTickFormatter, emphasizeBaselineAxis, xTitle, yTitle, ariaLabel, ariaLabelledby, ariaDescription, i18nStrings = {}, plotContainerRef, detailPopoverSeriesContent } = _a, props = __rest(_a, ["fitHeight", "height", "series", "visibleSeries", "highlightedSeries", "onHighlightChange", "highlightedPoint", "setHighlightedPoint", "highlightedGroupIndex", "setHighlightedGroupIndex", "detailPopoverFooter", "detailPopoverSize", "stackedBars", "horizontalBars", "xScaleType", "yScaleType", "xTickFormatter", "yTickFormatter", "emphasizeBaselineAxis", "xTitle", "yTitle", "ariaLabel", "ariaLabelledby", "ariaDescription", "i18nStrings", "plotContainerRef", "detailPopoverSeriesContent"]);
38
+ var { fitHeight, height: explicitPlotHeight, series, visibleSeries, highlightedSeries, onHighlightChange, highlightedPoint, setHighlightedPoint, highlightedGroupIndex, setHighlightedGroupIndex, detailPopoverFooter, detailPopoverSize = 'medium', stackedBars = false, horizontalBars = false, xScaleType, yScaleType, xTickFormatter, yTickFormatter, emphasizeBaselineAxis, xTitle, yTitle, ariaLabel, ariaLabelledby, ariaDescription, i18nStrings = {}, detailPopoverSeriesContent } = _a, props = __rest(_a, ["fitHeight", "height", "series", "visibleSeries", "highlightedSeries", "onHighlightChange", "highlightedPoint", "setHighlightedPoint", "highlightedGroupIndex", "setHighlightedGroupIndex", "detailPopoverFooter", "detailPopoverSize", "stackedBars", "horizontalBars", "xScaleType", "yScaleType", "xTickFormatter", "yTickFormatter", "emphasizeBaselineAxis", "xTitle", "yTitle", "ariaLabel", "ariaLabelledby", "ariaDescription", "i18nStrings", "detailPopoverSeriesContent"]);
39
39
  const plotRef = useRef(null);
40
40
  const verticalMarkerRef = useRef(null);
41
41
  const [leftLabelsWidth, setLeftLabelsWidth] = useState(0);
@@ -260,17 +260,13 @@ export default function ChartContainer(_a) {
260
260
  }
261
261
  };
262
262
  const onSVGBlur = (event) => {
263
- var _a;
264
263
  setPlotFocused(false);
265
264
  const blurTarget = event.relatedTarget || event.target;
266
265
  if (blurTarget === null ||
267
266
  !(blurTarget instanceof Element) ||
268
267
  !nodeBelongs(containerRefObject.current, blurTarget)) {
269
- setHighlightedPoint(null);
268
+ clearHighlightedSeries();
270
269
  setVerticalMarkerX(null);
271
- if (!((_a = plotContainerRef === null || plotContainerRef === void 0 ? void 0 : plotContainerRef.current) === null || _a === void 0 ? void 0 : _a.contains(blurTarget))) {
272
- clearHighlightedSeries();
273
- }
274
270
  if (isPopoverOpen && !isPopoverPinned) {
275
271
  dismissPopover();
276
272
  }
@@ -1 +1 @@
1
- {"version":3,"file":"chart-container.js","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/chart-container.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAElG,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACxH,OAAO,SAA2B,MAAM,mCAAmC,CAAC;AAC5E,OAAO,SAAS,MAAM,mDAAmD,CAAC;AAC1E,OAAO,aAAa,MAAM,uDAAuD,CAAC;AAClF,OAAO,UAAU,MAAM,oDAAoD,CAAC;AAC5E,OAAO,YAAY,EAAE,EAAE,eAAe,EAAE,MAAM,sDAAsD,CAAC;AACrG,OAAO,iBAAiB,MAAM,4DAA4D,CAAC;AAC3F,OAAO,kBAAkB,MAAM,4DAA4D,CAAC;AAC5F,OAAO,gBAAgB,MAAM,0DAA0D,CAAC;AACxF,OAAO,cAAc,MAAM,wDAAwD,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAC9F,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,gBAAiC,MAAM,sBAAsB,CAAC;AACr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B,YAAY,EAAE,IAAI,EAClB,YAAY,EAAE,eAAe,GAC7B,CACH;YAEA,iBAAiB,IAAI,UAAU,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CACxD,oBAAC,SAAS,IACR,SAAS,EAAE,eAAe,EAC1B,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,EACpB,qBAAqB,EAAE,qBAAqB,EAC5C,mBAAmB,EAAE,mBAAmB,GACxC,CACH;YAED,oBAAC,YAAY,oBACP,iBAAiB,IACrB,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,eAAe,CAAC,KAAK,EAC5B,KAAK,EAAE,eAAe,CAAC,KAAK,EAC5B,mBAAmB,EAAE,eAAe,CAAC,mBAAmB,EACxD,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,SAAS,EAChB,UAAU,EAAE,eAAe,GAAG,oBAAoB,EAClD,WAAW,EAAE,oBAAoB,IACjC,CACQ,EAEd,OAAO,EACL,oBAAC,YAAY,IACX,GAAG,EAAE,UAAU,EACf,YAAY,EAAE,kBAAkB,EAChC,QAAQ,EAAE,qBAAqB,EAC/B,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,eAAe,EACzB,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,gBAAgB,EAC3B,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,0BAA0B,EAClC,gBAAgB,EAAE,WAAW,CAAC,6BAA6B,EAC3D,YAAY,EAAE,cAAc,EAC5B,MAAM,EAAE,SAAS,EACjB,cAAc,EAAE,qBAAqB,GACrC,GAEJ,CACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\n\nimport { getXTickCount, getYTickCount, createXTicks, createYTicks } from '../internal/components/cartesian-chart/ticks';\nimport ChartPlot, { ChartPlotRef } from '../internal/components/chart-plot';\nimport AxisLabel from '../internal/components/cartesian-chart/axis-label';\nimport LabelsMeasure from '../internal/components/cartesian-chart/labels-measure';\nimport LeftLabels from '../internal/components/cartesian-chart/left-labels';\nimport BottomLabels, { useBottomLabels } from '../internal/components/cartesian-chart/bottom-labels';\nimport VerticalGridLines from '../internal/components/cartesian-chart/vertical-grid-lines';\nimport EmphasizedBaseline from '../internal/components/cartesian-chart/emphasized-baseline';\nimport HighlightedPoint from '../internal/components/cartesian-chart/highlighted-point';\nimport VerticalMarker from '../internal/components/cartesian-chart/vertical-marker';\nimport { ChartScale, NumericChartScale } from '../internal/components/cartesian-chart/scales';\nimport ChartPopover from './chart-popover';\nimport { ChartDataTypes, InternalChartSeries, MixedLineBarChartProps, ScaleType, VerticalMarkerX } from './interfaces';\nimport { computeDomainX, computeDomainY } from './domain';\nimport { isXThreshold } from './utils';\nimport makeScaledSeries, { ScaledPoint } from './make-scaled-series';\nimport makeScaledBarGroups, { ScaledBarGroup } from './make-scaled-bar-groups';\nimport formatHighlighted from './format-highlighted';\nimport DataSeries from './data-series';\nimport BarGroups from './bar-groups';\nimport { useMouseHover } from './hooks/use-mouse-hover';\nimport { useNavigation } from './hooks/use-navigation';\nimport { usePopover } from './hooks/use-popover';\n\nimport { CartesianChartProps } from '../internal/components/cartesian-chart/interfaces';\nimport useContainerWidth from '../internal/utils/use-container-width';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { nodeBelongs } from '../internal/utils/node-belongs';\nimport { CartesianChartContainer } from '../internal/components/cartesian-chart/chart-container';\nimport { useHeightMeasure } from '../internal/hooks/container-queries/use-height-measure';\n\nconst LEFT_LABELS_MARGIN = 16;\nconst BOTTOM_LABELS_OFFSET = 12;\n\ntype TickFormatter = undefined | ((value: ChartDataTypes) => string);\n\nexport interface ChartContainerProps<T extends ChartDataTypes> {\n series: ReadonlyArray<InternalChartSeries<T>>;\n visibleSeries: ReadonlyArray<InternalChartSeries<T>>;\n\n fitHeight?: boolean;\n height: number;\n detailPopoverSize: MixedLineBarChartProps<T>['detailPopoverSize'];\n detailPopoverFooter: MixedLineBarChartProps<T>['detailPopoverFooter'];\n\n xScaleType: ScaleType;\n yScaleType: 'linear' | 'log';\n\n xDomain: MixedLineBarChartProps<T>['xDomain'];\n yDomain: MixedLineBarChartProps<T>['yDomain'];\n\n xTickFormatter?: CartesianChartProps.TickFormatter<T>;\n yTickFormatter?: CartesianChartProps.TickFormatter<number>;\n\n xTitle?: string;\n yTitle?: string;\n\n stackedBars?: boolean;\n emphasizeBaselineAxis: boolean;\n horizontalBars?: boolean;\n\n highlightedSeries?: MixedLineBarChartProps<T>['highlightedSeries'];\n onHighlightChange: (series: InternalChartSeries<T>['series'] | null) => void;\n highlightedPoint: ScaledPoint<T> | null;\n setHighlightedPoint: (point: ScaledPoint<T> | null) => void;\n highlightedGroupIndex: number | null;\n setHighlightedGroupIndex: (groupIndex: number | null) => void;\n\n ariaLabel: MixedLineBarChartProps<T>['ariaLabel'];\n ariaLabelledby: MixedLineBarChartProps<T>['ariaLabelledby'];\n ariaDescription: MixedLineBarChartProps<T>['ariaDescription'];\n i18nStrings: MixedLineBarChartProps<T>['i18nStrings'];\n\n plotContainerRef: React.RefObject<HTMLDivElement>;\n\n detailPopoverSeriesContent?: MixedLineBarChartProps.DetailPopoverSeriesContent<T>;\n}\n\ninterface BaseAxisProps {\n tickCount: number;\n tickFormatter: TickFormatter;\n title?: string;\n ariaRoleDescription?: string;\n}\n\ninterface XAxisProps extends BaseAxisProps {\n axis: 'x';\n scale: ChartScale;\n ticks: ChartDataTypes[];\n}\n\ninterface YAxisProps extends BaseAxisProps {\n axis: 'y';\n scale: NumericChartScale;\n ticks: number[];\n}\n\nconst fallbackContainerWidth = 500;\n\nexport default function ChartContainer<T extends ChartDataTypes>({\n fitHeight,\n height: explicitPlotHeight,\n series,\n visibleSeries,\n highlightedSeries,\n onHighlightChange,\n highlightedPoint,\n setHighlightedPoint,\n highlightedGroupIndex,\n setHighlightedGroupIndex,\n detailPopoverFooter,\n detailPopoverSize = 'medium',\n stackedBars = false,\n horizontalBars = false,\n xScaleType,\n yScaleType,\n xTickFormatter,\n yTickFormatter,\n emphasizeBaselineAxis,\n xTitle,\n yTitle,\n ariaLabel,\n ariaLabelledby,\n ariaDescription,\n i18nStrings = {},\n plotContainerRef,\n detailPopoverSeriesContent,\n ...props\n}: ChartContainerProps<T>) {\n const plotRef = useRef<ChartPlotRef>(null);\n const verticalMarkerRef = useRef<SVGLineElement>(null);\n\n const [leftLabelsWidth, setLeftLabelsWidth] = useState(0);\n const [verticalMarkerX, setVerticalMarkerX] = useState<VerticalMarkerX<T> | null>(null);\n const [detailsPopoverText, setDetailsPopoverText] = useState('');\n const [containerWidth, containerMeasureRef] = useContainerWidth(fallbackContainerWidth);\n const maxLeftLabelsWidth = Math.round(containerWidth / 2);\n const plotWidth = containerWidth\n ? // Calculate the minimum between leftLabelsWidth and maxLeftLabelsWidth for extra safety because leftLabelsWidth could be out of date\n Math.max(0, containerWidth - Math.min(leftLabelsWidth, maxLeftLabelsWidth) - LEFT_LABELS_MARGIN)\n : fallbackContainerWidth;\n const containerRefObject = useRef(null);\n const containerRef = useMergeRefs(containerMeasureRef, containerRefObject);\n const popoverRef = useRef<HTMLElement | null>(null);\n\n const xDomain = (props.xDomain || computeDomainX(series, xScaleType)) as\n | readonly number[]\n | readonly string[]\n | readonly Date[];\n const yDomain = (props.yDomain || computeDomainY(series, yScaleType, stackedBars)) as readonly number[];\n\n const linesOnly = series.every(({ series }) => series.type === 'line' || series.type === 'threshold');\n\n function getXAxisProps(size: number, range: [from: number, until: number]): XAxisProps {\n const tickCount = getXTickCount(size);\n const scale = new ChartScale(xScaleType, xDomain, range, linesOnly);\n const ticks = createXTicks(scale, tickCount);\n return {\n axis: 'x',\n tickCount,\n scale,\n ticks,\n tickFormatter: xTickFormatter as TickFormatter,\n title: xTitle,\n ariaRoleDescription: i18nStrings.xAxisAriaRoleDescription,\n };\n }\n\n function getYAxisProps(size: number, range: [from: number, until: number]): YAxisProps {\n const tickCount = getYTickCount(size);\n const scale = new NumericChartScale(yScaleType, yDomain, range, props.yDomain ? null : tickCount);\n const ticks = createYTicks(scale, tickCount);\n return {\n axis: 'y',\n tickCount,\n scale,\n ticks,\n tickFormatter: yTickFormatter as TickFormatter,\n title: yTitle,\n ariaRoleDescription: i18nStrings.yAxisAriaRoleDescription,\n };\n }\n\n const bottomAxisProps = !horizontalBars\n ? getXAxisProps(plotWidth, [0, plotWidth])\n : getYAxisProps(plotWidth, [0, plotWidth]);\n\n const bottomLabelsProps = useBottomLabels({ ...bottomAxisProps });\n\n const plotMeasureRef = useRef<SVGLineElement>(null);\n const measuredHeight = useHeightMeasure(() => plotMeasureRef.current, !fitHeight);\n const plotHeight = fitHeight ? measuredHeight ?? 0 : explicitPlotHeight;\n\n const leftAxisProps = !horizontalBars\n ? getYAxisProps(plotHeight, [plotHeight, 0])\n : getXAxisProps(plotHeight, [0, plotHeight]);\n\n const xAxisProps = bottomAxisProps.axis === 'x' ? bottomAxisProps : leftAxisProps.axis === 'x' ? leftAxisProps : null;\n const yAxisProps = bottomAxisProps.axis === 'y' ? bottomAxisProps : leftAxisProps.axis === 'y' ? leftAxisProps : null;\n if (!xAxisProps || !yAxisProps) {\n throw new Error('Invariant violation: invalid axis props.');\n }\n\n /**\n * Interactions\n */\n const highlightedPointRef = useRef<SVGGElement>(null);\n const highlightedGroupRef = useRef<SVGRectElement>(null);\n const [isPlotFocused, setPlotFocused] = useState(false);\n\n // Some chart components are rendered against \"x\" or \"y\" axes,\n // When \"horizontalBars\" is enabled, the axes are inverted.\n const x = !horizontalBars ? 'x' : 'y';\n const y = !horizontalBars ? 'y' : 'x';\n\n const scaledSeries = makeScaledSeries(visibleSeries, xAxisProps.scale, yAxisProps.scale);\n const barGroups: ScaledBarGroup<T>[] = makeScaledBarGroups(visibleSeries, xAxisProps.scale, plotWidth, plotHeight, y);\n\n const { isPopoverOpen, isPopoverPinned, showPopover, pinPopover, dismissPopover } = usePopover();\n\n // Allows to add a delay between popover is dismissed and handlers are enabled to prevent immediate popover reopening.\n const [isHandlersDisabled, setHandlersDisabled] = useState(!isPopoverPinned);\n useEffect(() => {\n if (isPopoverPinned) {\n setHandlersDisabled(true);\n } else {\n const timeoutId = setTimeout(() => setHandlersDisabled(false), 25);\n return () => clearTimeout(timeoutId);\n }\n }, [isPopoverPinned]);\n\n const highlightSeries = useCallback(\n (series: MixedLineBarChartProps.ChartSeries<T> | null) => {\n if (series !== highlightedSeries) {\n onHighlightChange(series);\n }\n },\n [highlightedSeries, onHighlightChange]\n );\n\n const highlightPoint = useCallback(\n (point: ScaledPoint<T> | null) => {\n setHighlightedGroupIndex(null);\n setHighlightedPoint(point);\n if (point) {\n highlightSeries(point.series);\n setVerticalMarkerX({\n scaledX: point.x,\n label: point.datum?.x ?? null,\n });\n }\n },\n [setHighlightedGroupIndex, setHighlightedPoint, highlightSeries]\n );\n\n const clearAllHighlights = useCallback(() => {\n setHighlightedPoint(null);\n highlightSeries(null);\n setHighlightedGroupIndex(null);\n }, [highlightSeries, setHighlightedGroupIndex, setHighlightedPoint]);\n\n // Highlight all points at a given X in a line chart\n const highlightX = useCallback(\n (marker: VerticalMarkerX<T> | null) => {\n if (marker) {\n clearAllHighlights();\n }\n setVerticalMarkerX(marker);\n },\n [clearAllHighlights]\n );\n\n // Highlight all points and bars at a given X index in a mixed line and bar chart\n const highlightGroup = useCallback(\n (groupIndex: number) => {\n highlightSeries(null);\n setHighlightedPoint(null);\n setHighlightedGroupIndex(groupIndex);\n },\n [highlightSeries, setHighlightedPoint, setHighlightedGroupIndex]\n );\n\n const clearHighlightedSeries = useCallback(() => {\n clearAllHighlights();\n dismissPopover();\n }, [dismissPopover, clearAllHighlights]);\n\n const { isGroupNavigation, ...handlers } = useNavigation({\n series,\n visibleSeries,\n scaledSeries,\n barGroups,\n xScale: xAxisProps.scale,\n yScale: yAxisProps.scale,\n highlightedPoint,\n highlightedGroupIndex,\n highlightedSeries,\n isHandlersDisabled,\n pinPopover,\n highlightSeries,\n highlightGroup,\n highlightPoint,\n highlightX,\n clearHighlightedSeries,\n verticalMarkerX,\n });\n\n const { onSVGMouseMove, onSVGMouseOut, onPopoverLeave } = useMouseHover<T>({\n scaledSeries,\n barGroups,\n plotRef,\n popoverRef,\n highlightPoint,\n highlightGroup,\n clearHighlightedSeries,\n isGroupNavigation,\n isHandlersDisabled,\n highlightX,\n });\n\n // There are multiple ways to indicate what X is selected.\n // TODO: make a uniform verticalMarkerX state to fit all use-cases.\n const highlightedX = useMemo(() => {\n if (highlightedGroupIndex !== null) {\n return barGroups[highlightedGroupIndex].x;\n }\n if (verticalMarkerX !== null) {\n return verticalMarkerX.label;\n }\n return highlightedPoint?.datum?.x ?? null;\n }, [highlightedPoint, verticalMarkerX, highlightedGroupIndex, barGroups]);\n\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n dismissPopover();\n }\n };\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [dismissPopover]);\n\n useLayoutEffect(() => {\n if (highlightedX !== null || highlightedPoint !== null) {\n showPopover();\n }\n }, [highlightedX, highlightedPoint, showPopover]);\n\n const onPopoverDismiss = (outsideClick?: boolean) => {\n dismissPopover();\n\n if (!outsideClick) {\n // The delay is needed to bypass focus events caused by click or keypress needed to unpin the popover.\n setTimeout(() => {\n const isSomeInnerElementFocused = highlightedPoint || highlightedGroupIndex !== null || verticalMarkerX;\n if (isSomeInnerElementFocused) {\n plotRef.current?.focusApplication();\n } else {\n plotRef.current?.focusPlot();\n }\n }, 0);\n } else {\n clearAllHighlights();\n setVerticalMarkerX(null);\n }\n };\n\n const onSVGClick = (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => {\n if (isPopoverOpen) {\n if (isPopoverPinned) {\n dismissPopover();\n } else {\n pinPopover();\n e.preventDefault();\n }\n } else {\n showPopover();\n }\n };\n\n const onSVGFocus = (event: React.FocusEvent, trigger: 'mouse' | 'keyboard') => {\n setPlotFocused(true);\n if (trigger === 'keyboard') {\n handlers.onFocus();\n } else {\n // noop: clicks are handled separately\n }\n };\n\n const onSVGBlur = (event: React.FocusEvent<Element>) => {\n setPlotFocused(false);\n const blurTarget = event.relatedTarget || event.target;\n if (\n blurTarget === null ||\n !(blurTarget instanceof Element) ||\n !nodeBelongs(containerRefObject.current, blurTarget)\n ) {\n setHighlightedPoint(null);\n setVerticalMarkerX(null);\n if (!plotContainerRef?.current?.contains(blurTarget)) {\n clearHighlightedSeries();\n }\n\n if (isPopoverOpen && !isPopoverPinned) {\n dismissPopover();\n }\n }\n };\n\n const onSVGKeyDown = handlers.onKeyDown;\n\n const xOffset = xAxisProps.scale.isCategorical() ? Math.max(0, xAxisProps.scale.d3Scale.bandwidth() - 1) / 2 : 0;\n\n let verticalLineX: number | null = null;\n if (verticalMarkerX !== null) {\n verticalLineX = verticalMarkerX.scaledX;\n } else if (isGroupNavigation && highlightedGroupIndex !== null) {\n const x = xAxisProps.scale.d3Scale(barGroups[highlightedGroupIndex].x as any) ?? null;\n if (x !== null) {\n verticalLineX = xOffset + x;\n }\n }\n\n const point = useMemo(\n () =>\n highlightedPoint\n ? {\n key: `${highlightedPoint.x}-${highlightedPoint.y}`,\n x: highlightedPoint.x,\n y: highlightedPoint.y,\n color: highlightedPoint.color,\n }\n : null,\n [highlightedPoint]\n );\n\n const verticalMarkers = useMemo(\n () =>\n verticalLineX !== null\n ? scaledSeries\n .filter(({ x, y }) => (x === verticalLineX || isNaN(x)) && !isNaN(y))\n .map(({ x, y, color }, index) => ({\n key: `${index}-${x}-${y}`,\n x: !horizontalBars ? verticalLineX || 0 : y,\n y: !horizontalBars ? y : verticalLineX || 0,\n color: color,\n }))\n : [],\n [scaledSeries, verticalLineX, horizontalBars]\n );\n\n const highlightedElementRef = isGroupNavigation\n ? highlightedGroupRef\n : highlightedPoint\n ? highlightedPointRef\n : verticalMarkerRef;\n\n const highlightDetails = useMemo(() => {\n if (highlightedX === null) {\n return null;\n }\n\n // When series point is highlighted show the corresponding series and matching x-thresholds.\n if (highlightedPoint) {\n const seriesToShow = visibleSeries.filter(\n series => series.series === highlightedPoint?.series || isXThreshold(series.series)\n );\n return formatHighlighted({\n position: highlightedX,\n series: seriesToShow,\n xTickFormatter,\n detailPopoverSeriesContent,\n });\n }\n\n // Otherwise - show all visible series details.\n return formatHighlighted({\n position: highlightedX,\n series: visibleSeries,\n xTickFormatter,\n detailPopoverSeriesContent,\n });\n }, [highlightedX, highlightedPoint, visibleSeries, xTickFormatter, detailPopoverSeriesContent]);\n\n const detailPopoverFooterContent = useMemo(\n () => (detailPopoverFooter && highlightedX ? detailPopoverFooter(highlightedX) : null),\n [detailPopoverFooter, highlightedX]\n );\n\n const activeAriaLabel =\n highlightDetails && detailsPopoverText ? `${highlightDetails.position}, ${detailsPopoverText}` : '';\n\n // Live region is used when nothing is focused e.g. when hovering.\n const activeLiveRegion =\n activeAriaLabel && !highlightedPoint && highlightedGroupIndex === null ? activeAriaLabel : '';\n\n const isLineXKeyboardFocused = isPlotFocused && !highlightedPoint && verticalMarkerX;\n\n const isRefresh = useVisualRefresh();\n\n return (\n <CartesianChartContainer\n ref={containerRef}\n minHeight={explicitPlotHeight + bottomLabelsProps.height}\n fitHeight={!!fitHeight}\n leftAxisLabel={<AxisLabel axis={y} position=\"left\" title={leftAxisProps.title} />}\n leftAxisLabelMeasure={\n <LabelsMeasure\n ticks={leftAxisProps.ticks}\n scale={leftAxisProps.scale}\n tickFormatter={leftAxisProps.tickFormatter as TickFormatter}\n autoWidth={setLeftLabelsWidth}\n maxLabelsWidth={maxLeftLabelsWidth}\n />\n }\n bottomAxisLabel={<AxisLabel axis={x} position=\"bottom\" title={bottomAxisProps.title} />}\n chartPlot={\n <ChartPlot\n ref={plotRef}\n width=\"100%\"\n height={fitHeight ? `calc(100% - ${bottomLabelsProps.height}px)` : plotHeight}\n offsetBottom={bottomLabelsProps.height}\n isClickable={isPopoverOpen && !isPopoverPinned}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n ariaDescription={ariaDescription}\n ariaRoleDescription={i18nStrings?.chartAriaRoleDescription}\n ariaLiveRegion={activeLiveRegion}\n activeElementRef={highlightedElementRef}\n activeElementKey={\n isPlotFocused &&\n (highlightedGroupIndex?.toString() ??\n (isLineXKeyboardFocused ? `point-index-${handlers.xIndex}` : point?.key))\n }\n activeElementFocusOffset={isGroupNavigation ? 0 : isLineXKeyboardFocused ? { x: 8, y: 0 } : 3}\n onMouseMove={onSVGMouseMove}\n onMouseOut={onSVGMouseOut}\n onClick={onSVGClick}\n onFocus={onSVGFocus}\n onBlur={onSVGBlur}\n onKeyDown={onSVGKeyDown}\n >\n <line\n ref={plotMeasureRef}\n x1=\"0\"\n x2=\"0\"\n y1=\"0\"\n y2=\"100%\"\n stroke=\"transparent\"\n strokeWidth={1}\n style={{ pointerEvents: 'none' }}\n />\n\n <LeftLabels\n axis={y}\n ticks={leftAxisProps.ticks}\n scale={leftAxisProps.scale}\n tickFormatter={leftAxisProps.tickFormatter as TickFormatter}\n title={leftAxisProps.title}\n ariaRoleDescription={leftAxisProps.ariaRoleDescription}\n maxLabelsWidth={maxLeftLabelsWidth}\n plotWidth={plotWidth}\n plotHeight={plotHeight}\n />\n\n {horizontalBars && (\n <VerticalGridLines scale={yAxisProps.scale} ticks={yAxisProps.ticks} height={plotHeight} />\n )}\n\n {emphasizeBaselineAxis && linesOnly && (\n <EmphasizedBaseline axis={x} scale={yAxisProps.scale} width={plotWidth} height={plotHeight} />\n )}\n\n <DataSeries\n axis={x}\n plotWidth={plotWidth}\n plotHeight={plotHeight}\n highlightedSeries={highlightedSeries ?? null}\n highlightedGroupIndex={highlightedGroupIndex}\n stackedBars={stackedBars}\n isGroupNavigation={isGroupNavigation}\n visibleSeries={visibleSeries}\n xScale={xAxisProps.scale}\n yScale={yAxisProps.scale}\n />\n\n {emphasizeBaselineAxis && !linesOnly && (\n <EmphasizedBaseline axis={x} scale={yAxisProps.scale} width={plotWidth} height={plotHeight} />\n )}\n\n <VerticalMarker\n key={verticalLineX || ''}\n height={plotHeight}\n showPoints={highlightedPoint === null}\n showLine={!isGroupNavigation}\n points={verticalMarkers}\n ref={verticalMarkerRef}\n />\n\n {highlightedPoint && (\n <HighlightedPoint\n ref={highlightedPointRef}\n point={point}\n role=\"button\"\n ariaLabel={activeAriaLabel}\n ariaHasPopup={true}\n ariaExpanded={isPopoverPinned}\n />\n )}\n\n {isGroupNavigation && xAxisProps.scale.isCategorical() && (\n <BarGroups\n ariaLabel={activeAriaLabel}\n isRefresh={isRefresh}\n isPopoverPinned={isPopoverPinned}\n barGroups={barGroups}\n highlightedGroupIndex={highlightedGroupIndex}\n highlightedGroupRef={highlightedGroupRef}\n />\n )}\n\n <BottomLabels\n {...bottomLabelsProps}\n axis={x}\n scale={bottomAxisProps.scale}\n title={bottomAxisProps.title}\n ariaRoleDescription={bottomAxisProps.ariaRoleDescription}\n height={plotHeight}\n width={plotWidth}\n offsetLeft={leftLabelsWidth + BOTTOM_LABELS_OFFSET}\n offsetRight={BOTTOM_LABELS_OFFSET}\n />\n </ChartPlot>\n }\n popover={\n <ChartPopover\n ref={popoverRef}\n containerRef={containerRefObject}\n trackRef={highlightedElementRef}\n isOpen={isPopoverOpen}\n isPinned={isPopoverPinned}\n highlightDetails={highlightDetails}\n onDismiss={onPopoverDismiss}\n size={detailPopoverSize}\n footer={detailPopoverFooterContent}\n dismissAriaLabel={i18nStrings.detailPopoverDismissAriaLabel}\n onMouseLeave={onPopoverLeave}\n onBlur={onSVGBlur}\n setPopoverText={setDetailsPopoverText}\n />\n }\n />\n );\n}\n"]}
1
+ {"version":3,"file":"chart-container.js","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/chart-container.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS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EAClD,WAAW,EAAE,oBAAoB,IACjC,CACQ,EAEd,OAAO,EACL,oBAAC,YAAY,IACX,GAAG,EAAE,UAAU,EACf,YAAY,EAAE,kBAAkB,EAChC,QAAQ,EAAE,qBAAqB,EAC/B,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,eAAe,EACzB,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,gBAAgB,EAC3B,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,0BAA0B,EAClC,gBAAgB,EAAE,WAAW,CAAC,6BAA6B,EAC3D,YAAY,EAAE,cAAc,EAC5B,MAAM,EAAE,SAAS,EACjB,cAAc,EAAE,qBAAqB,GACrC,GAEJ,CACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\n\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\n\nimport { getXTickCount, getYTickCount, createXTicks, createYTicks } from '../internal/components/cartesian-chart/ticks';\nimport ChartPlot, { ChartPlotRef } from '../internal/components/chart-plot';\nimport AxisLabel from '../internal/components/cartesian-chart/axis-label';\nimport LabelsMeasure from '../internal/components/cartesian-chart/labels-measure';\nimport LeftLabels from '../internal/components/cartesian-chart/left-labels';\nimport BottomLabels, { useBottomLabels } from '../internal/components/cartesian-chart/bottom-labels';\nimport VerticalGridLines from '../internal/components/cartesian-chart/vertical-grid-lines';\nimport EmphasizedBaseline from '../internal/components/cartesian-chart/emphasized-baseline';\nimport HighlightedPoint from '../internal/components/cartesian-chart/highlighted-point';\nimport VerticalMarker from '../internal/components/cartesian-chart/vertical-marker';\nimport { ChartScale, NumericChartScale } from '../internal/components/cartesian-chart/scales';\nimport ChartPopover from './chart-popover';\nimport { ChartDataTypes, InternalChartSeries, MixedLineBarChartProps, ScaleType, VerticalMarkerX } from './interfaces';\nimport { computeDomainX, computeDomainY } from './domain';\nimport { isXThreshold } from './utils';\nimport makeScaledSeries, { ScaledPoint } from './make-scaled-series';\nimport makeScaledBarGroups, { ScaledBarGroup } from './make-scaled-bar-groups';\nimport formatHighlighted from './format-highlighted';\nimport DataSeries from './data-series';\nimport BarGroups from './bar-groups';\nimport { useMouseHover } from './hooks/use-mouse-hover';\nimport { useNavigation } from './hooks/use-navigation';\nimport { usePopover } from './hooks/use-popover';\n\nimport { CartesianChartProps } from '../internal/components/cartesian-chart/interfaces';\nimport useContainerWidth from '../internal/utils/use-container-width';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { nodeBelongs } from '../internal/utils/node-belongs';\nimport { CartesianChartContainer } from '../internal/components/cartesian-chart/chart-container';\nimport { useHeightMeasure } from '../internal/hooks/container-queries/use-height-measure';\n\nconst LEFT_LABELS_MARGIN = 16;\nconst BOTTOM_LABELS_OFFSET = 12;\n\ntype TickFormatter = undefined | ((value: ChartDataTypes) => string);\n\nexport interface ChartContainerProps<T extends ChartDataTypes> {\n series: ReadonlyArray<InternalChartSeries<T>>;\n visibleSeries: ReadonlyArray<InternalChartSeries<T>>;\n\n fitHeight?: boolean;\n height: number;\n detailPopoverSize: MixedLineBarChartProps<T>['detailPopoverSize'];\n detailPopoverFooter: MixedLineBarChartProps<T>['detailPopoverFooter'];\n\n xScaleType: ScaleType;\n yScaleType: 'linear' | 'log';\n\n xDomain: MixedLineBarChartProps<T>['xDomain'];\n yDomain: MixedLineBarChartProps<T>['yDomain'];\n\n xTickFormatter?: CartesianChartProps.TickFormatter<T>;\n yTickFormatter?: CartesianChartProps.TickFormatter<number>;\n\n xTitle?: string;\n yTitle?: string;\n\n stackedBars?: boolean;\n emphasizeBaselineAxis: boolean;\n horizontalBars?: boolean;\n\n highlightedSeries?: MixedLineBarChartProps<T>['highlightedSeries'];\n onHighlightChange: (series: InternalChartSeries<T>['series'] | null) => void;\n highlightedPoint: ScaledPoint<T> | null;\n setHighlightedPoint: (point: ScaledPoint<T> | null) => void;\n highlightedGroupIndex: number | null;\n setHighlightedGroupIndex: (groupIndex: number | null) => void;\n\n ariaLabel: MixedLineBarChartProps<T>['ariaLabel'];\n ariaLabelledby: MixedLineBarChartProps<T>['ariaLabelledby'];\n ariaDescription: MixedLineBarChartProps<T>['ariaDescription'];\n i18nStrings: MixedLineBarChartProps<T>['i18nStrings'];\n\n detailPopoverSeriesContent?: MixedLineBarChartProps.DetailPopoverSeriesContent<T>;\n}\n\ninterface BaseAxisProps {\n tickCount: number;\n tickFormatter: TickFormatter;\n title?: string;\n ariaRoleDescription?: string;\n}\n\ninterface XAxisProps extends BaseAxisProps {\n axis: 'x';\n scale: ChartScale;\n ticks: ChartDataTypes[];\n}\n\ninterface YAxisProps extends BaseAxisProps {\n axis: 'y';\n scale: NumericChartScale;\n ticks: number[];\n}\n\nconst fallbackContainerWidth = 500;\n\nexport default function ChartContainer<T extends ChartDataTypes>({\n fitHeight,\n height: explicitPlotHeight,\n series,\n visibleSeries,\n highlightedSeries,\n onHighlightChange,\n highlightedPoint,\n setHighlightedPoint,\n highlightedGroupIndex,\n setHighlightedGroupIndex,\n detailPopoverFooter,\n detailPopoverSize = 'medium',\n stackedBars = false,\n horizontalBars = false,\n xScaleType,\n yScaleType,\n xTickFormatter,\n yTickFormatter,\n emphasizeBaselineAxis,\n xTitle,\n yTitle,\n ariaLabel,\n ariaLabelledby,\n ariaDescription,\n i18nStrings = {},\n detailPopoverSeriesContent,\n ...props\n}: ChartContainerProps<T>) {\n const plotRef = useRef<ChartPlotRef>(null);\n const verticalMarkerRef = useRef<SVGLineElement>(null);\n\n const [leftLabelsWidth, setLeftLabelsWidth] = useState(0);\n const [verticalMarkerX, setVerticalMarkerX] = useState<VerticalMarkerX<T> | null>(null);\n const [detailsPopoverText, setDetailsPopoverText] = useState('');\n const [containerWidth, containerMeasureRef] = useContainerWidth(fallbackContainerWidth);\n const maxLeftLabelsWidth = Math.round(containerWidth / 2);\n const plotWidth = containerWidth\n ? // Calculate the minimum between leftLabelsWidth and maxLeftLabelsWidth for extra safety because leftLabelsWidth could be out of date\n Math.max(0, containerWidth - Math.min(leftLabelsWidth, maxLeftLabelsWidth) - LEFT_LABELS_MARGIN)\n : fallbackContainerWidth;\n const containerRefObject = useRef(null);\n const containerRef = useMergeRefs(containerMeasureRef, containerRefObject);\n const popoverRef = useRef<HTMLElement | null>(null);\n\n const xDomain = (props.xDomain || computeDomainX(series, xScaleType)) as\n | readonly number[]\n | readonly string[]\n | readonly Date[];\n const yDomain = (props.yDomain || computeDomainY(series, yScaleType, stackedBars)) as readonly number[];\n\n const linesOnly = series.every(({ series }) => series.type === 'line' || series.type === 'threshold');\n\n function getXAxisProps(size: number, range: [from: number, until: number]): XAxisProps {\n const tickCount = getXTickCount(size);\n const scale = new ChartScale(xScaleType, xDomain, range, linesOnly);\n const ticks = createXTicks(scale, tickCount);\n return {\n axis: 'x',\n tickCount,\n scale,\n ticks,\n tickFormatter: xTickFormatter as TickFormatter,\n title: xTitle,\n ariaRoleDescription: i18nStrings.xAxisAriaRoleDescription,\n };\n }\n\n function getYAxisProps(size: number, range: [from: number, until: number]): YAxisProps {\n const tickCount = getYTickCount(size);\n const scale = new NumericChartScale(yScaleType, yDomain, range, props.yDomain ? null : tickCount);\n const ticks = createYTicks(scale, tickCount);\n return {\n axis: 'y',\n tickCount,\n scale,\n ticks,\n tickFormatter: yTickFormatter as TickFormatter,\n title: yTitle,\n ariaRoleDescription: i18nStrings.yAxisAriaRoleDescription,\n };\n }\n\n const bottomAxisProps = !horizontalBars\n ? getXAxisProps(plotWidth, [0, plotWidth])\n : getYAxisProps(plotWidth, [0, plotWidth]);\n\n const bottomLabelsProps = useBottomLabels({ ...bottomAxisProps });\n\n const plotMeasureRef = useRef<SVGLineElement>(null);\n const measuredHeight = useHeightMeasure(() => plotMeasureRef.current, !fitHeight);\n const plotHeight = fitHeight ? measuredHeight ?? 0 : explicitPlotHeight;\n\n const leftAxisProps = !horizontalBars\n ? getYAxisProps(plotHeight, [plotHeight, 0])\n : getXAxisProps(plotHeight, [0, plotHeight]);\n\n const xAxisProps = bottomAxisProps.axis === 'x' ? bottomAxisProps : leftAxisProps.axis === 'x' ? leftAxisProps : null;\n const yAxisProps = bottomAxisProps.axis === 'y' ? bottomAxisProps : leftAxisProps.axis === 'y' ? leftAxisProps : null;\n if (!xAxisProps || !yAxisProps) {\n throw new Error('Invariant violation: invalid axis props.');\n }\n\n /**\n * Interactions\n */\n const highlightedPointRef = useRef<SVGGElement>(null);\n const highlightedGroupRef = useRef<SVGRectElement>(null);\n const [isPlotFocused, setPlotFocused] = useState(false);\n\n // Some chart components are rendered against \"x\" or \"y\" axes,\n // When \"horizontalBars\" is enabled, the axes are inverted.\n const x = !horizontalBars ? 'x' : 'y';\n const y = !horizontalBars ? 'y' : 'x';\n\n const scaledSeries = makeScaledSeries(visibleSeries, xAxisProps.scale, yAxisProps.scale);\n const barGroups: ScaledBarGroup<T>[] = makeScaledBarGroups(visibleSeries, xAxisProps.scale, plotWidth, plotHeight, y);\n\n const { isPopoverOpen, isPopoverPinned, showPopover, pinPopover, dismissPopover } = usePopover();\n\n // Allows to add a delay between popover is dismissed and handlers are enabled to prevent immediate popover reopening.\n const [isHandlersDisabled, setHandlersDisabled] = useState(!isPopoverPinned);\n useEffect(() => {\n if (isPopoverPinned) {\n setHandlersDisabled(true);\n } else {\n const timeoutId = setTimeout(() => setHandlersDisabled(false), 25);\n return () => clearTimeout(timeoutId);\n }\n }, [isPopoverPinned]);\n\n const highlightSeries = useCallback(\n (series: MixedLineBarChartProps.ChartSeries<T> | null) => {\n if (series !== highlightedSeries) {\n onHighlightChange(series);\n }\n },\n [highlightedSeries, onHighlightChange]\n );\n\n const highlightPoint = useCallback(\n (point: ScaledPoint<T> | null) => {\n setHighlightedGroupIndex(null);\n setHighlightedPoint(point);\n if (point) {\n highlightSeries(point.series);\n setVerticalMarkerX({\n scaledX: point.x,\n label: point.datum?.x ?? null,\n });\n }\n },\n [setHighlightedGroupIndex, setHighlightedPoint, highlightSeries]\n );\n\n const clearAllHighlights = useCallback(() => {\n setHighlightedPoint(null);\n highlightSeries(null);\n setHighlightedGroupIndex(null);\n }, [highlightSeries, setHighlightedGroupIndex, setHighlightedPoint]);\n\n // Highlight all points at a given X in a line chart\n const highlightX = useCallback(\n (marker: VerticalMarkerX<T> | null) => {\n if (marker) {\n clearAllHighlights();\n }\n setVerticalMarkerX(marker);\n },\n [clearAllHighlights]\n );\n\n // Highlight all points and bars at a given X index in a mixed line and bar chart\n const highlightGroup = useCallback(\n (groupIndex: number) => {\n highlightSeries(null);\n setHighlightedPoint(null);\n setHighlightedGroupIndex(groupIndex);\n },\n [highlightSeries, setHighlightedPoint, setHighlightedGroupIndex]\n );\n\n const clearHighlightedSeries = useCallback(() => {\n clearAllHighlights();\n dismissPopover();\n }, [dismissPopover, clearAllHighlights]);\n\n const { isGroupNavigation, ...handlers } = useNavigation({\n series,\n visibleSeries,\n scaledSeries,\n barGroups,\n xScale: xAxisProps.scale,\n yScale: yAxisProps.scale,\n highlightedPoint,\n highlightedGroupIndex,\n highlightedSeries,\n isHandlersDisabled,\n pinPopover,\n highlightSeries,\n highlightGroup,\n highlightPoint,\n highlightX,\n clearHighlightedSeries,\n verticalMarkerX,\n });\n\n const { onSVGMouseMove, onSVGMouseOut, onPopoverLeave } = useMouseHover<T>({\n scaledSeries,\n barGroups,\n plotRef,\n popoverRef,\n highlightPoint,\n highlightGroup,\n clearHighlightedSeries,\n isGroupNavigation,\n isHandlersDisabled,\n highlightX,\n });\n\n // There are multiple ways to indicate what X is selected.\n // TODO: make a uniform verticalMarkerX state to fit all use-cases.\n const highlightedX = useMemo(() => {\n if (highlightedGroupIndex !== null) {\n return barGroups[highlightedGroupIndex].x;\n }\n if (verticalMarkerX !== null) {\n return verticalMarkerX.label;\n }\n return highlightedPoint?.datum?.x ?? null;\n }, [highlightedPoint, verticalMarkerX, highlightedGroupIndex, barGroups]);\n\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n dismissPopover();\n }\n };\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [dismissPopover]);\n\n useLayoutEffect(() => {\n if (highlightedX !== null || highlightedPoint !== null) {\n showPopover();\n }\n }, [highlightedX, highlightedPoint, showPopover]);\n\n const onPopoverDismiss = (outsideClick?: boolean) => {\n dismissPopover();\n\n if (!outsideClick) {\n // The delay is needed to bypass focus events caused by click or keypress needed to unpin the popover.\n setTimeout(() => {\n const isSomeInnerElementFocused = highlightedPoint || highlightedGroupIndex !== null || verticalMarkerX;\n if (isSomeInnerElementFocused) {\n plotRef.current?.focusApplication();\n } else {\n plotRef.current?.focusPlot();\n }\n }, 0);\n } else {\n clearAllHighlights();\n setVerticalMarkerX(null);\n }\n };\n\n const onSVGClick = (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => {\n if (isPopoverOpen) {\n if (isPopoverPinned) {\n dismissPopover();\n } else {\n pinPopover();\n e.preventDefault();\n }\n } else {\n showPopover();\n }\n };\n\n const onSVGFocus = (event: React.FocusEvent, trigger: 'mouse' | 'keyboard') => {\n setPlotFocused(true);\n if (trigger === 'keyboard') {\n handlers.onFocus();\n } else {\n // noop: clicks are handled separately\n }\n };\n\n const onSVGBlur = (event: React.FocusEvent<Element>) => {\n setPlotFocused(false);\n const blurTarget = event.relatedTarget || event.target;\n if (\n blurTarget === null ||\n !(blurTarget instanceof Element) ||\n !nodeBelongs(containerRefObject.current, blurTarget)\n ) {\n clearHighlightedSeries();\n setVerticalMarkerX(null);\n\n if (isPopoverOpen && !isPopoverPinned) {\n dismissPopover();\n }\n }\n };\n\n const onSVGKeyDown = handlers.onKeyDown;\n\n const xOffset = xAxisProps.scale.isCategorical() ? Math.max(0, xAxisProps.scale.d3Scale.bandwidth() - 1) / 2 : 0;\n\n let verticalLineX: number | null = null;\n if (verticalMarkerX !== null) {\n verticalLineX = verticalMarkerX.scaledX;\n } else if (isGroupNavigation && highlightedGroupIndex !== null) {\n const x = xAxisProps.scale.d3Scale(barGroups[highlightedGroupIndex].x as any) ?? null;\n if (x !== null) {\n verticalLineX = xOffset + x;\n }\n }\n\n const point = useMemo(\n () =>\n highlightedPoint\n ? {\n key: `${highlightedPoint.x}-${highlightedPoint.y}`,\n x: highlightedPoint.x,\n y: highlightedPoint.y,\n color: highlightedPoint.color,\n }\n : null,\n [highlightedPoint]\n );\n\n const verticalMarkers = useMemo(\n () =>\n verticalLineX !== null\n ? scaledSeries\n .filter(({ x, y }) => (x === verticalLineX || isNaN(x)) && !isNaN(y))\n .map(({ x, y, color }, index) => ({\n key: `${index}-${x}-${y}`,\n x: !horizontalBars ? verticalLineX || 0 : y,\n y: !horizontalBars ? y : verticalLineX || 0,\n color: color,\n }))\n : [],\n [scaledSeries, verticalLineX, horizontalBars]\n );\n\n const highlightedElementRef = isGroupNavigation\n ? highlightedGroupRef\n : highlightedPoint\n ? highlightedPointRef\n : verticalMarkerRef;\n\n const highlightDetails = useMemo(() => {\n if (highlightedX === null) {\n return null;\n }\n\n // When series point is highlighted show the corresponding series and matching x-thresholds.\n if (highlightedPoint) {\n const seriesToShow = visibleSeries.filter(\n series => series.series === highlightedPoint?.series || isXThreshold(series.series)\n );\n return formatHighlighted({\n position: highlightedX,\n series: seriesToShow,\n xTickFormatter,\n detailPopoverSeriesContent,\n });\n }\n\n // Otherwise - show all visible series details.\n return formatHighlighted({\n position: highlightedX,\n series: visibleSeries,\n xTickFormatter,\n detailPopoverSeriesContent,\n });\n }, [highlightedX, highlightedPoint, visibleSeries, xTickFormatter, detailPopoverSeriesContent]);\n\n const detailPopoverFooterContent = useMemo(\n () => (detailPopoverFooter && highlightedX ? detailPopoverFooter(highlightedX) : null),\n [detailPopoverFooter, highlightedX]\n );\n\n const activeAriaLabel =\n highlightDetails && detailsPopoverText ? `${highlightDetails.position}, ${detailsPopoverText}` : '';\n\n // Live region is used when nothing is focused e.g. when hovering.\n const activeLiveRegion =\n activeAriaLabel && !highlightedPoint && highlightedGroupIndex === null ? activeAriaLabel : '';\n\n const isLineXKeyboardFocused = isPlotFocused && !highlightedPoint && verticalMarkerX;\n\n const isRefresh = useVisualRefresh();\n\n return (\n <CartesianChartContainer\n ref={containerRef}\n minHeight={explicitPlotHeight + bottomLabelsProps.height}\n fitHeight={!!fitHeight}\n leftAxisLabel={<AxisLabel axis={y} position=\"left\" title={leftAxisProps.title} />}\n leftAxisLabelMeasure={\n <LabelsMeasure\n ticks={leftAxisProps.ticks}\n scale={leftAxisProps.scale}\n tickFormatter={leftAxisProps.tickFormatter as TickFormatter}\n autoWidth={setLeftLabelsWidth}\n maxLabelsWidth={maxLeftLabelsWidth}\n />\n }\n bottomAxisLabel={<AxisLabel axis={x} position=\"bottom\" title={bottomAxisProps.title} />}\n chartPlot={\n <ChartPlot\n ref={plotRef}\n width=\"100%\"\n height={fitHeight ? `calc(100% - ${bottomLabelsProps.height}px)` : plotHeight}\n offsetBottom={bottomLabelsProps.height}\n isClickable={isPopoverOpen && !isPopoverPinned}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n ariaDescription={ariaDescription}\n ariaRoleDescription={i18nStrings?.chartAriaRoleDescription}\n ariaLiveRegion={activeLiveRegion}\n activeElementRef={highlightedElementRef}\n activeElementKey={\n isPlotFocused &&\n (highlightedGroupIndex?.toString() ??\n (isLineXKeyboardFocused ? `point-index-${handlers.xIndex}` : point?.key))\n }\n activeElementFocusOffset={isGroupNavigation ? 0 : isLineXKeyboardFocused ? { x: 8, y: 0 } : 3}\n onMouseMove={onSVGMouseMove}\n onMouseOut={onSVGMouseOut}\n onClick={onSVGClick}\n onFocus={onSVGFocus}\n onBlur={onSVGBlur}\n onKeyDown={onSVGKeyDown}\n >\n <line\n ref={plotMeasureRef}\n x1=\"0\"\n x2=\"0\"\n y1=\"0\"\n y2=\"100%\"\n stroke=\"transparent\"\n strokeWidth={1}\n style={{ pointerEvents: 'none' }}\n />\n\n <LeftLabels\n axis={y}\n ticks={leftAxisProps.ticks}\n scale={leftAxisProps.scale}\n tickFormatter={leftAxisProps.tickFormatter as TickFormatter}\n title={leftAxisProps.title}\n ariaRoleDescription={leftAxisProps.ariaRoleDescription}\n maxLabelsWidth={maxLeftLabelsWidth}\n plotWidth={plotWidth}\n plotHeight={plotHeight}\n />\n\n {horizontalBars && (\n <VerticalGridLines scale={yAxisProps.scale} ticks={yAxisProps.ticks} height={plotHeight} />\n )}\n\n {emphasizeBaselineAxis && linesOnly && (\n <EmphasizedBaseline axis={x} scale={yAxisProps.scale} width={plotWidth} height={plotHeight} />\n )}\n\n <DataSeries\n axis={x}\n plotWidth={plotWidth}\n plotHeight={plotHeight}\n highlightedSeries={highlightedSeries ?? null}\n highlightedGroupIndex={highlightedGroupIndex}\n stackedBars={stackedBars}\n isGroupNavigation={isGroupNavigation}\n visibleSeries={visibleSeries}\n xScale={xAxisProps.scale}\n yScale={yAxisProps.scale}\n />\n\n {emphasizeBaselineAxis && !linesOnly && (\n <EmphasizedBaseline axis={x} scale={yAxisProps.scale} width={plotWidth} height={plotHeight} />\n )}\n\n <VerticalMarker\n key={verticalLineX || ''}\n height={plotHeight}\n showPoints={highlightedPoint === null}\n showLine={!isGroupNavigation}\n points={verticalMarkers}\n ref={verticalMarkerRef}\n />\n\n {highlightedPoint && (\n <HighlightedPoint\n ref={highlightedPointRef}\n point={point}\n role=\"button\"\n ariaLabel={activeAriaLabel}\n ariaHasPopup={true}\n ariaExpanded={isPopoverPinned}\n />\n )}\n\n {isGroupNavigation && xAxisProps.scale.isCategorical() && (\n <BarGroups\n ariaLabel={activeAriaLabel}\n isRefresh={isRefresh}\n isPopoverPinned={isPopoverPinned}\n barGroups={barGroups}\n highlightedGroupIndex={highlightedGroupIndex}\n highlightedGroupRef={highlightedGroupRef}\n />\n )}\n\n <BottomLabels\n {...bottomLabelsProps}\n axis={x}\n scale={bottomAxisProps.scale}\n title={bottomAxisProps.title}\n ariaRoleDescription={bottomAxisProps.ariaRoleDescription}\n height={plotHeight}\n width={plotWidth}\n offsetLeft={leftLabelsWidth + BOTTOM_LABELS_OFFSET}\n offsetRight={BOTTOM_LABELS_OFFSET}\n />\n </ChartPlot>\n }\n popover={\n <ChartPopover\n ref={popoverRef}\n containerRef={containerRefObject}\n trackRef={highlightedElementRef}\n isOpen={isPopoverOpen}\n isPinned={isPopoverPinned}\n highlightDetails={highlightDetails}\n onDismiss={onPopoverDismiss}\n size={detailPopoverSize}\n footer={detailPopoverFooterContent}\n dismissAriaLabel={i18nStrings.detailPopoverDismissAriaLabel}\n onMouseLeave={onPopoverLeave}\n onBlur={onSVGBlur}\n setPopoverText={setDetailsPopoverText}\n />\n }\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/internal.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAItE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAKlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,KAAK,8BAA8B,CAAC,CAAC,SAAS,cAAc,IAAI,YAAY,CAC1E,sBAAsB,CAAC,CAAC,CAAC,EACvB,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,gBAAgB,GAChB,YAAY,GACZ,mBAAmB,GACnB,uBAAuB,CAC1B,GACC,0BAA0B,CAAC;AAE7B,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,EAClF,SAAS,EACT,MAAM,EACN,UAAU,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,iBAAiB,EAAE,2BAA2B,EAC9C,aAAa,EAAE,uBAAuB,EACtC,MAAM,EAAE,cAAc,EACtB,cAAc,EACd,iBAAiB,EAAE,2BAA2B,EAC9C,WAAW,EACX,SAAS,EACT,cAAc,EACd,eAAe,EACf,MAAM,EACN,MAAM,EACN,WAAW,EACX,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,EACL,OAAO,EACP,SAAS,EACT,WAAW,EACX,YAAY,EACZ,eAAe,EACf,iBAAwB,EACxB,GAAG,KAAK,EACT,EAAE,8BAA8B,CAAC,CAAC,CAAC,eA6NnC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/internal.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAItE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAKlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,KAAK,8BAA8B,CAAC,CAAC,SAAS,cAAc,IAAI,YAAY,CAC1E,sBAAsB,CAAC,CAAC,CAAC,EACvB,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,gBAAgB,GAChB,YAAY,GACZ,mBAAmB,GACnB,uBAAuB,CAC1B,GACC,0BAA0B,CAAC;AAE7B,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,EAClF,SAAS,EACT,MAAM,EACN,UAAU,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,iBAAiB,EAAE,2BAA2B,EAC9C,aAAa,EAAE,uBAAuB,EACtC,MAAM,EAAE,cAAc,EACtB,cAAc,EACd,iBAAiB,EAAE,2BAA2B,EAC9C,WAAW,EACX,SAAS,EACT,cAAc,EACd,eAAe,EACf,MAAM,EACN,MAAM,EACN,WAAW,EACX,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,EACL,OAAO,EACP,SAAS,EACT,WAAW,EACX,YAAY,EACZ,eAAe,EACf,iBAAwB,EACxB,GAAG,KAAK,EACT,EAAE,8BAA8B,CAAC,CAAC,CAAC,eA4NnC"}
@@ -112,6 +112,6 @@ export default function InternalMixedLineBarChart(_a) {
112
112
  color,
113
113
  datum: series,
114
114
  }));
115
- return (React.createElement(ChartWrapper, Object.assign({ ref: mergedRef }, baseProps, { className: clsx(baseProps.className, styles.root), fitHeight: !!fitHeight, contentMinHeight: height, defaultFilter: showFilters && !hideFilter ? (React.createElement(Filter, { series: filterItems, onChange: filterChange, selectedSeries: externalVisibleSeries || [], i18nStrings: i18nStrings })) : null, additionalFilters: showFilters ? additionalFilters : null, reserveFilterSpace: !!reserveFilterSpace, reserveLegendSpace: !!reserveLegendSpace, chartStatus: React.createElement(ChartStatusContainer, { isEmpty: isEmpty, isNoMatch: isNoMatch, showChart: showChart, statusType: statusType, empty: empty, noMatch: noMatch, loadingText: loadingText, errorText: errorText, recoveryText: recoveryText, onRecoveryClick: onRecoveryClick }), chart: showChart ? (React.createElement(ChartContainer, { fitHeight: fitHeight, height: height, xScaleType: xScaleType, yScaleType: yScaleType, xDomain: xDomain, yDomain: yDomain, xTickFormatter: xTickFormatter !== null && xTickFormatter !== void 0 ? xTickFormatter : i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.xTickFormatter, yTickFormatter: yTickFormatter !== null && yTickFormatter !== void 0 ? yTickFormatter : i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.yTickFormatter, emphasizeBaselineAxis: emphasizeBaselineAxis, stackedBars: stackedBars, horizontalBars: horizontalBars, series: series, visibleSeries: visibleSeries, highlightedSeries: highlightedSeries, onHighlightChange: onHighlightChange, highlightedPoint: highlightedPoint, setHighlightedPoint: setHighlightedPoint, highlightedGroupIndex: highlightedGroupIndex, setHighlightedGroupIndex: setHighlightedGroupIndex, detailPopoverSize: detailPopoverSize, detailPopoverFooter: detailPopoverFooter, detailPopoverSeriesContent: detailPopoverSeriesContent, xTitle: xTitle, yTitle: yTitle, ariaLabel: ariaLabel, ariaLabelledby: ariaLabelledby, ariaDescription: ariaDescription, i18nStrings: i18nStrings, plotContainerRef: containerRef })) : null, legend: showLegend ? (React.createElement(InternalChartLegend, { series: series, visibleSeries: externalVisibleSeries || [], highlightedSeries: legendSeries, onHighlightChange: onHighlightChange, legendTitle: legendTitle, ariaLabel: i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.legendAriaLabel, plotContainerRef: containerRef })) : null, onBlur: onBlur })));
115
+ return (React.createElement(ChartWrapper, Object.assign({ ref: mergedRef }, baseProps, { className: clsx(baseProps.className, styles.root), fitHeight: !!fitHeight, contentMinHeight: height, defaultFilter: showFilters && !hideFilter ? (React.createElement(Filter, { series: filterItems, onChange: filterChange, selectedSeries: externalVisibleSeries || [], i18nStrings: i18nStrings })) : null, additionalFilters: showFilters ? additionalFilters : null, reserveFilterSpace: !!reserveFilterSpace, reserveLegendSpace: !!reserveLegendSpace, chartStatus: React.createElement(ChartStatusContainer, { isEmpty: isEmpty, isNoMatch: isNoMatch, showChart: showChart, statusType: statusType, empty: empty, noMatch: noMatch, loadingText: loadingText, errorText: errorText, recoveryText: recoveryText, onRecoveryClick: onRecoveryClick }), chart: showChart ? (React.createElement(ChartContainer, { fitHeight: fitHeight, height: height, xScaleType: xScaleType, yScaleType: yScaleType, xDomain: xDomain, yDomain: yDomain, xTickFormatter: xTickFormatter !== null && xTickFormatter !== void 0 ? xTickFormatter : i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.xTickFormatter, yTickFormatter: yTickFormatter !== null && yTickFormatter !== void 0 ? yTickFormatter : i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.yTickFormatter, emphasizeBaselineAxis: emphasizeBaselineAxis, stackedBars: stackedBars, horizontalBars: horizontalBars, series: series, visibleSeries: visibleSeries, highlightedSeries: highlightedSeries, onHighlightChange: onHighlightChange, highlightedPoint: highlightedPoint, setHighlightedPoint: setHighlightedPoint, highlightedGroupIndex: highlightedGroupIndex, setHighlightedGroupIndex: setHighlightedGroupIndex, detailPopoverSize: detailPopoverSize, detailPopoverFooter: detailPopoverFooter, detailPopoverSeriesContent: detailPopoverSeriesContent, xTitle: xTitle, yTitle: yTitle, ariaLabel: ariaLabel, ariaLabelledby: ariaLabelledby, ariaDescription: ariaDescription, i18nStrings: i18nStrings })) : null, legend: showLegend ? (React.createElement(InternalChartLegend, { series: series, visibleSeries: externalVisibleSeries || [], highlightedSeries: legendSeries, onHighlightChange: onHighlightChange, legendTitle: legendTitle, ariaLabel: i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.legendAriaLabel, plotContainerRef: containerRef })) : null, onBlur: onBlur })));
116
116
  }
117
117
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,oBAAoB,EAAE,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,OAAO,mBAAmB,MAAM,gBAAgB,CAAC;AACjD,OAAO,cAA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EAAE,0BAA0B,EACtD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,YAAY,GAC9B,CACH,CAAC,CAAC,CAAC,IAAI,EAEV,MAAM,EACJ,UAAU,CAAC,CAAC,CAAC,CACX,oBAAC,mBAAmB,IAClB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,qBAAqB,IAAI,EAAE,EAC1C,iBAAiB,EAAE,YAAY,EAC/B,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,eAAe,EACvC,gBAAgB,EAAE,YAAY,GAC9B,CACH,CAAC,CAAC,CAAC,IAAI,EAEV,MAAM,EAAE,MAAM,IACd,CACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport ChartStatusContainer, { getChartStatus } from '../internal/components/chart-status-container';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { usePrevious } from '../internal/hooks/use-previous';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ChartDataTypes, MixedLineBarChartProps } from './interfaces';\nimport InternalChartLegend from './chart-legend';\nimport ChartContainer from './chart-container';\nimport styles from './styles.css.js';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { isDevelopment } from '../internal/is-development';\nimport createCategoryColorScale from '../internal/utils/create-category-color-scale';\nimport { ScaledPoint } from './make-scaled-series';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { SomeRequired } from '../internal/types';\nimport { chartLegendMap, isXThreshold, isYThreshold } from './utils';\nimport { nodeBelongs } from '../internal/utils/node-belongs';\nimport Filter from '../internal/components/chart-filter';\nimport { ChartWrapper } from '../internal/components/chart-wrapper';\n\ntype InternalMixedLineBarChartProps<T extends ChartDataTypes> = SomeRequired<\n MixedLineBarChartProps<T>,\n | 'series'\n | 'height'\n | 'xScaleType'\n | 'yScaleType'\n | 'stackedBars'\n | 'horizontalBars'\n | 'statusType'\n | 'detailPopoverSize'\n | 'emphasizeBaselineAxis'\n> &\n InternalBaseComponentProps;\n\nexport default function InternalMixedLineBarChart<T extends number | string | Date>({\n fitHeight,\n height,\n xScaleType,\n yScaleType,\n xDomain,\n yDomain,\n xTickFormatter,\n yTickFormatter,\n highlightedSeries: controlledHighlightedSeries,\n visibleSeries: controlledVisibleSeries,\n series: externalSeries,\n onFilterChange,\n onHighlightChange: controlledOnHighlightChange,\n i18nStrings,\n ariaLabel,\n ariaLabelledby,\n ariaDescription,\n xTitle,\n yTitle,\n stackedBars,\n horizontalBars,\n hideFilter,\n additionalFilters,\n hideLegend,\n legendTitle,\n statusType,\n detailPopoverSize,\n detailPopoverFooter,\n detailPopoverSeriesContent,\n emphasizeBaselineAxis,\n empty,\n noMatch,\n errorText,\n loadingText,\n recoveryText,\n onRecoveryClick,\n __internalRootRef = null,\n ...props\n}: InternalMixedLineBarChartProps<T>) {\n const baseProps = getBaseProps(props);\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const gotBarSeries = externalSeries.some(s => s.type === 'bar');\n const gotLineSeries = externalSeries.some(s => s.type === 'line');\n\n if (xScaleType !== 'categorical' && gotBarSeries) {\n warnOnce(\n 'MixedLineBarChart',\n `Bar series cannot be used with a ${xScaleType} scale. Use a categorical x axis instead.`\n );\n }\n\n if (horizontalBars && gotLineSeries) {\n warnOnce(\n 'MixedLineBarChart',\n `Property horizontalBars can only be used with charts that contain only bar or threshold series.`\n );\n }\n\n for (const s of externalSeries) {\n if (s.type === 'threshold' && s.x !== undefined && s.y !== undefined) {\n warnOnce('MixedLineBarChart', `Series of type \"threshold\" must contain either x or y property.`);\n }\n if (s.type === 'threshold' && s.x === undefined && s.y === undefined) {\n warnOnce('MixedLineBarChart', `Series of type \"threshold\" must contain either x or y property.`);\n }\n }\n }, [xScaleType, horizontalBars, externalSeries]);\n\n const series = useMemo(() => {\n // Generate series colors if not explicitly provided.\n // The thresholds use a dedicated colour scale.\n const colors = createCategoryColorScale(\n externalSeries,\n it => isYThreshold(it) || isXThreshold(it),\n it => it.color || null\n );\n\n return externalSeries.map((s, i) => ({ index: i, color: colors[i], series: s }));\n }, [externalSeries]);\n\n const [highlightedPoint, setHighlightedPoint] = useState<ScaledPoint<T> | null>(null);\n const [highlightedGroupIndex, setHighlightedGroupIndex] = useState<number | null>(null);\n const [highlightedSeries = null, setHighlightedSeries] = useControllable(\n controlledHighlightedSeries,\n controlledOnHighlightChange,\n null,\n {\n componentName: 'MixedLineBarChart',\n controlledProp: 'highlightedSeries',\n changeHandler: 'onHighlightChange',\n }\n );\n const [legendSeries, setLegendSeries] = useState<MixedLineBarChartProps.ChartSeries<T> | null>(highlightedSeries);\n useEffect(() => {\n setLegendSeries(controlledHighlightedSeries || null);\n }, [controlledHighlightedSeries]);\n\n const [externalVisibleSeries, setExternalVisibleSeries] = useControllable(\n controlledVisibleSeries,\n onFilterChange,\n externalSeries,\n {\n componentName: 'MixedLineBarChart',\n controlledProp: 'visibleSeries',\n changeHandler: 'onFilterChange',\n }\n );\n\n if (isDevelopment) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const previousSeries = usePrevious(externalSeries);\n\n const hasPrevious = !!(previousSeries && previousSeries.length);\n const hasCurrent = !!externalSeries.length;\n\n if (hasPrevious && hasCurrent && externalSeries !== previousSeries && !controlledVisibleSeries && !hideFilter) {\n warnOnce(\n 'MixedLineBarChart',\n 'The `series` value passed into the component changed. ' +\n 'This may cause problems with filtering - we recommend that you make the `series` value constant, ' +\n 'or provide a `visibleSeries` value that derives from the current `series` value.'\n );\n }\n }\n\n const visibleSeries = useMemo(\n () => series.filter(s => externalVisibleSeries?.indexOf(s.series) !== -1),\n [series, externalVisibleSeries]\n );\n\n const filterChange = (selectedSeries: ReadonlyArray<MixedLineBarChartProps.ChartSeries<T>>) => {\n setExternalVisibleSeries(selectedSeries);\n fireNonCancelableEvent(onFilterChange, {\n visibleSeries: selectedSeries,\n });\n };\n\n const onHighlightChange = (series: MixedLineBarChartProps.ChartSeries<T> | null) => {\n setHighlightedSeries(series);\n fireNonCancelableEvent(controlledOnHighlightChange, {\n highlightedSeries: series,\n });\n setLegendSeries(series);\n };\n\n const onBlur = (event: React.FocusEvent) => {\n if (event.relatedTarget && !nodeBelongs(containerRef.current, event.relatedTarget)) {\n highlightedSeries && onHighlightChange(highlightedSeries);\n setHighlightedPoint(null);\n setHighlightedGroupIndex(null);\n setLegendSeries(null);\n }\n };\n\n const { isEmpty, isNoMatch, showChart } = getChartStatus({\n externalData: externalSeries,\n visibleData: visibleSeries || [],\n statusType,\n });\n const showFilters = statusType === 'finished' && (!isEmpty || isNoMatch) && (additionalFilters || !hideFilter);\n const showLegend = !hideLegend && !isEmpty && statusType === 'finished';\n const reserveLegendSpace = !showChart && !hideLegend;\n const reserveFilterSpace = !showChart && !isNoMatch && (!hideFilter || additionalFilters);\n const mergedRef = useMergeRefs(containerRef, __internalRootRef);\n\n const filterItems = series.map(({ series, color }) => ({\n label: series.title,\n type: chartLegendMap[series.type],\n color,\n datum: series,\n }));\n\n return (\n <ChartWrapper\n ref={mergedRef}\n {...baseProps}\n className={clsx(baseProps.className, styles.root)}\n fitHeight={!!fitHeight}\n contentMinHeight={height}\n defaultFilter={\n showFilters && !hideFilter ? (\n <Filter\n series={filterItems}\n onChange={filterChange}\n selectedSeries={externalVisibleSeries || []}\n i18nStrings={i18nStrings}\n />\n ) : null\n }\n additionalFilters={showFilters ? additionalFilters : null}\n reserveFilterSpace={!!reserveFilterSpace}\n reserveLegendSpace={!!reserveLegendSpace}\n chartStatus={\n <ChartStatusContainer\n isEmpty={isEmpty}\n isNoMatch={isNoMatch}\n showChart={showChart}\n statusType={statusType}\n empty={empty}\n noMatch={noMatch}\n loadingText={loadingText}\n errorText={errorText}\n recoveryText={recoveryText}\n onRecoveryClick={onRecoveryClick}\n />\n }\n chart={\n showChart ? (\n <ChartContainer\n fitHeight={fitHeight}\n height={height}\n xScaleType={xScaleType}\n yScaleType={yScaleType}\n xDomain={xDomain}\n yDomain={yDomain}\n xTickFormatter={xTickFormatter ?? i18nStrings?.xTickFormatter}\n yTickFormatter={yTickFormatter ?? i18nStrings?.yTickFormatter}\n emphasizeBaselineAxis={emphasizeBaselineAxis}\n stackedBars={stackedBars}\n horizontalBars={horizontalBars}\n series={series}\n visibleSeries={visibleSeries}\n highlightedSeries={highlightedSeries}\n onHighlightChange={onHighlightChange}\n highlightedPoint={highlightedPoint}\n setHighlightedPoint={setHighlightedPoint}\n highlightedGroupIndex={highlightedGroupIndex}\n setHighlightedGroupIndex={setHighlightedGroupIndex}\n detailPopoverSize={detailPopoverSize}\n detailPopoverFooter={detailPopoverFooter}\n detailPopoverSeriesContent={detailPopoverSeriesContent}\n xTitle={xTitle}\n yTitle={yTitle}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n ariaDescription={ariaDescription}\n i18nStrings={i18nStrings}\n plotContainerRef={containerRef}\n />\n ) : null\n }\n legend={\n showLegend ? (\n <InternalChartLegend\n series={series}\n visibleSeries={externalVisibleSeries || []}\n highlightedSeries={legendSeries}\n onHighlightChange={onHighlightChange}\n legendTitle={legendTitle}\n ariaLabel={i18nStrings?.legendAriaLabel}\n plotContainerRef={containerRef}\n />\n ) : null\n }\n onBlur={onBlur}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,O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EAC7D,cAAc,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,cAAc,EAC7D,qBAAqB,EAAE,qBAAqB,EAC5C,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,qBAAqB,EAAE,qBAAqB,EAC5C,wBAAwB,EAAE,wBAAwB,EAClD,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB,EACxC,0BAA0B,EAAE,0BAA0B,EACtD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,GACxB,CACH,CAAC,CAAC,CAAC,IAAI,EAEV,MAAM,EACJ,UAAU,CAAC,CAAC,CAAC,CACX,oBAAC,mBAAmB,IAClB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,qBAAqB,IAAI,EAAE,EAC1C,iBAAiB,EAAE,YAAY,EAC/B,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,eAAe,EACvC,gBAAgB,EAAE,YAAY,GAC9B,CACH,CAAC,CAAC,CAAC,IAAI,EAEV,MAAM,EAAE,MAAM,IACd,CACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport ChartStatusContainer, { getChartStatus } from '../internal/components/chart-status-container';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { usePrevious } from '../internal/hooks/use-previous';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ChartDataTypes, MixedLineBarChartProps } from './interfaces';\nimport InternalChartLegend from './chart-legend';\nimport ChartContainer from './chart-container';\nimport styles from './styles.css.js';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { isDevelopment } from '../internal/is-development';\nimport createCategoryColorScale from '../internal/utils/create-category-color-scale';\nimport { ScaledPoint } from './make-scaled-series';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { SomeRequired } from '../internal/types';\nimport { chartLegendMap, isXThreshold, isYThreshold } from './utils';\nimport { nodeBelongs } from '../internal/utils/node-belongs';\nimport Filter from '../internal/components/chart-filter';\nimport { ChartWrapper } from '../internal/components/chart-wrapper';\n\ntype InternalMixedLineBarChartProps<T extends ChartDataTypes> = SomeRequired<\n MixedLineBarChartProps<T>,\n | 'series'\n | 'height'\n | 'xScaleType'\n | 'yScaleType'\n | 'stackedBars'\n | 'horizontalBars'\n | 'statusType'\n | 'detailPopoverSize'\n | 'emphasizeBaselineAxis'\n> &\n InternalBaseComponentProps;\n\nexport default function InternalMixedLineBarChart<T extends number | string | Date>({\n fitHeight,\n height,\n xScaleType,\n yScaleType,\n xDomain,\n yDomain,\n xTickFormatter,\n yTickFormatter,\n highlightedSeries: controlledHighlightedSeries,\n visibleSeries: controlledVisibleSeries,\n series: externalSeries,\n onFilterChange,\n onHighlightChange: controlledOnHighlightChange,\n i18nStrings,\n ariaLabel,\n ariaLabelledby,\n ariaDescription,\n xTitle,\n yTitle,\n stackedBars,\n horizontalBars,\n hideFilter,\n additionalFilters,\n hideLegend,\n legendTitle,\n statusType,\n detailPopoverSize,\n detailPopoverFooter,\n detailPopoverSeriesContent,\n emphasizeBaselineAxis,\n empty,\n noMatch,\n errorText,\n loadingText,\n recoveryText,\n onRecoveryClick,\n __internalRootRef = null,\n ...props\n}: InternalMixedLineBarChartProps<T>) {\n const baseProps = getBaseProps(props);\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const gotBarSeries = externalSeries.some(s => s.type === 'bar');\n const gotLineSeries = externalSeries.some(s => s.type === 'line');\n\n if (xScaleType !== 'categorical' && gotBarSeries) {\n warnOnce(\n 'MixedLineBarChart',\n `Bar series cannot be used with a ${xScaleType} scale. Use a categorical x axis instead.`\n );\n }\n\n if (horizontalBars && gotLineSeries) {\n warnOnce(\n 'MixedLineBarChart',\n `Property horizontalBars can only be used with charts that contain only bar or threshold series.`\n );\n }\n\n for (const s of externalSeries) {\n if (s.type === 'threshold' && s.x !== undefined && s.y !== undefined) {\n warnOnce('MixedLineBarChart', `Series of type \"threshold\" must contain either x or y property.`);\n }\n if (s.type === 'threshold' && s.x === undefined && s.y === undefined) {\n warnOnce('MixedLineBarChart', `Series of type \"threshold\" must contain either x or y property.`);\n }\n }\n }, [xScaleType, horizontalBars, externalSeries]);\n\n const series = useMemo(() => {\n // Generate series colors if not explicitly provided.\n // The thresholds use a dedicated colour scale.\n const colors = createCategoryColorScale(\n externalSeries,\n it => isYThreshold(it) || isXThreshold(it),\n it => it.color || null\n );\n\n return externalSeries.map((s, i) => ({ index: i, color: colors[i], series: s }));\n }, [externalSeries]);\n\n const [highlightedPoint, setHighlightedPoint] = useState<ScaledPoint<T> | null>(null);\n const [highlightedGroupIndex, setHighlightedGroupIndex] = useState<number | null>(null);\n const [highlightedSeries = null, setHighlightedSeries] = useControllable(\n controlledHighlightedSeries,\n controlledOnHighlightChange,\n null,\n {\n componentName: 'MixedLineBarChart',\n controlledProp: 'highlightedSeries',\n changeHandler: 'onHighlightChange',\n }\n );\n const [legendSeries, setLegendSeries] = useState<MixedLineBarChartProps.ChartSeries<T> | null>(highlightedSeries);\n useEffect(() => {\n setLegendSeries(controlledHighlightedSeries || null);\n }, [controlledHighlightedSeries]);\n\n const [externalVisibleSeries, setExternalVisibleSeries] = useControllable(\n controlledVisibleSeries,\n onFilterChange,\n externalSeries,\n {\n componentName: 'MixedLineBarChart',\n controlledProp: 'visibleSeries',\n changeHandler: 'onFilterChange',\n }\n );\n\n if (isDevelopment) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const previousSeries = usePrevious(externalSeries);\n\n const hasPrevious = !!(previousSeries && previousSeries.length);\n const hasCurrent = !!externalSeries.length;\n\n if (hasPrevious && hasCurrent && externalSeries !== previousSeries && !controlledVisibleSeries && !hideFilter) {\n warnOnce(\n 'MixedLineBarChart',\n 'The `series` value passed into the component changed. ' +\n 'This may cause problems with filtering - we recommend that you make the `series` value constant, ' +\n 'or provide a `visibleSeries` value that derives from the current `series` value.'\n );\n }\n }\n\n const visibleSeries = useMemo(\n () => series.filter(s => externalVisibleSeries?.indexOf(s.series) !== -1),\n [series, externalVisibleSeries]\n );\n\n const filterChange = (selectedSeries: ReadonlyArray<MixedLineBarChartProps.ChartSeries<T>>) => {\n setExternalVisibleSeries(selectedSeries);\n fireNonCancelableEvent(onFilterChange, {\n visibleSeries: selectedSeries,\n });\n };\n\n const onHighlightChange = (series: MixedLineBarChartProps.ChartSeries<T> | null) => {\n setHighlightedSeries(series);\n fireNonCancelableEvent(controlledOnHighlightChange, {\n highlightedSeries: series,\n });\n setLegendSeries(series);\n };\n\n const onBlur = (event: React.FocusEvent) => {\n if (event.relatedTarget && !nodeBelongs(containerRef.current, event.relatedTarget)) {\n highlightedSeries && onHighlightChange(highlightedSeries);\n setHighlightedPoint(null);\n setHighlightedGroupIndex(null);\n setLegendSeries(null);\n }\n };\n\n const { isEmpty, isNoMatch, showChart } = getChartStatus({\n externalData: externalSeries,\n visibleData: visibleSeries || [],\n statusType,\n });\n const showFilters = statusType === 'finished' && (!isEmpty || isNoMatch) && (additionalFilters || !hideFilter);\n const showLegend = !hideLegend && !isEmpty && statusType === 'finished';\n const reserveLegendSpace = !showChart && !hideLegend;\n const reserveFilterSpace = !showChart && !isNoMatch && (!hideFilter || additionalFilters);\n const mergedRef = useMergeRefs(containerRef, __internalRootRef);\n\n const filterItems = series.map(({ series, color }) => ({\n label: series.title,\n type: chartLegendMap[series.type],\n color,\n datum: series,\n }));\n\n return (\n <ChartWrapper\n ref={mergedRef}\n {...baseProps}\n className={clsx(baseProps.className, styles.root)}\n fitHeight={!!fitHeight}\n contentMinHeight={height}\n defaultFilter={\n showFilters && !hideFilter ? (\n <Filter\n series={filterItems}\n onChange={filterChange}\n selectedSeries={externalVisibleSeries || []}\n i18nStrings={i18nStrings}\n />\n ) : null\n }\n additionalFilters={showFilters ? additionalFilters : null}\n reserveFilterSpace={!!reserveFilterSpace}\n reserveLegendSpace={!!reserveLegendSpace}\n chartStatus={\n <ChartStatusContainer\n isEmpty={isEmpty}\n isNoMatch={isNoMatch}\n showChart={showChart}\n statusType={statusType}\n empty={empty}\n noMatch={noMatch}\n loadingText={loadingText}\n errorText={errorText}\n recoveryText={recoveryText}\n onRecoveryClick={onRecoveryClick}\n />\n }\n chart={\n showChart ? (\n <ChartContainer\n fitHeight={fitHeight}\n height={height}\n xScaleType={xScaleType}\n yScaleType={yScaleType}\n xDomain={xDomain}\n yDomain={yDomain}\n xTickFormatter={xTickFormatter ?? i18nStrings?.xTickFormatter}\n yTickFormatter={yTickFormatter ?? i18nStrings?.yTickFormatter}\n emphasizeBaselineAxis={emphasizeBaselineAxis}\n stackedBars={stackedBars}\n horizontalBars={horizontalBars}\n series={series}\n visibleSeries={visibleSeries}\n highlightedSeries={highlightedSeries}\n onHighlightChange={onHighlightChange}\n highlightedPoint={highlightedPoint}\n setHighlightedPoint={setHighlightedPoint}\n highlightedGroupIndex={highlightedGroupIndex}\n setHighlightedGroupIndex={setHighlightedGroupIndex}\n detailPopoverSize={detailPopoverSize}\n detailPopoverFooter={detailPopoverFooter}\n detailPopoverSeriesContent={detailPopoverSeriesContent}\n xTitle={xTitle}\n yTitle={yTitle}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n ariaDescription={ariaDescription}\n i18nStrings={i18nStrings}\n />\n ) : null\n }\n legend={\n showLegend ? (\n <InternalChartLegend\n series={series}\n visibleSeries={externalVisibleSeries || []}\n highlightedSeries={legendSeries}\n onHighlightChange={onHighlightChange}\n legendTitle={legendTitle}\n ariaLabel={i18nStrings?.legendAriaLabel}\n plotContainerRef={containerRef}\n />\n ) : null\n }\n onBlur={onBlur}\n />\n );\n}\n"]}
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@cloudscape-design/components","main":"./index.js","exports":{".":"./index.js","./package.json":"./package.json","./theming":"./theming/index.js","./test-utils/dom":"./test-utils/dom/index.js","./test-utils/selectors":"./test-utils/selectors/index.js","./interfaces":"./interfaces.js","./contexts/form-field":"./contexts/form-field.js","./alert":"./alert/index.js","./anchor-navigation":"./anchor-navigation/index.js","./annotation-context":"./annotation-context/index.js","./app-layout":"./app-layout/index.js","./area-chart":"./area-chart/index.js","./attribute-editor":"./attribute-editor/index.js","./autosuggest":"./autosuggest/index.js","./badge":"./badge/index.js","./bar-chart":"./bar-chart/index.js","./box":"./box/index.js","./breadcrumb-group":"./breadcrumb-group/index.js","./button":"./button/index.js","./button-dropdown":"./button-dropdown/index.js","./calendar":"./calendar/index.js","./cards":"./cards/index.js","./checkbox":"./checkbox/index.js","./code-editor":"./code-editor/index.js","./collection-preferences":"./collection-preferences/index.js","./column-layout":"./column-layout/index.js","./container":"./container/index.js","./content-layout":"./content-layout/index.js","./date-input":"./date-input/index.js","./date-picker":"./date-picker/index.js","./date-range-picker":"./date-range-picker/index.js","./drawer":"./drawer/index.js","./expandable-section":"./expandable-section/index.js","./file-upload":"./file-upload/index.js","./flashbar":"./flashbar/index.js","./form":"./form/index.js","./form-field":"./form-field/index.js","./grid":"./grid/index.js","./header":"./header/index.js","./help-panel":"./help-panel/index.js","./hotspot":"./hotspot/index.js","./icon":"./icon/index.js","./input":"./input/index.js","./line-chart":"./line-chart/index.js","./link":"./link/index.js","./mixed-line-bar-chart":"./mixed-line-bar-chart/index.js","./modal":"./modal/index.js","./multiselect":"./multiselect/index.js","./pagination":"./pagination/index.js","./pie-chart":"./pie-chart/index.js","./popover":"./popover/index.js","./progress-bar":"./progress-bar/index.js","./property-filter":"./property-filter/index.js","./radio-group":"./radio-group/index.js","./s3-resource-selector":"./s3-resource-selector/index.js","./segmented-control":"./segmented-control/index.js","./select":"./select/index.js","./side-navigation":"./side-navigation/index.js","./space-between":"./space-between/index.js","./spinner":"./spinner/index.js","./split-panel":"./split-panel/index.js","./status-indicator":"./status-indicator/index.js","./table":"./table/index.js","./tabs":"./tabs/index.js","./tag-editor":"./tag-editor/index.js","./text-content":"./text-content/index.js","./text-filter":"./text-filter/index.js","./textarea":"./textarea/index.js","./tiles":"./tiles/index.js","./time-input":"./time-input/index.js","./toggle":"./toggle/index.js","./token-group":"./token-group/index.js","./top-navigation":"./top-navigation/index.js","./tutorial-panel":"./tutorial-panel/index.js","./wizard":"./wizard/index.js","./top-navigation/1.0-beta":"./top-navigation/1.0-beta/index.js","./i18n":"./i18n/index.js","./i18n/messages/all.all":"./i18n/messages/all.all.js","./i18n/messages/all.all.json":"./i18n/messages/all.all.json","./i18n/messages/all.de":"./i18n/messages/all.de.js","./i18n/messages/all.de.json":"./i18n/messages/all.de.json","./i18n/messages/all.en-GB":"./i18n/messages/all.en-GB.js","./i18n/messages/all.en-GB.json":"./i18n/messages/all.en-GB.json","./i18n/messages/all.en":"./i18n/messages/all.en.js","./i18n/messages/all.en.json":"./i18n/messages/all.en.json","./i18n/messages/all.es":"./i18n/messages/all.es.js","./i18n/messages/all.es.json":"./i18n/messages/all.es.json","./i18n/messages/all.fr":"./i18n/messages/all.fr.js","./i18n/messages/all.fr.json":"./i18n/messages/all.fr.json","./i18n/messages/all.id":"./i18n/messages/all.id.js","./i18n/messages/all.id.json":"./i18n/messages/all.id.json","./i18n/messages/all.it":"./i18n/messages/all.it.js","./i18n/messages/all.it.json":"./i18n/messages/all.it.json","./i18n/messages/all.ja":"./i18n/messages/all.ja.js","./i18n/messages/all.ja.json":"./i18n/messages/all.ja.json","./i18n/messages/all.ko":"./i18n/messages/all.ko.js","./i18n/messages/all.ko.json":"./i18n/messages/all.ko.json","./i18n/messages/all.pt-BR":"./i18n/messages/all.pt-BR.js","./i18n/messages/all.pt-BR.json":"./i18n/messages/all.pt-BR.json","./i18n/messages/all.tr":"./i18n/messages/all.tr.js","./i18n/messages/all.tr.json":"./i18n/messages/all.tr.json","./i18n/messages/all.zh-CN":"./i18n/messages/all.zh-CN.js","./i18n/messages/all.zh-CN.json":"./i18n/messages/all.zh-CN.json","./i18n/messages/all.zh-TW":"./i18n/messages/all.zh-TW.js","./i18n/messages/all.zh-TW.json":"./i18n/messages/all.zh-TW.json"},"sideEffects":["*.css","./internal/base-component/index.js","./internal/base-component/styles.css.js"],"version":"3.0.472","repository":{"type":"git","url":"https://github.com/cloudscape-design/components.git"},"homepage":"https://cloudscape.design","dependencies":{"@cloudscape-design/collection-hooks":"^1.0.0","@cloudscape-design/component-toolkit":"^1.0.0-beta","@cloudscape-design/test-utils-core":"^1.0.0","@cloudscape-design/theming-runtime":"^1.0.0","@dnd-kit/core":"^6.0.8","@dnd-kit/sortable":"^7.0.2","@dnd-kit/utilities":"^3.2.1","@juggle/resize-observer":"^3.3.1","ace-builds":"^1.23.0","balanced-match":"^1.0.2","clsx":"^1.1.0","d3-shape":"^1.3.7","date-fns":"^2.25.0","intl-messageformat":"^10.3.1","mnth":"^2.0.0","react-keyed-flatten-children":"^1.3.0","react-transition-group":"^4.4.2","react-virtual":"^2.8.2","tslib":"^2.4.0","weekstart":"^1.1.0"},"peerDependencies":{"react":"^16.8 || ^17 || ^18","react-dom":"^16.8 || ^17 || ^18"},"license":"Apache-2.0"}
1
+ {"name":"@cloudscape-design/components","main":"./index.js","exports":{".":"./index.js","./package.json":"./package.json","./theming":"./theming/index.js","./test-utils/dom":"./test-utils/dom/index.js","./test-utils/selectors":"./test-utils/selectors/index.js","./interfaces":"./interfaces.js","./contexts/form-field":"./contexts/form-field.js","./alert":"./alert/index.js","./anchor-navigation":"./anchor-navigation/index.js","./annotation-context":"./annotation-context/index.js","./app-layout":"./app-layout/index.js","./area-chart":"./area-chart/index.js","./attribute-editor":"./attribute-editor/index.js","./autosuggest":"./autosuggest/index.js","./badge":"./badge/index.js","./bar-chart":"./bar-chart/index.js","./box":"./box/index.js","./breadcrumb-group":"./breadcrumb-group/index.js","./button":"./button/index.js","./button-dropdown":"./button-dropdown/index.js","./calendar":"./calendar/index.js","./cards":"./cards/index.js","./checkbox":"./checkbox/index.js","./code-editor":"./code-editor/index.js","./collection-preferences":"./collection-preferences/index.js","./column-layout":"./column-layout/index.js","./container":"./container/index.js","./content-layout":"./content-layout/index.js","./date-input":"./date-input/index.js","./date-picker":"./date-picker/index.js","./date-range-picker":"./date-range-picker/index.js","./drawer":"./drawer/index.js","./expandable-section":"./expandable-section/index.js","./file-upload":"./file-upload/index.js","./flashbar":"./flashbar/index.js","./form":"./form/index.js","./form-field":"./form-field/index.js","./grid":"./grid/index.js","./header":"./header/index.js","./help-panel":"./help-panel/index.js","./hotspot":"./hotspot/index.js","./icon":"./icon/index.js","./input":"./input/index.js","./line-chart":"./line-chart/index.js","./link":"./link/index.js","./mixed-line-bar-chart":"./mixed-line-bar-chart/index.js","./modal":"./modal/index.js","./multiselect":"./multiselect/index.js","./pagination":"./pagination/index.js","./pie-chart":"./pie-chart/index.js","./popover":"./popover/index.js","./progress-bar":"./progress-bar/index.js","./property-filter":"./property-filter/index.js","./radio-group":"./radio-group/index.js","./s3-resource-selector":"./s3-resource-selector/index.js","./segmented-control":"./segmented-control/index.js","./select":"./select/index.js","./side-navigation":"./side-navigation/index.js","./space-between":"./space-between/index.js","./spinner":"./spinner/index.js","./split-panel":"./split-panel/index.js","./status-indicator":"./status-indicator/index.js","./table":"./table/index.js","./tabs":"./tabs/index.js","./tag-editor":"./tag-editor/index.js","./text-content":"./text-content/index.js","./text-filter":"./text-filter/index.js","./textarea":"./textarea/index.js","./tiles":"./tiles/index.js","./time-input":"./time-input/index.js","./toggle":"./toggle/index.js","./token-group":"./token-group/index.js","./top-navigation":"./top-navigation/index.js","./tutorial-panel":"./tutorial-panel/index.js","./wizard":"./wizard/index.js","./top-navigation/1.0-beta":"./top-navigation/1.0-beta/index.js","./i18n":"./i18n/index.js","./i18n/messages/all.all":"./i18n/messages/all.all.js","./i18n/messages/all.all.json":"./i18n/messages/all.all.json","./i18n/messages/all.de":"./i18n/messages/all.de.js","./i18n/messages/all.de.json":"./i18n/messages/all.de.json","./i18n/messages/all.en-GB":"./i18n/messages/all.en-GB.js","./i18n/messages/all.en-GB.json":"./i18n/messages/all.en-GB.json","./i18n/messages/all.en":"./i18n/messages/all.en.js","./i18n/messages/all.en.json":"./i18n/messages/all.en.json","./i18n/messages/all.es":"./i18n/messages/all.es.js","./i18n/messages/all.es.json":"./i18n/messages/all.es.json","./i18n/messages/all.fr":"./i18n/messages/all.fr.js","./i18n/messages/all.fr.json":"./i18n/messages/all.fr.json","./i18n/messages/all.id":"./i18n/messages/all.id.js","./i18n/messages/all.id.json":"./i18n/messages/all.id.json","./i18n/messages/all.it":"./i18n/messages/all.it.js","./i18n/messages/all.it.json":"./i18n/messages/all.it.json","./i18n/messages/all.ja":"./i18n/messages/all.ja.js","./i18n/messages/all.ja.json":"./i18n/messages/all.ja.json","./i18n/messages/all.ko":"./i18n/messages/all.ko.js","./i18n/messages/all.ko.json":"./i18n/messages/all.ko.json","./i18n/messages/all.pt-BR":"./i18n/messages/all.pt-BR.js","./i18n/messages/all.pt-BR.json":"./i18n/messages/all.pt-BR.json","./i18n/messages/all.tr":"./i18n/messages/all.tr.js","./i18n/messages/all.tr.json":"./i18n/messages/all.tr.json","./i18n/messages/all.zh-CN":"./i18n/messages/all.zh-CN.js","./i18n/messages/all.zh-CN.json":"./i18n/messages/all.zh-CN.json","./i18n/messages/all.zh-TW":"./i18n/messages/all.zh-TW.js","./i18n/messages/all.zh-TW.json":"./i18n/messages/all.zh-TW.json"},"sideEffects":["*.css","./internal/base-component/index.js","./internal/base-component/styles.css.js"],"version":"3.0.473","repository":{"type":"git","url":"https://github.com/cloudscape-design/components.git"},"homepage":"https://cloudscape.design","dependencies":{"@cloudscape-design/collection-hooks":"^1.0.0","@cloudscape-design/component-toolkit":"^1.0.0-beta","@cloudscape-design/test-utils-core":"^1.0.0","@cloudscape-design/theming-runtime":"^1.0.0","@dnd-kit/core":"^6.0.8","@dnd-kit/sortable":"^7.0.2","@dnd-kit/utilities":"^3.2.1","@juggle/resize-observer":"^3.3.1","ace-builds":"^1.23.0","balanced-match":"^1.0.2","clsx":"^1.1.0","d3-shape":"^1.3.7","date-fns":"^2.25.0","intl-messageformat":"^10.3.1","mnth":"^2.0.0","react-keyed-flatten-children":"^1.3.0","react-transition-group":"^4.4.2","react-virtual":"^2.8.2","tslib":"^2.4.0","weekstart":"^1.1.0"},"peerDependencies":{"react":"^16.8 || ^17 || ^18","react-dom":"^16.8 || ^17 || ^18"},"license":"Apache-2.0"}