@highcharts/grid-pro 2.1.1 → 2.2.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/css/grid-pro.css +428 -432
- package/es-modules/Accessibility/A11yI18n.js +3 -3
- package/es-modules/Accessibility/Accessibility.js +4 -3
- package/es-modules/Accessibility/AccessibilityComponent.d.ts +1 -1
- package/es-modules/Accessibility/AccessibilityComponent.js +4 -3
- package/es-modules/Accessibility/Components/AnnotationsA11y.js +4 -3
- package/es-modules/Accessibility/Components/ContainerComponent.js +4 -3
- package/es-modules/Accessibility/Components/InfoRegionsComponent.js +4 -3
- package/es-modules/Accessibility/Components/LegendComponent.js +4 -3
- package/es-modules/Accessibility/Components/MenuComponent.js +4 -3
- package/es-modules/Accessibility/Components/NavigatorComponent.js +3 -3
- package/es-modules/Accessibility/Components/RangeSelectorComponent.js +4 -3
- package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +14 -3
- package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +4 -3
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +4 -3
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +4 -3
- package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +4 -3
- package/es-modules/Accessibility/Components/ZoomComponent.js +4 -3
- package/es-modules/Accessibility/FocusBorder.js +4 -3
- package/es-modules/Accessibility/HighContrastMode.js +4 -3
- package/es-modules/Accessibility/HighContrastTheme.js +4 -3
- package/es-modules/Accessibility/KeyboardNavigation.js +4 -3
- package/es-modules/Accessibility/KeyboardNavigationHandler.js +4 -3
- package/es-modules/Accessibility/Options/A11yDefaults.js +4 -3
- package/es-modules/Accessibility/Options/DeprecatedOptions.js +4 -3
- package/es-modules/Accessibility/Options/LangDefaults.js +4 -3
- package/es-modules/Accessibility/ProxyElement.js +4 -3
- package/es-modules/Accessibility/ProxyProvider.js +4 -3
- package/es-modules/Accessibility/Utils/Announcer.js +4 -3
- package/es-modules/Accessibility/Utils/ChartUtilities.js +4 -3
- package/es-modules/Accessibility/Utils/DOMElementProvider.js +4 -3
- package/es-modules/Accessibility/Utils/EventProvider.d.ts +1 -1
- package/es-modules/Accessibility/Utils/EventProvider.js +4 -3
- package/es-modules/Accessibility/Utils/HTMLUtilities.js +4 -3
- package/es-modules/Core/Animation/AnimationOptions.d.ts +42 -0
- package/es-modules/Core/Animation/AnimationOptions.js +10 -0
- package/es-modules/Core/Animation/AnimationUtilities.js +39 -3
- package/es-modules/Core/Animation/Fx.d.ts +1 -130
- package/es-modules/Core/Animation/Fx.js +13 -6
- package/es-modules/Core/Animation/FxBase.d.ts +1 -0
- package/es-modules/Core/Animation/FxBase.js +11 -0
- package/es-modules/Core/Callback.d.ts +49 -0
- package/es-modules/Core/Callback.js +10 -0
- package/es-modules/Core/Chart/Chart.d.ts +659 -400
- package/es-modules/Core/Chart/Chart.js +64 -54
- package/es-modules/Core/Chart/Chart3D.d.ts +123 -233
- package/es-modules/Core/Chart/Chart3D.js +22 -35
- package/es-modules/Core/Chart/ChartBase.d.ts +3 -0
- package/es-modules/Core/Chart/ChartBase.js +11 -0
- package/es-modules/Core/Chart/ChartDefaults.js +7 -12
- package/es-modules/Core/Chart/ChartNavigationComposition.d.ts +1 -55
- package/es-modules/Core/Chart/ChartNavigationComposition.js +13 -13
- package/es-modules/Core/Chart/ChartOptions.d.ts +1217 -0
- package/es-modules/Core/Chart/ChartOptions.js +10 -0
- package/es-modules/Core/Chart/GanttChart.d.ts +0 -38
- package/es-modules/Core/Chart/GanttChart.js +4 -3
- package/es-modules/Core/Chart/MapChart.d.ts +9 -4
- package/es-modules/Core/Chart/MapChart.js +13 -3
- package/es-modules/Core/Chart/StockChart.d.ts +0 -85
- package/es-modules/Core/Chart/StockChart.js +33 -15
- package/es-modules/Core/Color/Color.d.ts +16 -24
- package/es-modules/Core/Color/Color.js +26 -8
- package/es-modules/Core/Color/ColorString.d.ts +0 -23
- package/es-modules/Core/Color/ColorString.js +11 -0
- package/es-modules/Core/Color/ColorType.d.ts +0 -33
- package/es-modules/Core/Color/ColorType.js +11 -0
- package/es-modules/Core/Color/GradientColor.d.ts +0 -33
- package/es-modules/Core/Color/GradientColor.js +11 -0
- package/es-modules/Core/Color/Palettes.d.ts +1 -84
- package/es-modules/Core/Color/Palettes.js +2 -1
- package/es-modules/Core/Defaults.d.ts +6 -0
- package/es-modules/Core/Defaults.js +30 -66
- package/es-modules/Core/Foundation.d.ts +1 -19
- package/es-modules/Core/Foundation.js +7 -4
- package/es-modules/Core/Geometry/CircleObject.d.ts +5 -0
- package/es-modules/Core/Geometry/CircleObject.js +10 -0
- package/es-modules/Core/Geometry/CircleUtilities.d.ts +1 -189
- package/es-modules/Core/Geometry/CircleUtilities.js +17 -15
- package/es-modules/Core/Geometry/GeometryObject.d.ts +7 -0
- package/es-modules/Core/Geometry/GeometryObject.js +10 -0
- package/es-modules/Core/Geometry/GeometryUtilities.d.ts +1 -48
- package/es-modules/Core/Geometry/GeometryUtilities.js +9 -7
- package/es-modules/Core/Geometry/IntersectionObject.d.ts +7 -0
- package/es-modules/Core/Geometry/IntersectionObject.js +10 -0
- package/es-modules/Core/Geometry/PolygonClip.d.ts +1 -19
- package/es-modules/Core/Geometry/PolygonClip.js +9 -7
- package/es-modules/Core/Globals.d.ts +9 -31
- package/es-modules/Core/Globals.js +9 -10
- package/es-modules/Core/GlobalsBase.d.ts +35 -0
- package/es-modules/Core/GlobalsBase.js +11 -0
- package/es-modules/Core/HttpUtilities.d.ts +54 -17
- package/es-modules/Core/HttpUtilities.js +15 -14
- package/es-modules/Core/JSON.d.ts +29 -0
- package/es-modules/Core/JSON.js +13 -0
- package/es-modules/Core/KeyboardEvent.d.ts +1 -0
- package/es-modules/Core/KeyboardEvent.js +11 -0
- package/es-modules/Core/MSPointer.d.ts +1 -74
- package/es-modules/Core/MSPointer.js +23 -13
- package/es-modules/Core/Math3D.d.ts +1 -117
- package/es-modules/Core/Math3D.js +13 -10
- package/es-modules/Core/Options.d.ts +334 -0
- package/es-modules/Core/Options.js +10 -0
- package/es-modules/Core/Pointer.d.ts +71 -445
- package/es-modules/Core/Pointer.js +51 -65
- package/es-modules/Core/PointerEvent.d.ts +18 -0
- package/es-modules/Core/PointerEvent.js +11 -0
- package/es-modules/Core/Renderer/AlignObject.d.ts +25 -27
- package/es-modules/Core/Renderer/AlignObject.js +11 -0
- package/es-modules/Core/Renderer/BBoxObject.d.ts +20 -31
- package/es-modules/Core/Renderer/BBoxObject.js +11 -0
- package/es-modules/Core/Renderer/CSSObject.d.ts +268 -59
- package/es-modules/Core/Renderer/CSSObject.js +10 -0
- package/es-modules/Core/Renderer/DOMElementType.d.ts +1 -33
- package/es-modules/Core/Renderer/DOMElementType.js +11 -0
- package/es-modules/Core/Renderer/DashStyleValue.d.ts +1 -27
- package/es-modules/Core/Renderer/DashStyleValue.js +11 -0
- package/es-modules/Core/Renderer/FontMetricsObject.d.ts +6 -26
- package/es-modules/Core/Renderer/FontMetricsObject.js +11 -0
- package/es-modules/Core/Renderer/HTML/AST.d.ts +3 -15
- package/es-modules/Core/Renderer/HTML/AST.js +22 -13
- package/es-modules/Core/Renderer/HTML/HTMLAttributes.d.ts +1 -25
- package/es-modules/Core/Renderer/HTML/HTMLAttributes.js +11 -0
- package/es-modules/Core/Renderer/HTML/HTMLElement.d.ts +0 -54
- package/es-modules/Core/Renderer/HTML/HTMLElement.js +27 -22
- package/es-modules/Core/Renderer/PolygonBoxObject.d.ts +15 -12
- package/es-modules/Core/Renderer/PolygonBoxObject.js +11 -0
- package/es-modules/Core/Renderer/Position3DObject.d.ts +6 -30
- package/es-modules/Core/Renderer/Position3DObject.js +11 -0
- package/es-modules/Core/Renderer/PositionObject.d.ts +9 -23
- package/es-modules/Core/Renderer/PositionObject.js +11 -0
- package/es-modules/Core/Renderer/RectangleObject.d.ts +6 -30
- package/es-modules/Core/Renderer/RectangleObject.js +11 -0
- package/es-modules/Core/Renderer/RendererRegistry.d.ts +1 -29
- package/es-modules/Core/Renderer/RendererRegistry.js +6 -3
- package/es-modules/Core/Renderer/RendererType.d.ts +1 -53
- package/es-modules/Core/Renderer/RendererType.js +11 -0
- package/es-modules/Core/Renderer/RendererUtilities.d.ts +1 -26
- package/es-modules/Core/Renderer/RendererUtilities.js +7 -4
- package/es-modules/Core/Renderer/SVG/ButtonThemeObject.d.ts +26 -31
- package/es-modules/Core/Renderer/SVG/SVGArc3D.d.ts +1 -44
- package/es-modules/Core/Renderer/SVG/SVGAttributes.d.ts +15 -51
- package/es-modules/Core/Renderer/SVG/SVGAttributes3D.d.ts +1 -42
- package/es-modules/Core/Renderer/SVG/SVGCuboid.d.ts +1 -42
- package/es-modules/Core/Renderer/SVG/SVGElement.d.ts +459 -0
- package/es-modules/Core/Renderer/SVG/SVGElement3D.d.ts +1 -0
- package/es-modules/Core/Renderer/SVG/SVGElementBase.d.ts +0 -23
- package/es-modules/Core/Renderer/SVG/SVGLabel.d.ts +14 -0
- package/es-modules/Core/Renderer/SVG/SVGPath.d.ts +18 -56
- package/es-modules/Core/Renderer/SVG/SVGPath3D.d.ts +0 -30
- package/es-modules/Core/Renderer/SVG/SVGRenderer.d.ts +652 -0
- package/es-modules/Core/Renderer/SVG/SVGRenderer3D.d.ts +1 -0
- package/es-modules/Core/Renderer/SVG/SVGRendererBase.d.ts +0 -24
- package/es-modules/Core/Renderer/SVG/SymbolOptions.d.ts +3 -26
- package/es-modules/Core/Renderer/SVG/SymbolType.d.ts +1 -41
- package/es-modules/Core/Renderer/SVG/Symbols.d.ts +146 -0
- package/es-modules/Core/Renderer/SVG/TextBuilder.d.ts +1 -0
- package/es-modules/Core/Renderer/ShadowOptionsObject.d.ts +21 -30
- package/es-modules/Core/Renderer/ShadowOptionsObject.js +11 -0
- package/es-modules/Core/Renderer/SizeObject.d.ts +0 -23
- package/es-modules/Core/Renderer/SizeObject.js +11 -0
- package/es-modules/Core/Responsive.d.ts +91 -28
- package/es-modules/Core/Responsive.js +7 -8
- package/es-modules/Core/Templating.d.ts +16 -0
- package/es-modules/Core/Templating.js +9 -4
- package/es-modules/Core/Time.d.ts +10 -1
- package/es-modules/Core/Time.js +4 -3
- package/es-modules/Core/Tooltip.d.ts +63 -115
- package/es-modules/Core/Tooltip.js +61 -27
- package/es-modules/Core/TooltipOptions.d.ts +681 -0
- package/es-modules/Core/TooltipOptions.js +10 -0
- package/es-modules/Core/Utilities.d.ts +75 -106
- package/es-modules/Core/Utilities.js +19 -53
- package/es-modules/Data/ColumnUtils.js +3 -3
- package/es-modules/Data/Connectors/CSVConnector.js +3 -3
- package/es-modules/Data/Connectors/CSVConnectorOptions.d.ts +3 -3
- package/es-modules/Data/Connectors/DataConnector.d.ts +12 -1
- package/es-modules/Data/Connectors/DataConnector.js +34 -4
- package/es-modules/Data/Connectors/DataConnectorOptions.d.ts +3 -3
- package/es-modules/Data/Connectors/DataConnectorType.d.ts +3 -3
- package/es-modules/Data/Connectors/GoogleSheetsConnector.js +3 -3
- package/es-modules/Data/Connectors/GoogleSheetsConnectorOptions.d.ts +3 -3
- package/es-modules/Data/Connectors/HTMLTableConnector.js +3 -3
- package/es-modules/Data/Connectors/HTMLTableConnectorOptions.d.ts +3 -3
- package/es-modules/Data/Connectors/JSONConnector.js +3 -3
- package/es-modules/Data/Connectors/JSONConnectorOptions.d.ts +3 -3
- package/es-modules/Data/Converters/CSVConverter.js +3 -3
- package/es-modules/Data/Converters/CSVConverterOptions.d.ts +3 -3
- package/es-modules/Data/Converters/DataConverter.js +3 -3
- package/es-modules/Data/Converters/DataConverterType.d.ts +3 -3
- package/es-modules/Data/Converters/DataConverterUtils.js +3 -3
- package/es-modules/Data/Converters/GoogleSheetsConverter.js +3 -3
- package/es-modules/Data/Converters/GoogleSheetsConverterOptions.d.ts +3 -3
- package/es-modules/Data/Converters/HTMLTableConverter.js +3 -3
- package/es-modules/Data/Converters/HTMLTableConverterOptions.d.ts +3 -3
- package/es-modules/Data/Converters/JSONConverter.js +3 -3
- package/es-modules/Data/Converters/JSONConverterOptions.d.ts +3 -3
- package/es-modules/Data/DataCursor.js +3 -3
- package/es-modules/Data/DataEvent.js +3 -3
- package/es-modules/Data/DataPool.js +3 -3
- package/es-modules/Data/DataPoolOptions.d.ts +3 -3
- package/es-modules/Data/DataTable.d.ts +6 -6
- package/es-modules/Data/DataTable.js +64 -30
- package/es-modules/Data/DataTableCore.d.ts +2 -2
- package/es-modules/Data/DataTableCore.js +5 -5
- package/es-modules/Data/DataTableOptions.js +3 -3
- package/es-modules/Data/Formula/Formula.js +3 -3
- package/es-modules/Data/Formula/FormulaParser.js +3 -3
- package/es-modules/Data/Formula/FormulaProcessor.js +3 -3
- package/es-modules/Data/Formula/FormulaTypes.js +3 -3
- package/es-modules/Data/Formula/Functions/ABS.js +3 -3
- package/es-modules/Data/Formula/Functions/AND.js +3 -3
- package/es-modules/Data/Formula/Functions/AVERAGE.js +3 -3
- package/es-modules/Data/Formula/Functions/AVERAGEA.js +3 -3
- package/es-modules/Data/Formula/Functions/COUNT.js +3 -3
- package/es-modules/Data/Formula/Functions/COUNTA.js +3 -3
- package/es-modules/Data/Formula/Functions/IF.js +3 -3
- package/es-modules/Data/Formula/Functions/ISNA.js +3 -3
- package/es-modules/Data/Formula/Functions/MAX.js +3 -3
- package/es-modules/Data/Formula/Functions/MEDIAN.js +3 -3
- package/es-modules/Data/Formula/Functions/MIN.js +3 -3
- package/es-modules/Data/Formula/Functions/MOD.js +3 -3
- package/es-modules/Data/Formula/Functions/MODE.js +3 -3
- package/es-modules/Data/Formula/Functions/NOT.js +3 -3
- package/es-modules/Data/Formula/Functions/OR.js +3 -3
- package/es-modules/Data/Formula/Functions/PRODUCT.js +3 -3
- package/es-modules/Data/Formula/Functions/SUM.js +3 -3
- package/es-modules/Data/Formula/Functions/XOR.js +3 -3
- package/es-modules/Data/Modifiers/ChainModifier.js +3 -3
- package/es-modules/Data/Modifiers/ChainModifierOptions.js +3 -3
- package/es-modules/Data/Modifiers/DataModifier.js +3 -3
- package/es-modules/Data/Modifiers/DataModifierEvent.js +3 -3
- package/es-modules/Data/Modifiers/DataModifierOptions.js +3 -3
- package/es-modules/Data/Modifiers/DataModifierType.d.ts +3 -3
- package/es-modules/Data/Modifiers/FilterModifier.js +3 -3
- package/es-modules/Data/Modifiers/FilterModifierOptions.js +3 -3
- package/es-modules/Data/Modifiers/InvertModifier.js +3 -3
- package/es-modules/Data/Modifiers/InvertModifierOptions.js +3 -3
- package/es-modules/Data/Modifiers/MathModifier.js +3 -3
- package/es-modules/Data/Modifiers/MathModifierOptions.js +3 -3
- package/es-modules/Data/Modifiers/RangeModifier.js +3 -3
- package/es-modules/Data/Modifiers/RangeModifierOptions.js +3 -3
- package/es-modules/Data/Modifiers/SortModifier.js +32 -6
- package/es-modules/Data/Modifiers/SortModifierOptions.d.ts +41 -4
- package/es-modules/Data/Modifiers/SortModifierOptions.js +3 -3
- package/es-modules/Grid/Core/Accessibility/A11yOptions.d.ts +77 -0
- package/es-modules/Grid/Core/Accessibility/A11yOptions.js +4 -3
- package/es-modules/Grid/Core/Accessibility/Accessibility.d.ts +67 -0
- package/es-modules/Grid/Core/Accessibility/Accessibility.js +176 -3
- package/es-modules/Grid/Core/Credits.js +3 -3
- package/es-modules/Grid/Core/Defaults.js +17 -5
- package/es-modules/Grid/Core/Globals.d.ts +4 -4
- package/es-modules/Grid/Core/Globals.js +5 -5
- package/es-modules/Grid/Core/Grid.d.ts +12 -1
- package/es-modules/Grid/Core/Grid.js +110 -8
- package/es-modules/Grid/Core/GridUtils.js +3 -3
- package/es-modules/Grid/Core/Options.d.ts +17 -1
- package/es-modules/Grid/Core/Options.js +3 -3
- package/es-modules/Grid/Core/Pagination/Pagination.js +3 -3
- package/es-modules/Grid/Core/Pagination/PaginationOptions.d.ts +0 -40
- package/es-modules/Grid/Core/Pagination/PaginationOptions.js +11 -0
- package/es-modules/Grid/Core/Querying/FilteringController.js +3 -3
- package/es-modules/Grid/Core/Querying/PaginationController.js +3 -3
- package/es-modules/Grid/Core/Querying/QueryingController.js +3 -3
- package/es-modules/Grid/Core/Querying/SortingController.d.ts +15 -0
- package/es-modules/Grid/Core/Querying/SortingController.js +89 -51
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js +3 -3
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.d.ts +2 -2
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.js +3 -3
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.js +3 -3
- package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.js +3 -3
- package/es-modules/Grid/Core/Table/Actions/ColumnSorting.d.ts +12 -2
- package/es-modules/Grid/Core/Table/Actions/ColumnSorting.js +85 -18
- package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.js +3 -3
- package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.d.ts +37 -0
- package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.js +137 -26
- package/es-modules/Grid/Core/Table/Body/TableCell.d.ts +9 -2
- package/es-modules/Grid/Core/Table/Body/TableCell.js +15 -8
- package/es-modules/Grid/Core/Table/Body/TableRow.d.ts +18 -0
- package/es-modules/Grid/Core/Table/Body/TableRow.js +56 -10
- package/es-modules/Grid/Core/Table/Cell.d.ts +0 -7
- package/es-modules/Grid/Core/Table/Cell.js +5 -3
- package/es-modules/Grid/Core/Table/CellContent/CellContent.js +3 -3
- package/es-modules/Grid/Core/Table/CellContent/TextContent.js +4 -4
- package/es-modules/Grid/Core/Table/Column.d.ts +1 -1
- package/es-modules/Grid/Core/Table/Column.js +3 -3
- package/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.js +3 -3
- package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.js +3 -3
- package/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.js +3 -3
- package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js +3 -3
- package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.js +3 -3
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js +14 -5
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.js +3 -3
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.js +3 -3
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.d.ts +9 -0
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.js +35 -6
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuPopup.js +5 -4
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.js +11 -7
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js +3 -3
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.js +3 -3
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.d.ts +5 -1
- package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.js +92 -9
- package/es-modules/Grid/Core/Table/Header/HeaderCell.d.ts +2 -2
- package/es-modules/Grid/Core/Table/Header/HeaderCell.js +8 -7
- package/es-modules/Grid/Core/Table/Header/HeaderRow.js +3 -3
- package/es-modules/Grid/Core/Table/Header/TableHeader.js +3 -3
- package/es-modules/Grid/Core/Table/Row.js +3 -3
- package/es-modules/Grid/Core/Table/Table.d.ts +30 -0
- package/es-modules/Grid/Core/Table/Table.js +118 -7
- package/es-modules/Grid/Core/UI/Button.js +3 -3
- package/es-modules/Grid/Core/UI/ContextMenu.js +3 -3
- package/es-modules/Grid/Core/UI/ContextMenuButton.js +3 -3
- package/es-modules/Grid/Core/UI/Popup.js +3 -3
- package/es-modules/Grid/Core/UI/SvgIcons.js +3 -3
- package/es-modules/Grid/Core/UI/Toolbar.js +3 -3
- package/es-modules/Grid/Core/UI/ToolbarButton.js +3 -3
- package/es-modules/Grid/Pro/CellEditing/CellEditMode.d.ts +3 -44
- package/es-modules/Grid/Pro/CellEditing/CellEditMode.js +16 -0
- package/es-modules/Grid/Pro/CellEditing/CellEditing.js +3 -3
- package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/CellContentPro.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/CellRenderer.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/CellRendererType.d.ts +1 -34
- package/es-modules/Grid/Pro/CellRendering/CellRendererType.js +15 -0
- package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.d.ts +7 -5
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRendererBase.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.d.ts +3 -3
- package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js +3 -3
- package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js +3 -3
- package/es-modules/Grid/Pro/ColumnTypes/Validator.d.ts +10 -1
- package/es-modules/Grid/Pro/ColumnTypes/Validator.js +50 -8
- package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js +3 -3
- package/es-modules/Grid/Pro/Credits/CreditsPro.js +3 -3
- package/es-modules/Grid/Pro/Credits/CreditsProComposition.js +3 -3
- package/es-modules/Grid/Pro/Export/Exporting.js +4 -5
- package/es-modules/Grid/Pro/Export/ExportingComposition.js +3 -3
- package/es-modules/Grid/Pro/GridEvents.d.ts +1 -0
- package/es-modules/Grid/Pro/GridEvents.js +3 -3
- package/es-modules/Grid/Pro/Pagination/PaginationComposition.js +3 -3
- package/es-modules/Grid/index.js +3 -3
- package/es-modules/Shared/BaseForm.js +3 -3
- package/es-modules/Shared/DownloadURL.d.ts +1 -85
- package/es-modules/Shared/DownloadURL.js +14 -11
- package/es-modules/Shared/LangOptionsCore.d.ts +4 -3
- package/es-modules/Shared/TimeBase.d.ts +1 -46
- package/es-modules/Shared/TimeBase.js +8 -7
- package/es-modules/Shared/Types.d.ts +4 -3
- package/es-modules/masters/grid-pro.src.d.ts +8 -13
- package/es-modules/masters/grid-pro.src.js +15 -7
- package/grid-pro.d.ts +8 -13
- package/grid-pro.js +6 -5
- package/grid-pro.js.map +1 -1
- package/grid-pro.src.d.ts +8 -13
- package/grid-pro.src.js +1923 -721
- package/package.json +1 -1
- package/es-modules/Grid/Pro/highcharts.d.ts +0 -7
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
*
|
|
3
3
|
* Grid ColumnSorting class
|
|
4
4
|
*
|
|
5
|
-
* (c) 2020-
|
|
5
|
+
* (c) 2020-2026 Highsoft AS
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* A commercial license may be required depending on use.
|
|
8
|
+
* See www.highcharts.com/license
|
|
8
9
|
*
|
|
9
|
-
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
10
10
|
*
|
|
11
11
|
* Authors:
|
|
12
12
|
* - Dawid Dragula
|
|
@@ -43,24 +43,35 @@ class ColumnSorting {
|
|
|
43
43
|
constructor(column, headerCellElement) {
|
|
44
44
|
/**
|
|
45
45
|
* Toggle sorting order for the column in the order: asc -> desc -> none
|
|
46
|
+
*
|
|
47
|
+
* @param e
|
|
48
|
+
* Optional mouse or keyboard event.
|
|
46
49
|
*/
|
|
47
|
-
this.toggle = () => {
|
|
50
|
+
this.toggle = (e) => {
|
|
48
51
|
const viewport = this.column.viewport;
|
|
49
52
|
const querying = viewport.grid.querying;
|
|
50
53
|
const sortingController = querying.sorting;
|
|
51
|
-
const
|
|
52
|
-
|
|
54
|
+
const additive = !!e?.shiftKey;
|
|
55
|
+
const currentOrder = (additive ?
|
|
56
|
+
sortingController.currentSortings?.find((sorting) => sorting.columnId === this.column.id)?.order :
|
|
57
|
+
(sortingController.currentSorting?.columnId ===
|
|
58
|
+
this.column.id ?
|
|
59
|
+
sortingController.currentSorting.order :
|
|
60
|
+
null)) || 'none';
|
|
53
61
|
const consequents = {
|
|
54
62
|
none: 'asc',
|
|
55
63
|
asc: 'desc',
|
|
56
64
|
desc: null
|
|
57
65
|
};
|
|
58
|
-
void this.setOrder(consequents[currentOrder]);
|
|
66
|
+
void this.setOrder(consequents[currentOrder], additive);
|
|
59
67
|
};
|
|
60
68
|
this.column = column;
|
|
61
69
|
this.headerCellElement = headerCellElement;
|
|
62
70
|
this.addHeaderElementAttributes();
|
|
63
|
-
|
|
71
|
+
const sortingOptions = column.options.sorting;
|
|
72
|
+
const sortingEnabled = sortingOptions?.enabled ??
|
|
73
|
+
sortingOptions?.sortable;
|
|
74
|
+
if (sortingEnabled) {
|
|
64
75
|
headerCellElement.classList.add(Globals.getClassName('columnSortable'));
|
|
65
76
|
}
|
|
66
77
|
}
|
|
@@ -76,19 +87,25 @@ class ColumnSorting {
|
|
|
76
87
|
const col = this.column;
|
|
77
88
|
const a11y = col.viewport.grid.accessibility;
|
|
78
89
|
const sortingOptions = col.options.sorting;
|
|
79
|
-
const { currentSorting } = col.viewport.grid.querying.sorting;
|
|
90
|
+
const { currentSorting, currentSortings } = col.viewport.grid.querying.sorting;
|
|
80
91
|
const sortedAscClassName = Globals.getClassName('columnSortedAsc');
|
|
81
92
|
const sortedDescClassName = Globals.getClassName('columnSortedDesc');
|
|
82
93
|
const el = this.headerCellElement;
|
|
83
|
-
|
|
94
|
+
const sortingEnabled = sortingOptions?.enabled ??
|
|
95
|
+
sortingOptions?.sortable;
|
|
96
|
+
const columnSorting = (currentSortings?.find((sorting) => sorting.columnId === col.id) ||
|
|
97
|
+
(currentSorting?.columnId === col.id ?
|
|
98
|
+
currentSorting :
|
|
99
|
+
void 0));
|
|
100
|
+
if (!columnSorting?.order) {
|
|
84
101
|
el.classList.remove(sortedAscClassName);
|
|
85
102
|
el.classList.remove(sortedDescClassName);
|
|
86
|
-
if (
|
|
103
|
+
if (sortingEnabled) {
|
|
87
104
|
a11y?.setColumnSortState(el, 'none');
|
|
88
105
|
}
|
|
89
106
|
return;
|
|
90
107
|
}
|
|
91
|
-
switch (
|
|
108
|
+
switch (columnSorting.order) {
|
|
92
109
|
case 'asc':
|
|
93
110
|
el.classList.add(sortedAscClassName);
|
|
94
111
|
el.classList.remove(sortedDescClassName);
|
|
@@ -101,6 +118,12 @@ class ColumnSorting {
|
|
|
101
118
|
break;
|
|
102
119
|
}
|
|
103
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Refreshes the sorting-related header attributes and classes.
|
|
123
|
+
*/
|
|
124
|
+
refreshHeaderAttributes() {
|
|
125
|
+
this.addHeaderElementAttributes();
|
|
126
|
+
}
|
|
104
127
|
/**
|
|
105
128
|
* Updates the column options with the new sorting state.
|
|
106
129
|
*
|
|
@@ -108,12 +131,24 @@ class ColumnSorting {
|
|
|
108
131
|
* The column to update.
|
|
109
132
|
*/
|
|
110
133
|
updateColumnOptions(col) {
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
134
|
+
const sortings = col.viewport.grid.querying.sorting.currentSortings || [];
|
|
135
|
+
const sortingIndex = sortings.findIndex((sorting) => sorting.columnId === col.id);
|
|
136
|
+
if (sortingIndex !== -1 && sortings[sortingIndex].order) {
|
|
137
|
+
const sorting = sortings[sortingIndex];
|
|
138
|
+
const sortingOptions = {
|
|
139
|
+
order: sorting.order
|
|
140
|
+
};
|
|
141
|
+
if (sortings.length > 1) {
|
|
142
|
+
sortingOptions.priority = sortingIndex + 1;
|
|
143
|
+
}
|
|
144
|
+
col.setOptions({ sorting: sortingOptions });
|
|
145
|
+
if (sortings.length < 2) {
|
|
146
|
+
delete col.options.sorting?.priority;
|
|
147
|
+
}
|
|
114
148
|
}
|
|
115
149
|
else {
|
|
116
150
|
delete col.options.sorting?.order;
|
|
151
|
+
delete col.options.sorting?.priority;
|
|
117
152
|
if (col.options.sorting &&
|
|
118
153
|
Object.keys(col.options.sorting).length < 1) {
|
|
119
154
|
delete col.options.sorting;
|
|
@@ -127,8 +162,11 @@ class ColumnSorting {
|
|
|
127
162
|
* @param order
|
|
128
163
|
* The order of sorting. It can be `'asc'`, `'desc'` or `null` if the
|
|
129
164
|
* sorting should be disabled.
|
|
165
|
+
*
|
|
166
|
+
* @param additive
|
|
167
|
+
* Whether to add this sort to existing sorts or replace them.
|
|
130
168
|
*/
|
|
131
|
-
async setOrder(order) {
|
|
169
|
+
async setOrder(order, additive = false) {
|
|
132
170
|
const viewport = this.column.viewport;
|
|
133
171
|
// Do not call sorting when cell is currently edited and validated.
|
|
134
172
|
if (viewport.validator?.errorCell) {
|
|
@@ -143,11 +181,40 @@ class ColumnSorting {
|
|
|
143
181
|
order
|
|
144
182
|
});
|
|
145
183
|
});
|
|
146
|
-
|
|
184
|
+
if (additive) {
|
|
185
|
+
const baseSortings = (sortingController.currentSortings ||
|
|
186
|
+
(sortingController.currentSorting?.columnId &&
|
|
187
|
+
sortingController.currentSorting.order ?
|
|
188
|
+
[sortingController.currentSorting] :
|
|
189
|
+
[])).filter((sorting) => !!(sorting.columnId && sorting.order));
|
|
190
|
+
const sortings = baseSortings.slice();
|
|
191
|
+
const index = sortings.findIndex((sorting) => sorting.columnId === this.column.id);
|
|
192
|
+
if (!order) {
|
|
193
|
+
if (index !== -1) {
|
|
194
|
+
sortings.splice(index, 1);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
const sorting = {
|
|
199
|
+
columnId: this.column.id,
|
|
200
|
+
order
|
|
201
|
+
};
|
|
202
|
+
if (index !== -1) {
|
|
203
|
+
sortings[index] = sorting;
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
sortings.push(sorting);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
sortingController.setSorting(sortings);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
sortingController.setSorting(order, this.column.id);
|
|
213
|
+
}
|
|
147
214
|
await viewport.updateRows();
|
|
148
215
|
for (const col of viewport.columns) {
|
|
149
216
|
this.updateColumnOptions(col);
|
|
150
|
-
col.sorting?.
|
|
217
|
+
col.sorting?.refreshHeaderAttributes();
|
|
151
218
|
}
|
|
152
219
|
a11y?.userSortedColumn(order);
|
|
153
220
|
[this.column, viewport.grid].forEach((source) => {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
*
|
|
3
3
|
* Grid Columns Resizer class.
|
|
4
4
|
*
|
|
5
|
-
* (c) 2020-
|
|
5
|
+
* (c) 2020-2026 Highsoft AS
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* A commercial license may be required depending on use.
|
|
8
|
+
* See www.highcharts.com/license
|
|
8
9
|
*
|
|
9
|
-
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
10
10
|
*
|
|
11
11
|
* Authors:
|
|
12
12
|
* - Dawid Dragula
|
|
@@ -35,6 +35,19 @@ declare class RowsVirtualizer {
|
|
|
35
35
|
* Rendering row settings.
|
|
36
36
|
*/
|
|
37
37
|
rowSettings?: RowsSettings;
|
|
38
|
+
/**
|
|
39
|
+
* Reuse pool for rows that are currently out of viewport.
|
|
40
|
+
*/
|
|
41
|
+
private readonly rowPool;
|
|
42
|
+
/**
|
|
43
|
+
* Maximum number of rows to keep in the reuse pool.
|
|
44
|
+
*/
|
|
45
|
+
private static readonly MAX_POOL_SIZE;
|
|
46
|
+
/**
|
|
47
|
+
* Flag indicating if a scroll update is queued for the next animation
|
|
48
|
+
* frame.
|
|
49
|
+
*/
|
|
50
|
+
private scrollQueued;
|
|
38
51
|
/**
|
|
39
52
|
* Constructs an instance of the rows virtualizer.
|
|
40
53
|
*
|
|
@@ -56,6 +69,10 @@ declare class RowsVirtualizer {
|
|
|
56
69
|
* is enabled.
|
|
57
70
|
*/
|
|
58
71
|
scroll(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Applies the scroll logic for virtualized rows.
|
|
74
|
+
*/
|
|
75
|
+
private applyScroll;
|
|
59
76
|
/**
|
|
60
77
|
* Adjusts the visible row heights from the bottom of the viewport.
|
|
61
78
|
*/
|
|
@@ -78,9 +95,29 @@ declare class RowsVirtualizer {
|
|
|
78
95
|
* Reflow the rendered rows content dimensions.
|
|
79
96
|
*/
|
|
80
97
|
reflowRows(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Gets a row from the pool or creates a new one for the given index.
|
|
100
|
+
*
|
|
101
|
+
* @param index
|
|
102
|
+
* The row index in the data table.
|
|
103
|
+
*
|
|
104
|
+
* @returns
|
|
105
|
+
* A TableRow instance ready for use.
|
|
106
|
+
*/
|
|
107
|
+
private getOrCreateRow;
|
|
108
|
+
/**
|
|
109
|
+
* Adds a row to the reuse pool, or destroys it if the pool is full.
|
|
110
|
+
*
|
|
111
|
+
* @param row
|
|
112
|
+
* The row to pool.
|
|
113
|
+
*/
|
|
114
|
+
private poolRow;
|
|
81
115
|
/**
|
|
82
116
|
* Returns the default height of a row. This method should be called only
|
|
83
117
|
* once on initialization.
|
|
118
|
+
*
|
|
119
|
+
* @returns
|
|
120
|
+
* The default height of a row.
|
|
84
121
|
*/
|
|
85
122
|
private getDefaultRowHeight;
|
|
86
123
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
*
|
|
3
3
|
* Grid Rows Renderer class.
|
|
4
4
|
*
|
|
5
|
-
* (c) 2020-
|
|
5
|
+
* (c) 2020-2026 Highsoft AS
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* A commercial license may be required depending on use.
|
|
8
|
+
* See www.highcharts.com/license
|
|
8
9
|
*
|
|
9
|
-
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
10
10
|
*
|
|
11
11
|
* Authors:
|
|
12
12
|
* - Dawid Dragula
|
|
@@ -45,6 +45,15 @@ class RowsVirtualizer {
|
|
|
45
45
|
* flickering loops when scrolling to the last row.
|
|
46
46
|
*/
|
|
47
47
|
this.preventScroll = false;
|
|
48
|
+
/**
|
|
49
|
+
* Reuse pool for rows that are currently out of viewport.
|
|
50
|
+
*/
|
|
51
|
+
this.rowPool = [];
|
|
52
|
+
/**
|
|
53
|
+
* Flag indicating if a scroll update is queued for the next animation
|
|
54
|
+
* frame.
|
|
55
|
+
*/
|
|
56
|
+
this.scrollQueued = false;
|
|
48
57
|
this.rowSettings =
|
|
49
58
|
viewport.grid.options?.rendering?.rows;
|
|
50
59
|
this.viewport = viewport;
|
|
@@ -81,6 +90,12 @@ class RowsVirtualizer {
|
|
|
81
90
|
let rows = this.viewport.rows;
|
|
82
91
|
const oldScrollLeft = tbody.scrollLeft;
|
|
83
92
|
let oldScrollTop;
|
|
93
|
+
if (this.rowPool.length) {
|
|
94
|
+
for (let i = this.rowPool.length - 1; i >= 0; --i) {
|
|
95
|
+
this.rowPool[i].destroy();
|
|
96
|
+
}
|
|
97
|
+
this.rowPool.length = 0;
|
|
98
|
+
}
|
|
84
99
|
if (rows.length) {
|
|
85
100
|
oldScrollTop = tbody.scrollTop;
|
|
86
101
|
for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {
|
|
@@ -107,6 +122,19 @@ class RowsVirtualizer {
|
|
|
107
122
|
* is enabled.
|
|
108
123
|
*/
|
|
109
124
|
scroll() {
|
|
125
|
+
if (this.scrollQueued) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this.scrollQueued = true;
|
|
129
|
+
requestAnimationFrame(() => {
|
|
130
|
+
this.scrollQueued = false;
|
|
131
|
+
this.applyScroll();
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Applies the scroll logic for virtualized rows.
|
|
136
|
+
*/
|
|
137
|
+
applyScroll() {
|
|
110
138
|
const target = this.viewport.tbodyElement;
|
|
111
139
|
const { defaultRowHeight: rowHeight } = this;
|
|
112
140
|
const lastScrollTop = target.scrollTop;
|
|
@@ -195,36 +223,70 @@ class RowsVirtualizer {
|
|
|
195
223
|
const to = Math.min(rowCursor + rowsPerPage + buffer, rows[rows.length - 1].index - 1);
|
|
196
224
|
const alwaysLastRow = rows.pop();
|
|
197
225
|
const tempRows = [];
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
226
|
+
const currentFrom = rows[0]?.index;
|
|
227
|
+
const currentTo = rows[rows.length - 1]?.index;
|
|
228
|
+
const hasOverlap = (rows.length > 0 &&
|
|
229
|
+
currentFrom !== void 0 &&
|
|
230
|
+
currentTo !== void 0 &&
|
|
231
|
+
!(to < currentFrom || from > currentTo));
|
|
232
|
+
if (!hasOverlap) {
|
|
233
|
+
// Remove rows that are out of the range except the last row.
|
|
234
|
+
for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {
|
|
235
|
+
const row = rows[i];
|
|
236
|
+
const rowIndex = row.index;
|
|
237
|
+
if (rowIndex < from || rowIndex > to) {
|
|
238
|
+
this.poolRow(row);
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
tempRows.push(row);
|
|
242
|
+
}
|
|
204
243
|
}
|
|
205
|
-
|
|
206
|
-
|
|
244
|
+
rows = tempRows;
|
|
245
|
+
vp.rows = rows;
|
|
246
|
+
for (let i = from; i <= to; ++i) {
|
|
247
|
+
const row = rows[i - (rows[0]?.index || 0)];
|
|
248
|
+
// Recreate row when it is destroyed and it is in the range.
|
|
249
|
+
if (!row) {
|
|
250
|
+
rows.push(this.getOrCreateRow(i));
|
|
251
|
+
}
|
|
207
252
|
}
|
|
253
|
+
rows.sort((a, b) => a.index - b.index);
|
|
208
254
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
rows.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
255
|
+
else {
|
|
256
|
+
// Remove rows outside the range from the start.
|
|
257
|
+
while (rows.length && rows[0].index < from) {
|
|
258
|
+
this.poolRow(rows.shift());
|
|
259
|
+
}
|
|
260
|
+
// Remove rows outside the range from the end.
|
|
261
|
+
while (rows.length && rows[rows.length - 1].index > to) {
|
|
262
|
+
this.poolRow(rows.pop());
|
|
263
|
+
}
|
|
264
|
+
if (!rows.length) {
|
|
265
|
+
for (let i = from; i <= to; ++i) {
|
|
266
|
+
rows.push(this.getOrCreateRow(i));
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
// Add rows before the current range.
|
|
271
|
+
for (let i = rows[0].index - 1; i >= from; --i) {
|
|
272
|
+
rows.unshift(this.getOrCreateRow(i));
|
|
273
|
+
}
|
|
274
|
+
// Add rows after the current range.
|
|
275
|
+
for (let i = rows[rows.length - 1].index + 1; i <= to; ++i) {
|
|
276
|
+
rows.push(this.getOrCreateRow(i));
|
|
220
277
|
}
|
|
221
278
|
}
|
|
279
|
+
vp.rows = rows;
|
|
222
280
|
}
|
|
223
|
-
rows.sort((a, b) => a.index - b.index);
|
|
224
281
|
for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
282
|
+
const row = rows[i];
|
|
283
|
+
if (!row.rendered) {
|
|
284
|
+
vp.tbodyElement.insertBefore(row.htmlElement, vp.tbodyElement.lastChild);
|
|
285
|
+
row.render();
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
if (!row.htmlElement.isConnected) {
|
|
289
|
+
vp.tbodyElement.insertBefore(row.htmlElement, vp.tbodyElement.lastChild);
|
|
228
290
|
}
|
|
229
291
|
}
|
|
230
292
|
if (alwaysLastRow) {
|
|
@@ -322,9 +384,54 @@ class RowsVirtualizer {
|
|
|
322
384
|
}
|
|
323
385
|
this.adjustRowHeights();
|
|
324
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* Gets a row from the pool or creates a new one for the given index.
|
|
389
|
+
*
|
|
390
|
+
* @param index
|
|
391
|
+
* The row index in the data table.
|
|
392
|
+
*
|
|
393
|
+
* @returns
|
|
394
|
+
* A TableRow instance ready for use.
|
|
395
|
+
*/
|
|
396
|
+
getOrCreateRow(index) {
|
|
397
|
+
const vp = this.viewport;
|
|
398
|
+
const isVirtualization = vp.virtualRows;
|
|
399
|
+
const pooledRow = this.rowPool.pop();
|
|
400
|
+
if (pooledRow) {
|
|
401
|
+
pooledRow.reuse(index, false);
|
|
402
|
+
if (isVirtualization) {
|
|
403
|
+
pooledRow.setTranslateY(pooledRow.getDefaultTopOffset());
|
|
404
|
+
}
|
|
405
|
+
return pooledRow;
|
|
406
|
+
}
|
|
407
|
+
const newRow = new TableRow(vp, index);
|
|
408
|
+
newRow.rendered = false;
|
|
409
|
+
if (isVirtualization) {
|
|
410
|
+
newRow.setTranslateY(newRow.getDefaultTopOffset());
|
|
411
|
+
}
|
|
412
|
+
return newRow;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Adds a row to the reuse pool, or destroys it if the pool is full.
|
|
416
|
+
*
|
|
417
|
+
* @param row
|
|
418
|
+
* The row to pool.
|
|
419
|
+
*/
|
|
420
|
+
poolRow(row) {
|
|
421
|
+
row.htmlElement.remove();
|
|
422
|
+
if (this.rowPool.length < RowsVirtualizer.MAX_POOL_SIZE) {
|
|
423
|
+
this.rowPool.push(row);
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
row.destroy();
|
|
427
|
+
}
|
|
428
|
+
}
|
|
325
429
|
/**
|
|
326
430
|
* Returns the default height of a row. This method should be called only
|
|
327
431
|
* once on initialization.
|
|
432
|
+
*
|
|
433
|
+
* @returns
|
|
434
|
+
* The default height of a row.
|
|
328
435
|
*/
|
|
329
436
|
getDefaultRowHeight() {
|
|
330
437
|
const vp = this.viewport;
|
|
@@ -338,6 +445,10 @@ class RowsVirtualizer {
|
|
|
338
445
|
return defaultRowHeight;
|
|
339
446
|
}
|
|
340
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
* Maximum number of rows to keep in the reuse pool.
|
|
450
|
+
*/
|
|
451
|
+
RowsVirtualizer.MAX_POOL_SIZE = 100;
|
|
341
452
|
/* *
|
|
342
453
|
*
|
|
343
454
|
* Default Export
|
|
@@ -63,13 +63,20 @@ declare class TableCell extends Cell {
|
|
|
63
63
|
* the cell's content.
|
|
64
64
|
*/
|
|
65
65
|
private updateDataTable;
|
|
66
|
+
/**
|
|
67
|
+
* Initialize event listeners for table body cells.
|
|
68
|
+
*
|
|
69
|
+
* Most events (click, dblclick, keydown, mousedown, mouseover, mouseout)
|
|
70
|
+
* are delegated to Table for better performance with virtualization.
|
|
71
|
+
* Only focus/blur remain on individual cells for focus management.
|
|
72
|
+
*/
|
|
66
73
|
initEvents(): void;
|
|
67
74
|
/**
|
|
68
75
|
* Handles the focus event on the cell.
|
|
69
76
|
*/
|
|
70
77
|
protected onFocus(): void;
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
onMouseOver(): void;
|
|
79
|
+
onMouseOut(): void;
|
|
73
80
|
/**
|
|
74
81
|
* Handles the double click event on the cell.
|
|
75
82
|
*
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
*
|
|
3
3
|
* Grid class
|
|
4
4
|
*
|
|
5
|
-
* (c) 2020-
|
|
5
|
+
* (c) 2020-2026 Highsoft AS
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* A commercial license may be required depending on use.
|
|
8
|
+
* See www.highcharts.com/license
|
|
8
9
|
*
|
|
9
|
-
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
10
10
|
*
|
|
11
11
|
* Authors:
|
|
12
12
|
* - Dawid Dragula
|
|
@@ -133,12 +133,19 @@ class TableCell extends Cell {
|
|
|
133
133
|
await vp.updateRows();
|
|
134
134
|
return true;
|
|
135
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Initialize event listeners for table body cells.
|
|
138
|
+
*
|
|
139
|
+
* Most events (click, dblclick, keydown, mousedown, mouseover, mouseout)
|
|
140
|
+
* are delegated to Table for better performance with virtualization.
|
|
141
|
+
* Only focus/blur remain on individual cells for focus management.
|
|
142
|
+
*/
|
|
136
143
|
initEvents() {
|
|
137
|
-
this.cellEvents.push(['
|
|
138
|
-
this.cellEvents.push(['
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
144
|
+
this.cellEvents.push(['blur', () => this.onBlur()]);
|
|
145
|
+
this.cellEvents.push(['focus', () => this.onFocus()]);
|
|
146
|
+
this.cellEvents.forEach((pair) => {
|
|
147
|
+
this.htmlElement.addEventListener(pair[0], pair[1]);
|
|
148
|
+
});
|
|
142
149
|
}
|
|
143
150
|
/**
|
|
144
151
|
* Handles the focus event on the cell.
|
|
@@ -43,6 +43,16 @@ declare class TableRow extends Row {
|
|
|
43
43
|
* table.
|
|
44
44
|
*/
|
|
45
45
|
update(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Reuses the row instance for a new index.
|
|
48
|
+
*
|
|
49
|
+
* @param index
|
|
50
|
+
* The index of the row in the data table.
|
|
51
|
+
*
|
|
52
|
+
* @param doReflow
|
|
53
|
+
* Whether to reflow the row after updating the cells.
|
|
54
|
+
*/
|
|
55
|
+
reuse(index: number, doReflow?: boolean): void;
|
|
46
56
|
/**
|
|
47
57
|
* Adds or removes the hovered CSS class to the row element.
|
|
48
58
|
*
|
|
@@ -66,6 +76,14 @@ declare class TableRow extends Row {
|
|
|
66
76
|
* lifecycle.
|
|
67
77
|
*/
|
|
68
78
|
updateRowAttributes(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Updates the row parity class based on index.
|
|
81
|
+
*/
|
|
82
|
+
private updateParityClass;
|
|
83
|
+
/**
|
|
84
|
+
* Updates the hovered and synced classes based on grid state.
|
|
85
|
+
*/
|
|
86
|
+
private updateStateClasses;
|
|
69
87
|
/**
|
|
70
88
|
* Sets the vertical translation of the row. Used for virtual scrolling.
|
|
71
89
|
*
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
*
|
|
3
3
|
* Grid TableRow class
|
|
4
4
|
*
|
|
5
|
-
* (c) 2020-
|
|
5
|
+
* (c) 2020-2026 Highsoft AS
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* A commercial license may be required depending on use.
|
|
8
|
+
* See www.highcharts.com/license
|
|
8
9
|
*
|
|
9
|
-
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
|
|
10
10
|
*
|
|
11
11
|
* Authors:
|
|
12
12
|
* - Dawid Dragula
|
|
@@ -92,6 +92,35 @@ class TableRow extends Row {
|
|
|
92
92
|
}
|
|
93
93
|
this.reflow();
|
|
94
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Reuses the row instance for a new index.
|
|
97
|
+
*
|
|
98
|
+
* @param index
|
|
99
|
+
* The index of the row in the data table.
|
|
100
|
+
*
|
|
101
|
+
* @param doReflow
|
|
102
|
+
* Whether to reflow the row after updating the cells.
|
|
103
|
+
*/
|
|
104
|
+
reuse(index, doReflow = true) {
|
|
105
|
+
if (this.index === index) {
|
|
106
|
+
this.update();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
this.index = index;
|
|
110
|
+
this.id = this.viewport.dataTable.getOriginalRowIndex(index);
|
|
111
|
+
this.htmlElement.setAttribute('data-row-index', index);
|
|
112
|
+
this.updateRowAttributes();
|
|
113
|
+
this.updateParityClass();
|
|
114
|
+
this.updateStateClasses();
|
|
115
|
+
this.loadData();
|
|
116
|
+
for (let i = 0, iEnd = this.cells.length; i < iEnd; ++i) {
|
|
117
|
+
const cell = this.cells[i];
|
|
118
|
+
void cell.setValue();
|
|
119
|
+
}
|
|
120
|
+
if (doReflow) {
|
|
121
|
+
this.reflow();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
95
124
|
/**
|
|
96
125
|
* Adds or removes the hovered CSS class to the row element.
|
|
97
126
|
*
|
|
@@ -127,13 +156,8 @@ class TableRow extends Row {
|
|
|
127
156
|
el.setAttribute('data-row-index', idx);
|
|
128
157
|
this.updateRowAttributes();
|
|
129
158
|
// Indexing from 0, so rows with even index are odd.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
el.classList.add(Globals.getClassName('hoveredRow'));
|
|
133
|
-
}
|
|
134
|
-
if (this.viewport.grid.syncedRowIndex === idx) {
|
|
135
|
-
el.classList.add(Globals.getClassName('syncedRow'));
|
|
136
|
-
}
|
|
159
|
+
this.updateParityClass();
|
|
160
|
+
this.updateStateClasses();
|
|
137
161
|
}
|
|
138
162
|
/**
|
|
139
163
|
* Sets the row HTML element attributes that are updateable in the row
|
|
@@ -151,6 +175,28 @@ class TableRow extends Row {
|
|
|
151
175
|
// Calculate levels of header, 1 to avoid indexing from 0
|
|
152
176
|
a11y?.setRowIndex(el, idx + (vp.header?.rows.length ?? 0) + 1);
|
|
153
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* Updates the row parity class based on index.
|
|
180
|
+
*/
|
|
181
|
+
updateParityClass() {
|
|
182
|
+
const el = this.htmlElement;
|
|
183
|
+
el.classList.remove(Globals.getClassName('rowEven'), Globals.getClassName('rowOdd'));
|
|
184
|
+
// Indexing from 0, so rows with even index are odd.
|
|
185
|
+
el.classList.add(Globals.getClassName(this.index % 2 ? 'rowEven' : 'rowOdd'));
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Updates the hovered and synced classes based on grid state.
|
|
189
|
+
*/
|
|
190
|
+
updateStateClasses() {
|
|
191
|
+
const el = this.htmlElement;
|
|
192
|
+
el.classList.remove(Globals.getClassName('hoveredRow'), Globals.getClassName('syncedRow'));
|
|
193
|
+
if (this.viewport.grid.hoveredRowIndex === this.index) {
|
|
194
|
+
el.classList.add(Globals.getClassName('hoveredRow'));
|
|
195
|
+
}
|
|
196
|
+
if (this.viewport.grid.syncedRowIndex === this.index) {
|
|
197
|
+
el.classList.add(Globals.getClassName('syncedRow'));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
154
200
|
/**
|
|
155
201
|
* Sets the vertical translation of the row. Used for virtual scrolling.
|
|
156
202
|
*
|
|
@@ -52,13 +52,6 @@ declare abstract class Cell {
|
|
|
52
52
|
* Handles the blur event on the cell.
|
|
53
53
|
*/
|
|
54
54
|
protected onBlur(): void;
|
|
55
|
-
/**
|
|
56
|
-
* Handles user keydown on the cell.
|
|
57
|
-
*
|
|
58
|
-
* @param e
|
|
59
|
-
* Keyboard event object.
|
|
60
|
-
*/
|
|
61
|
-
protected onKeyDown(e: KeyboardEvent): void;
|
|
62
55
|
/**
|
|
63
56
|
* Renders the cell by appending the HTML element to the row.
|
|
64
57
|
*/
|