@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,108 @@
|
|
|
1
|
+
import type { DOMElementType, HTMLDOMElement } from '../../Core/Renderer/DOMElementType';
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* @param {Highcharts.HTMLDOMElement} el
|
|
5
|
+
* @param {string} className
|
|
6
|
+
* @return {void}
|
|
7
|
+
*/
|
|
8
|
+
declare function addClass(el: HTMLDOMElement, className: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
* @param {Highcharts.HTMLDOMElement} el
|
|
12
|
+
* @param {string} className
|
|
13
|
+
* @return {void}
|
|
14
|
+
*/
|
|
15
|
+
declare function removeClass(el: HTMLDOMElement, className: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* Utility function to clone a mouse event for re-dispatching.
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
declare function cloneMouseEvent(e: MouseEvent): MouseEvent;
|
|
21
|
+
/**
|
|
22
|
+
* Utility function to clone a touch event for re-dispatching.
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
declare function cloneTouchEvent(e: TouchEvent): TouchEvent;
|
|
26
|
+
/**
|
|
27
|
+
* @private
|
|
28
|
+
*/
|
|
29
|
+
declare function escapeStringForHTML(str: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Get an element by ID
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
declare function getElement(id: string): (DOMElementType | null);
|
|
35
|
+
/**
|
|
36
|
+
* Get a fake mouse event of a given type. If relatedTarget is not given,
|
|
37
|
+
* it will point to simulatedEventTarget, as an indicator that the event
|
|
38
|
+
* is fake.
|
|
39
|
+
* @private
|
|
40
|
+
*/
|
|
41
|
+
declare function getFakeMouseEvent(type: string, position?: {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
}, relatedTarget?: EventTarget): MouseEvent;
|
|
45
|
+
/**
|
|
46
|
+
* Get an appropriate heading level for an element. Corresponds to the
|
|
47
|
+
* heading level below the previous heading in the DOM.
|
|
48
|
+
*
|
|
49
|
+
* Note: Only detects previous headings in the DOM that are siblings,
|
|
50
|
+
* ancestors, or previous siblings of ancestors. Headings that are nested below
|
|
51
|
+
* siblings of ancestors (cousins et.al) are not picked up. This is because it
|
|
52
|
+
* is ambiguous whether or not the nesting is for layout purposes or indicates a
|
|
53
|
+
* separate section.
|
|
54
|
+
*
|
|
55
|
+
* @private
|
|
56
|
+
* @param {Highcharts.HTMLDOMElement} [element]
|
|
57
|
+
* @return {string} The heading tag name (h1, h2 etc).
|
|
58
|
+
* If no nearest heading is found, "p" is returned.
|
|
59
|
+
*/
|
|
60
|
+
declare function getHeadingTagNameForElement(element: HTMLDOMElement): string;
|
|
61
|
+
/**
|
|
62
|
+
* Remove an element from the DOM.
|
|
63
|
+
* @private
|
|
64
|
+
* @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} [element]
|
|
65
|
+
* @return {void}
|
|
66
|
+
*/
|
|
67
|
+
declare function removeElement(element?: DOMElementType): void;
|
|
68
|
+
/**
|
|
69
|
+
* Remove all child nodes from an element.
|
|
70
|
+
* @private
|
|
71
|
+
* @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} [element]
|
|
72
|
+
* @return {void}
|
|
73
|
+
*/
|
|
74
|
+
declare function removeChildNodes(element: DOMElementType): void;
|
|
75
|
+
/**
|
|
76
|
+
* Utility function. Reverses child nodes of a DOM element.
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
declare function reverseChildNodes(node: DOMElementType): void;
|
|
80
|
+
/**
|
|
81
|
+
* Used for aria-label attributes, painting on a canvas will fail if the
|
|
82
|
+
* text contains tags.
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
declare function stripHTMLTagsFromString(str: string, isForExport?: boolean): string;
|
|
86
|
+
/**
|
|
87
|
+
* Utility function for hiding an element visually, but still keeping it
|
|
88
|
+
* available to screen reader users.
|
|
89
|
+
* @private
|
|
90
|
+
*/
|
|
91
|
+
declare function visuallyHideElement(element: HTMLDOMElement): void;
|
|
92
|
+
declare const HTMLUtilities: {
|
|
93
|
+
addClass: typeof addClass;
|
|
94
|
+
cloneMouseEvent: typeof cloneMouseEvent;
|
|
95
|
+
cloneTouchEvent: typeof cloneTouchEvent;
|
|
96
|
+
escapeStringForHTML: typeof escapeStringForHTML;
|
|
97
|
+
getElement: typeof getElement;
|
|
98
|
+
getFakeMouseEvent: typeof getFakeMouseEvent;
|
|
99
|
+
getHeadingTagNameForElement: typeof getHeadingTagNameForElement;
|
|
100
|
+
removeChildNodes: typeof removeChildNodes;
|
|
101
|
+
removeClass: typeof removeClass;
|
|
102
|
+
removeElement: typeof removeElement;
|
|
103
|
+
reverseChildNodes: typeof reverseChildNodes;
|
|
104
|
+
simulatedEventTarget: EventTarget;
|
|
105
|
+
stripHTMLTagsFromString: typeof stripHTMLTagsFromString;
|
|
106
|
+
visuallyHideElement: typeof visuallyHideElement;
|
|
107
|
+
};
|
|
108
|
+
export default HTMLUtilities;
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
/* *
|
|
2
|
+
*
|
|
3
|
+
* (c) 2009-2025 Øystein Moseng
|
|
4
|
+
*
|
|
5
|
+
* Utility functions for accessibility module.
|
|
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 H from '../../Core/Globals.js';
|
|
14
|
+
const { doc, win } = H;
|
|
15
|
+
import U from '../../Core/Utilities.js';
|
|
16
|
+
const { css } = U;
|
|
17
|
+
/* *
|
|
18
|
+
*
|
|
19
|
+
* Constants
|
|
20
|
+
*
|
|
21
|
+
* */
|
|
22
|
+
const simulatedEventTarget = win.EventTarget && new win.EventTarget() || 'none';
|
|
23
|
+
/* *
|
|
24
|
+
*
|
|
25
|
+
* Functions
|
|
26
|
+
*
|
|
27
|
+
* */
|
|
28
|
+
/* eslint-disable valid-jsdoc */
|
|
29
|
+
/**
|
|
30
|
+
* @private
|
|
31
|
+
* @param {Highcharts.HTMLDOMElement} el
|
|
32
|
+
* @param {string} className
|
|
33
|
+
* @return {void}
|
|
34
|
+
*/
|
|
35
|
+
function addClass(el, className) {
|
|
36
|
+
if (el.classList) {
|
|
37
|
+
el.classList.add(className);
|
|
38
|
+
}
|
|
39
|
+
else if (el.className.indexOf(className) < 0) {
|
|
40
|
+
// Note: Dumb check for class name exists, should be fine for practical
|
|
41
|
+
// use cases, but will return false positives if the element has a class
|
|
42
|
+
// that contains the className.
|
|
43
|
+
el.className += ' ' + className;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @private
|
|
48
|
+
* @param {Highcharts.HTMLDOMElement} el
|
|
49
|
+
* @param {string} className
|
|
50
|
+
* @return {void}
|
|
51
|
+
*/
|
|
52
|
+
function removeClass(el, className) {
|
|
53
|
+
if (el.classList) {
|
|
54
|
+
el.classList.remove(className);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
// Note: Dumb logic that will break if the element has a class name that
|
|
58
|
+
// consists of className plus something else.
|
|
59
|
+
el.className = el.className.replace(new RegExp(className, 'g'), '');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Utility function to clone a mouse event for re-dispatching.
|
|
64
|
+
* @private
|
|
65
|
+
*/
|
|
66
|
+
function cloneMouseEvent(e) {
|
|
67
|
+
if (typeof win.MouseEvent === 'function') {
|
|
68
|
+
return new win.MouseEvent(e.type, e);
|
|
69
|
+
}
|
|
70
|
+
// No MouseEvent support, try using initMouseEvent
|
|
71
|
+
if (doc?.createEvent) {
|
|
72
|
+
const evt = doc.createEvent('MouseEvent');
|
|
73
|
+
if (evt.initMouseEvent) {
|
|
74
|
+
evt.initMouseEvent(e.type, e.bubbles, // #10561, #12161
|
|
75
|
+
e.cancelable, e.view || win, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
|
|
76
|
+
return evt;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return getFakeMouseEvent(e.type);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Utility function to clone a touch event for re-dispatching.
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
function cloneTouchEvent(e) {
|
|
86
|
+
const touchListToTouchArray = (l) => {
|
|
87
|
+
const touchArray = [];
|
|
88
|
+
for (let i = 0; i < l.length; ++i) {
|
|
89
|
+
const item = l.item(i);
|
|
90
|
+
if (item) {
|
|
91
|
+
touchArray.push(item);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return touchArray;
|
|
95
|
+
};
|
|
96
|
+
if (typeof win.TouchEvent === 'function') {
|
|
97
|
+
const newEvent = new win.TouchEvent(e.type, {
|
|
98
|
+
touches: touchListToTouchArray(e.touches),
|
|
99
|
+
targetTouches: touchListToTouchArray(e.targetTouches),
|
|
100
|
+
changedTouches: touchListToTouchArray(e.changedTouches),
|
|
101
|
+
ctrlKey: e.ctrlKey,
|
|
102
|
+
shiftKey: e.shiftKey,
|
|
103
|
+
altKey: e.altKey,
|
|
104
|
+
metaKey: e.metaKey,
|
|
105
|
+
bubbles: e.bubbles,
|
|
106
|
+
cancelable: e.cancelable,
|
|
107
|
+
composed: e.composed,
|
|
108
|
+
detail: e.detail,
|
|
109
|
+
view: e.view
|
|
110
|
+
});
|
|
111
|
+
if (e.defaultPrevented) {
|
|
112
|
+
newEvent.preventDefault();
|
|
113
|
+
}
|
|
114
|
+
return newEvent;
|
|
115
|
+
}
|
|
116
|
+
const fakeEvt = cloneMouseEvent(e);
|
|
117
|
+
fakeEvt.touches = e.touches;
|
|
118
|
+
fakeEvt.changedTouches = e.changedTouches;
|
|
119
|
+
fakeEvt.targetTouches = e.targetTouches;
|
|
120
|
+
return fakeEvt;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* @private
|
|
124
|
+
*/
|
|
125
|
+
function escapeStringForHTML(str) {
|
|
126
|
+
return str
|
|
127
|
+
.replace(/&/g, '&')
|
|
128
|
+
.replace(/</g, '<')
|
|
129
|
+
.replace(/>/g, '>')
|
|
130
|
+
.replace(/"/g, '"')
|
|
131
|
+
.replace(/'/g, ''')
|
|
132
|
+
.replace(/\//g, '/');
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Get an element by ID
|
|
136
|
+
* @private
|
|
137
|
+
*/
|
|
138
|
+
function getElement(id) {
|
|
139
|
+
return doc.getElementById(id);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Get a fake mouse event of a given type. If relatedTarget is not given,
|
|
143
|
+
* it will point to simulatedEventTarget, as an indicator that the event
|
|
144
|
+
* is fake.
|
|
145
|
+
* @private
|
|
146
|
+
*/
|
|
147
|
+
function getFakeMouseEvent(type, position, relatedTarget) {
|
|
148
|
+
const pos = position || {
|
|
149
|
+
x: 0,
|
|
150
|
+
y: 0
|
|
151
|
+
};
|
|
152
|
+
if (typeof win.MouseEvent === 'function') {
|
|
153
|
+
return new win.MouseEvent(type, {
|
|
154
|
+
bubbles: true,
|
|
155
|
+
cancelable: true,
|
|
156
|
+
composed: true,
|
|
157
|
+
button: 0,
|
|
158
|
+
buttons: 1,
|
|
159
|
+
relatedTarget: relatedTarget || simulatedEventTarget,
|
|
160
|
+
view: win,
|
|
161
|
+
detail: type === 'click' ? 1 : 0,
|
|
162
|
+
screenX: pos.x,
|
|
163
|
+
screenY: pos.y,
|
|
164
|
+
clientX: pos.x,
|
|
165
|
+
clientY: pos.y
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
// No MouseEvent support, try using initMouseEvent
|
|
169
|
+
if (doc?.createEvent) {
|
|
170
|
+
const evt = doc.createEvent('MouseEvent');
|
|
171
|
+
if (evt.initMouseEvent) {
|
|
172
|
+
evt.initMouseEvent(type, true, // Bubble
|
|
173
|
+
true, // Cancel
|
|
174
|
+
win, // View
|
|
175
|
+
type === 'click' ? 1 : 0, // Detail
|
|
176
|
+
// Coords
|
|
177
|
+
pos.x, pos.y, pos.x, pos.y,
|
|
178
|
+
// Pressed keys
|
|
179
|
+
false, false, false, false, 0, // Button
|
|
180
|
+
null // Related target
|
|
181
|
+
);
|
|
182
|
+
return evt;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return { type: type };
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Get an appropriate heading level for an element. Corresponds to the
|
|
189
|
+
* heading level below the previous heading in the DOM.
|
|
190
|
+
*
|
|
191
|
+
* Note: Only detects previous headings in the DOM that are siblings,
|
|
192
|
+
* ancestors, or previous siblings of ancestors. Headings that are nested below
|
|
193
|
+
* siblings of ancestors (cousins et.al) are not picked up. This is because it
|
|
194
|
+
* is ambiguous whether or not the nesting is for layout purposes or indicates a
|
|
195
|
+
* separate section.
|
|
196
|
+
*
|
|
197
|
+
* @private
|
|
198
|
+
* @param {Highcharts.HTMLDOMElement} [element]
|
|
199
|
+
* @return {string} The heading tag name (h1, h2 etc).
|
|
200
|
+
* If no nearest heading is found, "p" is returned.
|
|
201
|
+
*/
|
|
202
|
+
function getHeadingTagNameForElement(element) {
|
|
203
|
+
const getIncreasedHeadingLevel = (tagName) => {
|
|
204
|
+
const headingLevel = parseInt(tagName.slice(1), 10), newLevel = Math.min(6, headingLevel + 1);
|
|
205
|
+
return 'h' + newLevel;
|
|
206
|
+
};
|
|
207
|
+
const isHeading = (tagName) => /^H[1-6]$/i.test(tagName);
|
|
208
|
+
const getPreviousSiblingsHeading = (el) => {
|
|
209
|
+
let sibling = el;
|
|
210
|
+
while (sibling = sibling.previousSibling) { // eslint-disable-line
|
|
211
|
+
const tagName = sibling.tagName || '';
|
|
212
|
+
if (isHeading(tagName)) {
|
|
213
|
+
return tagName;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return '';
|
|
217
|
+
};
|
|
218
|
+
const getHeadingRecursive = (el) => {
|
|
219
|
+
const prevSiblingsHeading = getPreviousSiblingsHeading(el);
|
|
220
|
+
if (prevSiblingsHeading) {
|
|
221
|
+
return getIncreasedHeadingLevel(prevSiblingsHeading);
|
|
222
|
+
}
|
|
223
|
+
// No previous siblings are headings, try parent node
|
|
224
|
+
const parent = el.parentElement;
|
|
225
|
+
if (!parent) {
|
|
226
|
+
return 'h6';
|
|
227
|
+
}
|
|
228
|
+
const parentTagName = parent.tagName;
|
|
229
|
+
if (isHeading(parentTagName)) {
|
|
230
|
+
return getIncreasedHeadingLevel(parentTagName);
|
|
231
|
+
}
|
|
232
|
+
return getHeadingRecursive(parent);
|
|
233
|
+
};
|
|
234
|
+
return getHeadingRecursive(element);
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Remove an element from the DOM.
|
|
238
|
+
* @private
|
|
239
|
+
* @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} [element]
|
|
240
|
+
* @return {void}
|
|
241
|
+
*/
|
|
242
|
+
function removeElement(element) {
|
|
243
|
+
if (element && element.parentNode) {
|
|
244
|
+
element.parentNode.removeChild(element);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Remove all child nodes from an element.
|
|
249
|
+
* @private
|
|
250
|
+
* @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} [element]
|
|
251
|
+
* @return {void}
|
|
252
|
+
*/
|
|
253
|
+
function removeChildNodes(element) {
|
|
254
|
+
while (element.lastChild) {
|
|
255
|
+
element.removeChild(element.lastChild);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Utility function. Reverses child nodes of a DOM element.
|
|
260
|
+
* @private
|
|
261
|
+
*/
|
|
262
|
+
function reverseChildNodes(node) {
|
|
263
|
+
let i = node.childNodes.length;
|
|
264
|
+
while (i--) {
|
|
265
|
+
node.appendChild(node.childNodes[i]);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Used for aria-label attributes, painting on a canvas will fail if the
|
|
270
|
+
* text contains tags.
|
|
271
|
+
* @private
|
|
272
|
+
*/
|
|
273
|
+
function stripHTMLTagsFromString(str, isForExport = false) {
|
|
274
|
+
return (typeof str === 'string') ?
|
|
275
|
+
(isForExport ?
|
|
276
|
+
str.replace(/<\/?[^>]+(>|$)/g, '') :
|
|
277
|
+
str.replace(/<\/?(?!\s)[^>]+(>|$)/g, '')) : str;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Utility function for hiding an element visually, but still keeping it
|
|
281
|
+
* available to screen reader users.
|
|
282
|
+
* @private
|
|
283
|
+
*/
|
|
284
|
+
function visuallyHideElement(element) {
|
|
285
|
+
css(element, {
|
|
286
|
+
position: 'absolute',
|
|
287
|
+
width: '1px',
|
|
288
|
+
height: '1px',
|
|
289
|
+
overflow: 'hidden',
|
|
290
|
+
whiteSpace: 'nowrap',
|
|
291
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
292
|
+
marginTop: '-3px',
|
|
293
|
+
'-ms-filter': 'progid:DXImageTransform.Microsoft.Alpha(Opacity=1)',
|
|
294
|
+
filter: 'alpha(opacity=1)',
|
|
295
|
+
opacity: 0.01
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
/* *
|
|
299
|
+
*
|
|
300
|
+
* Default Export
|
|
301
|
+
*
|
|
302
|
+
* */
|
|
303
|
+
const HTMLUtilities = {
|
|
304
|
+
addClass,
|
|
305
|
+
cloneMouseEvent,
|
|
306
|
+
cloneTouchEvent,
|
|
307
|
+
escapeStringForHTML,
|
|
308
|
+
getElement,
|
|
309
|
+
getFakeMouseEvent,
|
|
310
|
+
getHeadingTagNameForElement,
|
|
311
|
+
removeChildNodes,
|
|
312
|
+
removeClass,
|
|
313
|
+
removeElement,
|
|
314
|
+
reverseChildNodes,
|
|
315
|
+
simulatedEventTarget,
|
|
316
|
+
stripHTMLTagsFromString,
|
|
317
|
+
visuallyHideElement
|
|
318
|
+
};
|
|
319
|
+
export default HTMLUtilities;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type AnimationOptions from './AnimationOptions';
|
|
2
|
+
import type Chart from '../Chart/Chart';
|
|
3
|
+
import type CSSObject from '../Renderer/CSSObject';
|
|
4
|
+
import type { DeepPartial } from '../../Shared/Types';
|
|
5
|
+
import type { HTMLDOMElement } from '../Renderer/DOMElementType';
|
|
6
|
+
import type Series from '../Series/Series';
|
|
7
|
+
import type SVGAttributes from '../Renderer/SVG/SVGAttributes';
|
|
8
|
+
import type SVGElement from '../Renderer/SVG/SVGElement';
|
|
9
|
+
/**
|
|
10
|
+
* Set the global animation to either a given value, or fall back to the given
|
|
11
|
+
* chart's animation option.
|
|
12
|
+
*
|
|
13
|
+
* @function Highcharts.setAnimation
|
|
14
|
+
*
|
|
15
|
+
* @param {boolean|Partial<Highcharts.AnimationOptionsObject>|undefined} animation
|
|
16
|
+
* The animation object.
|
|
17
|
+
*
|
|
18
|
+
* @param {Highcharts.Chart} chart
|
|
19
|
+
* The chart instance.
|
|
20
|
+
*
|
|
21
|
+
* @todo
|
|
22
|
+
* This function always relates to a chart, and sets a property on the renderer,
|
|
23
|
+
* so it should be moved to the SVGRenderer.
|
|
24
|
+
*/
|
|
25
|
+
declare function setAnimation(animation: (boolean | Partial<AnimationOptions> | undefined), chart: Chart): void;
|
|
26
|
+
/**
|
|
27
|
+
* Get the animation in object form, where a disabled animation is always
|
|
28
|
+
* returned as `{ duration: 0 }`.
|
|
29
|
+
*
|
|
30
|
+
* @function Highcharts.animObject
|
|
31
|
+
*
|
|
32
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} [animation=0]
|
|
33
|
+
* An animation setting. Can be an object with duration, complete and
|
|
34
|
+
* easing properties, or a boolean to enable or disable.
|
|
35
|
+
*
|
|
36
|
+
* @return {Highcharts.AnimationOptionsObject}
|
|
37
|
+
* An object with at least a duration property.
|
|
38
|
+
*/
|
|
39
|
+
declare function animObject(animation?: (boolean | DeepPartial<AnimationOptions>)): AnimationOptions;
|
|
40
|
+
/**
|
|
41
|
+
* Get the defer as a number value from series animation options.
|
|
42
|
+
*
|
|
43
|
+
* @function Highcharts.getDeferredAnimation
|
|
44
|
+
*
|
|
45
|
+
* @param {Highcharts.Chart} chart
|
|
46
|
+
* The chart instance.
|
|
47
|
+
*
|
|
48
|
+
* @param {boolean|Highcharts.AnimationOptionsObject} animation
|
|
49
|
+
* An animation setting. Can be an object with duration, complete and
|
|
50
|
+
* easing properties, or a boolean to enable or disable.
|
|
51
|
+
*
|
|
52
|
+
* @param {Highcharts.Series} [series]
|
|
53
|
+
* Series to defer animation.
|
|
54
|
+
*
|
|
55
|
+
* @return {number}
|
|
56
|
+
* The numeric value.
|
|
57
|
+
*/
|
|
58
|
+
declare function getDeferredAnimation(chart: Chart, animation: (boolean | Partial<AnimationOptions> | undefined), series?: Series): Partial<AnimationOptions>;
|
|
59
|
+
/**
|
|
60
|
+
* The global animate method, which uses Fx to create individual animators.
|
|
61
|
+
*
|
|
62
|
+
* @function Highcharts.animate
|
|
63
|
+
*
|
|
64
|
+
* @param {Highcharts.HTMLDOMElement|Highcharts.SVGElement} el
|
|
65
|
+
* The element to animate.
|
|
66
|
+
*
|
|
67
|
+
* @param {Highcharts.CSSObject|Highcharts.SVGAttributes} params
|
|
68
|
+
* An object containing key-value pairs of the properties to animate.
|
|
69
|
+
* Supports numeric as pixel-based CSS properties for HTML objects and
|
|
70
|
+
* attributes for SVGElements.
|
|
71
|
+
*
|
|
72
|
+
* @param {Partial<Highcharts.AnimationOptionsObject>} [opt]
|
|
73
|
+
* Animation options.
|
|
74
|
+
*
|
|
75
|
+
* @return {void}
|
|
76
|
+
*/
|
|
77
|
+
declare function animate(el: (HTMLDOMElement | SVGElement), params: (CSSObject | SVGAttributes), opt?: boolean | Partial<AnimationOptions>): void;
|
|
78
|
+
/**
|
|
79
|
+
* Stop running animation.
|
|
80
|
+
*
|
|
81
|
+
* @function Highcharts.stop
|
|
82
|
+
*
|
|
83
|
+
* @param {Highcharts.SVGElement} el
|
|
84
|
+
* The SVGElement to stop animation on.
|
|
85
|
+
*
|
|
86
|
+
* @param {string} [prop]
|
|
87
|
+
* The property to stop animating. If given, the stop method will stop a
|
|
88
|
+
* single property from animating, while others continue.
|
|
89
|
+
*
|
|
90
|
+
* @return {void}
|
|
91
|
+
*
|
|
92
|
+
* @todo
|
|
93
|
+
* A possible extension to this would be to stop a single property, when
|
|
94
|
+
* we want to continue animating others. Then assign the prop to the timer
|
|
95
|
+
* in the Fx.run method, and check for the prop here. This would be an
|
|
96
|
+
* improvement in all cases where we stop the animation from .attr. Instead of
|
|
97
|
+
* stopping everything, we can just stop the actual attributes we're setting.
|
|
98
|
+
*/
|
|
99
|
+
declare function stop(el: SVGElement | HTMLElement, prop?: string): void;
|
|
100
|
+
declare const animationExports: {
|
|
101
|
+
animate: typeof animate;
|
|
102
|
+
animObject: typeof animObject;
|
|
103
|
+
getDeferredAnimation: typeof getDeferredAnimation;
|
|
104
|
+
setAnimation: typeof setAnimation;
|
|
105
|
+
stop: typeof stop;
|
|
106
|
+
};
|
|
107
|
+
export default animationExports;
|