@cloudscape-design/chart-components 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cartesian-chart/chart-series-cartesian.js +3 -3
- package/cartesian-chart/chart-series-cartesian.js.map +1 -1
- package/cartesian-chart/index.js +2 -2
- package/cartesian-chart/index.js.map +1 -1
- package/core/interfaces.d.ts +13 -9
- package/core/interfaces.js.map +1 -1
- package/internal/api-docs/test-utils-doc/dom.js +380 -0
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ import * as Styles from "../internal/chart-styles";
|
|
|
7
7
|
// custom x- and y-threshold series types, that are represented as a combination of invisible line series, and plot lines.
|
|
8
8
|
// The plot lines, unlike series, are rendered across the entire chart plot width or height.
|
|
9
9
|
export const transformCartesianSeries = (originalSeries, visibleSeries) => {
|
|
10
|
-
var _a;
|
|
10
|
+
var _a, _b, _c;
|
|
11
11
|
// The injected plot lines have IDs matching the IDs of the threshold series. This is used by the core chart
|
|
12
12
|
// to manage visibility and highlight state for them, when the corresponding threshold series are toggled
|
|
13
13
|
// or highlighted in the legend or filter.
|
|
@@ -17,10 +17,10 @@ export const transformCartesianSeries = (originalSeries, visibleSeries) => {
|
|
|
17
17
|
const seriesId = getOptionsId(s);
|
|
18
18
|
const style = { ...Styles.thresholdPlotLine, color: (_a = s.color) !== null && _a !== void 0 ? _a : Styles.thresholdPlotLine.color };
|
|
19
19
|
if (s.type === "x-threshold" && visibleSeries.includes(seriesId)) {
|
|
20
|
-
xPlotLines.push({ id: seriesId, value: s.value, ...style });
|
|
20
|
+
xPlotLines.push({ id: seriesId, value: s.value, ...style, dashStyle: (_b = s.dashStyle) !== null && _b !== void 0 ? _b : style.dashStyle });
|
|
21
21
|
}
|
|
22
22
|
if (s.type === "y-threshold" && visibleSeries.includes(seriesId)) {
|
|
23
|
-
yPlotLines.push({ id: seriesId, value: s.value, ...style });
|
|
23
|
+
yPlotLines.push({ id: seriesId, value: s.value, ...style, dashStyle: (_c = s.dashStyle) !== null && _c !== void 0 ? _c : style.dashStyle });
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
// The threshold series require data points to enable keyboard navigation and hover effects.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-series-cartesian.js","sourceRoot":"","sources":["../../../src/cartesian-chart/chart-series-cartesian.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAItC,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAG7E,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AAInD,6GAA6G;AAC7G,0HAA0H;AAC1H,4FAA4F;AAC5F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,cAA4D,EAC5D,aAAgC,EAChC,EAAE;;IACF,4GAA4G;IAC5G,yGAAyG;IACzG,0CAA0C;IAC1C,MAAM,UAAU,GAAuC,EAAE,CAAC;IAC1D,MAAM,UAAU,GAAuC,EAAE,CAAC;IAC1D,KAAK,MAAM,CAAC,IAAI,cAAc,EAAE;QAC9B,MAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QACjC,MAAM,KAAK,GAAG,EAAE,GAAG,MAAM,CAAC,iBAAiB,EAAE,KAAK,EAAE,MAAA,CAAC,CAAC,KAAK,mCAAI,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;QAChG,IAAI,CAAC,CAAC,IAAI,KAAK,aAAa,IAAI,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YAChE,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;
|
|
1
|
+
{"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Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type Highcharts from \"highcharts\";\n\nimport { colorChartsErrorBarMarker } from \"@cloudscape-design/design-tokens\";\n\nimport { PointDataItemType, RangeDataItemOptions } from \"../core/interfaces\";\nimport { createThresholdMetadata, getOptionsId } from \"../core/utils\";\nimport * as Styles from \"../internal/chart-styles\";\nimport { Writeable } from \"../internal/utils/utils\";\nimport { CartesianChartProps } from \"./interfaces\";\n\n// The utility transforms cartesian chart component's series to Highcharts series. This includes transforming\n// custom x- and y-threshold series types, that are represented as a combination of invisible line series, and plot lines.\n// The plot lines, unlike series, are rendered across the entire chart plot width or height.\nexport const transformCartesianSeries = (\n originalSeries: readonly CartesianChartProps.SeriesOptions[],\n visibleSeries: readonly string[],\n) => {\n // The injected plot lines have IDs matching the IDs of the threshold series. This is used by the core chart\n // to manage visibility and highlight state for them, when the corresponding threshold series are toggled\n // or highlighted in the legend or filter.\n const xPlotLines: Highcharts.XAxisPlotLinesOptions[] = [];\n const yPlotLines: Highcharts.YAxisPlotLinesOptions[] = [];\n for (const s of originalSeries) {\n const seriesId = getOptionsId(s);\n const style = { ...Styles.thresholdPlotLine, color: s.color ?? Styles.thresholdPlotLine.color };\n if (s.type === \"x-threshold\" && visibleSeries.includes(seriesId)) {\n xPlotLines.push({ id: seriesId, value: s.value, ...style, dashStyle: s.dashStyle ?? style.dashStyle });\n }\n if (s.type === \"y-threshold\" && visibleSeries.includes(seriesId)) {\n yPlotLines.push({ id: seriesId, value: s.value, ...style, dashStyle: s.dashStyle ?? style.dashStyle });\n }\n }\n // The threshold series require data points to enable keyboard navigation and hover effects.\n const thresholdX = getThresholdX(originalSeries, visibleSeries);\n const thresholdY = getThresholdY(originalSeries, visibleSeries);\n function transformSeriesToHighcharts(s: CartesianChartProps.SeriesOptions): Highcharts.SeriesOptionsType {\n if (s.type === \"x-threshold\" || s.type === \"y-threshold\") {\n const data =\n s.type === \"x-threshold\"\n ? thresholdY.map((y) => ({ x: s.value, y }))\n : thresholdX.map((x) => ({ x, y: s.value }));\n const { custom } = createThresholdMetadata(s.type, s.value);\n const enableMouseTracking = s.type === \"y-threshold\";\n const style = { ...Styles.thresholdSeries, color: s.color ?? Styles.thresholdSeries.color };\n return { type: \"line\", id: s.id, name: s.name, data, custom, enableMouseTracking, ...style };\n }\n if (s.type === \"errorbar\") {\n const color = s.color ?? colorChartsErrorBarMarker;\n // In Highcharts, the error-bar series graphic color is represented as stem-, and whisker colors.\n // We simplify that, and only expose a single color prop that sets both of those.\n const colors = { stemColor: color, whiskerColor: color };\n return { ...s, data: s.data as Writeable<RangeDataItemOptions[]>, ...colors };\n }\n return { ...s, data: s.data as Writeable<PointDataItemType[]> };\n }\n const series = originalSeries.map(transformSeriesToHighcharts);\n // We inject a fake empty series so that the empty state still shows axes, if defined.\n if (series.length === 0) {\n series.push({ type: \"line\", data: [], showInLegend: false });\n }\n return { series, xPlotLines, yPlotLines };\n};\n\n// For x-threshold the point-based navigation is disabled as irrelevant. However, we still need at least\n// one data point for core chart to work correctly, so we find the first visible y value from other series.\nfunction getThresholdY(series: readonly CartesianChartProps.SeriesOptions[], visibleSeries: readonly string[]) {\n for (const s of getVisibleDataSeries(series, visibleSeries)) {\n for (const d of s.data) {\n const y = d === null ? null : typeof d === \"number\" ? d : d.y;\n if (y !== null) {\n return [y];\n }\n }\n }\n return [];\n}\n\n// For y-threshold we find all defined x values from other series and use it those to create an array of\n// data points. As result, the y-threshold series becomes properly navigable.\nfunction getThresholdX(series: readonly CartesianChartProps.SeriesOptions[], visibleSeries: readonly string[]) {\n const allX = new Set<number>();\n for (const s of getVisibleDataSeries(series, visibleSeries)) {\n for (let i = 0; i < s.data.length; i++) {\n const d = s.data[i];\n const x = (typeof d === \"object\" ? d?.x : i) ?? i;\n allX.add(x);\n }\n }\n return [...allX].sort((a, b) => a - b);\n}\n\nfunction getVisibleDataSeries(series: readonly CartesianChartProps.SeriesOptions[], visibleSeries: readonly string[]) {\n const dataSeries: Exclude<\n CartesianChartProps.SeriesOptions,\n | CartesianChartProps.XThresholdSeriesOptions\n | CartesianChartProps.YThresholdSeriesOptions\n | CartesianChartProps.ErrorBarSeriesOptions\n >[] = [];\n for (const s of series) {\n if (\n s.type !== \"x-threshold\" &&\n s.type !== \"y-threshold\" &&\n s.type !== \"errorbar\" &&\n visibleSeries.includes(getOptionsId(s))\n ) {\n dataSeries.push(s);\n }\n }\n return dataSeries;\n}\n"]}
|
package/cartesian-chart/index.js
CHANGED
|
@@ -56,7 +56,7 @@ function transformSeries(untransformedSeries, stacking) {
|
|
|
56
56
|
}
|
|
57
57
|
function transformLineLikeSeries(s) {
|
|
58
58
|
const data = transformPointData(s.data);
|
|
59
|
-
return { type: s.type, id: s.id, name: s.name, color: s.color, data };
|
|
59
|
+
return { type: s.type, id: s.id, name: s.name, color: s.color, dashStyle: s.dashStyle, data };
|
|
60
60
|
}
|
|
61
61
|
function transformColumnSeries(s) {
|
|
62
62
|
const data = transformPointData(s.data);
|
|
@@ -69,7 +69,7 @@ function transformScatterSeries(s) {
|
|
|
69
69
|
return { type: s.type, id: s.id, name: s.name, color: s.color, data, marker };
|
|
70
70
|
}
|
|
71
71
|
function transformThresholdSeries(s) {
|
|
72
|
-
return { type: s.type, id: s.id, name: s.name, color: s.color, value: s.value };
|
|
72
|
+
return { type: s.type, id: s.id, name: s.name, color: s.color, value: s.value, dashStyle: s.dashStyle };
|
|
73
73
|
}
|
|
74
74
|
function transformErrorBarSeries(series, allSeries, stacking) {
|
|
75
75
|
// Highcharts only supports error bars for non-stacked series.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cartesian-chart/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD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AAP,OAAO,uBAAP,OAAO,CAAE,IAAI,mCAAI,QAAQ;KAChC,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CACtB,MAA0C;;IAE1C,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,mCAAI,IAAI,EAAE,CAAC;AACzD,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { forwardRef } from \"react\";\n\nimport { warnOnce } from \"@cloudscape-design/component-toolkit/internal\";\n\nimport { PointDataItemType, RangeDataItemOptions } from \"../core/interfaces\";\nimport { getDataAttributes } from \"../internal/base-component/get-data-attributes\";\nimport useBaseComponent from \"../internal/base-component/use-base-component\";\nimport { applyDisplayName } from \"../internal/utils/apply-display-name\";\nimport { SomeRequired } from \"../internal/utils/utils\";\nimport { InternalCartesianChart } from \"./chart-cartesian-internal\";\nimport { CartesianChartProps } from \"./interfaces\";\n\nexport type { CartesianChartProps };\n\nconst CartesianChart = forwardRef(\n (\n {\n fitHeight = false,\n inverted = false,\n stacking = undefined,\n emphasizeBaseline = true,\n verticalAxisTitlePlacement = \"top\",\n ...props\n }: CartesianChartProps,\n ref: React.Ref<CartesianChartProps.Ref>,\n ) => {\n // We transform options before propagating them to the internal chart to ensure only those\n // defined in the component's contract can be propagated down to the underlying Highcharts.\n // Additionally, we assign all default options, including the nested ones.\n const series = transformSeries(props.series, stacking);\n const xAxis = transformXAxisOptions(props.xAxis);\n const yAxis = transformYAxisOptions(props.yAxis);\n const tooltip = transformTooltip(props.tooltip);\n const legend = transformLegend(props.legend);\n\n const baseComponentProps = useBaseComponent(\"CartesianChart\", {\n props: { fitHeight, inverted, stacking, emphasizeBaseline, verticalAxisTitlePlacement },\n metadata: {},\n });\n\n return (\n <InternalCartesianChart\n ref={ref}\n {...props}\n fitHeight={fitHeight}\n inverted={inverted}\n stacking={stacking}\n emphasizeBaseline={emphasizeBaseline}\n verticalAxisTitlePlacement={verticalAxisTitlePlacement}\n series={series}\n xAxis={xAxis}\n yAxis={yAxis}\n tooltip={tooltip}\n legend={legend}\n {...getDataAttributes(props)}\n {...baseComponentProps}\n />\n );\n },\n);\n\napplyDisplayName(CartesianChart, \"CartesianChart\");\n\nexport default CartesianChart;\n\nfunction transformSeries(\n untransformedSeries: readonly CartesianChartProps.SeriesOptions[],\n stacking?: \"normal\",\n): CartesianChartProps.SeriesOptions[] {\n const transformedSeries: CartesianChartProps.SeriesOptions[] = [];\n function transformSingleSeries(s: CartesianChartProps.SeriesOptions): null | CartesianChartProps.SeriesOptions {\n switch (s.type) {\n case \"area\":\n case \"areaspline\":\n case \"line\":\n case \"spline\":\n return transformLineLikeSeries(s);\n case \"column\":\n return transformColumnSeries(s);\n case \"scatter\":\n return transformScatterSeries(s);\n case \"errorbar\":\n return transformErrorBarSeries(s, untransformedSeries, stacking);\n case \"x-threshold\":\n case \"y-threshold\":\n return transformThresholdSeries(s);\n default:\n return null;\n }\n }\n for (const series of untransformedSeries) {\n const transformed = transformSingleSeries(series);\n if (transformed) {\n transformedSeries.push(transformed);\n }\n }\n return transformedSeries;\n}\n\nfunction transformLineLikeSeries<\n S extends\n | CartesianChartProps.AreaSeriesOptions\n | CartesianChartProps.AreaSplineSeriesOptions\n | CartesianChartProps.LineSeriesOptions\n | CartesianChartProps.SplineSeriesOptions,\n>(s: S): null | S {\n const data = transformPointData(s.data);\n return { type: s.type, id: s.id, name: s.name, color: s.color, data } as S;\n}\n\nfunction transformColumnSeries<S extends CartesianChartProps.ColumnSeriesOptions>(s: S): null | S {\n const data = transformPointData(s.data);\n return { type: s.type, id: s.id, name: s.name, color: s.color, data } as S;\n}\n\nfunction transformScatterSeries<S extends CartesianChartProps.ScatterSeriesOptions>(s: S): null | S {\n const data = transformPointData(s.data);\n const marker = s.marker ?? {};\n return { type: s.type, id: s.id, name: s.name, color: s.color, data, marker } as S;\n}\n\nfunction transformThresholdSeries<\n S extends CartesianChartProps.XThresholdSeriesOptions | CartesianChartProps.YThresholdSeriesOptions,\n>(s: S): null | S {\n return { type: s.type, id: s.id, name: s.name, color: s.color, value: s.value } as S;\n}\n\nfunction transformErrorBarSeries(\n series: CartesianChartProps.ErrorBarSeriesOptions,\n allSeries: readonly CartesianChartProps.SeriesOptions[],\n stacking?: \"normal\",\n): null | CartesianChartProps.ErrorBarSeriesOptions {\n // Highcharts only supports error bars for non-stacked series.\n // See: https://github.com/highcharts/highcharts/issues/23080.\n if (stacking) {\n warnOnce(\"CartesianChart\", \"Error bars are not supported for stacked series.\");\n return null;\n }\n // We only support error bars that are linked to some other series. It is only possible to link it\n // using series ID (but not name), or by using \":previous\" pseudo-selector.\n // See: https://api.highcharts.com/highcharts/series.errorbar.linkedTo.\n const linkedSeries =\n series.linkedTo === \":previous\"\n ? allSeries[allSeries.indexOf(series) - 1]\n : allSeries.find(({ id }) => id === series.linkedTo);\n // The non-linked error bars are not supported: those will not appear in our custom legend and tooltip,\n // so we remove them from the series array. We also do not support linking them to other error bars,\n // or our custom threshold series.\n if (!linkedSeries || [\"errorbar\", \"x-threshold\", \"y-threshold\"].includes(linkedSeries.type)) {\n warnOnce(\n \"CartesianChart\",\n 'The `linkedTo` property of \"errorbar\" series points to a missing, or unsupported series.',\n );\n return null;\n }\n const data = transformRangeData(series.data);\n return { type: series.type, id: series.id, name: series.name, color: series.color, linkedTo: series.linkedTo, data };\n}\n\nfunction transformPointData(data: readonly PointDataItemType[]): readonly PointDataItemType[] {\n return data.map((d) => (d && typeof d === \"object\" ? { x: d.x, y: d.y } : d));\n}\n\nfunction transformRangeData(data: readonly RangeDataItemOptions[]): readonly RangeDataItemOptions[] {\n return data.map((d) => ({ x: d.x, low: d.low, high: d.high }));\n}\n\nfunction transformXAxisOptions(axis?: CartesianChartProps.XAxisOptions): CartesianChartProps.XAxisOptions {\n return transformAxisOptions(axis);\n}\n\nfunction transformYAxisOptions(axis?: CartesianChartProps.YAxisOptions): CartesianChartProps.YAxisOptions {\n return { ...transformAxisOptions(axis), reversedStacks: axis?.reversedStacks };\n}\n\nfunction transformAxisOptions<O extends CartesianChartProps.XAxisOptions | CartesianChartProps.YAxisOptions>(\n axis?: O,\n): O {\n return {\n type: axis?.type,\n title: axis?.title,\n min: axis?.min,\n max: axis?.max,\n tickInterval: axis?.tickInterval,\n categories: axis?.categories,\n valueFormatter: axis?.valueFormatter,\n } as O;\n}\n\nfunction transformTooltip(\n tooltip?: CartesianChartProps.TooltipOptions,\n): SomeRequired<CartesianChartProps.TooltipOptions, \"enabled\" | \"placement\" | \"size\"> {\n return {\n ...tooltip,\n enabled: tooltip?.enabled ?? true,\n placement: tooltip?.placement ?? \"middle\",\n size: tooltip?.size ?? \"medium\",\n };\n}\n\nfunction transformLegend(\n legend?: CartesianChartProps.LegendOptions,\n): SomeRequired<CartesianChartProps.LegendOptions, \"enabled\"> {\n return { ...legend, enabled: legend?.enabled ?? true };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cartesian-chart/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAKpE,MAAM,cAAc,GAAG,UAAU,CAC/B,CACE,EACE,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,SAAS,EACpB,iBAAiB,GAAG,IAAI,EACxB,0BAA0B,GAAG,KAAK,EAClC,GAAG,KAAK,EACY,EACtB,GAAuC,EACvC,EAAE;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-Identifier: Apache-2.0\n\nimport { forwardRef } from \"react\";\n\nimport { warnOnce } from \"@cloudscape-design/component-toolkit/internal\";\n\nimport { PointDataItemType, RangeDataItemOptions } from \"../core/interfaces\";\nimport { getDataAttributes } from \"../internal/base-component/get-data-attributes\";\nimport useBaseComponent from \"../internal/base-component/use-base-component\";\nimport { applyDisplayName } from \"../internal/utils/apply-display-name\";\nimport { SomeRequired } from \"../internal/utils/utils\";\nimport { InternalCartesianChart } from \"./chart-cartesian-internal\";\nimport { CartesianChartProps } from \"./interfaces\";\n\nexport type { CartesianChartProps };\n\nconst CartesianChart = forwardRef(\n (\n {\n fitHeight = false,\n inverted = false,\n stacking = undefined,\n emphasizeBaseline = true,\n verticalAxisTitlePlacement = \"top\",\n ...props\n }: CartesianChartProps,\n ref: React.Ref<CartesianChartProps.Ref>,\n ) => {\n // We transform options before propagating them to the internal chart to ensure only those\n // defined in the component's contract can be propagated down to the underlying Highcharts.\n // Additionally, we assign all default options, including the nested ones.\n const series = transformSeries(props.series, stacking);\n const xAxis = transformXAxisOptions(props.xAxis);\n const yAxis = transformYAxisOptions(props.yAxis);\n const tooltip = transformTooltip(props.tooltip);\n const legend = transformLegend(props.legend);\n\n const baseComponentProps = useBaseComponent(\"CartesianChart\", {\n props: { fitHeight, inverted, stacking, emphasizeBaseline, verticalAxisTitlePlacement },\n metadata: {},\n });\n\n return (\n <InternalCartesianChart\n ref={ref}\n {...props}\n fitHeight={fitHeight}\n inverted={inverted}\n stacking={stacking}\n emphasizeBaseline={emphasizeBaseline}\n verticalAxisTitlePlacement={verticalAxisTitlePlacement}\n series={series}\n xAxis={xAxis}\n yAxis={yAxis}\n tooltip={tooltip}\n legend={legend}\n {...getDataAttributes(props)}\n {...baseComponentProps}\n />\n );\n },\n);\n\napplyDisplayName(CartesianChart, \"CartesianChart\");\n\nexport default CartesianChart;\n\nfunction transformSeries(\n untransformedSeries: readonly CartesianChartProps.SeriesOptions[],\n stacking?: \"normal\",\n): CartesianChartProps.SeriesOptions[] {\n const transformedSeries: CartesianChartProps.SeriesOptions[] = [];\n function transformSingleSeries(s: CartesianChartProps.SeriesOptions): null | CartesianChartProps.SeriesOptions {\n switch (s.type) {\n case \"area\":\n case \"areaspline\":\n case \"line\":\n case \"spline\":\n return transformLineLikeSeries(s);\n case \"column\":\n return transformColumnSeries(s);\n case \"scatter\":\n return transformScatterSeries(s);\n case \"errorbar\":\n return transformErrorBarSeries(s, untransformedSeries, stacking);\n case \"x-threshold\":\n case \"y-threshold\":\n return transformThresholdSeries(s);\n default:\n return null;\n }\n }\n for (const series of untransformedSeries) {\n const transformed = transformSingleSeries(series);\n if (transformed) {\n transformedSeries.push(transformed);\n }\n }\n return transformedSeries;\n}\n\nfunction transformLineLikeSeries<\n S extends\n | CartesianChartProps.AreaSeriesOptions\n | CartesianChartProps.AreaSplineSeriesOptions\n | CartesianChartProps.LineSeriesOptions\n | CartesianChartProps.SplineSeriesOptions,\n>(s: S): null | S {\n const data = transformPointData(s.data);\n return { type: s.type, id: s.id, name: s.name, color: s.color, dashStyle: s.dashStyle, data } as S;\n}\n\nfunction transformColumnSeries<S extends CartesianChartProps.ColumnSeriesOptions>(s: S): null | S {\n const data = transformPointData(s.data);\n return { type: s.type, id: s.id, name: s.name, color: s.color, data } as S;\n}\n\nfunction transformScatterSeries<S extends CartesianChartProps.ScatterSeriesOptions>(s: S): null | S {\n const data = transformPointData(s.data);\n const marker = s.marker ?? {};\n return { type: s.type, id: s.id, name: s.name, color: s.color, data, marker } as S;\n}\n\nfunction transformThresholdSeries<\n S extends CartesianChartProps.XThresholdSeriesOptions | CartesianChartProps.YThresholdSeriesOptions,\n>(s: S): null | S {\n return { type: s.type, id: s.id, name: s.name, color: s.color, value: s.value, dashStyle: s.dashStyle } as S;\n}\n\nfunction transformErrorBarSeries(\n series: CartesianChartProps.ErrorBarSeriesOptions,\n allSeries: readonly CartesianChartProps.SeriesOptions[],\n stacking?: \"normal\",\n): null | CartesianChartProps.ErrorBarSeriesOptions {\n // Highcharts only supports error bars for non-stacked series.\n // See: https://github.com/highcharts/highcharts/issues/23080.\n if (stacking) {\n warnOnce(\"CartesianChart\", \"Error bars are not supported for stacked series.\");\n return null;\n }\n // We only support error bars that are linked to some other series. It is only possible to link it\n // using series ID (but not name), or by using \":previous\" pseudo-selector.\n // See: https://api.highcharts.com/highcharts/series.errorbar.linkedTo.\n const linkedSeries =\n series.linkedTo === \":previous\"\n ? allSeries[allSeries.indexOf(series) - 1]\n : allSeries.find(({ id }) => id === series.linkedTo);\n // The non-linked error bars are not supported: those will not appear in our custom legend and tooltip,\n // so we remove them from the series array. We also do not support linking them to other error bars,\n // or our custom threshold series.\n if (!linkedSeries || [\"errorbar\", \"x-threshold\", \"y-threshold\"].includes(linkedSeries.type)) {\n warnOnce(\n \"CartesianChart\",\n 'The `linkedTo` property of \"errorbar\" series points to a missing, or unsupported series.',\n );\n return null;\n }\n const data = transformRangeData(series.data);\n return { type: series.type, id: series.id, name: series.name, color: series.color, linkedTo: series.linkedTo, data };\n}\n\nfunction transformPointData(data: readonly PointDataItemType[]): readonly PointDataItemType[] {\n return data.map((d) => (d && typeof d === \"object\" ? { x: d.x, y: d.y } : d));\n}\n\nfunction transformRangeData(data: readonly RangeDataItemOptions[]): readonly RangeDataItemOptions[] {\n return data.map((d) => ({ x: d.x, low: d.low, high: d.high }));\n}\n\nfunction transformXAxisOptions(axis?: CartesianChartProps.XAxisOptions): CartesianChartProps.XAxisOptions {\n return transformAxisOptions(axis);\n}\n\nfunction transformYAxisOptions(axis?: CartesianChartProps.YAxisOptions): CartesianChartProps.YAxisOptions {\n return { ...transformAxisOptions(axis), reversedStacks: axis?.reversedStacks };\n}\n\nfunction transformAxisOptions<O extends CartesianChartProps.XAxisOptions | CartesianChartProps.YAxisOptions>(\n axis?: O,\n): O {\n return {\n type: axis?.type,\n title: axis?.title,\n min: axis?.min,\n max: axis?.max,\n tickInterval: axis?.tickInterval,\n categories: axis?.categories,\n valueFormatter: axis?.valueFormatter,\n } as O;\n}\n\nfunction transformTooltip(\n tooltip?: CartesianChartProps.TooltipOptions,\n): SomeRequired<CartesianChartProps.TooltipOptions, \"enabled\" | \"placement\" | \"size\"> {\n return {\n ...tooltip,\n enabled: tooltip?.enabled ?? true,\n placement: tooltip?.placement ?? \"middle\",\n size: tooltip?.size ?? \"medium\",\n };\n}\n\nfunction transformLegend(\n legend?: CartesianChartProps.LegendOptions,\n): SomeRequired<CartesianChartProps.LegendOptions, \"enabled\"> {\n return { ...legend, enabled: legend?.enabled ?? true };\n}\n"]}
|
package/core/interfaces.d.ts
CHANGED
|
@@ -162,11 +162,11 @@ export interface BaseTooltipPointFormatted {
|
|
|
162
162
|
value: React.ReactNode;
|
|
163
163
|
}>;
|
|
164
164
|
}
|
|
165
|
-
export interface AreaSeriesOptions extends
|
|
165
|
+
export interface AreaSeriesOptions extends BaseCartesianLineLikeOptions {
|
|
166
166
|
type: "area";
|
|
167
167
|
data: readonly PointDataItemType[];
|
|
168
168
|
}
|
|
169
|
-
export interface AreaSplineSeriesOptions extends
|
|
169
|
+
export interface AreaSplineSeriesOptions extends BaseCartesianLineLikeOptions {
|
|
170
170
|
type: "areaspline";
|
|
171
171
|
data: readonly PointDataItemType[];
|
|
172
172
|
}
|
|
@@ -174,11 +174,11 @@ export interface ColumnSeriesOptions extends BaseCartesianSeriesOptions {
|
|
|
174
174
|
type: "column";
|
|
175
175
|
data: readonly PointDataItemType[];
|
|
176
176
|
}
|
|
177
|
-
export interface LineSeriesOptions extends
|
|
177
|
+
export interface LineSeriesOptions extends BaseCartesianLineLikeOptions {
|
|
178
178
|
type: "line";
|
|
179
179
|
data: readonly PointDataItemType[];
|
|
180
180
|
}
|
|
181
|
-
export interface SplineSeriesOptions extends
|
|
181
|
+
export interface SplineSeriesOptions extends BaseCartesianLineLikeOptions {
|
|
182
182
|
type: "spline";
|
|
183
183
|
data: readonly PointDataItemType[];
|
|
184
184
|
}
|
|
@@ -193,19 +193,19 @@ export interface ErrorBarSeriesOptions extends Omit<BaseCartesianSeriesOptions,
|
|
|
193
193
|
data: readonly RangeDataItemOptions[];
|
|
194
194
|
linkedTo: string;
|
|
195
195
|
}
|
|
196
|
-
export interface XThresholdSeriesOptions extends
|
|
196
|
+
export interface XThresholdSeriesOptions extends BaseCartesianLineLikeOptions {
|
|
197
197
|
type: "x-threshold";
|
|
198
198
|
value: number;
|
|
199
199
|
}
|
|
200
|
-
export interface YThresholdSeriesOptions extends
|
|
200
|
+
export interface YThresholdSeriesOptions extends BaseCartesianLineLikeOptions {
|
|
201
201
|
type: "y-threshold";
|
|
202
202
|
value: number;
|
|
203
203
|
}
|
|
204
|
-
export interface PieSeriesOptions extends
|
|
204
|
+
export interface PieSeriesOptions extends BaseSeriesOptions {
|
|
205
205
|
type: "pie";
|
|
206
206
|
data: readonly PieSegmentOptions[];
|
|
207
207
|
}
|
|
208
|
-
export interface DonutSeriesOptions extends
|
|
208
|
+
export interface DonutSeriesOptions extends BaseSeriesOptions {
|
|
209
209
|
type: "donut";
|
|
210
210
|
data: readonly PieSegmentOptions[];
|
|
211
211
|
}
|
|
@@ -225,11 +225,15 @@ export interface RangeDataItemOptions {
|
|
|
225
225
|
low: number;
|
|
226
226
|
high: number;
|
|
227
227
|
}
|
|
228
|
-
interface
|
|
228
|
+
interface BaseSeriesOptions {
|
|
229
229
|
id?: string;
|
|
230
230
|
name: string;
|
|
231
231
|
color?: string;
|
|
232
232
|
}
|
|
233
|
+
type BaseCartesianSeriesOptions = BaseSeriesOptions;
|
|
234
|
+
interface BaseCartesianLineLikeOptions extends BaseCartesianSeriesOptions {
|
|
235
|
+
dashStyle?: Highcharts.DashStyleValue;
|
|
236
|
+
}
|
|
233
237
|
interface PointMarkerOptions {
|
|
234
238
|
symbol?: "circle" | "diamond" | "square" | "triangle" | "triangle-down";
|
|
235
239
|
}
|
package/core/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/core/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type Highcharts from \"highcharts\";\n\nimport type * as InternalComponentTypes from \"../internal/components/interfaces\";\nimport { type NonCancelableEventHandler } from \"../internal/events\";\n\n// All charts take `highcharts` instance, that can be served statically or dynamically.\n// Although it has to be of type Highcharts, the TS type we use is `null | object`, so\n// that it is ignored by the documenter.\n\n/**\n * This interface includes common public chart properties, applicable for all chart types.\n */\nexport interface BaseChartOptions {\n /**\n * The Highcharts instance, which can be obtained using `import Highcharts from \"highcharts\"`.\n * Supported Highcharts versions: 12.\n */\n highcharts: null | object;\n\n /**\n * Custom content that renders when `highcharts=null`. It renders a spinner if not defined.\n */\n fallback?: React.ReactNode;\n\n /**\n * The height of the chart plot in pixels. It does not include legend and filter.\n */\n chartHeight?: number;\n\n /**\n * The chart automatically adjusts its height to fill the parent container when this property is set.\n */\n fitHeight?: boolean;\n\n /**\n * Defines the minimum allowed height of the chart plot. Use this when `fitHeight=true` to\n * prevent the chart plot from becoming too small to display its content. When the parent\n * container is shorter than the minimum height, a vertical scrollbar appears automatically.\n */\n chartMinHeight?: number;\n\n /**\n * Defines the minimum allowed width of the chart plot. When the parent container is narrower than the\n * minimum width, the horizontal scrollbar is automatically added.\n */\n chartMinWidth?: number;\n\n /**\n * Defines the ARIA label for the chart container.\n * This property corresponds to [lang.chartContainerLabel](https://api.highcharts.com/highcharts/lang.accessibility.chartContainerLabel),\n * and requires the [accessibility module](https://www.highcharts.com/docs/accessibility/accessibility-module).\n */\n ariaLabel?: string;\n\n /**\n * Defines the ARIA description of the chart container.\n * This property corresponds to [accessibility.description](https://api.highcharts.com/highcharts/accessibility.description),\n * and requires the [accessibility module](https://www.highcharts.com/docs/accessibility/accessibility-module).\n */\n ariaDescription?: string;\n\n /**\n * Defines chart legend options, including:\n * * `enabled` (optional, boolean) - Hides legend when set to `false`.\n * * `title` (optional, string) - Visible label, shown above the legend.\n * * `actions` (optional, slot) - A slot before the legend that can be used to render custom actions.\n */\n legend?: BaseLegendOptions;\n\n /**\n * Defines options to represent empty, no-match, loading, and error state of the chart, including:\n * * `statusType` (optional, \"finished\" | \"loading\" | \"error\") - Specifies the current status of loading data.\n * * `empty` (optional, ReactNode) - Content displayed when the chart data is empty.\n * * `noMatch` (optional, ReactNode) - Content displayed when there is no data to display due to the built-in filtering.\n * * `loading` (optional, ReactNode) - Content displayed when `statusType=\"loading\"`. If omitted, the default loading state\n * is shown, using `i18n.loadingText` or built-in i18n.\n * * `error` (optional, ReactNode) - Content displayed when `statusType=\"error\"`. If omitted, the default error state\n * is shown, using `i18n.errorText` and `i18n.recoveryText` (when `onRecoveryClick` is provided), or built-in i18n.\n * * `onRecoveryClick` (optional, function) - Called when the user clicks the recovery button that appears when using default error\n * state, and only if `onRecoveryClick` is provided. Use this to enable the user to retry a failed request or provide another option\n * for the user to recover from the error.\n */\n noData?: BaseNoDataOptions;\n\n /**\n * Defines options for filtering in the chart, including:\n * * `seriesFilter` (optional, boolean) - Displays default series filter at the top of the chart.\n * * `additionalFilters` (optional, slot) - A slot for custom chart filters at the top of the chart.\n */\n filter?: BaseFilterOptions;\n}\n\nexport interface BaseLegendOptions {\n enabled?: boolean;\n title?: string;\n actions?: React.ReactNode;\n}\n\nexport interface BaseNoDataOptions {\n statusType?: \"finished\" | \"loading\" | \"error\";\n empty?: React.ReactNode;\n error?: React.ReactNode;\n loading?: React.ReactNode;\n noMatch?: React.ReactNode;\n onRecoveryClick?: NonCancelableEventHandler;\n}\n\nexport interface BaseTooltipDetail {\n key: React.ReactNode;\n value: React.ReactNode;\n}\n\nexport interface BaseI18nStrings {\n loadingText?: string;\n errorText?: string;\n recoveryText?: string;\n seriesFilterLabel?: string;\n seriesFilterPlaceholder?: string;\n seriesFilterSelectedAriaLabel?: string;\n legendAriaLabel?: string;\n detailPopoverDismissAriaLabel?: string;\n chartRoleDescription?: string;\n}\n\nexport interface WithCartesianI18nStrings {\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n *\n * Available properties:\n * * `loadingText` (optional, string) - Text, displayed when the chart is loading, i.e. when `noData.statusType` is set to \"loading\".\n * * `errorText` (optional, string) - Text, displayed when the chart is in error state, i.e. when `noData.statusType` is set to \"error\".\n * * `recoveryText` (optional, string) - Text for the recovery button, displayed next to the error text.\n * * `seriesFilterLabel` (optional, string) - Text for the visible label of the default series filter.\n * * `seriesFilterPlaceholder` (optional, string) - Text for the default series filter placeholder.\n * * `seriesFilterSelectedAriaLabel` (optional, string) - ARIA label of the default series filter which is appended to any option that is selected.\n * * `legendAriaLabel` (optional, string) - ARIA label that is associated with the legend in case there is no visible `legend.title` defined.\n * * `detailPopoverDismissAriaLabel` (optional, string) - ARIA label for the details popover dismiss button.\n * * `chartRoleDescription` (optional, string) - Accessible role description of the chart plot area, e.g. \"interactive chart\".\n * * `xAxisRoleDescription` (optional, string) - Accessible role description of the x axis, e.g. \"x axis\".\n * * `yAxisRoleDescription` (optional, string) - Accessible role description of the y axis, e.g. \"y axis\".\n */\n i18nStrings?: CartesianI18nStrings;\n}\n\nexport interface WithPieI18nStrings {\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n *\n * Available properties:\n * * `loadingText` (optional, string) - Text, displayed when the chart is loading, i.e. when `noData.statusType` is set to \"loading\".\n * * `errorText` (optional, string) - Text, displayed when the chart is in error state, i.e. when `noData.statusType` is set to \"error\".\n * * `recoveryText` (optional, string) - Text for the recovery button, displayed next to the error text.\n * * `seriesFilterLabel` (optional, string) - Text for the visible label of the default series filter.\n * * `seriesFilterPlaceholder` (optional, string) - Text for the default series filter placeholder.\n * * `seriesFilterSelectedAriaLabel` (optional, string) - ARIA label of the default series filter which is appended to any option that is selected.\n * * `legendAriaLabel` (optional, string) - ARIA label that is associated with the legend in case there is no visible `legend.title` defined.\n * * `detailPopoverDismissAriaLabel` (optional, string) - ARIA label for the details popover dismiss button.\n * * `chartRoleDescription` (optional, string) - Accessible role description of the chart plot area, e.g. \"interactive chart\".\n * * `segmentRoleDescription` (optional, string) - Accessible role description of the segment.\n */\n i18nStrings?: PieI18nStrings;\n}\n\nexport interface CartesianI18nStrings extends BaseI18nStrings {\n xAxisRoleDescription?: string;\n yAxisRoleDescription?: string;\n}\n\nexport interface PieI18nStrings extends BaseI18nStrings {\n segmentRoleDescription?: string;\n}\n\nexport interface BaseFilterOptions {\n seriesFilter?: boolean;\n additionalFilters?: React.ReactNode;\n}\n\nexport interface BaseTooltipPointFormatted {\n key?: React.ReactNode;\n value?: React.ReactNode;\n description?: React.ReactNode;\n expandable?: boolean;\n subItems?: ReadonlyArray<{ key: React.ReactNode; value: React.ReactNode }>;\n}\n\nexport interface AreaSeriesOptions extends BaseCartesianSeriesOptions {\n type: \"area\";\n data: readonly PointDataItemType[];\n}\n\nexport interface AreaSplineSeriesOptions extends BaseCartesianSeriesOptions {\n type: \"areaspline\";\n data: readonly PointDataItemType[];\n}\n\nexport interface ColumnSeriesOptions extends BaseCartesianSeriesOptions {\n type: \"column\";\n data: readonly PointDataItemType[];\n}\n\nexport interface LineSeriesOptions extends BaseCartesianSeriesOptions {\n type: \"line\";\n data: readonly PointDataItemType[];\n}\n\nexport interface SplineSeriesOptions extends BaseCartesianSeriesOptions {\n type: \"spline\";\n data: readonly PointDataItemType[];\n}\n\nexport interface ScatterSeriesOptions extends BaseCartesianSeriesOptions {\n type: \"scatter\";\n data: readonly PointDataItemType[];\n marker?: PointMarkerOptions;\n}\n\nexport interface ErrorBarSeriesOptions extends Omit<BaseCartesianSeriesOptions, \"name\"> {\n type: \"errorbar\";\n name?: string;\n data: readonly RangeDataItemOptions[];\n linkedTo: string;\n}\n\nexport interface XThresholdSeriesOptions extends BaseCartesianSeriesOptions {\n type: \"x-threshold\";\n value: number;\n}\n\nexport interface YThresholdSeriesOptions extends BaseCartesianSeriesOptions {\n type: \"y-threshold\";\n value: number;\n}\n\nexport interface PieSeriesOptions extends BaseCartesianSeriesOptions {\n type: \"pie\";\n data: readonly PieSegmentOptions[];\n}\n\nexport interface DonutSeriesOptions extends BaseCartesianSeriesOptions {\n type: \"donut\";\n data: readonly PieSegmentOptions[];\n}\n\nexport interface PieSegmentOptions {\n y: number | null;\n id?: string;\n name: string;\n color?: string;\n}\n\nexport type PointDataItemType = null | number | PointDataItemOptions;\n\nexport interface PointDataItemOptions {\n x?: number;\n y: number | null;\n}\n\nexport interface RangeDataItemOptions {\n x?: number;\n low: number;\n high: number;\n}\n\ninterface BaseCartesianSeriesOptions {\n id?: string;\n name: string;\n color?: string;\n}\n\n// The symbols union matches that of Highcharts.PointMarkerOptionsObject\ninterface PointMarkerOptions {\n symbol?: \"circle\" | \"diamond\" | \"square\" | \"triangle\" | \"triangle-down\";\n}\n\nexport interface CoreCartesianOptions {\n /**\n * When set to `true`, adds a visual emphasis on the zero baseline axis.\n */\n emphasizeBaseline?: boolean;\n /**\n * Controls the placement of the vertical axis title.\n * When set to \"side\", displays the title along the axis line.\n */\n verticalAxisTitlePlacement?: \"top\" | \"side\";\n}\n\nexport interface CoreChartProps\n extends Pick<\n BaseChartOptions,\n | \"highcharts\"\n | \"fallback\"\n | \"fitHeight\"\n | \"chartHeight\"\n | \"chartMinHeight\"\n | \"chartMinWidth\"\n | \"ariaLabel\"\n | \"ariaDescription\"\n | \"filter\"\n | \"noData\"\n >,\n CoreCartesianOptions {\n /**\n * The Highcharts options. Cloudscape injects custom styles and settings, but all can be\n * overridden with explicitly provided options. An exception is event handlers - those are\n * not overridden, but merged with Cloudscape event handlers so that both are getting called.\n */\n options: CoreChartProps.ChartOptions;\n /**\n * The Cloudscape tooltip, that comes with a vertical cursor when used on cartesian series.\n * The tooltip content is only shown when `getContent` property is defined, which is called\n * for each visited { x, y } point.\n */\n tooltip?: CoreChartProps.TooltipOptions;\n /**\n * A custom slot above the chart plot, chart's axis title, and filter.\n */\n header?: CoreChartProps.HeaderOptions;\n /**\n * Prop for passing a custom navigation control component to be rendered with the chart.\n * Use this property to add timeline navigation, range selectors, or other custom navigation elements.\n */\n navigator?: React.ReactNode;\n /**\n * A custom slot below the chart plot and legend.\n */\n footer?: CoreChartProps.FooterOptions;\n /**\n * Chart legend options.\n */\n legend?: CoreChartProps.LegendOptions;\n /**\n * The callback to init the chart's API when it is ready. The API includes the Highcharts chart object, and\n * additional Cloudscape methods.\n */\n callback?: (chart: CoreChartProps.ChartAPI) => void;\n /**\n * This is used to provide a test-utils selector. Do not use this property to provide custom styles.\n */\n className?: string;\n /**\n * IDs of visible series or points.\n */\n visibleItems?: readonly string[];\n /**\n * Called when a legend item is highlighted.\n */\n onLegendItemHighlight?: NonCancelableEventHandler<CoreChartProps.LegendItemHighlightDetail>;\n /**\n * Called when series/points visibility changes due to user interaction with legend or filter.\n */\n onVisibleItemsChange?: NonCancelableEventHandler<CoreChartProps.VisibleItemsChangeDetail>;\n /**\n * Called whenever chart tooltip is rendered to provide content for tooltip's header, body, and (optional) footer.\n */\n getTooltipContent?: CoreChartProps.GetTooltipContent;\n /**\n * Called whenever a legend item is hovered to provide content for legend tooltip's header, body, and (optional) footer.\n * If not provided, no tooltip will be displayed.\n */\n getLegendTooltipContent?: CoreChartProps.GetLegendTooltipContent;\n /**\n * Called whenever chart point or group is highlighted.\n */\n onHighlight?: NonCancelableEventHandler<CoreChartProps.HighlightChangeDetail>;\n /**\n * Called whenever chart point or group loses highlight.\n */\n onClearHighlight?: NonCancelableEventHandler<CoreChartProps.HighlightClearDetail>;\n /**\n * Use Cloudscape keyboard navigation.\n */\n keyboardNavigation?: boolean;\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n */\n i18nStrings?: CartesianI18nStrings & PieI18nStrings;\n}\n\nexport namespace CoreChartProps {\n // The API methods allow programmatic triggering of chart's behaviors, some of which are not accessible via React state.\n // This enables advanced integration scenarios, such as building a custom legend, or making multiple charts synchronized.\n export interface ChartAPI {\n chart: Highcharts.Chart;\n highcharts: typeof Highcharts;\n highlightItems(itemIds: readonly string[]): void;\n setItemsVisible(itemIds: readonly string[]): void;\n highlightChartPoint(point: Highcharts.Point): void;\n highlightChartGroup(group: readonly Highcharts.Point[]): void;\n clearChartHighlight(): void;\n }\n\n // The extended version of Highcharts.Options. The axes types are extended with Cloudscape value formatter.\n // We use a custom formatter because we cannot use the built-in Highcharts formatter for our tooltip.\n export type ChartOptions = Omit<Highcharts.Options, \"xAxis\" | \"yAxis\"> & {\n xAxis?: XAxisOptions | XAxisOptions[];\n yAxis?: YAxisOptions | YAxisOptions[];\n };\n export type XAxisOptions = Highcharts.XAxisOptions & { valueFormatter?: (value: null | number) => string };\n export type YAxisOptions = Highcharts.YAxisOptions & { valueFormatter?: (value: null | number) => string };\n\n export interface HeaderOptions {\n content: React.ReactNode;\n }\n export interface FooterOptions {\n content: React.ReactNode;\n }\n\n export interface LegendOptions extends BaseLegendOptions {\n bottomMaxHeight?: number;\n position?: \"bottom\" | \"side\";\n }\n export type LegendItem = InternalComponentTypes.LegendItem;\n export type LegendTooltipContent = InternalComponentTypes.LegendTooltipContent;\n export type GetLegendTooltipContent = InternalComponentTypes.GetLegendTooltipContent;\n export type GetLegendTooltipContentProps = InternalComponentTypes.GetLegendTooltipContentProps;\n\n export interface TooltipOptions {\n enabled?: boolean;\n placement?: \"middle\" | \"outside\" | \"target\";\n size?: \"small\" | \"medium\" | \"large\";\n }\n\n export type GetTooltipContent = (props: GetTooltipContentProps) => TooltipContentRenderer;\n export interface GetTooltipContentProps {\n point: null | Highcharts.Point;\n group: readonly Highcharts.Point[];\n }\n export interface TooltipContentRenderer {\n point?: (props: TooltipPointProps) => TooltipPointFormatted;\n details?: (props: TooltipDetailsProps) => readonly TooltipDetail[];\n header?: (props: TooltipSlotProps) => React.ReactNode;\n body?: (props: TooltipSlotProps) => React.ReactNode;\n footer?: (props: TooltipSlotProps) => React.ReactNode;\n }\n export type TooltipPointFormatted = BaseTooltipPointFormatted;\n export interface TooltipContentItem {\n point: Highcharts.Point;\n errorRanges: Highcharts.Point[];\n }\n export interface TooltipPointProps {\n item: TooltipContentItem;\n }\n export interface TooltipSlotProps {\n x: number;\n items: TooltipContentItem[];\n }\n\n export interface TooltipDetailsProps {\n point: Highcharts.Point;\n }\n\n export type TooltipDetail = BaseTooltipDetail;\n\n export interface LegendItemHighlightDetail {\n item: LegendItem;\n }\n export interface VisibleItemsChangeDetail {\n items: readonly LegendItem[];\n isApiCall: boolean;\n }\n export interface HighlightChangeDetail {\n point: null | Highcharts.Point;\n group: readonly Highcharts.Point[];\n isApiCall: boolean;\n }\n export interface HighlightClearDetail {\n isApiCall: boolean;\n }\n\n export type I18nStrings = CartesianI18nStrings & PieI18nStrings;\n}\n\nexport interface CoreLegendProps {\n items: readonly CoreLegendProps.Item[];\n title?: string;\n ariaLabel?: string;\n actions?: React.ReactNode;\n alignment?: \"horizontal\" | \"vertical\";\n onClearHighlight?: NonCancelableEventHandler;\n onItemHighlight?: NonCancelableEventHandler<CoreLegendProps.ItemHighlightDetail>;\n onVisibleItemsChange?: NonCancelableEventHandler<CoreLegendProps.VisibleItemsChangeDetail>;\n getLegendTooltipContent?: CoreLegendProps.GetTooltipContent;\n}\n\nexport namespace CoreLegendProps {\n export type Item = InternalComponentTypes.LegendItem;\n export type GetTooltipContent = InternalComponentTypes.GetLegendTooltipContent;\n export interface ItemHighlightDetail {\n item: Item;\n }\n export interface VisibleItemsChangeDetail {\n items: readonly string[];\n }\n}\n\n// Utility types\n\nexport interface Rect {\n x: number;\n y: number;\n height: number;\n width: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/core/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type Highcharts from \"highcharts\";\n\nimport type * as InternalComponentTypes from \"../internal/components/interfaces\";\nimport { type NonCancelableEventHandler } from \"../internal/events\";\n\n// All charts take `highcharts` instance, that can be served statically or dynamically.\n// Although it has to be of type Highcharts, the TS type we use is `null | object`, so\n// that it is ignored by the documenter.\n\n/**\n * This interface includes common public chart properties, applicable for all chart types.\n */\nexport interface BaseChartOptions {\n /**\n * The Highcharts instance, which can be obtained using `import Highcharts from \"highcharts\"`.\n * Supported Highcharts versions: 12.\n */\n highcharts: null | object;\n\n /**\n * Custom content that renders when `highcharts=null`. It renders a spinner if not defined.\n */\n fallback?: React.ReactNode;\n\n /**\n * The height of the chart plot in pixels. It does not include legend and filter.\n */\n chartHeight?: number;\n\n /**\n * The chart automatically adjusts its height to fill the parent container when this property is set.\n */\n fitHeight?: boolean;\n\n /**\n * Defines the minimum allowed height of the chart plot. Use this when `fitHeight=true` to\n * prevent the chart plot from becoming too small to display its content. When the parent\n * container is shorter than the minimum height, a vertical scrollbar appears automatically.\n */\n chartMinHeight?: number;\n\n /**\n * Defines the minimum allowed width of the chart plot. When the parent container is narrower than the\n * minimum width, the horizontal scrollbar is automatically added.\n */\n chartMinWidth?: number;\n\n /**\n * Defines the ARIA label for the chart container.\n * This property corresponds to [lang.chartContainerLabel](https://api.highcharts.com/highcharts/lang.accessibility.chartContainerLabel),\n * and requires the [accessibility module](https://www.highcharts.com/docs/accessibility/accessibility-module).\n */\n ariaLabel?: string;\n\n /**\n * Defines the ARIA description of the chart container.\n * This property corresponds to [accessibility.description](https://api.highcharts.com/highcharts/accessibility.description),\n * and requires the [accessibility module](https://www.highcharts.com/docs/accessibility/accessibility-module).\n */\n ariaDescription?: string;\n\n /**\n * Defines chart legend options, including:\n * * `enabled` (optional, boolean) - Hides legend when set to `false`.\n * * `title` (optional, string) - Visible label, shown above the legend.\n * * `actions` (optional, slot) - A slot before the legend that can be used to render custom actions.\n */\n legend?: BaseLegendOptions;\n\n /**\n * Defines options to represent empty, no-match, loading, and error state of the chart, including:\n * * `statusType` (optional, \"finished\" | \"loading\" | \"error\") - Specifies the current status of loading data.\n * * `empty` (optional, ReactNode) - Content displayed when the chart data is empty.\n * * `noMatch` (optional, ReactNode) - Content displayed when there is no data to display due to the built-in filtering.\n * * `loading` (optional, ReactNode) - Content displayed when `statusType=\"loading\"`. If omitted, the default loading state\n * is shown, using `i18n.loadingText` or built-in i18n.\n * * `error` (optional, ReactNode) - Content displayed when `statusType=\"error\"`. If omitted, the default error state\n * is shown, using `i18n.errorText` and `i18n.recoveryText` (when `onRecoveryClick` is provided), or built-in i18n.\n * * `onRecoveryClick` (optional, function) - Called when the user clicks the recovery button that appears when using default error\n * state, and only if `onRecoveryClick` is provided. Use this to enable the user to retry a failed request or provide another option\n * for the user to recover from the error.\n */\n noData?: BaseNoDataOptions;\n\n /**\n * Defines options for filtering in the chart, including:\n * * `seriesFilter` (optional, boolean) - Displays default series filter at the top of the chart.\n * * `additionalFilters` (optional, slot) - A slot for custom chart filters at the top of the chart.\n */\n filter?: BaseFilterOptions;\n}\n\nexport interface BaseLegendOptions {\n enabled?: boolean;\n title?: string;\n actions?: React.ReactNode;\n}\n\nexport interface BaseNoDataOptions {\n statusType?: \"finished\" | \"loading\" | \"error\";\n empty?: React.ReactNode;\n error?: React.ReactNode;\n loading?: React.ReactNode;\n noMatch?: React.ReactNode;\n onRecoveryClick?: NonCancelableEventHandler;\n}\n\nexport interface BaseTooltipDetail {\n key: React.ReactNode;\n value: React.ReactNode;\n}\n\nexport interface BaseI18nStrings {\n loadingText?: string;\n errorText?: string;\n recoveryText?: string;\n seriesFilterLabel?: string;\n seriesFilterPlaceholder?: string;\n seriesFilterSelectedAriaLabel?: string;\n legendAriaLabel?: string;\n detailPopoverDismissAriaLabel?: string;\n chartRoleDescription?: string;\n}\n\nexport interface WithCartesianI18nStrings {\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n *\n * Available properties:\n * * `loadingText` (optional, string) - Text, displayed when the chart is loading, i.e. when `noData.statusType` is set to \"loading\".\n * * `errorText` (optional, string) - Text, displayed when the chart is in error state, i.e. when `noData.statusType` is set to \"error\".\n * * `recoveryText` (optional, string) - Text for the recovery button, displayed next to the error text.\n * * `seriesFilterLabel` (optional, string) - Text for the visible label of the default series filter.\n * * `seriesFilterPlaceholder` (optional, string) - Text for the default series filter placeholder.\n * * `seriesFilterSelectedAriaLabel` (optional, string) - ARIA label of the default series filter which is appended to any option that is selected.\n * * `legendAriaLabel` (optional, string) - ARIA label that is associated with the legend in case there is no visible `legend.title` defined.\n * * `detailPopoverDismissAriaLabel` (optional, string) - ARIA label for the details popover dismiss button.\n * * `chartRoleDescription` (optional, string) - Accessible role description of the chart plot area, e.g. \"interactive chart\".\n * * `xAxisRoleDescription` (optional, string) - Accessible role description of the x axis, e.g. \"x axis\".\n * * `yAxisRoleDescription` (optional, string) - Accessible role description of the y axis, e.g. \"y axis\".\n */\n i18nStrings?: CartesianI18nStrings;\n}\n\nexport interface WithPieI18nStrings {\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n *\n * Available properties:\n * * `loadingText` (optional, string) - Text, displayed when the chart is loading, i.e. when `noData.statusType` is set to \"loading\".\n * * `errorText` (optional, string) - Text, displayed when the chart is in error state, i.e. when `noData.statusType` is set to \"error\".\n * * `recoveryText` (optional, string) - Text for the recovery button, displayed next to the error text.\n * * `seriesFilterLabel` (optional, string) - Text for the visible label of the default series filter.\n * * `seriesFilterPlaceholder` (optional, string) - Text for the default series filter placeholder.\n * * `seriesFilterSelectedAriaLabel` (optional, string) - ARIA label of the default series filter which is appended to any option that is selected.\n * * `legendAriaLabel` (optional, string) - ARIA label that is associated with the legend in case there is no visible `legend.title` defined.\n * * `detailPopoverDismissAriaLabel` (optional, string) - ARIA label for the details popover dismiss button.\n * * `chartRoleDescription` (optional, string) - Accessible role description of the chart plot area, e.g. \"interactive chart\".\n * * `segmentRoleDescription` (optional, string) - Accessible role description of the segment.\n */\n i18nStrings?: PieI18nStrings;\n}\n\nexport interface CartesianI18nStrings extends BaseI18nStrings {\n xAxisRoleDescription?: string;\n yAxisRoleDescription?: string;\n}\n\nexport interface PieI18nStrings extends BaseI18nStrings {\n segmentRoleDescription?: string;\n}\n\nexport interface BaseFilterOptions {\n seriesFilter?: boolean;\n additionalFilters?: React.ReactNode;\n}\n\nexport interface BaseTooltipPointFormatted {\n key?: React.ReactNode;\n value?: React.ReactNode;\n description?: React.ReactNode;\n expandable?: boolean;\n subItems?: ReadonlyArray<{ key: React.ReactNode; value: React.ReactNode }>;\n}\n\nexport interface AreaSeriesOptions extends BaseCartesianLineLikeOptions {\n type: \"area\";\n data: readonly PointDataItemType[];\n}\n\nexport interface AreaSplineSeriesOptions extends BaseCartesianLineLikeOptions {\n type: \"areaspline\";\n data: readonly PointDataItemType[];\n}\n\nexport interface ColumnSeriesOptions extends BaseCartesianSeriesOptions {\n type: \"column\";\n data: readonly PointDataItemType[];\n}\n\nexport interface LineSeriesOptions extends BaseCartesianLineLikeOptions {\n type: \"line\";\n data: readonly PointDataItemType[];\n}\n\nexport interface SplineSeriesOptions extends BaseCartesianLineLikeOptions {\n type: \"spline\";\n data: readonly PointDataItemType[];\n}\n\nexport interface ScatterSeriesOptions extends BaseCartesianSeriesOptions {\n type: \"scatter\";\n data: readonly PointDataItemType[];\n marker?: PointMarkerOptions;\n}\n\nexport interface ErrorBarSeriesOptions extends Omit<BaseCartesianSeriesOptions, \"name\"> {\n type: \"errorbar\";\n name?: string;\n data: readonly RangeDataItemOptions[];\n linkedTo: string;\n}\n\nexport interface XThresholdSeriesOptions extends BaseCartesianLineLikeOptions {\n type: \"x-threshold\";\n value: number;\n}\n\nexport interface YThresholdSeriesOptions extends BaseCartesianLineLikeOptions {\n type: \"y-threshold\";\n value: number;\n}\n\nexport interface PieSeriesOptions extends BaseSeriesOptions {\n type: \"pie\";\n data: readonly PieSegmentOptions[];\n}\n\nexport interface DonutSeriesOptions extends BaseSeriesOptions {\n type: \"donut\";\n data: readonly PieSegmentOptions[];\n}\n\nexport interface PieSegmentOptions {\n y: number | null;\n id?: string;\n name: string;\n color?: string;\n}\n\nexport type PointDataItemType = null | number | PointDataItemOptions;\n\nexport interface PointDataItemOptions {\n x?: number;\n y: number | null;\n}\n\nexport interface RangeDataItemOptions {\n x?: number;\n low: number;\n high: number;\n}\n\ninterface BaseSeriesOptions {\n id?: string;\n name: string;\n color?: string;\n}\n\ntype BaseCartesianSeriesOptions = BaseSeriesOptions;\n\ninterface BaseCartesianLineLikeOptions extends BaseCartesianSeriesOptions {\n dashStyle?: Highcharts.DashStyleValue;\n}\n\n// The symbols union matches that of Highcharts.PointMarkerOptionsObject\ninterface PointMarkerOptions {\n symbol?: \"circle\" | \"diamond\" | \"square\" | \"triangle\" | \"triangle-down\";\n}\n\nexport interface CoreCartesianOptions {\n /**\n * When set to `true`, adds a visual emphasis on the zero baseline axis.\n */\n emphasizeBaseline?: boolean;\n /**\n * Controls the placement of the vertical axis title.\n * When set to \"side\", displays the title along the axis line.\n */\n verticalAxisTitlePlacement?: \"top\" | \"side\";\n}\n\nexport interface CoreChartProps\n extends Pick<\n BaseChartOptions,\n | \"highcharts\"\n | \"fallback\"\n | \"fitHeight\"\n | \"chartHeight\"\n | \"chartMinHeight\"\n | \"chartMinWidth\"\n | \"ariaLabel\"\n | \"ariaDescription\"\n | \"filter\"\n | \"noData\"\n >,\n CoreCartesianOptions {\n /**\n * The Highcharts options. Cloudscape injects custom styles and settings, but all can be\n * overridden with explicitly provided options. An exception is event handlers - those are\n * not overridden, but merged with Cloudscape event handlers so that both are getting called.\n */\n options: CoreChartProps.ChartOptions;\n /**\n * The Cloudscape tooltip, that comes with a vertical cursor when used on cartesian series.\n * The tooltip content is only shown when `getContent` property is defined, which is called\n * for each visited { x, y } point.\n */\n tooltip?: CoreChartProps.TooltipOptions;\n /**\n * A custom slot above the chart plot, chart's axis title, and filter.\n */\n header?: CoreChartProps.HeaderOptions;\n /**\n * Prop for passing a custom navigation control component to be rendered with the chart.\n * Use this property to add timeline navigation, range selectors, or other custom navigation elements.\n */\n navigator?: React.ReactNode;\n /**\n * A custom slot below the chart plot and legend.\n */\n footer?: CoreChartProps.FooterOptions;\n /**\n * Chart legend options.\n */\n legend?: CoreChartProps.LegendOptions;\n /**\n * The callback to init the chart's API when it is ready. The API includes the Highcharts chart object, and\n * additional Cloudscape methods.\n */\n callback?: (chart: CoreChartProps.ChartAPI) => void;\n /**\n * This is used to provide a test-utils selector. Do not use this property to provide custom styles.\n */\n className?: string;\n /**\n * IDs of visible series or points.\n */\n visibleItems?: readonly string[];\n /**\n * Called when a legend item is highlighted.\n */\n onLegendItemHighlight?: NonCancelableEventHandler<CoreChartProps.LegendItemHighlightDetail>;\n /**\n * Called when series/points visibility changes due to user interaction with legend or filter.\n */\n onVisibleItemsChange?: NonCancelableEventHandler<CoreChartProps.VisibleItemsChangeDetail>;\n /**\n * Called whenever chart tooltip is rendered to provide content for tooltip's header, body, and (optional) footer.\n */\n getTooltipContent?: CoreChartProps.GetTooltipContent;\n /**\n * Called whenever a legend item is hovered to provide content for legend tooltip's header, body, and (optional) footer.\n * If not provided, no tooltip will be displayed.\n */\n getLegendTooltipContent?: CoreChartProps.GetLegendTooltipContent;\n /**\n * Called whenever chart point or group is highlighted.\n */\n onHighlight?: NonCancelableEventHandler<CoreChartProps.HighlightChangeDetail>;\n /**\n * Called whenever chart point or group loses highlight.\n */\n onClearHighlight?: NonCancelableEventHandler<CoreChartProps.HighlightClearDetail>;\n /**\n * Use Cloudscape keyboard navigation.\n */\n keyboardNavigation?: boolean;\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n */\n i18nStrings?: CartesianI18nStrings & PieI18nStrings;\n}\n\nexport namespace CoreChartProps {\n // The API methods allow programmatic triggering of chart's behaviors, some of which are not accessible via React state.\n // This enables advanced integration scenarios, such as building a custom legend, or making multiple charts synchronized.\n export interface ChartAPI {\n chart: Highcharts.Chart;\n highcharts: typeof Highcharts;\n highlightItems(itemIds: readonly string[]): void;\n setItemsVisible(itemIds: readonly string[]): void;\n highlightChartPoint(point: Highcharts.Point): void;\n highlightChartGroup(group: readonly Highcharts.Point[]): void;\n clearChartHighlight(): void;\n }\n\n // The extended version of Highcharts.Options. The axes types are extended with Cloudscape value formatter.\n // We use a custom formatter because we cannot use the built-in Highcharts formatter for our tooltip.\n export type ChartOptions = Omit<Highcharts.Options, \"xAxis\" | \"yAxis\"> & {\n xAxis?: XAxisOptions | XAxisOptions[];\n yAxis?: YAxisOptions | YAxisOptions[];\n };\n export type XAxisOptions = Highcharts.XAxisOptions & { valueFormatter?: (value: null | number) => string };\n export type YAxisOptions = Highcharts.YAxisOptions & { valueFormatter?: (value: null | number) => string };\n\n export interface HeaderOptions {\n content: React.ReactNode;\n }\n export interface FooterOptions {\n content: React.ReactNode;\n }\n\n export interface LegendOptions extends BaseLegendOptions {\n bottomMaxHeight?: number;\n position?: \"bottom\" | \"side\";\n }\n export type LegendItem = InternalComponentTypes.LegendItem;\n export type LegendTooltipContent = InternalComponentTypes.LegendTooltipContent;\n export type GetLegendTooltipContent = InternalComponentTypes.GetLegendTooltipContent;\n export type GetLegendTooltipContentProps = InternalComponentTypes.GetLegendTooltipContentProps;\n\n export interface TooltipOptions {\n enabled?: boolean;\n placement?: \"middle\" | \"outside\" | \"target\";\n size?: \"small\" | \"medium\" | \"large\";\n }\n\n export type GetTooltipContent = (props: GetTooltipContentProps) => TooltipContentRenderer;\n export interface GetTooltipContentProps {\n point: null | Highcharts.Point;\n group: readonly Highcharts.Point[];\n }\n export interface TooltipContentRenderer {\n point?: (props: TooltipPointProps) => TooltipPointFormatted;\n details?: (props: TooltipDetailsProps) => readonly TooltipDetail[];\n header?: (props: TooltipSlotProps) => React.ReactNode;\n body?: (props: TooltipSlotProps) => React.ReactNode;\n footer?: (props: TooltipSlotProps) => React.ReactNode;\n }\n export type TooltipPointFormatted = BaseTooltipPointFormatted;\n export interface TooltipContentItem {\n point: Highcharts.Point;\n errorRanges: Highcharts.Point[];\n }\n export interface TooltipPointProps {\n item: TooltipContentItem;\n }\n export interface TooltipSlotProps {\n x: number;\n items: TooltipContentItem[];\n }\n\n export interface TooltipDetailsProps {\n point: Highcharts.Point;\n }\n\n export type TooltipDetail = BaseTooltipDetail;\n\n export interface LegendItemHighlightDetail {\n item: LegendItem;\n }\n export interface VisibleItemsChangeDetail {\n items: readonly LegendItem[];\n isApiCall: boolean;\n }\n export interface HighlightChangeDetail {\n point: null | Highcharts.Point;\n group: readonly Highcharts.Point[];\n isApiCall: boolean;\n }\n export interface HighlightClearDetail {\n isApiCall: boolean;\n }\n\n export type I18nStrings = CartesianI18nStrings & PieI18nStrings;\n}\n\nexport interface CoreLegendProps {\n items: readonly CoreLegendProps.Item[];\n title?: string;\n ariaLabel?: string;\n actions?: React.ReactNode;\n alignment?: \"horizontal\" | \"vertical\";\n onClearHighlight?: NonCancelableEventHandler;\n onItemHighlight?: NonCancelableEventHandler<CoreLegendProps.ItemHighlightDetail>;\n onVisibleItemsChange?: NonCancelableEventHandler<CoreLegendProps.VisibleItemsChangeDetail>;\n getLegendTooltipContent?: CoreLegendProps.GetTooltipContent;\n}\n\nexport namespace CoreLegendProps {\n export type Item = InternalComponentTypes.LegendItem;\n export type GetTooltipContent = InternalComponentTypes.GetLegendTooltipContent;\n export interface ItemHighlightDetail {\n item: Item;\n }\n export interface VisibleItemsChangeDetail {\n items: readonly string[];\n }\n}\n\n// Utility types\n\nexport interface Rect {\n x: number;\n y: number;\n height: number;\n width: number;\n}\n"]}
|
|
@@ -441,6 +441,25 @@ module.exports = { classes: [
|
|
|
441
441
|
"name": "AbstractWrapper.keypress"
|
|
442
442
|
}
|
|
443
443
|
},
|
|
444
|
+
{
|
|
445
|
+
"name": "keypress",
|
|
446
|
+
"returnType": {
|
|
447
|
+
"name": "void",
|
|
448
|
+
"isNullable": false
|
|
449
|
+
},
|
|
450
|
+
"parameters": [
|
|
451
|
+
{
|
|
452
|
+
"name": "keyboardEventProps",
|
|
453
|
+
"typeName": "KeyboardEventInit",
|
|
454
|
+
"flags": {
|
|
455
|
+
"isOptional": false
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
],
|
|
459
|
+
"inheritedFrom": {
|
|
460
|
+
"name": "AbstractWrapper.keypress"
|
|
461
|
+
}
|
|
462
|
+
},
|
|
444
463
|
{
|
|
445
464
|
"name": "keyup",
|
|
446
465
|
"returnType": {
|
|
@@ -460,6 +479,25 @@ module.exports = { classes: [
|
|
|
460
479
|
"name": "AbstractWrapper.keyup"
|
|
461
480
|
}
|
|
462
481
|
},
|
|
482
|
+
{
|
|
483
|
+
"name": "keyup",
|
|
484
|
+
"returnType": {
|
|
485
|
+
"name": "void",
|
|
486
|
+
"isNullable": false
|
|
487
|
+
},
|
|
488
|
+
"parameters": [
|
|
489
|
+
{
|
|
490
|
+
"name": "keyboardEventProps",
|
|
491
|
+
"typeName": "KeyboardEventInit",
|
|
492
|
+
"flags": {
|
|
493
|
+
"isOptional": false
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
],
|
|
497
|
+
"inheritedFrom": {
|
|
498
|
+
"name": "AbstractWrapper.keyup"
|
|
499
|
+
}
|
|
500
|
+
},
|
|
463
501
|
{
|
|
464
502
|
"name": "matches",
|
|
465
503
|
"returnType": {
|
|
@@ -869,6 +907,25 @@ module.exports = { classes: [
|
|
|
869
907
|
"name": "AbstractWrapper.keypress"
|
|
870
908
|
}
|
|
871
909
|
},
|
|
910
|
+
{
|
|
911
|
+
"name": "keypress",
|
|
912
|
+
"returnType": {
|
|
913
|
+
"name": "void",
|
|
914
|
+
"isNullable": false
|
|
915
|
+
},
|
|
916
|
+
"parameters": [
|
|
917
|
+
{
|
|
918
|
+
"name": "keyboardEventProps",
|
|
919
|
+
"typeName": "KeyboardEventInit",
|
|
920
|
+
"flags": {
|
|
921
|
+
"isOptional": false
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
],
|
|
925
|
+
"inheritedFrom": {
|
|
926
|
+
"name": "AbstractWrapper.keypress"
|
|
927
|
+
}
|
|
928
|
+
},
|
|
872
929
|
{
|
|
873
930
|
"name": "keyup",
|
|
874
931
|
"returnType": {
|
|
@@ -888,6 +945,25 @@ module.exports = { classes: [
|
|
|
888
945
|
"name": "AbstractWrapper.keyup"
|
|
889
946
|
}
|
|
890
947
|
},
|
|
948
|
+
{
|
|
949
|
+
"name": "keyup",
|
|
950
|
+
"returnType": {
|
|
951
|
+
"name": "void",
|
|
952
|
+
"isNullable": false
|
|
953
|
+
},
|
|
954
|
+
"parameters": [
|
|
955
|
+
{
|
|
956
|
+
"name": "keyboardEventProps",
|
|
957
|
+
"typeName": "KeyboardEventInit",
|
|
958
|
+
"flags": {
|
|
959
|
+
"isOptional": false
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
],
|
|
963
|
+
"inheritedFrom": {
|
|
964
|
+
"name": "AbstractWrapper.keyup"
|
|
965
|
+
}
|
|
966
|
+
},
|
|
891
967
|
{
|
|
892
968
|
"name": "matches",
|
|
893
969
|
"returnType": {
|
|
@@ -1289,6 +1365,25 @@ module.exports = { classes: [
|
|
|
1289
1365
|
"name": "AbstractWrapper.keypress"
|
|
1290
1366
|
}
|
|
1291
1367
|
},
|
|
1368
|
+
{
|
|
1369
|
+
"name": "keypress",
|
|
1370
|
+
"returnType": {
|
|
1371
|
+
"name": "void",
|
|
1372
|
+
"isNullable": false
|
|
1373
|
+
},
|
|
1374
|
+
"parameters": [
|
|
1375
|
+
{
|
|
1376
|
+
"name": "keyboardEventProps",
|
|
1377
|
+
"typeName": "KeyboardEventInit",
|
|
1378
|
+
"flags": {
|
|
1379
|
+
"isOptional": false
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
],
|
|
1383
|
+
"inheritedFrom": {
|
|
1384
|
+
"name": "AbstractWrapper.keypress"
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1292
1387
|
{
|
|
1293
1388
|
"name": "keyup",
|
|
1294
1389
|
"returnType": {
|
|
@@ -1308,6 +1403,25 @@ module.exports = { classes: [
|
|
|
1308
1403
|
"name": "AbstractWrapper.keyup"
|
|
1309
1404
|
}
|
|
1310
1405
|
},
|
|
1406
|
+
{
|
|
1407
|
+
"name": "keyup",
|
|
1408
|
+
"returnType": {
|
|
1409
|
+
"name": "void",
|
|
1410
|
+
"isNullable": false
|
|
1411
|
+
},
|
|
1412
|
+
"parameters": [
|
|
1413
|
+
{
|
|
1414
|
+
"name": "keyboardEventProps",
|
|
1415
|
+
"typeName": "KeyboardEventInit",
|
|
1416
|
+
"flags": {
|
|
1417
|
+
"isOptional": false
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
],
|
|
1421
|
+
"inheritedFrom": {
|
|
1422
|
+
"name": "AbstractWrapper.keyup"
|
|
1423
|
+
}
|
|
1424
|
+
},
|
|
1311
1425
|
{
|
|
1312
1426
|
"name": "matches",
|
|
1313
1427
|
"returnType": {
|
|
@@ -1686,6 +1800,25 @@ module.exports = { classes: [
|
|
|
1686
1800
|
"name": "AbstractWrapper.keypress"
|
|
1687
1801
|
}
|
|
1688
1802
|
},
|
|
1803
|
+
{
|
|
1804
|
+
"name": "keypress",
|
|
1805
|
+
"returnType": {
|
|
1806
|
+
"name": "void",
|
|
1807
|
+
"isNullable": false
|
|
1808
|
+
},
|
|
1809
|
+
"parameters": [
|
|
1810
|
+
{
|
|
1811
|
+
"name": "keyboardEventProps",
|
|
1812
|
+
"typeName": "KeyboardEventInit",
|
|
1813
|
+
"flags": {
|
|
1814
|
+
"isOptional": false
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
],
|
|
1818
|
+
"inheritedFrom": {
|
|
1819
|
+
"name": "AbstractWrapper.keypress"
|
|
1820
|
+
}
|
|
1821
|
+
},
|
|
1689
1822
|
{
|
|
1690
1823
|
"name": "keyup",
|
|
1691
1824
|
"returnType": {
|
|
@@ -1705,6 +1838,25 @@ module.exports = { classes: [
|
|
|
1705
1838
|
"name": "AbstractWrapper.keyup"
|
|
1706
1839
|
}
|
|
1707
1840
|
},
|
|
1841
|
+
{
|
|
1842
|
+
"name": "keyup",
|
|
1843
|
+
"returnType": {
|
|
1844
|
+
"name": "void",
|
|
1845
|
+
"isNullable": false
|
|
1846
|
+
},
|
|
1847
|
+
"parameters": [
|
|
1848
|
+
{
|
|
1849
|
+
"name": "keyboardEventProps",
|
|
1850
|
+
"typeName": "KeyboardEventInit",
|
|
1851
|
+
"flags": {
|
|
1852
|
+
"isOptional": false
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
],
|
|
1856
|
+
"inheritedFrom": {
|
|
1857
|
+
"name": "AbstractWrapper.keyup"
|
|
1858
|
+
}
|
|
1859
|
+
},
|
|
1708
1860
|
{
|
|
1709
1861
|
"name": "matches",
|
|
1710
1862
|
"returnType": {
|
|
@@ -2088,6 +2240,25 @@ module.exports = { classes: [
|
|
|
2088
2240
|
"name": "AbstractWrapper.keypress"
|
|
2089
2241
|
}
|
|
2090
2242
|
},
|
|
2243
|
+
{
|
|
2244
|
+
"name": "keypress",
|
|
2245
|
+
"returnType": {
|
|
2246
|
+
"name": "void",
|
|
2247
|
+
"isNullable": false
|
|
2248
|
+
},
|
|
2249
|
+
"parameters": [
|
|
2250
|
+
{
|
|
2251
|
+
"name": "keyboardEventProps",
|
|
2252
|
+
"typeName": "KeyboardEventInit",
|
|
2253
|
+
"flags": {
|
|
2254
|
+
"isOptional": false
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
],
|
|
2258
|
+
"inheritedFrom": {
|
|
2259
|
+
"name": "AbstractWrapper.keypress"
|
|
2260
|
+
}
|
|
2261
|
+
},
|
|
2091
2262
|
{
|
|
2092
2263
|
"name": "keyup",
|
|
2093
2264
|
"returnType": {
|
|
@@ -2107,6 +2278,25 @@ module.exports = { classes: [
|
|
|
2107
2278
|
"name": "AbstractWrapper.keyup"
|
|
2108
2279
|
}
|
|
2109
2280
|
},
|
|
2281
|
+
{
|
|
2282
|
+
"name": "keyup",
|
|
2283
|
+
"returnType": {
|
|
2284
|
+
"name": "void",
|
|
2285
|
+
"isNullable": false
|
|
2286
|
+
},
|
|
2287
|
+
"parameters": [
|
|
2288
|
+
{
|
|
2289
|
+
"name": "keyboardEventProps",
|
|
2290
|
+
"typeName": "KeyboardEventInit",
|
|
2291
|
+
"flags": {
|
|
2292
|
+
"isOptional": false
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
],
|
|
2296
|
+
"inheritedFrom": {
|
|
2297
|
+
"name": "AbstractWrapper.keyup"
|
|
2298
|
+
}
|
|
2299
|
+
},
|
|
2110
2300
|
{
|
|
2111
2301
|
"name": "matches",
|
|
2112
2302
|
"returnType": {
|
|
@@ -2471,6 +2661,25 @@ module.exports = { classes: [
|
|
|
2471
2661
|
"name": "AbstractWrapper.keypress"
|
|
2472
2662
|
}
|
|
2473
2663
|
},
|
|
2664
|
+
{
|
|
2665
|
+
"name": "keypress",
|
|
2666
|
+
"returnType": {
|
|
2667
|
+
"name": "void",
|
|
2668
|
+
"isNullable": false
|
|
2669
|
+
},
|
|
2670
|
+
"parameters": [
|
|
2671
|
+
{
|
|
2672
|
+
"name": "keyboardEventProps",
|
|
2673
|
+
"typeName": "KeyboardEventInit",
|
|
2674
|
+
"flags": {
|
|
2675
|
+
"isOptional": false
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
],
|
|
2679
|
+
"inheritedFrom": {
|
|
2680
|
+
"name": "AbstractWrapper.keypress"
|
|
2681
|
+
}
|
|
2682
|
+
},
|
|
2474
2683
|
{
|
|
2475
2684
|
"name": "keyup",
|
|
2476
2685
|
"returnType": {
|
|
@@ -2490,6 +2699,25 @@ module.exports = { classes: [
|
|
|
2490
2699
|
"name": "AbstractWrapper.keyup"
|
|
2491
2700
|
}
|
|
2492
2701
|
},
|
|
2702
|
+
{
|
|
2703
|
+
"name": "keyup",
|
|
2704
|
+
"returnType": {
|
|
2705
|
+
"name": "void",
|
|
2706
|
+
"isNullable": false
|
|
2707
|
+
},
|
|
2708
|
+
"parameters": [
|
|
2709
|
+
{
|
|
2710
|
+
"name": "keyboardEventProps",
|
|
2711
|
+
"typeName": "KeyboardEventInit",
|
|
2712
|
+
"flags": {
|
|
2713
|
+
"isOptional": false
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
],
|
|
2717
|
+
"inheritedFrom": {
|
|
2718
|
+
"name": "AbstractWrapper.keyup"
|
|
2719
|
+
}
|
|
2720
|
+
},
|
|
2493
2721
|
{
|
|
2494
2722
|
"name": "matches",
|
|
2495
2723
|
"returnType": {
|
|
@@ -2876,6 +3104,25 @@ module.exports = { classes: [
|
|
|
2876
3104
|
"name": "AbstractWrapper.keypress"
|
|
2877
3105
|
}
|
|
2878
3106
|
},
|
|
3107
|
+
{
|
|
3108
|
+
"name": "keypress",
|
|
3109
|
+
"returnType": {
|
|
3110
|
+
"name": "void",
|
|
3111
|
+
"isNullable": false
|
|
3112
|
+
},
|
|
3113
|
+
"parameters": [
|
|
3114
|
+
{
|
|
3115
|
+
"name": "keyboardEventProps",
|
|
3116
|
+
"typeName": "KeyboardEventInit",
|
|
3117
|
+
"flags": {
|
|
3118
|
+
"isOptional": false
|
|
3119
|
+
}
|
|
3120
|
+
}
|
|
3121
|
+
],
|
|
3122
|
+
"inheritedFrom": {
|
|
3123
|
+
"name": "AbstractWrapper.keypress"
|
|
3124
|
+
}
|
|
3125
|
+
},
|
|
2879
3126
|
{
|
|
2880
3127
|
"name": "keyup",
|
|
2881
3128
|
"returnType": {
|
|
@@ -2895,6 +3142,25 @@ module.exports = { classes: [
|
|
|
2895
3142
|
"name": "AbstractWrapper.keyup"
|
|
2896
3143
|
}
|
|
2897
3144
|
},
|
|
3145
|
+
{
|
|
3146
|
+
"name": "keyup",
|
|
3147
|
+
"returnType": {
|
|
3148
|
+
"name": "void",
|
|
3149
|
+
"isNullable": false
|
|
3150
|
+
},
|
|
3151
|
+
"parameters": [
|
|
3152
|
+
{
|
|
3153
|
+
"name": "keyboardEventProps",
|
|
3154
|
+
"typeName": "KeyboardEventInit",
|
|
3155
|
+
"flags": {
|
|
3156
|
+
"isOptional": false
|
|
3157
|
+
}
|
|
3158
|
+
}
|
|
3159
|
+
],
|
|
3160
|
+
"inheritedFrom": {
|
|
3161
|
+
"name": "AbstractWrapper.keyup"
|
|
3162
|
+
}
|
|
3163
|
+
},
|
|
2898
3164
|
{
|
|
2899
3165
|
"name": "matches",
|
|
2900
3166
|
"returnType": {
|
|
@@ -3296,6 +3562,25 @@ module.exports = { classes: [
|
|
|
3296
3562
|
"name": "AbstractWrapper.keypress"
|
|
3297
3563
|
}
|
|
3298
3564
|
},
|
|
3565
|
+
{
|
|
3566
|
+
"name": "keypress",
|
|
3567
|
+
"returnType": {
|
|
3568
|
+
"name": "void",
|
|
3569
|
+
"isNullable": false
|
|
3570
|
+
},
|
|
3571
|
+
"parameters": [
|
|
3572
|
+
{
|
|
3573
|
+
"name": "keyboardEventProps",
|
|
3574
|
+
"typeName": "KeyboardEventInit",
|
|
3575
|
+
"flags": {
|
|
3576
|
+
"isOptional": false
|
|
3577
|
+
}
|
|
3578
|
+
}
|
|
3579
|
+
],
|
|
3580
|
+
"inheritedFrom": {
|
|
3581
|
+
"name": "AbstractWrapper.keypress"
|
|
3582
|
+
}
|
|
3583
|
+
},
|
|
3299
3584
|
{
|
|
3300
3585
|
"name": "keyup",
|
|
3301
3586
|
"returnType": {
|
|
@@ -3315,6 +3600,25 @@ module.exports = { classes: [
|
|
|
3315
3600
|
"name": "AbstractWrapper.keyup"
|
|
3316
3601
|
}
|
|
3317
3602
|
},
|
|
3603
|
+
{
|
|
3604
|
+
"name": "keyup",
|
|
3605
|
+
"returnType": {
|
|
3606
|
+
"name": "void",
|
|
3607
|
+
"isNullable": false
|
|
3608
|
+
},
|
|
3609
|
+
"parameters": [
|
|
3610
|
+
{
|
|
3611
|
+
"name": "keyboardEventProps",
|
|
3612
|
+
"typeName": "KeyboardEventInit",
|
|
3613
|
+
"flags": {
|
|
3614
|
+
"isOptional": false
|
|
3615
|
+
}
|
|
3616
|
+
}
|
|
3617
|
+
],
|
|
3618
|
+
"inheritedFrom": {
|
|
3619
|
+
"name": "AbstractWrapper.keyup"
|
|
3620
|
+
}
|
|
3621
|
+
},
|
|
3318
3622
|
{
|
|
3319
3623
|
"name": "matches",
|
|
3320
3624
|
"returnType": {
|
|
@@ -3809,6 +4113,25 @@ module.exports = { classes: [
|
|
|
3809
4113
|
"name": "AbstractWrapper.keypress"
|
|
3810
4114
|
}
|
|
3811
4115
|
},
|
|
4116
|
+
{
|
|
4117
|
+
"name": "keypress",
|
|
4118
|
+
"returnType": {
|
|
4119
|
+
"name": "void",
|
|
4120
|
+
"isNullable": false
|
|
4121
|
+
},
|
|
4122
|
+
"parameters": [
|
|
4123
|
+
{
|
|
4124
|
+
"name": "keyboardEventProps",
|
|
4125
|
+
"typeName": "KeyboardEventInit",
|
|
4126
|
+
"flags": {
|
|
4127
|
+
"isOptional": false
|
|
4128
|
+
}
|
|
4129
|
+
}
|
|
4130
|
+
],
|
|
4131
|
+
"inheritedFrom": {
|
|
4132
|
+
"name": "AbstractWrapper.keypress"
|
|
4133
|
+
}
|
|
4134
|
+
},
|
|
3812
4135
|
{
|
|
3813
4136
|
"name": "keyup",
|
|
3814
4137
|
"returnType": {
|
|
@@ -3828,6 +4151,25 @@ module.exports = { classes: [
|
|
|
3828
4151
|
"name": "AbstractWrapper.keyup"
|
|
3829
4152
|
}
|
|
3830
4153
|
},
|
|
4154
|
+
{
|
|
4155
|
+
"name": "keyup",
|
|
4156
|
+
"returnType": {
|
|
4157
|
+
"name": "void",
|
|
4158
|
+
"isNullable": false
|
|
4159
|
+
},
|
|
4160
|
+
"parameters": [
|
|
4161
|
+
{
|
|
4162
|
+
"name": "keyboardEventProps",
|
|
4163
|
+
"typeName": "KeyboardEventInit",
|
|
4164
|
+
"flags": {
|
|
4165
|
+
"isOptional": false
|
|
4166
|
+
}
|
|
4167
|
+
}
|
|
4168
|
+
],
|
|
4169
|
+
"inheritedFrom": {
|
|
4170
|
+
"name": "AbstractWrapper.keyup"
|
|
4171
|
+
}
|
|
4172
|
+
},
|
|
3831
4173
|
{
|
|
3832
4174
|
"name": "matches",
|
|
3833
4175
|
"returnType": {
|
|
@@ -4211,6 +4553,25 @@ module.exports = { classes: [
|
|
|
4211
4553
|
"name": "AbstractWrapper.keypress"
|
|
4212
4554
|
}
|
|
4213
4555
|
},
|
|
4556
|
+
{
|
|
4557
|
+
"name": "keypress",
|
|
4558
|
+
"returnType": {
|
|
4559
|
+
"name": "void",
|
|
4560
|
+
"isNullable": false
|
|
4561
|
+
},
|
|
4562
|
+
"parameters": [
|
|
4563
|
+
{
|
|
4564
|
+
"name": "keyboardEventProps",
|
|
4565
|
+
"typeName": "KeyboardEventInit",
|
|
4566
|
+
"flags": {
|
|
4567
|
+
"isOptional": false
|
|
4568
|
+
}
|
|
4569
|
+
}
|
|
4570
|
+
],
|
|
4571
|
+
"inheritedFrom": {
|
|
4572
|
+
"name": "AbstractWrapper.keypress"
|
|
4573
|
+
}
|
|
4574
|
+
},
|
|
4214
4575
|
{
|
|
4215
4576
|
"name": "keyup",
|
|
4216
4577
|
"returnType": {
|
|
@@ -4230,6 +4591,25 @@ module.exports = { classes: [
|
|
|
4230
4591
|
"name": "AbstractWrapper.keyup"
|
|
4231
4592
|
}
|
|
4232
4593
|
},
|
|
4594
|
+
{
|
|
4595
|
+
"name": "keyup",
|
|
4596
|
+
"returnType": {
|
|
4597
|
+
"name": "void",
|
|
4598
|
+
"isNullable": false
|
|
4599
|
+
},
|
|
4600
|
+
"parameters": [
|
|
4601
|
+
{
|
|
4602
|
+
"name": "keyboardEventProps",
|
|
4603
|
+
"typeName": "KeyboardEventInit",
|
|
4604
|
+
"flags": {
|
|
4605
|
+
"isOptional": false
|
|
4606
|
+
}
|
|
4607
|
+
}
|
|
4608
|
+
],
|
|
4609
|
+
"inheritedFrom": {
|
|
4610
|
+
"name": "AbstractWrapper.keyup"
|
|
4611
|
+
}
|
|
4612
|
+
},
|
|
4233
4613
|
{
|
|
4234
4614
|
"name": "matches",
|
|
4235
4615
|
"returnType": {
|
package/internal/environment.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "chart-components";
|
|
2
|
-
export var PACKAGE_VERSION = "1.0.0 (
|
|
2
|
+
export var PACKAGE_VERSION = "1.0.0 (c356b2f9)";
|
|
3
3
|
export var THEME = "open-source-visual-refresh";
|
|
4
4
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
5
5
|
export var SYSTEM = "console";
|
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudscape-design/chart-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cloudscape-design/chart-components.git"
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"stylelint-config-recommended-scss": "^14.1.0",
|
|
84
84
|
"stylelint-prettier": "^5.0.2",
|
|
85
85
|
"typescript": "^4.9.4",
|
|
86
|
-
"vite": "^6.
|
|
86
|
+
"vite": "^6.4.1",
|
|
87
87
|
"vitest": "^3.0.7"
|
|
88
88
|
},
|
|
89
89
|
"//": "ensure that typedoc uses latest typescript. It prints a warning, but works",
|