@highcharts/grid-pro 2.0.0
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/README.md +35 -0
- package/css/grid-pro.css +1756 -0
- package/es-modules/Accessibility/A11yI18n.d.ts +95 -0
- package/es-modules/Accessibility/A11yI18n.js +290 -0
- package/es-modules/Accessibility/Accessibility.d.ts +116 -0
- package/es-modules/Accessibility/Accessibility.js +402 -0
- package/es-modules/Accessibility/AccessibilityComponent.d.ts +97 -0
- package/es-modules/Accessibility/AccessibilityComponent.js +147 -0
- package/es-modules/Accessibility/Components/AnnotationsA11y.d.ts +43 -0
- package/es-modules/Accessibility/Components/AnnotationsA11y.js +160 -0
- package/es-modules/Accessibility/Components/ContainerComponent.d.ts +48 -0
- package/es-modules/Accessibility/Components/ContainerComponent.js +142 -0
- package/es-modules/Accessibility/Components/InfoRegionsComponent.d.ts +144 -0
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +555 -0
- package/es-modules/Accessibility/Components/LegendComponent.d.ts +124 -0
- package/es-modules/Accessibility/Components/LegendComponent.js +474 -0
- package/es-modules/Accessibility/Components/MenuComponent.d.ts +93 -0
- package/es-modules/Accessibility/Components/MenuComponent.js +430 -0
- package/es-modules/Accessibility/Components/NavigatorComponent.d.ts +57 -0
- package/es-modules/Accessibility/Components/NavigatorComponent.js +235 -0
- package/es-modules/Accessibility/Components/RangeSelectorComponent.d.ts +126 -0
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +473 -0
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.d.ts +18 -0
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +234 -0
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.d.ts +87 -0
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +309 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.d.ts +53 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +130 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.d.ts +28 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +415 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.d.ts +114 -0
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +721 -0
- package/es-modules/Accessibility/Components/ZoomComponent.d.ts +96 -0
- package/es-modules/Accessibility/Components/ZoomComponent.js +314 -0
- package/es-modules/Accessibility/FocusBorder.d.ts +40 -0
- package/es-modules/Accessibility/FocusBorder.js +301 -0
- package/es-modules/Accessibility/HighContrastMode.d.ts +35 -0
- package/es-modules/Accessibility/HighContrastMode.js +100 -0
- package/es-modules/Accessibility/HighContrastTheme.d.ts +11 -0
- package/es-modules/Accessibility/HighContrastTheme.js +212 -0
- package/es-modules/Accessibility/KeyboardNavigation.d.ts +133 -0
- package/es-modules/Accessibility/KeyboardNavigation.js +450 -0
- package/es-modules/Accessibility/KeyboardNavigationHandler.d.ts +48 -0
- package/es-modules/Accessibility/KeyboardNavigationHandler.js +126 -0
- package/es-modules/Accessibility/Options/A11yDefaults.d.ts +68 -0
- package/es-modules/Accessibility/Options/A11yDefaults.js +971 -0
- package/es-modules/Accessibility/Options/DeprecatedOptions.d.ts +22 -0
- package/es-modules/Accessibility/Options/DeprecatedOptions.js +265 -0
- package/es-modules/Accessibility/Options/LangDefaults.d.ts +4 -0
- package/es-modules/Accessibility/Options/LangDefaults.js +440 -0
- package/es-modules/Accessibility/ProxyElement.d.ts +78 -0
- package/es-modules/Accessibility/ProxyElement.js +223 -0
- package/es-modules/Accessibility/ProxyProvider.d.ts +90 -0
- package/es-modules/Accessibility/ProxyProvider.js +315 -0
- package/es-modules/Accessibility/Utils/Announcer.d.ts +26 -0
- package/es-modules/Accessibility/Utils/Announcer.js +90 -0
- package/es-modules/Accessibility/Utils/ChartUtilities.d.ts +90 -0
- package/es-modules/Accessibility/Utils/ChartUtilities.js +298 -0
- package/es-modules/Accessibility/Utils/DOMElementProvider.d.ts +20 -0
- package/es-modules/Accessibility/Utils/DOMElementProvider.js +69 -0
- package/es-modules/Accessibility/Utils/EventProvider.d.ts +26 -0
- package/es-modules/Accessibility/Utils/EventProvider.js +65 -0
- package/es-modules/Accessibility/Utils/HTMLUtilities.d.ts +108 -0
- package/es-modules/Accessibility/Utils/HTMLUtilities.js +319 -0
- package/es-modules/Core/Animation/AnimationUtilities.d.ts +107 -0
- package/es-modules/Core/Animation/AnimationUtilities.js +200 -0
- package/es-modules/Core/Animation/Fx.d.ts +130 -0
- package/es-modules/Core/Animation/Fx.js +388 -0
- package/es-modules/Core/Chart/Chart.d.ts +1009 -0
- package/es-modules/Core/Chart/Chart.js +3008 -0
- package/es-modules/Core/Chart/Chart3D.d.ts +276 -0
- package/es-modules/Core/Chart/Chart3D.js +1686 -0
- package/es-modules/Core/Chart/ChartDefaults.d.ts +8 -0
- package/es-modules/Core/Chart/ChartDefaults.js +1304 -0
- package/es-modules/Core/Chart/ChartNavigationComposition.d.ts +55 -0
- package/es-modules/Core/Chart/ChartNavigationComposition.js +90 -0
- package/es-modules/Core/Chart/GanttChart.d.ts +74 -0
- package/es-modules/Core/Chart/GanttChart.js +189 -0
- package/es-modules/Core/Chart/MapChart.d.ts +132 -0
- package/es-modules/Core/Chart/MapChart.js +232 -0
- package/es-modules/Core/Chart/StockChart.d.ts +117 -0
- package/es-modules/Core/Chart/StockChart.js +641 -0
- package/es-modules/Core/Color/Color.d.ts +112 -0
- package/es-modules/Core/Color/Color.js +418 -0
- package/es-modules/Core/Color/Palettes.d.ts +84 -0
- package/es-modules/Core/Color/Palettes.js +23 -0
- package/es-modules/Core/Defaults.d.ts +42 -0
- package/es-modules/Core/Defaults.js +2977 -0
- package/es-modules/Core/Foundation.d.ts +19 -0
- package/es-modules/Core/Foundation.js +63 -0
- package/es-modules/Core/Geometry/CircleUtilities.d.ts +189 -0
- package/es-modules/Core/Geometry/CircleUtilities.js +388 -0
- package/es-modules/Core/Geometry/GeometryUtilities.d.ts +48 -0
- package/es-modules/Core/Geometry/GeometryUtilities.js +105 -0
- package/es-modules/Core/Geometry/PolygonClip.d.ts +19 -0
- package/es-modules/Core/Geometry/PolygonClip.js +96 -0
- package/es-modules/Core/Globals.d.ts +110 -0
- package/es-modules/Core/Globals.js +127 -0
- package/es-modules/Core/HttpUtilities.d.ts +61 -0
- package/es-modules/Core/HttpUtilities.js +214 -0
- package/es-modules/Core/MSPointer.d.ts +74 -0
- package/es-modules/Core/MSPointer.js +218 -0
- package/es-modules/Core/Math3D.d.ts +117 -0
- package/es-modules/Core/Math3D.js +250 -0
- package/es-modules/Core/Pointer.d.ts +590 -0
- package/es-modules/Core/Pointer.js +1631 -0
- package/es-modules/Core/Renderer/HTML/AST.d.ts +163 -0
- package/es-modules/Core/Renderer/HTML/AST.js +562 -0
- package/es-modules/Core/Renderer/HTML/HTMLElement.d.ts +76 -0
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +471 -0
- package/es-modules/Core/Renderer/RendererRegistry.d.ts +29 -0
- package/es-modules/Core/Renderer/RendererRegistry.js +76 -0
- package/es-modules/Core/Renderer/RendererUtilities.d.ts +26 -0
- package/es-modules/Core/Renderer/RendererUtilities.js +172 -0
- package/es-modules/Core/Responsive.d.ts +55 -0
- package/es-modules/Core/Responsive.js +260 -0
- package/es-modules/Core/Templating.d.ts +125 -0
- package/es-modules/Core/Templating.js +428 -0
- package/es-modules/Core/Time.d.ts +69 -0
- package/es-modules/Core/Time.js +172 -0
- package/es-modules/Core/Tooltip.d.ts +297 -0
- package/es-modules/Core/Tooltip.js +1377 -0
- package/es-modules/Core/Utilities.d.ts +770 -0
- package/es-modules/Core/Utilities.js +1989 -0
- package/es-modules/Data/ColumnUtils.d.ts +87 -0
- package/es-modules/Data/ColumnUtils.js +140 -0
- package/es-modules/Data/Connectors/CSVConnector.d.ts +63 -0
- package/es-modules/Data/Connectors/CSVConnector.js +149 -0
- package/es-modules/Data/Connectors/CSVConnectorOptions.d.ts +149 -0
- package/es-modules/Data/Connectors/DataConnector.d.ts +204 -0
- package/es-modules/Data/Connectors/DataConnector.js +345 -0
- package/es-modules/Data/Connectors/DataConnectorOptions.d.ts +87 -0
- package/es-modules/Data/Connectors/DataConnectorType.d.ts +45 -0
- package/es-modules/Data/Connectors/GoogleSheetsConnector.d.ts +65 -0
- package/es-modules/Data/Connectors/GoogleSheetsConnector.js +226 -0
- package/es-modules/Data/Connectors/GoogleSheetsConnectorOptions.d.ts +167 -0
- package/es-modules/Data/Connectors/HTMLTableConnector.d.ts +77 -0
- package/es-modules/Data/Connectors/HTMLTableConnector.js +119 -0
- package/es-modules/Data/Connectors/HTMLTableConnectorOptions.d.ts +49 -0
- package/es-modules/Data/Connectors/JSONConnector.d.ts +64 -0
- package/es-modules/Data/Connectors/JSONConnector.js +156 -0
- package/es-modules/Data/Connectors/JSONConnectorOptions.d.ts +185 -0
- package/es-modules/Data/Converters/CSVConverter.d.ts +64 -0
- package/es-modules/Data/Converters/CSVConverter.js +374 -0
- package/es-modules/Data/Converters/CSVConverterOptions.d.ts +53 -0
- package/es-modules/Data/Converters/DataConverter.d.ts +168 -0
- package/es-modules/Data/Converters/DataConverter.js +387 -0
- package/es-modules/Data/Converters/DataConverterType.d.ts +40 -0
- package/es-modules/Data/Converters/DataConverterUtils.d.ts +82 -0
- package/es-modules/Data/Converters/DataConverterUtils.js +216 -0
- package/es-modules/Data/Converters/GoogleSheetsConverter.d.ts +46 -0
- package/es-modules/Data/Converters/GoogleSheetsConverter.js +135 -0
- package/es-modules/Data/Converters/GoogleSheetsConverterOptions.d.ts +52 -0
- package/es-modules/Data/Converters/HTMLTableConverter.d.ts +72 -0
- package/es-modules/Data/Converters/HTMLTableConverter.js +362 -0
- package/es-modules/Data/Converters/HTMLTableConverterOptions.d.ts +51 -0
- package/es-modules/Data/Converters/JSONConverter.d.ts +99 -0
- package/es-modules/Data/Converters/JSONConverter.js +239 -0
- package/es-modules/Data/Converters/JSONConverterOptions.d.ts +52 -0
- package/es-modules/Data/DataCursor.d.ts +176 -0
- package/es-modules/Data/DataCursor.js +379 -0
- package/es-modules/Data/DataEvent.d.ts +81 -0
- package/es-modules/Data/DataEvent.js +14 -0
- package/es-modules/Data/DataPool.d.ts +130 -0
- package/es-modules/Data/DataPool.js +257 -0
- package/es-modules/Data/DataPoolOptions.d.ts +66 -0
- package/es-modules/Data/DataTable.d.ts +563 -0
- package/es-modules/Data/DataTable.js +930 -0
- package/es-modules/Data/DataTableCore.d.ts +165 -0
- package/es-modules/Data/DataTableCore.js +316 -0
- package/es-modules/Data/DataTableOptions.d.ts +25 -0
- package/es-modules/Data/DataTableOptions.js +15 -0
- package/es-modules/Data/Formula/Formula.d.ts +21 -0
- package/es-modules/Data/Formula/Formula.js +54 -0
- package/es-modules/Data/Formula/FormulaParser.d.ts +31 -0
- package/es-modules/Data/Formula/FormulaParser.js +488 -0
- package/es-modules/Data/Formula/FormulaProcessor.d.ts +155 -0
- package/es-modules/Data/Formula/FormulaProcessor.js +529 -0
- package/es-modules/Data/Formula/FormulaTypes.d.ts +138 -0
- package/es-modules/Data/Formula/FormulaTypes.js +135 -0
- package/es-modules/Data/Formula/Functions/ABS.d.ts +19 -0
- package/es-modules/Data/Formula/Functions/ABS.js +67 -0
- package/es-modules/Data/Formula/Functions/AND.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/AND.js +59 -0
- package/es-modules/Data/Formula/Functions/AVERAGE.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/AVERAGE.js +74 -0
- package/es-modules/Data/Formula/Functions/AVERAGEA.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/AVERAGEA.js +90 -0
- package/es-modules/Data/Formula/Functions/COUNT.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/COUNT.js +65 -0
- package/es-modules/Data/Formula/Functions/COUNTA.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/COUNTA.js +71 -0
- package/es-modules/Data/Formula/Functions/IF.d.ts +21 -0
- package/es-modules/Data/Formula/Functions/IF.js +54 -0
- package/es-modules/Data/Formula/Functions/ISNA.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/ISNA.js +52 -0
- package/es-modules/Data/Formula/Functions/MAX.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/MAX.js +69 -0
- package/es-modules/Data/Formula/Functions/MEDIAN.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/MEDIAN.js +78 -0
- package/es-modules/Data/Formula/Functions/MIN.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/MIN.js +69 -0
- package/es-modules/Data/Formula/Functions/MOD.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/MOD.js +63 -0
- package/es-modules/Data/Formula/Functions/MODE.d.ts +41 -0
- package/es-modules/Data/Formula/Functions/MODE.js +149 -0
- package/es-modules/Data/Formula/Functions/NOT.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/NOT.js +60 -0
- package/es-modules/Data/Formula/Functions/OR.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/OR.js +62 -0
- package/es-modules/Data/Formula/Functions/PRODUCT.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/PRODUCT.js +68 -0
- package/es-modules/Data/Formula/Functions/SUM.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/SUM.js +65 -0
- package/es-modules/Data/Formula/Functions/XOR.d.ts +20 -0
- package/es-modules/Data/Formula/Functions/XOR.js +81 -0
- package/es-modules/Data/Modifiers/ChainModifier.d.ts +128 -0
- package/es-modules/Data/Modifiers/ChainModifier.js +231 -0
- package/es-modules/Data/Modifiers/ChainModifierOptions.d.ts +20 -0
- package/es-modules/Data/Modifiers/ChainModifierOptions.js +14 -0
- package/es-modules/Data/Modifiers/DataModifier.d.ts +117 -0
- package/es-modules/Data/Modifiers/DataModifier.js +202 -0
- package/es-modules/Data/Modifiers/DataModifierEvent.d.ts +28 -0
- package/es-modules/Data/Modifiers/DataModifierEvent.js +15 -0
- package/es-modules/Data/Modifiers/DataModifierOptions.d.ts +11 -0
- package/es-modules/Data/Modifiers/DataModifierOptions.js +15 -0
- package/es-modules/Data/Modifiers/DataModifierType.d.ts +44 -0
- package/es-modules/Data/Modifiers/FilterModifier.d.ts +53 -0
- package/es-modules/Data/Modifiers/FilterModifier.js +172 -0
- package/es-modules/Data/Modifiers/FilterModifierOptions.d.ts +110 -0
- package/es-modules/Data/Modifiers/FilterModifierOptions.js +14 -0
- package/es-modules/Data/Modifiers/InvertModifier.d.ts +48 -0
- package/es-modules/Data/Modifiers/InvertModifier.js +116 -0
- package/es-modules/Data/Modifiers/InvertModifierOptions.d.ts +11 -0
- package/es-modules/Data/Modifiers/InvertModifierOptions.js +15 -0
- package/es-modules/Data/Modifiers/MathModifier.d.ts +68 -0
- package/es-modules/Data/Modifiers/MathModifier.js +165 -0
- package/es-modules/Data/Modifiers/MathModifierOptions.d.ts +50 -0
- package/es-modules/Data/Modifiers/MathModifierOptions.js +14 -0
- package/es-modules/Data/Modifiers/RangeModifier.d.ts +46 -0
- package/es-modules/Data/Modifiers/RangeModifier.js +96 -0
- package/es-modules/Data/Modifiers/RangeModifierOptions.d.ts +22 -0
- package/es-modules/Data/Modifiers/RangeModifierOptions.js +15 -0
- package/es-modules/Data/Modifiers/SortModifier.d.ts +54 -0
- package/es-modules/Data/Modifiers/SortModifier.js +144 -0
- package/es-modules/Data/Modifiers/SortModifierOptions.d.ts +44 -0
- package/es-modules/Data/Modifiers/SortModifierOptions.js +14 -0
- package/es-modules/Grid/Core/Accessibility/A11yOptions.d.ts +148 -0
- package/es-modules/Grid/Core/Accessibility/A11yOptions.js +17 -0
- package/es-modules/Grid/Core/Accessibility/Accessibility.d.ts +115 -0
- package/es-modules/Grid/Core/Accessibility/Accessibility.js +231 -0
- package/es-modules/Grid/Core/Credits.d.ts +57 -0
- package/es-modules/Grid/Core/Credits.js +125 -0
- package/es-modules/Grid/Core/Defaults.d.ts +20 -0
- package/es-modules/Grid/Core/Defaults.js +148 -0
- package/es-modules/Grid/Core/Globals.d.ts +103 -0
- package/es-modules/Grid/Core/Globals.js +134 -0
- package/es-modules/Grid/Core/Grid.d.ts +295 -0
- package/es-modules/Grid/Core/Grid.js +730 -0
- package/es-modules/Grid/Core/GridUtils.d.ts +110 -0
- package/es-modules/Grid/Core/GridUtils.js +191 -0
- package/es-modules/Grid/Core/Options.d.ts +599 -0
- package/es-modules/Grid/Core/Options.js +16 -0
- package/es-modules/Grid/Core/Pagination/Icons.d.ts +7 -0
- package/es-modules/Grid/Core/Pagination/Icons.js +7 -0
- package/es-modules/Grid/Core/Pagination/Pagination.d.ts +278 -0
- package/es-modules/Grid/Core/Pagination/Pagination.js +842 -0
- package/es-modules/Grid/Core/Pagination/PaginationOptions.d.ts +228 -0
- package/es-modules/Grid/Core/Querying/FilteringController.d.ts +66 -0
- package/es-modules/Grid/Core/Querying/FilteringController.js +256 -0
- package/es-modules/Grid/Core/Querying/PaginationController.d.ts +50 -0
- package/es-modules/Grid/Core/Querying/PaginationController.js +101 -0
- package/es-modules/Grid/Core/Querying/QueryingController.d.ts +58 -0
- package/es-modules/Grid/Core/Querying/QueryingController.js +127 -0
- package/es-modules/Grid/Core/Querying/SortingController.d.ts +67 -0
- package/es-modules/Grid/Core/Querying/SortingController.js +136 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.d.ts +114 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js +351 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.d.ts +14 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.js +86 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.d.ts +19 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.js +80 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.d.ts +52 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.js +81 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnSorting.d.ts +56 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnSorting.js +170 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.d.ts +55 -0
- package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.js +182 -0
- package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.d.ts +87 -0
- package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.js +346 -0
- package/es-modules/Grid/Core/Table/Body/TableCell.d.ts +88 -0
- package/es-modules/Grid/Core/Table/Body/TableCell.js +231 -0
- package/es-modules/Grid/Core/Table/Body/TableRow.d.ts +79 -0
- package/es-modules/Grid/Core/Table/Body/TableRow.js +177 -0
- package/es-modules/Grid/Core/Table/Cell.d.ts +92 -0
- package/es-modules/Grid/Core/Table/Cell.js +223 -0
- package/es-modules/Grid/Core/Table/CellContent/CellContent.d.ts +30 -0
- package/es-modules/Grid/Core/Table/CellContent/CellContent.js +40 -0
- package/es-modules/Grid/Core/Table/CellContent/TextContent.d.ts +19 -0
- package/es-modules/Grid/Core/Table/CellContent/TextContent.js +98 -0
- package/es-modules/Grid/Core/Table/Column.d.ts +136 -0
- package/es-modules/Grid/Core/Table/Column.js +230 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.d.ts +7 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.js +62 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.d.ts +32 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.js +68 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.d.ts +7 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.js +53 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.d.ts +7 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js +63 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.d.ts +92 -0
- package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.js +194 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.d.ts +68 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js +187 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.d.ts +29 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.js +77 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.d.ts +13 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.js +79 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.d.ts +12 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.js +71 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuPopup.d.ts +12 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuPopup.js +66 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.d.ts +25 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.js +65 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.d.ts +12 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js +81 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.d.ts +12 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.js +80 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.d.ts +11 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.js +81 -0
- package/es-modules/Grid/Core/Table/Header/HeaderCell.d.ts +70 -0
- package/es-modules/Grid/Core/Table/Header/HeaderCell.js +225 -0
- package/es-modules/Grid/Core/Table/Header/HeaderRow.d.ts +53 -0
- package/es-modules/Grid/Core/Table/Header/HeaderRow.js +182 -0
- package/es-modules/Grid/Core/Table/Header/TableHeader.d.ts +65 -0
- package/es-modules/Grid/Core/Table/Header/TableHeader.js +159 -0
- package/es-modules/Grid/Core/Table/Row.d.ts +76 -0
- package/es-modules/Grid/Core/Table/Row.js +131 -0
- package/es-modules/Grid/Core/Table/Table.d.ts +181 -0
- package/es-modules/Grid/Core/Table/Table.js +399 -0
- package/es-modules/Grid/Core/UI/Button.d.ts +31 -0
- package/es-modules/Grid/Core/UI/Button.js +16 -0
- package/es-modules/Grid/Core/UI/ContextMenu.d.ts +38 -0
- package/es-modules/Grid/Core/UI/ContextMenu.js +132 -0
- package/es-modules/Grid/Core/UI/ContextMenuButton.d.ts +126 -0
- package/es-modules/Grid/Core/UI/ContextMenuButton.js +183 -0
- package/es-modules/Grid/Core/UI/Popup.d.ts +149 -0
- package/es-modules/Grid/Core/UI/Popup.js +271 -0
- package/es-modules/Grid/Core/UI/SvgIcons.d.ts +53 -0
- package/es-modules/Grid/Core/UI/SvgIcons.js +158 -0
- package/es-modules/Grid/Core/UI/Toolbar.d.ts +16 -0
- package/es-modules/Grid/Core/UI/Toolbar.js +16 -0
- package/es-modules/Grid/Core/UI/ToolbarButton.d.ts +135 -0
- package/es-modules/Grid/Core/UI/ToolbarButton.js +191 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditMode.d.ts +112 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditing.d.ts +80 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditing.js +211 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.d.ts +123 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js +198 -0
- package/es-modules/Grid/Pro/CellRendering/CellContentPro.d.ts +23 -0
- package/es-modules/Grid/Pro/CellRendering/CellContentPro.js +45 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderer.d.ts +50 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderer.js +41 -0
- package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.d.ts +18 -0
- package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.js +58 -0
- package/es-modules/Grid/Pro/CellRendering/CellRendererType.d.ts +48 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.d.ts +18 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js +79 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.d.ts +30 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.js +122 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.d.ts +12 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.js +39 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.d.ts +66 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.js +145 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.d.ts +12 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.js +38 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.d.ts +58 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js +158 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.d.ts +58 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.js +173 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.d.ts +28 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js +157 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.d.ts +58 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js +168 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.d.ts +13 -0
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.js +41 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.d.ts +50 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js +65 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.d.ts +37 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js +65 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRendererBase.d.ts +26 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRendererBase.js +16 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.d.ts +37 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js +64 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.d.ts +52 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js +64 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.d.ts +74 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js +66 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.d.ts +45 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js +89 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.d.ts +54 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js +65 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.d.ts +43 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js +74 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.d.ts +37 -0
- package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js +64 -0
- package/es-modules/Grid/Pro/ColumnTypes/ColumnDataType.d.ts +29 -0
- package/es-modules/Grid/Pro/ColumnTypes/Validator.d.ts +118 -0
- package/es-modules/Grid/Pro/ColumnTypes/Validator.js +270 -0
- package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.d.ts +32 -0
- package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js +63 -0
- package/es-modules/Grid/Pro/Credits/CreditsPro.d.ts +35 -0
- package/es-modules/Grid/Pro/Credits/CreditsPro.js +112 -0
- package/es-modules/Grid/Pro/Credits/CreditsProComposition.d.ts +28 -0
- package/es-modules/Grid/Pro/Credits/CreditsProComposition.js +61 -0
- package/es-modules/Grid/Pro/Export/Exporting.d.ts +68 -0
- package/es-modules/Grid/Pro/Export/Exporting.js +202 -0
- package/es-modules/Grid/Pro/Export/ExportingComposition.d.ts +68 -0
- package/es-modules/Grid/Pro/Export/ExportingComposition.js +55 -0
- package/es-modules/Grid/Pro/GridEvents.d.ts +119 -0
- package/es-modules/Grid/Pro/GridEvents.js +107 -0
- package/es-modules/Grid/Pro/Pagination/PaginationComposition.d.ts +75 -0
- package/es-modules/Grid/Pro/Pagination/PaginationComposition.js +76 -0
- package/es-modules/Grid/Pro/highcharts.d.ts +7 -0
- package/es-modules/Grid/index.d.ts +5 -0
- package/es-modules/Grid/index.js +19 -0
- package/es-modules/Shared/BaseForm.d.ts +49 -0
- package/es-modules/Shared/BaseForm.js +126 -0
- package/es-modules/Shared/DownloadURL.d.ts +85 -0
- package/es-modules/Shared/DownloadURL.js +198 -0
- package/es-modules/Shared/LangOptionsCore.d.ts +27 -0
- package/es-modules/Shared/TimeBase.d.ts +353 -0
- package/es-modules/Shared/TimeBase.js +830 -0
- package/es-modules/Shared/Types.d.ts +48 -0
- package/es-modules/masters/grid-pro.src.d.ts +99 -0
- package/es-modules/masters/grid-pro.src.js +129 -0
- package/grid-pro.d.ts +50 -0
- package/grid-pro.js +12 -0
- package/grid-pro.js.map +1 -0
- package/grid-pro.src.d.ts +50 -0
- package/grid-pro.src.js +26623 -0
- package/package.json +21 -0
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
/* *
|
|
2
|
+
*
|
|
3
|
+
* (c) 2009-2025 Øystein Moseng
|
|
4
|
+
*
|
|
5
|
+
* Accessibility component for chart legend.
|
|
6
|
+
*
|
|
7
|
+
* License: www.highcharts.com/license
|
|
8
|
+
*
|
|
9
|
+
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
10
|
+
*
|
|
11
|
+
* */
|
|
12
|
+
'use strict';
|
|
13
|
+
import A from '../../Core/Animation/AnimationUtilities.js';
|
|
14
|
+
const { animObject } = A;
|
|
15
|
+
import H from '../../Core/Globals.js';
|
|
16
|
+
const { doc } = H;
|
|
17
|
+
import Legend from '../../Core/Legend/Legend.js';
|
|
18
|
+
import U from '../../Core/Utilities.js';
|
|
19
|
+
const { addEvent, fireEvent, isNumber, pick, syncTimeout } = U;
|
|
20
|
+
import AccessibilityComponent from '../AccessibilityComponent.js';
|
|
21
|
+
import KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';
|
|
22
|
+
import CU from '../Utils/ChartUtilities.js';
|
|
23
|
+
const { getChartTitle } = CU;
|
|
24
|
+
import HU from '../Utils/HTMLUtilities.js';
|
|
25
|
+
const { stripHTMLTagsFromString: stripHTMLTags, addClass, removeClass } = HU;
|
|
26
|
+
/* *
|
|
27
|
+
*
|
|
28
|
+
* Functions
|
|
29
|
+
*
|
|
30
|
+
* */
|
|
31
|
+
/**
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
function scrollLegendToItem(legend, itemIx) {
|
|
35
|
+
const itemPage = (legend.allItems[itemIx].legendItem || {}).pageIx, curPage = legend.currentPage;
|
|
36
|
+
if (typeof itemPage !== 'undefined' && itemPage + 1 !== curPage) {
|
|
37
|
+
legend.scroll(1 + itemPage - curPage);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @private
|
|
42
|
+
*/
|
|
43
|
+
function shouldDoLegendA11y(chart) {
|
|
44
|
+
const items = chart.legend && chart.legend.allItems, legendA11yOptions = (chart.options.legend.accessibility || {}), unsupportedColorAxis = chart.colorAxis && chart.colorAxis.some((c) => !c.dataClasses || !c.dataClasses.length);
|
|
45
|
+
return !!(items && items.length &&
|
|
46
|
+
!unsupportedColorAxis &&
|
|
47
|
+
legendA11yOptions.enabled !== false);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @private
|
|
51
|
+
*/
|
|
52
|
+
function setLegendItemHoverState(hoverActive, item) {
|
|
53
|
+
const legendItem = item.legendItem || {};
|
|
54
|
+
item.setState(hoverActive ? 'hover' : '', true);
|
|
55
|
+
for (const key of ['group', 'label', 'symbol']) {
|
|
56
|
+
const svgElement = legendItem[key];
|
|
57
|
+
const element = svgElement && svgElement.element || svgElement;
|
|
58
|
+
if (element) {
|
|
59
|
+
fireEvent(element, hoverActive ? 'mouseover' : 'mouseout');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/* *
|
|
64
|
+
*
|
|
65
|
+
* Class
|
|
66
|
+
*
|
|
67
|
+
* */
|
|
68
|
+
/**
|
|
69
|
+
* The LegendComponent class
|
|
70
|
+
*
|
|
71
|
+
* @private
|
|
72
|
+
* @class
|
|
73
|
+
* @name Highcharts.LegendComponent
|
|
74
|
+
*/
|
|
75
|
+
class LegendComponent extends AccessibilityComponent {
|
|
76
|
+
constructor() {
|
|
77
|
+
/* *
|
|
78
|
+
*
|
|
79
|
+
* Properties
|
|
80
|
+
*
|
|
81
|
+
* */
|
|
82
|
+
super(...arguments);
|
|
83
|
+
this.highlightedLegendItemIx = NaN;
|
|
84
|
+
this.proxyGroup = null;
|
|
85
|
+
}
|
|
86
|
+
/* *
|
|
87
|
+
*
|
|
88
|
+
* Functions
|
|
89
|
+
*
|
|
90
|
+
* */
|
|
91
|
+
/**
|
|
92
|
+
* Init the component
|
|
93
|
+
* @private
|
|
94
|
+
*/
|
|
95
|
+
init() {
|
|
96
|
+
const component = this;
|
|
97
|
+
this.recreateProxies();
|
|
98
|
+
// Note: Chart could create legend dynamically, so events cannot be
|
|
99
|
+
// tied to the component's chart's current legend.
|
|
100
|
+
// @todo 1. attach component to created legends
|
|
101
|
+
// @todo 2. move listeners to composition and access `this.component`
|
|
102
|
+
this.addEvent(Legend, 'afterScroll', function () {
|
|
103
|
+
if (this.chart === component.chart) {
|
|
104
|
+
component.proxyProvider.updateGroupProxyElementPositions('legend');
|
|
105
|
+
component.updateLegendItemProxyVisibility();
|
|
106
|
+
if (component.highlightedLegendItemIx > -1) {
|
|
107
|
+
this.chart.highlightLegendItem(component.highlightedLegendItemIx);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
this.addEvent(Legend, 'afterPositionItem', function (e) {
|
|
112
|
+
if (this.chart === component.chart && this.chart.renderer) {
|
|
113
|
+
component.updateProxyPositionForItem(e.item);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
this.addEvent(Legend, 'afterRender', function () {
|
|
117
|
+
if (this.chart === component.chart &&
|
|
118
|
+
this.chart.renderer &&
|
|
119
|
+
component.recreateProxies()) {
|
|
120
|
+
syncTimeout(() => component.proxyProvider
|
|
121
|
+
.updateGroupProxyElementPositions('legend'), animObject(pick(this.chart.renderer.globalAnimation, true)).duration);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Update visibility of legend items when using paged legend
|
|
127
|
+
* @private
|
|
128
|
+
*/
|
|
129
|
+
updateLegendItemProxyVisibility() {
|
|
130
|
+
const chart = this.chart;
|
|
131
|
+
const legend = chart.legend;
|
|
132
|
+
const items = legend.allItems || [];
|
|
133
|
+
const curPage = legend.currentPage || 1;
|
|
134
|
+
const clipHeight = legend.clipHeight || 0;
|
|
135
|
+
let legendItem;
|
|
136
|
+
items.forEach((item) => {
|
|
137
|
+
if (item.a11yProxyElement) {
|
|
138
|
+
const hasPages = legend.pages && legend.pages.length;
|
|
139
|
+
const proxyEl = item.a11yProxyElement.element;
|
|
140
|
+
let hide = false;
|
|
141
|
+
legendItem = item.legendItem || {};
|
|
142
|
+
if (hasPages) {
|
|
143
|
+
const itemPage = legendItem.pageIx || 0;
|
|
144
|
+
const y = legendItem.y || 0;
|
|
145
|
+
const h = legendItem.label ?
|
|
146
|
+
Math.round(legendItem.label.getBBox().height) :
|
|
147
|
+
0;
|
|
148
|
+
hide = y + h - legend.pages[itemPage] > clipHeight ||
|
|
149
|
+
itemPage !== curPage - 1;
|
|
150
|
+
}
|
|
151
|
+
if (hide) {
|
|
152
|
+
if (chart.styledMode) {
|
|
153
|
+
addClass(proxyEl, 'highcharts-a11y-invisible');
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
proxyEl.style.visibility = 'hidden';
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
removeClass(proxyEl, 'highcharts-a11y-invisible');
|
|
161
|
+
proxyEl.style.visibility = '';
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* @private
|
|
168
|
+
*/
|
|
169
|
+
onChartRender() {
|
|
170
|
+
if (!shouldDoLegendA11y(this.chart)) {
|
|
171
|
+
this.removeProxies();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* @private
|
|
176
|
+
*/
|
|
177
|
+
highlightAdjacentLegendPage(direction) {
|
|
178
|
+
const chart = this.chart;
|
|
179
|
+
const legend = chart.legend;
|
|
180
|
+
const curPageIx = legend.currentPage || 1;
|
|
181
|
+
const newPageIx = curPageIx + direction;
|
|
182
|
+
const pages = legend.pages || [];
|
|
183
|
+
if (newPageIx > 0 && newPageIx <= pages.length) {
|
|
184
|
+
let i = 0, res;
|
|
185
|
+
for (const item of legend.allItems) {
|
|
186
|
+
if (((item.legendItem || {}).pageIx || 0) + 1 === newPageIx) {
|
|
187
|
+
res = chart.highlightLegendItem(i);
|
|
188
|
+
if (res) {
|
|
189
|
+
this.highlightedLegendItemIx = i;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
++i;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* @private
|
|
198
|
+
*/
|
|
199
|
+
updateProxyPositionForItem(item) {
|
|
200
|
+
if (item.a11yProxyElement) {
|
|
201
|
+
item.a11yProxyElement.refreshPosition();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Returns false if legend a11y is disabled and proxies were not created,
|
|
206
|
+
* true otherwise.
|
|
207
|
+
* @private
|
|
208
|
+
*/
|
|
209
|
+
recreateProxies() {
|
|
210
|
+
const focusedElement = doc.activeElement;
|
|
211
|
+
const proxyGroup = this.proxyGroup;
|
|
212
|
+
const shouldRestoreFocus = focusedElement && proxyGroup &&
|
|
213
|
+
proxyGroup.contains(focusedElement);
|
|
214
|
+
this.removeProxies();
|
|
215
|
+
if (shouldDoLegendA11y(this.chart)) {
|
|
216
|
+
this.addLegendProxyGroup();
|
|
217
|
+
this.proxyLegendItems();
|
|
218
|
+
this.updateLegendItemProxyVisibility();
|
|
219
|
+
this.updateLegendTitle();
|
|
220
|
+
if (shouldRestoreFocus) {
|
|
221
|
+
this.chart.highlightLegendItem(this.highlightedLegendItemIx);
|
|
222
|
+
}
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* @private
|
|
229
|
+
*/
|
|
230
|
+
removeProxies() {
|
|
231
|
+
this.proxyProvider.removeGroup('legend');
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* @private
|
|
235
|
+
*/
|
|
236
|
+
updateLegendTitle() {
|
|
237
|
+
const chart = this.chart;
|
|
238
|
+
const legendTitle = stripHTMLTags((chart.legend &&
|
|
239
|
+
chart.legend.options.title &&
|
|
240
|
+
chart.legend.options.title.text ||
|
|
241
|
+
'').replace(/<br ?\/?>/g, ' '), chart.renderer.forExport);
|
|
242
|
+
const legendLabel = chart.langFormat('accessibility.legend.legendLabel' + (legendTitle ? '' : 'NoTitle'), {
|
|
243
|
+
chart,
|
|
244
|
+
legendTitle,
|
|
245
|
+
chartTitle: getChartTitle(chart)
|
|
246
|
+
});
|
|
247
|
+
this.proxyProvider.updateGroupAttrs('legend', {
|
|
248
|
+
'aria-label': legendLabel
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* @private
|
|
253
|
+
*/
|
|
254
|
+
addLegendProxyGroup() {
|
|
255
|
+
const a11yOptions = this.chart.options.accessibility;
|
|
256
|
+
const groupRole = a11yOptions.landmarkVerbosity === 'all' ?
|
|
257
|
+
'region' : null;
|
|
258
|
+
this.proxyGroup = this.proxyProvider.addGroup('legend', 'ul', {
|
|
259
|
+
// Filled by updateLegendTitle, to keep up to date without
|
|
260
|
+
// recreating group
|
|
261
|
+
'aria-label': '_placeholder_',
|
|
262
|
+
role: groupRole
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* @private
|
|
267
|
+
*/
|
|
268
|
+
proxyLegendItems() {
|
|
269
|
+
const component = this, items = (this.chart.legend || {}).allItems || [];
|
|
270
|
+
let legendItem;
|
|
271
|
+
items.forEach((item) => {
|
|
272
|
+
legendItem = item.legendItem || {};
|
|
273
|
+
if (legendItem.label && legendItem.label.element) {
|
|
274
|
+
component.proxyLegendItem(item);
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* @private
|
|
280
|
+
* @param {Highcharts.BubbleLegendItem|Point|Highcharts.Series} item
|
|
281
|
+
*/
|
|
282
|
+
proxyLegendItem(item) {
|
|
283
|
+
const legendItem = item.legendItem || {};
|
|
284
|
+
const legendItemLabel = item.legendItem?.label;
|
|
285
|
+
const legendLabelEl = legendItemLabel?.element;
|
|
286
|
+
const ellipsis = Boolean(legendItem.label?.styles?.textOverflow === 'ellipsis');
|
|
287
|
+
if (!legendItem.label || !legendItem.group) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
const itemLabel = this.chart.langFormat('accessibility.legend.legendItem', {
|
|
291
|
+
chart: this.chart,
|
|
292
|
+
itemName: stripHTMLTags(item.name, this.chart.renderer.forExport),
|
|
293
|
+
item
|
|
294
|
+
});
|
|
295
|
+
const attribs = {
|
|
296
|
+
tabindex: -1,
|
|
297
|
+
'aria-pressed': item.visible,
|
|
298
|
+
'aria-label': itemLabel,
|
|
299
|
+
title: ''
|
|
300
|
+
};
|
|
301
|
+
// Check if label contains an ellipsis character (\u2026) #22397
|
|
302
|
+
if (ellipsis &&
|
|
303
|
+
(legendLabelEl.textContent || '').indexOf('\u2026') !== -1) {
|
|
304
|
+
attribs.title = legendItemLabel?.textStr;
|
|
305
|
+
}
|
|
306
|
+
// Considers useHTML
|
|
307
|
+
const proxyPositioningElement = legendItem.group.div ?
|
|
308
|
+
legendItem.label :
|
|
309
|
+
legendItem.group;
|
|
310
|
+
item.a11yProxyElement = this.proxyProvider.addProxyElement('legend', {
|
|
311
|
+
click: legendItem.label,
|
|
312
|
+
visual: proxyPositioningElement.element
|
|
313
|
+
}, 'button', attribs);
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Get keyboard navigation handler for this component.
|
|
317
|
+
* @private
|
|
318
|
+
*/
|
|
319
|
+
getKeyboardNavigation() {
|
|
320
|
+
const keys = this.keyCodes, component = this, chart = this.chart;
|
|
321
|
+
return new KeyboardNavigationHandler(chart, {
|
|
322
|
+
keyCodeMap: [
|
|
323
|
+
[
|
|
324
|
+
[keys.left, keys.right, keys.up, keys.down],
|
|
325
|
+
function (keyCode) {
|
|
326
|
+
return component.onKbdArrowKey(this, keyCode);
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
[
|
|
330
|
+
[keys.enter, keys.space],
|
|
331
|
+
function () {
|
|
332
|
+
return component.onKbdClick(this);
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
[
|
|
336
|
+
[keys.pageDown, keys.pageUp],
|
|
337
|
+
function (keyCode) {
|
|
338
|
+
const direction = keyCode === keys.pageDown ? 1 : -1;
|
|
339
|
+
component.highlightAdjacentLegendPage(direction);
|
|
340
|
+
return this.response.success;
|
|
341
|
+
}
|
|
342
|
+
]
|
|
343
|
+
],
|
|
344
|
+
validate: function () {
|
|
345
|
+
return component.shouldHaveLegendNavigation();
|
|
346
|
+
},
|
|
347
|
+
init: function () {
|
|
348
|
+
chart.highlightLegendItem(0);
|
|
349
|
+
component.highlightedLegendItemIx = 0;
|
|
350
|
+
},
|
|
351
|
+
terminate: function () {
|
|
352
|
+
component.highlightedLegendItemIx = -1;
|
|
353
|
+
chart.legend.allItems.forEach((item) => setLegendItemHoverState(false, item));
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Arrow key navigation
|
|
359
|
+
* @private
|
|
360
|
+
*/
|
|
361
|
+
onKbdArrowKey(keyboardNavigationHandler, key) {
|
|
362
|
+
const { keyCodes: { left, up }, highlightedLegendItemIx, chart } = this, numItems = chart.legend.allItems.length, wrapAround = chart.options.accessibility
|
|
363
|
+
.keyboardNavigation.wrapAround, direction = (key === left || key === up) ? -1 : 1, res = chart.highlightLegendItem(highlightedLegendItemIx + direction);
|
|
364
|
+
if (res) {
|
|
365
|
+
this.highlightedLegendItemIx += direction;
|
|
366
|
+
}
|
|
367
|
+
else if (wrapAround && numItems > 1) {
|
|
368
|
+
this.highlightedLegendItemIx = direction > 0 ?
|
|
369
|
+
0 : numItems - 1;
|
|
370
|
+
chart.highlightLegendItem(this.highlightedLegendItemIx);
|
|
371
|
+
}
|
|
372
|
+
return keyboardNavigationHandler.response.success;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* @private
|
|
376
|
+
* @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler
|
|
377
|
+
* @return {number} Response code
|
|
378
|
+
*/
|
|
379
|
+
onKbdClick(keyboardNavigationHandler) {
|
|
380
|
+
const legendItem = this.chart.legend.allItems[this.highlightedLegendItemIx];
|
|
381
|
+
if (legendItem && legendItem.a11yProxyElement) {
|
|
382
|
+
legendItem.a11yProxyElement.click();
|
|
383
|
+
}
|
|
384
|
+
return keyboardNavigationHandler.response.success;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* @private
|
|
388
|
+
*/
|
|
389
|
+
shouldHaveLegendNavigation() {
|
|
390
|
+
if (!shouldDoLegendA11y(this.chart)) {
|
|
391
|
+
return false;
|
|
392
|
+
}
|
|
393
|
+
const chart = this.chart, legendOptions = chart.options.legend || {}, legendA11yOptions = (legendOptions.accessibility || {});
|
|
394
|
+
return !!(chart.legend.display &&
|
|
395
|
+
legendA11yOptions.keyboardNavigation &&
|
|
396
|
+
legendA11yOptions.keyboardNavigation.enabled);
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Clean up
|
|
400
|
+
* @private
|
|
401
|
+
*/
|
|
402
|
+
destroy() {
|
|
403
|
+
this.removeProxies();
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
/* *
|
|
407
|
+
*
|
|
408
|
+
* Class Namespace
|
|
409
|
+
*
|
|
410
|
+
* */
|
|
411
|
+
(function (LegendComponent) {
|
|
412
|
+
/* *
|
|
413
|
+
*
|
|
414
|
+
* Declarations
|
|
415
|
+
*
|
|
416
|
+
* */
|
|
417
|
+
/* *
|
|
418
|
+
*
|
|
419
|
+
* Functions
|
|
420
|
+
*
|
|
421
|
+
* */
|
|
422
|
+
/**
|
|
423
|
+
* Highlight legend item by index.
|
|
424
|
+
* @private
|
|
425
|
+
*/
|
|
426
|
+
function chartHighlightLegendItem(ix) {
|
|
427
|
+
const items = this.legend.allItems;
|
|
428
|
+
const oldIx = this.accessibility &&
|
|
429
|
+
this.accessibility.components.legend.highlightedLegendItemIx;
|
|
430
|
+
const itemToHighlight = items[ix], legendItem = itemToHighlight?.legendItem || {};
|
|
431
|
+
if (itemToHighlight) {
|
|
432
|
+
if (isNumber(oldIx) && items[oldIx]) {
|
|
433
|
+
setLegendItemHoverState(false, items[oldIx]);
|
|
434
|
+
}
|
|
435
|
+
scrollLegendToItem(this.legend, ix);
|
|
436
|
+
const legendItemProp = legendItem.label;
|
|
437
|
+
const proxyBtn = itemToHighlight.a11yProxyElement &&
|
|
438
|
+
itemToHighlight.a11yProxyElement.innerElement;
|
|
439
|
+
if (legendItemProp && legendItemProp.element && proxyBtn) {
|
|
440
|
+
this.setFocusToElement(legendItemProp, proxyBtn);
|
|
441
|
+
}
|
|
442
|
+
setLegendItemHoverState(true, itemToHighlight);
|
|
443
|
+
return true;
|
|
444
|
+
}
|
|
445
|
+
return false;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* @private
|
|
449
|
+
*/
|
|
450
|
+
function compose(ChartClass, LegendClass) {
|
|
451
|
+
const chartProto = ChartClass.prototype;
|
|
452
|
+
if (!chartProto.highlightLegendItem) {
|
|
453
|
+
chartProto.highlightLegendItem = chartHighlightLegendItem;
|
|
454
|
+
addEvent(LegendClass, 'afterColorizeItem', legendOnAfterColorizeItem);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
LegendComponent.compose = compose;
|
|
458
|
+
/**
|
|
459
|
+
* Keep track of pressed state for legend items.
|
|
460
|
+
* @private
|
|
461
|
+
*/
|
|
462
|
+
function legendOnAfterColorizeItem(e) {
|
|
463
|
+
const chart = this.chart, a11yOptions = chart.options.accessibility, legendItem = e.item;
|
|
464
|
+
if (a11yOptions.enabled && legendItem && legendItem.a11yProxyElement) {
|
|
465
|
+
legendItem.a11yProxyElement.innerElement.setAttribute('aria-pressed', e.visible ? 'true' : 'false');
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
})(LegendComponent || (LegendComponent = {}));
|
|
469
|
+
/* *
|
|
470
|
+
*
|
|
471
|
+
* Default Export
|
|
472
|
+
*
|
|
473
|
+
* */
|
|
474
|
+
export default LegendComponent;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type Accessibility from '../Accessibility';
|
|
2
|
+
import type ProxyElement from '../ProxyElement';
|
|
3
|
+
import Chart from '../../Core/Chart/Chart.js';
|
|
4
|
+
import AccessibilityComponent from '../AccessibilityComponent.js';
|
|
5
|
+
import KeyboardNavigationHandler from '../KeyboardNavigationHandler.js';
|
|
6
|
+
/**
|
|
7
|
+
* The MenuComponent class
|
|
8
|
+
*
|
|
9
|
+
* @private
|
|
10
|
+
* @class
|
|
11
|
+
* @name Highcharts.MenuComponent
|
|
12
|
+
*/
|
|
13
|
+
declare class MenuComponent extends AccessibilityComponent {
|
|
14
|
+
exportButtonProxy?: ProxyElement;
|
|
15
|
+
/**
|
|
16
|
+
* Init the component
|
|
17
|
+
*/
|
|
18
|
+
init(): void;
|
|
19
|
+
/**
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
onMenuHidden(): void;
|
|
23
|
+
/**
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
onMenuShown(): void;
|
|
27
|
+
/**
|
|
28
|
+
* @private
|
|
29
|
+
* @param {string} stateStr
|
|
30
|
+
*/
|
|
31
|
+
setExportButtonExpandedState(stateStr: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Called on each render of the chart. We need to update positioning of the
|
|
34
|
+
* proxy overlay.
|
|
35
|
+
*/
|
|
36
|
+
onChartRender(): void;
|
|
37
|
+
/**
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
proxyMenuButton(): void;
|
|
41
|
+
/**
|
|
42
|
+
* @private
|
|
43
|
+
*/
|
|
44
|
+
createProxyGroup(): void;
|
|
45
|
+
/**
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
addAccessibleContextMenuAttribs(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Get keyboard navigation handler for this component.
|
|
51
|
+
* @private
|
|
52
|
+
*/
|
|
53
|
+
getKeyboardNavigation(): KeyboardNavigationHandler;
|
|
54
|
+
/**
|
|
55
|
+
* @private
|
|
56
|
+
* @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler
|
|
57
|
+
* @return {number} Response code
|
|
58
|
+
*/
|
|
59
|
+
onKbdPrevious(keyboardNavigationHandler: KeyboardNavigationHandler): number;
|
|
60
|
+
/**
|
|
61
|
+
* @private
|
|
62
|
+
* @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler
|
|
63
|
+
* @return {number} Response code
|
|
64
|
+
*/
|
|
65
|
+
onKbdNext(keyboardNavigationHandler: KeyboardNavigationHandler): number;
|
|
66
|
+
/**
|
|
67
|
+
* @private
|
|
68
|
+
* @param {Highcharts.KeyboardNavigationHandler} keyboardNavigationHandler
|
|
69
|
+
* @return {number} Response code
|
|
70
|
+
*/
|
|
71
|
+
onKbdClick(keyboardNavigationHandler: KeyboardNavigationHandler): number;
|
|
72
|
+
}
|
|
73
|
+
interface MenuComponent {
|
|
74
|
+
chart: MenuComponent.ChartComposition;
|
|
75
|
+
}
|
|
76
|
+
declare namespace MenuComponent {
|
|
77
|
+
class ChartComposition extends Accessibility.ChartComposition {
|
|
78
|
+
highlightedExportItemIx?: number;
|
|
79
|
+
/** @requires modules/accessibility */
|
|
80
|
+
hideExportMenu(): void;
|
|
81
|
+
/** @requires modules/accessibility */
|
|
82
|
+
highlightExportItem(ix: number): (boolean | undefined);
|
|
83
|
+
/** @requires modules/accessibility */
|
|
84
|
+
highlightLastExportItem(): boolean;
|
|
85
|
+
/** @requires modules/accessibility */
|
|
86
|
+
showExportMenu(): void;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* @private
|
|
90
|
+
*/
|
|
91
|
+
function compose(ChartClass: typeof Chart): void;
|
|
92
|
+
}
|
|
93
|
+
export default MenuComponent;
|