@cloudscape-design/components 3.0.932 → 3.0.933

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
- import { ChartDomain, XDomain, XScaleType, YDomain, YScaleType } from '../../internal/components/cartesian-chart/interfaces';
1
+ import { XDomain, XScaleType, YDomain, YScaleType } from '../../internal/components/cartesian-chart/interfaces';
2
2
  import { ChartScale, NumericChartScale } from '../../internal/components/cartesian-chart/scales';
3
3
  import { AreaChartProps } from '../interfaces';
4
4
  export default function computeChartProps<T extends AreaChartProps.DataTypes>({ isRtl, series, xDomain: externalXDomain, yDomain: externalYDomain, xScaleType, yScaleType, height, width, }: {
@@ -11,8 +11,8 @@ export default function computeChartProps<T extends AreaChartProps.DataTypes>({
11
11
  height: number;
12
12
  width: number;
13
13
  }): {
14
- xDomain: ChartDomain<T>;
15
- yDomain: readonly number[];
14
+ xDomain: XDomain<T>;
15
+ yDomain: YDomain;
16
16
  xScale: ChartScale;
17
17
  yScale: NumericChartScale;
18
18
  xTicks: import("../../internal/components/cartesian-chart/interfaces").ChartDataTypes[];
@@ -1 +1 @@
1
- {"version":3,"file":"compute-chart-props.d.ts","sourceRoot":"","sources":["../../../../src/area-chart/model/compute-chart-props.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,OAAO,EACP,UAAU,EACV,OAAO,EACP,UAAU,EACX,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAOjG,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG/C,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,CAAC,SAAS,cAAc,CAAC,SAAS,EAAE,EAC5E,KAAK,EACL,MAAM,EACN,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,eAAe,EACxB,UAAU,EACV,UAAU,EACV,MAAM,EACN,KAAK,GACN,EAAE;IACD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,SAAS,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;;;;;;;;;;;;EAcA"}
1
+ {"version":3,"file":"compute-chart-props.d.ts","sourceRoot":"","sources":["../../../../src/area-chart/model/compute-chart-props.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,OAAO,EACP,UAAU,EACV,OAAO,EACP,UAAU,EACX,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAOjG,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG/C,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,CAAC,SAAS,cAAc,CAAC,SAAS,EAAE,EAC5E,KAAK,EACL,MAAM,EACN,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,eAAe,EACxB,UAAU,EACV,UAAU,EACV,MAAM,EACN,KAAK,GACN,EAAE;IACD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,SAAS,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;;;;;;;;;;;;EAcA"}
@@ -18,7 +18,7 @@ export interface CartesianChartProps<T extends ChartDataTypes, Series> extends B
18
18
  * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.
19
19
  * When controlling this directly, make sure to update the value based on filtering changes.
20
20
  */
21
- xDomain?: T extends unknown ? ReadonlyArray<T> : ReadonlyArray<T>;
21
+ xDomain?: ReadonlyArray<T>;
22
22
  /**
23
23
  * Determines the domain of the y axis, i.e. the range of values that will be visible in the chart.
24
24
  * The domain is defined by a tuple: `[minimumValue, maximumValue]`.
@@ -205,7 +205,7 @@ export type ScaleType = 'linear' | 'log' | 'time' | 'categorical';
205
205
  export type XScaleType = 'linear' | 'log' | 'time' | 'categorical';
206
206
  export type YScaleType = 'linear' | 'log';
207
207
  export type ScaleRange = [number, number];
208
- export type ChartDomain<T extends ChartDataTypes> = T extends unknown ? ReadonlyArray<T> : ReadonlyArray<T>;
208
+ export type ChartDomain<T extends ChartDataTypes> = ReadonlyArray<T>;
209
209
  export type XDomain<T extends ChartDataTypes> = ChartDomain<T>;
210
210
  export type YDomain = ChartDomain<number>;
211
211
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,cAAc,EAAE,MAAM,CAAE,SAAQ,kBAAkB;IAC/F;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAE9B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,CAAC,SAAS,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IAElE;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,M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AI,WAAW,CAAC,CAAC,CAAC,CAAC;AAC/D,MAAM,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../../base-component';\nimport { NonCancelableEventHandler } from '../../events';\n\nexport interface CartesianChartProps<T extends ChartDataTypes, Series> extends BaseComponentProps {\n /**\n * Determines the type of scale for values on the x axis.\n */\n xScaleType?: ScaleType;\n\n /**\n * Determines the type of scale for values on the y axis.\n */\n yScaleType?: 'linear' | 'log';\n\n /**\n * Determines the domain of the x axis, i.e. the range of values that will be visible in the chart.\n * For numerical and time-based data this is represented as an array with two values: `[minimumValue, maximumValue]`.\n * For categorical data this is represented as an array of strings that determine the categories to display.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n xDomain?: T extends unknown ? ReadonlyArray<T> : ReadonlyArray<T>;\n\n /**\n * Determines the domain of the y axis, i.e. the range of values that will be visible in the chart.\n * The domain is defined by a tuple: `[minimumValue, maximumValue]`.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n yDomain?: ReadonlyArray<number>;\n\n /**\n * The title of the x axis.\n */\n xTitle?: string;\n\n /**\n * The title of the y axis.\n */\n yTitle?: string;\n\n /**\n * Optional title for the legend.\n */\n legendTitle?: string;\n\n /**\n * ARIA label that is assigned to the chart itself. It should match the visible label on the page, e.g. in the container header.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n\n /**\n * Sets `aria-labelledby` on the chart itself.\n * If there is a visible label for the chart on the page, e.g. in the container header, set this property to the ID of that header element.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n\n /**\n * A description of the chart that assistive technologies can use (through `aria-describedby`).\n * Provide a concise summary of the data visualized in the chart.\n */\n ariaDescription?: string;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: CartesianChartProps.I18nStrings<T>;\n\n /**\n * Function to format the displayed label of an x axis tick.\n */\n xTickFormatter?: CartesianChartProps.TickFormatter<T>;\n\n /**\n * Function to format the displayed label of a y axis tick.\n */\n yTickFormatter?: CartesianChartProps.TickFormatter<number>;\n\n /**\n * An optional pixel value number that fixes the height of the chart area.\n * If not set explicitly, the component will use a default height that is defined internally.\n * When used with `fitHeight`, this property defines the minimum height of the chart area.\n */\n height?: number;\n\n /**\n * Determines the maximum width the detail popover will be limited to.\n */\n detailPopoverSize?: 'small' | 'medium' | 'large';\n\n /**\n * Additional content that is displayed at the bottom of the detail popover.\n */\n detailPopoverFooter?: CartesianChartProps.DetailPopoverFooter<T>;\n\n /**\n * When set to `true`, the legend beneath the chart is not displayed.\n * It is highly recommended to keep this set to `false`.\n */\n hideLegend?: boolean;\n\n /**\n * When set to `true`, the default filtering dropdown is not displayed.\n * It is still possible to render additional filters with the `additionalFilters` slot.\n */\n hideFilter?: boolean;\n\n /**\n * Additional filters that are added above the chart component.\n * Make sure to update the `data` property when any of your custom filters change the data to be displayed.\n */\n additionalFilters?: React.ReactNode;\n\n /**\n * The currently highlighted data series, usually through hovering over a series or the legend.\n * A value of `null` means no series is highlighted.\n *\n * - If you do not set this property, series are highlighted automatically when hovering over one of the triggers (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onHighlightChange` listener to update this property when a series should be highlighted (controlled behavior).\n */\n highlightedSeries?: Series | null;\n\n /**\n * An array of series objects that determines which of the data series are currently displayed, i.e. not filtered out.\n * - If you do not set this property, series are shown and hidden automatically when using the default filter component (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onFilterChange` listener to update this property when the visible series should change, or when one of your custom filters changes the number of visible series (controlled behavior).\n */\n visibleSeries?: ReadonlyArray<Series>;\n\n /**\n * Specifies the current status of loading data.\n * * `loading`: data fetching is in progress.\n * * `finished`: data has loaded successfully.\n * * `error`: an error occurred during fetch. You should provide user an option to recover.\n **/\n statusType?: 'loading' | 'finished' | 'error';\n\n /**\n * Content that is displayed when the data passed to the component is empty.\n */\n empty?: React.ReactNode;\n\n /**\n * Content that is displayed when there is no data to display due to the built-in filtering.\n */\n noMatch?: React.ReactNode;\n\n /**\n * Text that is displayed when the chart is loading, i.e. when `statusType` is set to `\"loading\"`.\n * @i18n\n */\n loadingText?: string;\n\n /**\n * Text that is displayed when the chart is in error state, i.e. when `statusType` is set to `\"error\"`.\n * @i18n\n */\n errorText?: string;\n\n /**\n * Text for the recovery button that is displayed next to the error text.\n * @i18n\n **/\n recoveryText?: string;\n\n /**\n * Called when the user clicks the recovery button that appears when there is an error state.\n * Use this to enable the user to retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n\n /**\n * Called when the values of the internal filter component changed.\n * This will **not** be called for any custom filter components you have defined in `additionalFilters`.\n */\n onFilterChange?: NonCancelableEventHandler<CartesianChartProps.FilterChangeDetail<Series>>;\n\n /**\n * Called when the highlighted series has changed because of user interaction.\n */\n onHighlightChange?: NonCancelableEventHandler<CartesianChartProps.HighlightChangeDetail<Series>>;\n\n /**\n * Enable this property to make the chart fit into the available height of the parent container.\n */\n fitHeight?: boolean;\n}\nexport namespace CartesianChartProps {\n export interface FilterChangeDetail<Series> {\n visibleSeries: ReadonlyArray<Series>;\n }\n\n export interface HighlightChangeDetail<Series> {\n highlightedSeries: Series | null;\n }\n\n export interface TickFormatter<T> {\n (value: T): string;\n }\n\n export interface ValueFormatter<YType, XType = null> {\n (yValue: YType, xValue: XType): string;\n }\n\n export interface DetailPopoverFooter<T> {\n (xValue: T): React.ReactNode;\n }\n\n export interface I18nStrings<T> {\n /** Visible label of the default filter */\n filterLabel?: string;\n\n /** Placeholder text of the default filter */\n filterPlaceholder?: string;\n\n /** ARIA label for the default filter which is appended to any option that is selected */\n filterSelectedAriaLabel?: string;\n\n /** ARIA label that is associated with the legend in case there is no visible `legendTitle` defined */\n legendAriaLabel?: string;\n\n /** ARIA label for details popover dismiss button */\n detailPopoverDismissAriaLabel?: string;\n\n /** Name of the ARIA role description of the chart, e.g. \"line chart\" */\n chartAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the x axis, e.g. \"x axis\" */\n xAxisAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the y axis, e.g. \"y axis\" */\n yAxisAriaRoleDescription?: string;\n\n /** @deprecated Use `xTickFormatter` on the component instead. */\n xTickFormatter?: TickFormatter<T>;\n\n /** @deprecated Use `yTickFormatter` on the component instead. */\n yTickFormatter?: TickFormatter<number>;\n }\n}\n\nexport type ChartDataTypes = number | string | Date;\n\nexport type ScaleType = 'linear' | 'log' | 'time' | 'categorical';\nexport type XScaleType = 'linear' | 'log' | 'time' | 'categorical';\nexport type YScaleType = 'linear' | 'log';\nexport type ScaleRange = [number, number];\n\nexport type ChartDomain<T extends ChartDataTypes> = T extends unknown ? ReadonlyArray<T> : ReadonlyArray<T>;\nexport type XDomain<T extends ChartDataTypes> = ChartDomain<T>;\nexport type YDomain = ChartDomain<number>;\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/cartesian-chart/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../../base-component';\nimport { NonCancelableEventHandler } from '../../events';\n\nexport interface CartesianChartProps<T extends ChartDataTypes, Series> extends BaseComponentProps {\n /**\n * Determines the type of scale for values on the x axis.\n */\n xScaleType?: ScaleType;\n\n /**\n * Determines the type of scale for values on the y axis.\n */\n yScaleType?: 'linear' | 'log';\n\n /**\n * Determines the domain of the x axis, i.e. the range of values that will be visible in the chart.\n * For numerical and time-based data this is represented as an array with two values: `[minimumValue, maximumValue]`.\n * For categorical data this is represented as an array of strings that determine the categories to display.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n xDomain?: ReadonlyArray<T>;\n\n /**\n * Determines the domain of the y axis, i.e. the range of values that will be visible in the chart.\n * The domain is defined by a tuple: `[minimumValue, maximumValue]`.\n *\n * It is recommended to set this explicitly. If not, the component will determine a domain that fits all data points.\n * When controlling this directly, make sure to update the value based on filtering changes.\n */\n yDomain?: ReadonlyArray<number>;\n\n /**\n * The title of the x axis.\n */\n xTitle?: string;\n\n /**\n * The title of the y axis.\n */\n yTitle?: string;\n\n /**\n * Optional title for the legend.\n */\n legendTitle?: string;\n\n /**\n * ARIA label that is assigned to the chart itself. It should match the visible label on the page, e.g. in the container header.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n\n /**\n * Sets `aria-labelledby` on the chart itself.\n * If there is a visible label for the chart on the page, e.g. in the container header, set this property to the ID of that header element.\n * Do not use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n\n /**\n * A description of the chart that assistive technologies can use (through `aria-describedby`).\n * Provide a concise summary of the data visualized in the chart.\n */\n ariaDescription?: string;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: CartesianChartProps.I18nStrings<T>;\n\n /**\n * Function to format the displayed label of an x axis tick.\n */\n xTickFormatter?: CartesianChartProps.TickFormatter<T>;\n\n /**\n * Function to format the displayed label of a y axis tick.\n */\n yTickFormatter?: CartesianChartProps.TickFormatter<number>;\n\n /**\n * An optional pixel value number that fixes the height of the chart area.\n * If not set explicitly, the component will use a default height that is defined internally.\n * When used with `fitHeight`, this property defines the minimum height of the chart area.\n */\n height?: number;\n\n /**\n * Determines the maximum width the detail popover will be limited to.\n */\n detailPopoverSize?: 'small' | 'medium' | 'large';\n\n /**\n * Additional content that is displayed at the bottom of the detail popover.\n */\n detailPopoverFooter?: CartesianChartProps.DetailPopoverFooter<T>;\n\n /**\n * When set to `true`, the legend beneath the chart is not displayed.\n * It is highly recommended to keep this set to `false`.\n */\n hideLegend?: boolean;\n\n /**\n * When set to `true`, the default filtering dropdown is not displayed.\n * It is still possible to render additional filters with the `additionalFilters` slot.\n */\n hideFilter?: boolean;\n\n /**\n * Additional filters that are added above the chart component.\n * Make sure to update the `data` property when any of your custom filters change the data to be displayed.\n */\n additionalFilters?: React.ReactNode;\n\n /**\n * The currently highlighted data series, usually through hovering over a series or the legend.\n * A value of `null` means no series is highlighted.\n *\n * - If you do not set this property, series are highlighted automatically when hovering over one of the triggers (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onHighlightChange` listener to update this property when a series should be highlighted (controlled behavior).\n */\n highlightedSeries?: Series | null;\n\n /**\n * An array of series objects that determines which of the data series are currently displayed, i.e. not filtered out.\n * - If you do not set this property, series are shown and hidden automatically when using the default filter component (uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onFilterChange` listener to update this property when the visible series should change, or when one of your custom filters changes the number of visible series (controlled behavior).\n */\n visibleSeries?: ReadonlyArray<Series>;\n\n /**\n * Specifies the current status of loading data.\n * * `loading`: data fetching is in progress.\n * * `finished`: data has loaded successfully.\n * * `error`: an error occurred during fetch. You should provide user an option to recover.\n **/\n statusType?: 'loading' | 'finished' | 'error';\n\n /**\n * Content that is displayed when the data passed to the component is empty.\n */\n empty?: React.ReactNode;\n\n /**\n * Content that is displayed when there is no data to display due to the built-in filtering.\n */\n noMatch?: React.ReactNode;\n\n /**\n * Text that is displayed when the chart is loading, i.e. when `statusType` is set to `\"loading\"`.\n * @i18n\n */\n loadingText?: string;\n\n /**\n * Text that is displayed when the chart is in error state, i.e. when `statusType` is set to `\"error\"`.\n * @i18n\n */\n errorText?: string;\n\n /**\n * Text for the recovery button that is displayed next to the error text.\n * @i18n\n **/\n recoveryText?: string;\n\n /**\n * Called when the user clicks the recovery button that appears when there is an error state.\n * Use this to enable the user to retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n\n /**\n * Called when the values of the internal filter component changed.\n * This will **not** be called for any custom filter components you have defined in `additionalFilters`.\n */\n onFilterChange?: NonCancelableEventHandler<CartesianChartProps.FilterChangeDetail<Series>>;\n\n /**\n * Called when the highlighted series has changed because of user interaction.\n */\n onHighlightChange?: NonCancelableEventHandler<CartesianChartProps.HighlightChangeDetail<Series>>;\n\n /**\n * Enable this property to make the chart fit into the available height of the parent container.\n */\n fitHeight?: boolean;\n}\nexport namespace CartesianChartProps {\n export interface FilterChangeDetail<Series> {\n visibleSeries: ReadonlyArray<Series>;\n }\n\n export interface HighlightChangeDetail<Series> {\n highlightedSeries: Series | null;\n }\n\n export interface TickFormatter<T> {\n (value: T): string;\n }\n\n export interface ValueFormatter<YType, XType = null> {\n (yValue: YType, xValue: XType): string;\n }\n\n export interface DetailPopoverFooter<T> {\n (xValue: T): React.ReactNode;\n }\n\n export interface I18nStrings<T> {\n /** Visible label of the default filter */\n filterLabel?: string;\n\n /** Placeholder text of the default filter */\n filterPlaceholder?: string;\n\n /** ARIA label for the default filter which is appended to any option that is selected */\n filterSelectedAriaLabel?: string;\n\n /** ARIA label that is associated with the legend in case there is no visible `legendTitle` defined */\n legendAriaLabel?: string;\n\n /** ARIA label for details popover dismiss button */\n detailPopoverDismissAriaLabel?: string;\n\n /** Name of the ARIA role description of the chart, e.g. \"line chart\" */\n chartAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the x axis, e.g. \"x axis\" */\n xAxisAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of the y axis, e.g. \"y axis\" */\n yAxisAriaRoleDescription?: string;\n\n /** @deprecated Use `xTickFormatter` on the component instead. */\n xTickFormatter?: TickFormatter<T>;\n\n /** @deprecated Use `yTickFormatter` on the component instead. */\n yTickFormatter?: TickFormatter<number>;\n }\n}\n\nexport type ChartDataTypes = number | string | Date;\n\nexport type ScaleType = 'linear' | 'log' | 'time' | 'categorical';\nexport type XScaleType = 'linear' | 'log' | 'time' | 'categorical';\nexport type YScaleType = 'linear' | 'log';\nexport type ScaleRange = [number, number];\n\nexport type ChartDomain<T extends ChartDataTypes> = ReadonlyArray<T>;\nexport type XDomain<T extends ChartDataTypes> = ChartDomain<T>;\nexport type YDomain = ChartDomain<number>;\n"]}
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (1ec4cef1)";
2
+ export var PACKAGE_VERSION = "3.0.0 (afdd0660)";
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 (1ec4cef1)",
3
+ "PACKAGE_VERSION": "3.0.0 (afdd0660)",
4
4
  "THEME": "open-source-visual-refresh",
5
5
  "ALWAYS_VISUAL_REFRESH": true
6
6
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "1ec4cef12ef2e0290a1d2dd4edfd4085c42c2053"
2
+ "commit": "afdd0660eacf9e9950845ecd788d35438adadd1a"
3
3
  }
package/package.json CHANGED
@@ -133,7 +133,7 @@
133
133
  "./internal/base-component/index.js",
134
134
  "./internal/base-component/styles.css.js"
135
135
  ],
136
- "version": "3.0.932",
136
+ "version": "3.0.933",
137
137
  "repository": {
138
138
  "type": "git",
139
139
  "url": "https://github.com/cloudscape-design/components.git"