@highcharts/grid-pro 2.2.0 → 2.3.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.
Files changed (266) hide show
  1. package/LICENSE.txt +6 -0
  2. package/README.md +15 -9
  3. package/css/grid-pro.css +1262 -1122
  4. package/css/modules/grid-base-variables.css +131 -0
  5. package/css/modules/grid-button-variables.css +140 -0
  6. package/css/modules/grid-caption-variables.css +11 -0
  7. package/css/modules/grid-description-variables.css +11 -0
  8. package/css/modules/grid-input-variables.css +114 -0
  9. package/css/modules/grid-link-variables.css +18 -0
  10. package/css/modules/grid-menu-variables.css +50 -0
  11. package/css/modules/grid-pagination-variables.css +12 -0
  12. package/css/modules/grid-popup-variables.css +24 -0
  13. package/css/modules/grid-pro.css +234 -0
  14. package/css/modules/grid-table-variables.css +385 -0
  15. package/css/modules/grid-theme-default.css +55 -0
  16. package/es-modules/Accessibility/A11yI18n.js +1 -2
  17. package/es-modules/Accessibility/Accessibility.js +1 -2
  18. package/es-modules/Accessibility/AccessibilityComponent.d.ts +2 -2
  19. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +5 -6
  20. package/es-modules/Accessibility/Components/LegendComponent.js +1 -2
  21. package/es-modules/Accessibility/Components/MenuComponent.js +1 -2
  22. package/es-modules/Accessibility/Components/NavigatorComponent.js +3 -4
  23. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +1 -2
  24. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +1 -2
  25. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +3 -4
  26. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +3 -4
  27. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +1 -2
  28. package/es-modules/Accessibility/Components/ZoomComponent.js +1 -2
  29. package/es-modules/Accessibility/FocusBorder.js +1 -2
  30. package/es-modules/Accessibility/KeyboardNavigation.js +1 -2
  31. package/es-modules/Accessibility/KeyboardNavigationHandler.js +1 -2
  32. package/es-modules/Accessibility/Options/A11yDefaults.d.ts +11 -0
  33. package/es-modules/Accessibility/Options/A11yDefaults.js +11 -0
  34. package/es-modules/Accessibility/Options/DeprecatedOptions.d.ts +58 -0
  35. package/es-modules/Accessibility/Options/DeprecatedOptions.js +7 -2
  36. package/es-modules/Accessibility/Options/LangDefaults.js +9 -0
  37. package/es-modules/Accessibility/ProxyElement.js +2 -5
  38. package/es-modules/Accessibility/ProxyProvider.js +1 -2
  39. package/es-modules/Accessibility/Utils/Announcer.js +2 -3
  40. package/es-modules/Accessibility/Utils/ChartUtilities.js +1 -2
  41. package/es-modules/Accessibility/Utils/EventProvider.d.ts +2 -2
  42. package/es-modules/Accessibility/Utils/EventProvider.js +6 -2
  43. package/es-modules/Accessibility/Utils/HTMLUtilities.js +1 -2
  44. package/es-modules/Core/Animation/AnimationUtilities.js +1 -2
  45. package/es-modules/Core/Animation/Fx.js +1 -2
  46. package/es-modules/Core/Callback.d.ts +9 -2
  47. package/es-modules/Core/Chart/Chart.js +48 -41
  48. package/es-modules/Core/Chart/Chart3D.js +1 -2
  49. package/es-modules/Core/Chart/ChartDefaults.js +11 -0
  50. package/es-modules/Core/Chart/ChartOptions.d.ts +8 -0
  51. package/es-modules/Core/Chart/GanttChart.js +1 -2
  52. package/es-modules/Core/Chart/MapChart.js +1 -2
  53. package/es-modules/Core/Chart/StockChart.js +2 -3
  54. package/es-modules/Core/Color/Color.js +1 -2
  55. package/es-modules/Core/Defaults.js +36 -9
  56. package/es-modules/Core/Delaunay.d.ts +52 -0
  57. package/es-modules/Core/Delaunay.js +310 -0
  58. package/es-modules/Core/Foundation.js +1 -2
  59. package/es-modules/Core/Geometry/CircleUtilities.js +1 -2
  60. package/es-modules/Core/Globals.js +1 -1
  61. package/es-modules/Core/HttpUtilities.js +1 -2
  62. package/es-modules/Core/MSPointer.js +1 -2
  63. package/es-modules/Core/Math3D.js +1 -2
  64. package/es-modules/Core/Options.d.ts +6 -2
  65. package/es-modules/Core/Pointer.js +23 -4
  66. package/es-modules/Core/PointerEvent.d.ts +2 -0
  67. package/es-modules/Core/Renderer/HTML/AST.js +2 -2
  68. package/es-modules/Core/Renderer/HTML/HTMLElement.js +1 -2
  69. package/es-modules/Core/Renderer/RendererUtilities.js +34 -19
  70. package/es-modules/Core/Responsive.d.ts +4 -2
  71. package/es-modules/Core/Responsive.js +10 -4
  72. package/es-modules/Core/Templating.d.ts +1 -1
  73. package/es-modules/Core/Templating.js +3 -4
  74. package/es-modules/Core/Time.d.ts +8 -0
  75. package/es-modules/Core/Time.js +2 -2
  76. package/es-modules/Core/Tooltip.d.ts +4 -8
  77. package/es-modules/Core/Tooltip.js +100 -81
  78. package/es-modules/Core/TooltipOptions.d.ts +44 -1
  79. package/es-modules/Core/Utilities.d.ts +25 -665
  80. package/es-modules/Core/Utilities.js +17 -1398
  81. package/es-modules/Data/ColumnUtils.d.ts +83 -80
  82. package/es-modules/Data/ColumnUtils.js +103 -113
  83. package/es-modules/Data/Connectors/CSVConnector.d.ts +9 -14
  84. package/es-modules/Data/Connectors/CSVConnector.js +3 -4
  85. package/es-modules/Data/Connectors/DataConnector.d.ts +52 -54
  86. package/es-modules/Data/Connectors/DataConnector.js +33 -52
  87. package/es-modules/Data/Connectors/GoogleSheetsConnector.d.ts +40 -42
  88. package/es-modules/Data/Connectors/GoogleSheetsConnector.js +73 -88
  89. package/es-modules/Data/Connectors/GoogleSheetsConnectorOptions.d.ts +4 -2
  90. package/es-modules/Data/Connectors/HTMLTableConnector.d.ts +23 -28
  91. package/es-modules/Data/Connectors/HTMLTableConnector.js +3 -4
  92. package/es-modules/Data/Connectors/JSONConnector.d.ts +9 -14
  93. package/es-modules/Data/Connectors/JSONConnector.js +3 -4
  94. package/es-modules/Data/Converters/CSVConverter.d.ts +5 -5
  95. package/es-modules/Data/Converters/CSVConverter.js +3 -4
  96. package/es-modules/Data/Converters/CSVConverterOptions.d.ts +2 -2
  97. package/es-modules/Data/Converters/DataConverter.d.ts +76 -78
  98. package/es-modules/Data/Converters/DataConverter.js +26 -53
  99. package/es-modules/Data/Converters/DataConverterUtils.d.ts +88 -81
  100. package/es-modules/Data/Converters/DataConverterUtils.js +169 -181
  101. package/es-modules/Data/Converters/GoogleSheetsConverter.d.ts +4 -4
  102. package/es-modules/Data/Converters/GoogleSheetsConverter.js +3 -3
  103. package/es-modules/Data/Converters/GoogleSheetsConverterOptions.d.ts +2 -2
  104. package/es-modules/Data/Converters/HTMLTableConverter.d.ts +4 -4
  105. package/es-modules/Data/Converters/HTMLTableConverter.js +2 -3
  106. package/es-modules/Data/Converters/HTMLTableConverterOptions.d.ts +2 -2
  107. package/es-modules/Data/Converters/JSONConverter.d.ts +7 -7
  108. package/es-modules/Data/Converters/JSONConverter.js +6 -6
  109. package/es-modules/Data/Converters/JSONConverterOptions.d.ts +2 -2
  110. package/es-modules/Data/DataCursor.d.ts +65 -70
  111. package/es-modules/Data/DataCursor.js +119 -139
  112. package/es-modules/Data/DataEvent.d.ts +55 -57
  113. package/es-modules/Data/DataPool.d.ts +10 -17
  114. package/es-modules/Data/DataPool.js +20 -9
  115. package/es-modules/Data/DataTable.d.ts +111 -113
  116. package/es-modules/Data/DataTable.js +3 -3
  117. package/es-modules/Data/DataTableCore.d.ts +9 -9
  118. package/es-modules/Data/DataTableCore.js +2 -2
  119. package/es-modules/Data/Formula/FormulaParser.js +1 -2
  120. package/es-modules/Data/Formula/FormulaProcessor.js +1 -2
  121. package/es-modules/Data/Modifiers/ChainModifier.d.ts +29 -34
  122. package/es-modules/Data/Modifiers/ChainModifier.js +7 -8
  123. package/es-modules/Data/Modifiers/DataModifier.d.ts +36 -41
  124. package/es-modules/Data/Modifiers/DataModifier.js +31 -53
  125. package/es-modules/Data/Modifiers/FilterModifier.d.ts +4 -4
  126. package/es-modules/Data/Modifiers/FilterModifier.js +3 -4
  127. package/es-modules/Data/Modifiers/FilterModifierOptions.d.ts +3 -2
  128. package/es-modules/Data/Modifiers/InvertModifier.d.ts +4 -4
  129. package/es-modules/Data/Modifiers/InvertModifier.js +3 -4
  130. package/es-modules/Data/Modifiers/MathModifier.d.ts +5 -4
  131. package/es-modules/Data/Modifiers/RangeModifier.d.ts +4 -4
  132. package/es-modules/Data/Modifiers/RangeModifier.js +3 -4
  133. package/es-modules/Data/Modifiers/SortModifier.d.ts +6 -11
  134. package/es-modules/Data/Modifiers/SortModifier.js +3 -4
  135. package/es-modules/Data/Modifiers/SortModifierOptions.d.ts +3 -3
  136. package/es-modules/Grid/Core/Accessibility/Accessibility.d.ts +1 -1
  137. package/es-modules/Grid/Core/Accessibility/Accessibility.js +5 -6
  138. package/es-modules/Grid/Core/Data/DataProvider.d.ts +97 -0
  139. package/es-modules/Grid/Core/Data/DataProvider.js +89 -0
  140. package/es-modules/Grid/Core/Data/DataProviderRegistry.d.ts +20 -0
  141. package/es-modules/Grid/Core/Data/DataProviderRegistry.js +52 -0
  142. package/es-modules/Grid/Core/Data/DataProviderType.d.ts +19 -0
  143. package/es-modules/Grid/Core/Data/DataProviderType.js +15 -0
  144. package/es-modules/Grid/Core/Data/LocalDataProvider.d.ts +165 -0
  145. package/es-modules/Grid/Core/Data/LocalDataProvider.js +341 -0
  146. package/es-modules/Grid/Core/Defaults.js +4 -2
  147. package/es-modules/Grid/Core/Globals.d.ts +20 -16
  148. package/es-modules/Grid/Core/Globals.js +10 -8
  149. package/es-modules/Grid/Core/Grid.d.ts +31 -22
  150. package/es-modules/Grid/Core/Grid.js +214 -136
  151. package/es-modules/Grid/Core/GridUtils.d.ts +33 -0
  152. package/es-modules/Grid/Core/GridUtils.js +50 -3
  153. package/es-modules/Grid/Core/Options.d.ts +145 -4
  154. package/es-modules/Grid/Core/Pagination/Pagination.d.ts +3 -0
  155. package/es-modules/Grid/Core/Pagination/Pagination.js +63 -23
  156. package/es-modules/Grid/Core/Pagination/PaginationOptions.d.ts +4 -0
  157. package/es-modules/Grid/Core/Querying/FilteringController.js +1 -2
  158. package/es-modules/Grid/Core/Querying/PaginationController.d.ts +2 -2
  159. package/es-modules/Grid/Core/Querying/PaginationController.js +3 -3
  160. package/es-modules/Grid/Core/Querying/QueryingController.d.ts +1 -1
  161. package/es-modules/Grid/Core/Querying/QueryingController.js +2 -26
  162. package/es-modules/Grid/Core/Responsive/ResponsiveComposition.d.ts +53 -0
  163. package/es-modules/Grid/Core/Responsive/ResponsiveComposition.js +229 -0
  164. package/es-modules/Grid/Core/Responsive/ResponsiveOptions.d.ts +58 -0
  165. package/es-modules/Grid/Core/Responsive/ResponsiveOptions.js +15 -0
  166. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js +2 -3
  167. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.d.ts +1 -1
  168. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.js +3 -4
  169. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.d.ts +1 -1
  170. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.js +2 -2
  171. package/es-modules/Grid/Core/Table/Actions/ColumnSorting.d.ts +17 -1
  172. package/es-modules/Grid/Core/Table/Actions/ColumnSorting.js +58 -15
  173. package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.js +1 -3
  174. package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.d.ts +57 -3
  175. package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.js +397 -118
  176. package/es-modules/Grid/Core/Table/Body/CellContextMenu.d.ts +11 -0
  177. package/es-modules/Grid/Core/Table/Body/CellContextMenu.js +84 -0
  178. package/es-modules/Grid/Core/Table/Body/TableCell.d.ts +27 -13
  179. package/es-modules/Grid/Core/Table/Body/TableCell.js +74 -25
  180. package/es-modules/Grid/Core/Table/Body/TableRow.d.ts +7 -15
  181. package/es-modules/Grid/Core/Table/Body/TableRow.js +24 -19
  182. package/es-modules/Grid/Core/Table/Cell.d.ts +16 -3
  183. package/es-modules/Grid/Core/Table/Cell.js +36 -3
  184. package/es-modules/Grid/Core/Table/CellContent/TextContent.js +3 -8
  185. package/es-modules/Grid/Core/Table/Column.d.ts +10 -4
  186. package/es-modules/Grid/Core/Table/Column.js +23 -34
  187. package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js +9 -8
  188. package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.js +4 -3
  189. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.d.ts +5 -0
  190. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js +7 -2
  191. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.js +1 -2
  192. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.js +1 -2
  193. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.js +2 -3
  194. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js +1 -2
  195. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.js +1 -2
  196. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.d.ts +0 -1
  197. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.js +4 -14
  198. package/es-modules/Grid/Core/Table/Header/HeaderCell.d.ts +6 -1
  199. package/es-modules/Grid/Core/Table/Header/HeaderCell.js +33 -13
  200. package/es-modules/Grid/Core/Table/Header/HeaderRow.js +4 -5
  201. package/es-modules/Grid/Core/Table/Header/TableHeader.d.ts +1 -1
  202. package/es-modules/Grid/Core/Table/Header/TableHeader.js +3 -3
  203. package/es-modules/Grid/Core/Table/Row.d.ts +1 -1
  204. package/es-modules/Grid/Core/Table/Row.js +2 -2
  205. package/es-modules/Grid/Core/Table/Table.d.ts +38 -12
  206. package/es-modules/Grid/Core/Table/Table.js +184 -91
  207. package/es-modules/Grid/Core/UI/ContextMenuButton.d.ts +6 -7
  208. package/es-modules/Grid/Core/UI/ContextMenuButton.js +5 -3
  209. package/es-modules/Grid/Core/UI/Popup.js +7 -9
  210. package/es-modules/Grid/Core/UI/SvgIcons.d.ts +42 -7
  211. package/es-modules/Grid/Core/UI/SvgIcons.js +206 -33
  212. package/es-modules/Grid/Core/UI/Toolbar.d.ts +5 -0
  213. package/es-modules/Grid/Core/UI/ToolbarButton.d.ts +4 -12
  214. package/es-modules/Grid/Core/UI/ToolbarButton.js +8 -26
  215. package/es-modules/Grid/Pro/CellEditing/CellEditMode.d.ts +2 -2
  216. package/es-modules/Grid/Pro/CellEditing/CellEditing.js +10 -10
  217. package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js +1 -2
  218. package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.d.ts +1 -1
  219. package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js +4 -2
  220. package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.d.ts +2 -2
  221. package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js +1 -2
  222. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.d.ts +2 -2
  223. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js +1 -2
  224. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.d.ts +2 -2
  225. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js +1 -2
  226. package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js +1 -2
  227. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js +1 -2
  228. package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js +1 -2
  229. package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js +1 -2
  230. package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js +1 -2
  231. package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.d.ts +2 -2
  232. package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js +1 -2
  233. package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js +1 -2
  234. package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js +1 -2
  235. package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js +1 -2
  236. package/es-modules/Grid/Pro/ColumnTypes/Validator.js +34 -32
  237. package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.d.ts +1 -1
  238. package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js +3 -4
  239. package/es-modules/Grid/Pro/Credits/CreditsProComposition.js +1 -3
  240. package/es-modules/Grid/Pro/Data/DataSourceHelper.d.ts +74 -0
  241. package/es-modules/Grid/Pro/Data/DataSourceHelper.js +246 -0
  242. package/es-modules/Grid/Pro/Data/QuerySerializer.d.ts +46 -0
  243. package/es-modules/Grid/Pro/Data/QuerySerializer.js +169 -0
  244. package/es-modules/Grid/Pro/Data/RemoteDataProvider.d.ts +187 -0
  245. package/es-modules/Grid/Pro/Data/RemoteDataProvider.js +500 -0
  246. package/es-modules/Grid/Pro/Export/Exporting.js +1 -2
  247. package/es-modules/Grid/Pro/Export/ExportingComposition.js +1 -2
  248. package/es-modules/Grid/Pro/GridEvents.js +1 -2
  249. package/es-modules/Grid/Pro/Pagination/PaginationComposition.d.ts +0 -1
  250. package/es-modules/Grid/Pro/Pagination/PaginationComposition.js +1 -2
  251. package/es-modules/Shared/BaseForm.js +1 -2
  252. package/es-modules/Shared/DownloadURL.js +1 -2
  253. package/es-modules/Shared/TimeBase.js +3 -3
  254. package/es-modules/Shared/Types.d.ts +7 -0
  255. package/es-modules/Shared/Utilities.d.ts +576 -0
  256. package/es-modules/Shared/Utilities.js +1368 -0
  257. package/es-modules/masters/grid-pro.src.d.ts +15 -11
  258. package/es-modules/masters/grid-pro.src.js +12 -5
  259. package/grid-pro.d.ts +15 -11
  260. package/grid-pro.js +3 -3
  261. package/grid-pro.js.map +1 -1
  262. package/grid-pro.src.d.ts +15 -11
  263. package/grid-pro.src.js +10408 -8009
  264. package/package.json +1 -1
  265. package/es-modules/Grid/Core/Pagination/Icons.d.ts +0 -7
  266. package/es-modules/Grid/Core/Pagination/Icons.js +0 -7
@@ -1,4 +1,4 @@
1
- import type DataEvent from '../DataEvent';
1
+ import type { DataEventDetail } from '../DataEvent';
2
2
  import type { RangeModifierOptions } from './RangeModifierOptions';
3
3
  import DataModifier from './DataModifier.js';
4
4
  import DataTable from '../DataTable.js';
@@ -13,7 +13,7 @@ declare class RangeModifier extends DataModifier {
13
13
  /**
14
14
  * Constructs an instance of the range modifier.
15
15
  *
16
- * @param {Partial<RangeModifier.Options>} [options]
16
+ * @param {Partial<RangeModifierOptions>} [options]
17
17
  * Options to configure the range modifier.
18
18
  */
19
19
  constructor(options?: Partial<RangeModifierOptions>);
@@ -29,14 +29,14 @@ declare class RangeModifier extends DataModifier {
29
29
  * @param {DataTable} table
30
30
  * Table to modify.
31
31
  *
32
- * @param {DataEvent.Detail} [eventDetail]
32
+ * @param {DataEventDetail} [eventDetail]
33
33
  * Custom information for pending events.
34
34
  *
35
35
  * @return {DataTable}
36
36
  * Table with `modified` property as a reference or modified table, if
37
37
  * `modified` property of the original table is undefined.
38
38
  */
39
- modifyTable(table: DataTable, eventDetail?: DataEvent.Detail): DataTable;
39
+ modifyTable(table: DataTable, eventDetail?: DataEventDetail): DataTable;
40
40
  }
41
41
  declare module './DataModifierType' {
42
42
  interface DataModifierTypes {
@@ -13,8 +13,7 @@
13
13
  * */
14
14
  'use strict';
15
15
  import DataModifier from './DataModifier.js';
16
- import U from '../../Core/Utilities.js';
17
- const { merge } = U;
16
+ import { merge } from '../../Shared/Utilities.js';
18
17
  /* *
19
18
  *
20
19
  * Class
@@ -32,7 +31,7 @@ class RangeModifier extends DataModifier {
32
31
  /**
33
32
  * Constructs an instance of the range modifier.
34
33
  *
35
- * @param {Partial<RangeModifier.Options>} [options]
34
+ * @param {Partial<RangeModifierOptions>} [options]
36
35
  * Options to configure the range modifier.
37
36
  */
38
37
  constructor(options) {
@@ -52,7 +51,7 @@ class RangeModifier extends DataModifier {
52
51
  * @param {DataTable} table
53
52
  * Table to modify.
54
53
  *
55
- * @param {DataEvent.Detail} [eventDetail]
54
+ * @param {DataEventDetail} [eventDetail]
56
55
  * Custom information for pending events.
57
56
  *
58
57
  * @return {DataTable}
@@ -1,11 +1,11 @@
1
- import type DataEvent from '../DataEvent';
1
+ import type { DataEventDetail } from '../DataEvent';
2
2
  import type SortModifierOptions from './SortModifierOptions';
3
3
  import DataModifier from './DataModifier.js';
4
- import DataTable from '../DataTable.js';
4
+ import DataTable, { type Row as DataTableRow } from '../DataTable.js';
5
5
  /** @private */
6
6
  interface SortRowReference {
7
7
  index: number;
8
- row: DataTable.Row;
8
+ row: DataTableRow;
9
9
  }
10
10
  /**
11
11
  * Sort table rows according to values of a column.
@@ -22,7 +22,7 @@ declare class SortModifier extends DataModifier {
22
22
  /**
23
23
  * Constructs an instance of the sort modifier.
24
24
  *
25
- * @param {Partial<SortDataModifier.Options>} [options]
25
+ * @param {Partial<SortModifierOptions>} [options]
26
26
  * Options to configure the sort modifier.
27
27
  */
28
28
  constructor(options?: Partial<SortModifierOptions>);
@@ -35,16 +35,11 @@ declare class SortModifier extends DataModifier {
35
35
  * @param {Highcharts.DataTable} table
36
36
  * Table with rows to reference.
37
37
  *
38
- * @return {Array<SortModifier.RowReference>}
38
+ * @return {Array<SortRowReference>}
39
39
  * Array of row references.
40
40
  */
41
41
  protected getRowReferences(table: DataTable): Array<SortRowReference>;
42
- modifyTable(table: DataTable, eventDetail?: DataEvent.Detail): DataTable;
43
- }
44
- /**
45
- * Additionally provided types for modifier events and options.
46
- */
47
- declare namespace SortModifier {
42
+ modifyTable(table: DataTable, eventDetail?: DataEventDetail): DataTable;
48
43
  }
49
44
  declare module './DataModifierType' {
50
45
  interface DataModifierTypes {
@@ -13,8 +13,7 @@
13
13
  * */
14
14
  'use strict';
15
15
  import DataModifier from './DataModifier.js';
16
- import U from '../../Core/Utilities.js';
17
- const { merge } = U;
16
+ import { merge } from '../../Shared/Utilities.js';
18
17
  /* *
19
18
  *
20
19
  * Class
@@ -59,7 +58,7 @@ class SortModifier extends DataModifier {
59
58
  /**
60
59
  * Constructs an instance of the sort modifier.
61
60
  *
62
- * @param {Partial<SortDataModifier.Options>} [options]
61
+ * @param {Partial<SortModifierOptions>} [options]
63
62
  * Options to configure the sort modifier.
64
63
  */
65
64
  constructor(options) {
@@ -79,7 +78,7 @@ class SortModifier extends DataModifier {
79
78
  * @param {Highcharts.DataTable} table
80
79
  * Table with rows to reference.
81
80
  *
82
- * @return {Array<SortModifier.RowReference>}
81
+ * @return {Array<SortRowReference>}
83
82
  * Array of row references.
84
83
  */
85
84
  getRowReferences(table) {
@@ -1,5 +1,5 @@
1
1
  import type DataModifierOptions from './DataModifierOptions';
2
- import type DataTable from '../DataTable';
2
+ import type { CellType as DataTableCellType } from '../DataTable';
3
3
  /**
4
4
  * Definition of a sorting level when sorting by multiple columns.
5
5
  */
@@ -17,7 +17,7 @@ export interface SortModifierOrderByOption {
17
17
  * Custom compare function for this level. If not set, the modifier-level
18
18
  * `compare` is used.
19
19
  */
20
- compare?: (a: DataTable.CellType, b: DataTable.CellType) => number;
20
+ compare?: (a: DataTableCellType, b: DataTableCellType) => number;
21
21
  }
22
22
  /**
23
23
  * Base options shared by sorting modifiers.
@@ -48,7 +48,7 @@ export interface SortModifierBaseOptions extends DataModifierOptions {
48
48
  * A number indicating whether the first value (`a`) is less than (`-1`),
49
49
  * equal to (`0`), or greater than (`1`) the second value (`b`).
50
50
  */
51
- compare?: (a: DataTable.CellType, b: DataTable.CellType) => number;
51
+ compare?: (a: DataTableCellType, b: DataTableCellType) => number;
52
52
  /**
53
53
  * Column to update with order index instead of change order of rows.
54
54
  */
@@ -101,7 +101,7 @@ declare class Accessibility {
101
101
  /**
102
102
  * Set a11y options for the Grid.
103
103
  */
104
- setA11yOptions(): void;
104
+ setA11yOptions(): Promise<void>;
105
105
  /**
106
106
  * Adds the screen reader section before or after the Grid.
107
107
  *
@@ -20,10 +20,9 @@ import Globals from '../Globals.js';
20
20
  import ColumnFiltering from '../Table/Actions/ColumnFiltering/ColumnFiltering.js';
21
21
  import GridUtils from '../GridUtils.js';
22
22
  import AST from '../../../Core/Renderer/HTML/AST.js';
23
- import U from '../../../Core/Utilities.js';
24
23
  import HTMLU from '../../../Accessibility/Utils/HTMLUtilities.js';
24
+ import { internalClearTimeout, replaceNested } from '../../../Shared/Utilities.js';
25
25
  const { formatText } = GridUtils;
26
- const { replaceNested } = U;
27
26
  const { getHeadingTagNameForElement } = HTMLU;
28
27
  /**
29
28
  * Representing the accessibility functionalities for the Data Grid.
@@ -87,7 +86,7 @@ class Accessibility {
87
86
  */
88
87
  announce(msg, assertive = false) {
89
88
  if (this.announcerTimeout) {
90
- clearTimeout(this.announcerTimeout);
89
+ internalClearTimeout(this.announcerTimeout);
91
90
  }
92
91
  this.announcerElement.remove();
93
92
  this.announcerElement.setAttribute('aria-live', assertive ? 'assertive' : 'polite');
@@ -213,13 +212,13 @@ class Accessibility {
213
212
  /**
214
213
  * Set a11y options for the Grid.
215
214
  */
216
- setA11yOptions() {
215
+ async setA11yOptions() {
217
216
  const grid = this.grid;
218
217
  const tableEl = grid.tableElement;
219
218
  if (!tableEl) {
220
219
  return;
221
220
  }
222
- tableEl.setAttribute('aria-rowcount', grid.dataTable?.getRowCount() || 0);
221
+ tableEl.setAttribute('aria-rowcount', await grid.dataProvider?.getRowCount() || 0);
223
222
  if (grid.captionElement) {
224
223
  tableEl.setAttribute('aria-labelledby', grid.captionElement.id);
225
224
  }
@@ -393,7 +392,7 @@ class Accessibility {
393
392
  }
394
393
  this.element.remove();
395
394
  this.announcerElement.remove();
396
- clearTimeout(this.announcerTimeout);
395
+ internalClearTimeout(this.announcerTimeout);
397
396
  }
398
397
  }
399
398
  /* *
@@ -0,0 +1,97 @@
1
+ import type { RowObject as RowObjectType, CellType as DataTableCellType, Column as DataTableColumnType } from '../../../Data/DataTable';
2
+ import type QueryingController from '../Querying/QueryingController';
3
+ import type { ColumnDataType } from '../Table/Column';
4
+ /**
5
+ * Base class for Grid data providers.
6
+ *
7
+ * Data providers are responsible for serving data to the grid, applying query
8
+ * modifiers and persisting edits.
9
+ */
10
+ export declare abstract class DataProvider {
11
+ /**
12
+ * Querying controller used to build and apply modifiers.
13
+ */
14
+ protected readonly querying: QueryingController;
15
+ /**
16
+ * Provider options as passed via `grid.options.data`.
17
+ */
18
+ protected readonly options: DataProviderOptions;
19
+ constructor(queryingController: QueryingController, options: DataProviderOptions);
20
+ /**
21
+ * Initializes the data provider.
22
+ */
23
+ init(): Promise<void>;
24
+ /**
25
+ * Returns all available column IDs.
26
+ */
27
+ abstract getColumnIds(): Promise<string[]>;
28
+ /**
29
+ * Returns a stable row id for a given row index (as used by the viewport).
30
+ */
31
+ abstract getRowId(rowIndex: number): Promise<RowId | undefined>;
32
+ /**
33
+ * Returns the current row index for a given stable row id.
34
+ */
35
+ abstract getRowIndex(rowId: RowId): Promise<number | undefined>;
36
+ /**
37
+ * Returns a row as an object keyed by column IDs.
38
+ */
39
+ abstract getRowObject(rowIndex: number): Promise<RowObjectType | undefined>;
40
+ /**
41
+ * Returns the current number of rows in the presentation dataset (after
42
+ * applying all query modifiers).
43
+ */
44
+ abstract getRowCount(): Promise<number>;
45
+ /**
46
+ * Returns the assumed / configured data type for a column.
47
+ */
48
+ abstract getColumnDataType(columnId: string): Promise<ColumnDataType>;
49
+ /**
50
+ * Returns a cell value for a given column and row index.
51
+ */
52
+ abstract getValue(columnId: string, rowIndex: number): Promise<DataTableCellType>;
53
+ /**
54
+ * Persists a cell value for a given row id.
55
+ */
56
+ abstract setValue(value: DataTableCellType, columnId: string, rowId: RowId): Promise<void>;
57
+ /**
58
+ * Applies the current query modifiers to update the provider's presentation
59
+ * state.
60
+ */
61
+ abstract applyQuery(): Promise<void>;
62
+ /**
63
+ * Destroys the provider and releases resources.
64
+ */
65
+ abstract destroy(): void;
66
+ /**
67
+ * Returns the number of items before pagination has been applied.
68
+ */
69
+ getPrePaginationRowCount(): Promise<number>;
70
+ /**
71
+ * Helper method to assume the data type of a column based on the sample
72
+ * of the column data.
73
+ *
74
+ * @param columnSample
75
+ * The sample of the column data to determine the data type from.
76
+ *
77
+ * @param columnId
78
+ * The id of the column to determine the data type for.
79
+ */
80
+ protected static assumeColumnDataType(columnSample: DataTableColumnType, columnId: string): ColumnDataType;
81
+ }
82
+ /**
83
+ * A type for the row ID.
84
+ */
85
+ export type RowId = number | string;
86
+ /**
87
+ * A base interface for the data provider options (`grid.options.data`).
88
+ */
89
+ export interface DataProviderOptions {
90
+ /**
91
+ * The type of the data provider.
92
+ *
93
+ * @default 'local'
94
+ */
95
+ providerType?: string;
96
+ }
97
+ export default DataProvider;
@@ -0,0 +1,89 @@
1
+ /* *
2
+ *
3
+ * Data Provider abstract class
4
+ *
5
+ * (c) 2020-2025 Highsoft AS
6
+ *
7
+ * License: www.highcharts.com/license
8
+ *
9
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
10
+ *
11
+ * Authors:
12
+ * - Dawid Dragula
13
+ *
14
+ * */
15
+ 'use strict';
16
+ import { defined } from '../../../Shared/Utilities.js';
17
+ /**
18
+ * Base class for Grid data providers.
19
+ *
20
+ * Data providers are responsible for serving data to the grid, applying query
21
+ * modifiers and persisting edits.
22
+ */
23
+ export class DataProvider {
24
+ /* *
25
+ *
26
+ * Constructor
27
+ *
28
+ * */
29
+ constructor(queryingController, options) {
30
+ this.querying = queryingController;
31
+ this.options = options;
32
+ }
33
+ /* *
34
+ *
35
+ * Methods
36
+ *
37
+ * */
38
+ /**
39
+ * Initializes the data provider.
40
+ */
41
+ init() {
42
+ return Promise.resolve();
43
+ }
44
+ /**
45
+ * Returns the number of items before pagination has been applied.
46
+ */
47
+ async getPrePaginationRowCount() {
48
+ return await this.getRowCount();
49
+ }
50
+ /**
51
+ * Helper method to assume the data type of a column based on the sample
52
+ * of the column data.
53
+ *
54
+ * @param columnSample
55
+ * The sample of the column data to determine the data type from.
56
+ *
57
+ * @param columnId
58
+ * The id of the column to determine the data type for.
59
+ */
60
+ static assumeColumnDataType(columnSample, columnId) {
61
+ for (let i = 0, iEnd = columnSample.length; i < iEnd; ++i) {
62
+ if (!defined(columnSample[i])) {
63
+ // If the data is null or undefined, we should look
64
+ // at the next value to determine the type.
65
+ continue;
66
+ }
67
+ switch (typeof columnSample[i]) {
68
+ case 'number':
69
+ return 'number';
70
+ case 'boolean':
71
+ return 'boolean';
72
+ default:
73
+ return 'string';
74
+ }
75
+ }
76
+ // eslint-disable-next-line no-console
77
+ console.warn(`Column "${columnId}" sample does not contain any defined ` +
78
+ 'values; defaulting dataType to "string". Set `dataType` option ' +
79
+ 'for the column to determine the data type and avoid unnecessary ' +
80
+ 'column scanning.');
81
+ return 'string';
82
+ }
83
+ }
84
+ /* *
85
+ *
86
+ * Default Export
87
+ *
88
+ * */
89
+ export default DataProvider;
@@ -0,0 +1,20 @@
1
+ import type { DataProviderTypeRegistry } from './DataProviderType';
2
+ /**
3
+ * Record of data provider classes
4
+ */
5
+ export declare const types: DataProviderTypeRegistry;
6
+ /**
7
+ * Method used to register new data provider classes.
8
+ *
9
+ * @param key
10
+ * Registry key of the data provider class.
11
+ *
12
+ * @param DataProviderClass
13
+ * Data provider class (aka class constructor) to register.
14
+ */
15
+ export declare function registerDataProvider<T extends keyof DataProviderTypeRegistry>(key: T, DataProviderClass: DataProviderTypeRegistry[T]): boolean;
16
+ declare const _default: {
17
+ readonly registerDataProvider: typeof registerDataProvider;
18
+ readonly types: DataProviderTypeRegistry;
19
+ };
20
+ export default _default;
@@ -0,0 +1,52 @@
1
+ /* *
2
+ *
3
+ * Data Provider Registry
4
+ *
5
+ * (c) 2020-2025 Highsoft AS
6
+ *
7
+ * License: www.highcharts.com/license
8
+ *
9
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
10
+ *
11
+ * Authors:
12
+ * - Dawid Dragula
13
+ *
14
+ * */
15
+ 'use strict';
16
+ /* *
17
+ *
18
+ * Constants
19
+ *
20
+ * */
21
+ /**
22
+ * Record of data provider classes
23
+ */
24
+ export const types = {};
25
+ /* *
26
+ *
27
+ * Functions
28
+ *
29
+ * */
30
+ /**
31
+ * Method used to register new data provider classes.
32
+ *
33
+ * @param key
34
+ * Registry key of the data provider class.
35
+ *
36
+ * @param DataProviderClass
37
+ * Data provider class (aka class constructor) to register.
38
+ */
39
+ export function registerDataProvider(key, DataProviderClass) {
40
+ return (!!key &&
41
+ !types[key] &&
42
+ !!(types[key] = DataProviderClass));
43
+ }
44
+ /* *
45
+ *
46
+ * Default Export
47
+ *
48
+ * */
49
+ export default {
50
+ registerDataProvider,
51
+ types
52
+ };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Contains all possible class types of the data provider registry.
3
+ */
4
+ export type DataProviderClassType = DataProviderTypeRegistry[keyof DataProviderTypeRegistry];
5
+ /**
6
+ * Contains all possible types of the class registry.
7
+ */
8
+ export type DataProviderType = DataProviderClassType['prototype'];
9
+ /**
10
+ * Union of all possible options of the data providers in the registry.
11
+ */
12
+ export type DataProviderOptionsType = DataProviderType['options'];
13
+ /**
14
+ * Describes the class registry as a record object with class name and their
15
+ * class types (aka class constructor).
16
+ */
17
+ export interface DataProviderTypeRegistry {
18
+ }
19
+ export default DataProviderType;
@@ -0,0 +1,15 @@
1
+ /* *
2
+ *
3
+ * Data Provider Type
4
+ *
5
+ * (c) 2020-2025 Highsoft AS
6
+ *
7
+ * License: www.highcharts.com/license
8
+ *
9
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
10
+ *
11
+ * Authors:
12
+ * - Dawid Dragula
13
+ *
14
+ * */
15
+ export {};
@@ -0,0 +1,165 @@
1
+ import type { DataProviderOptions, RowId } from './DataProvider';
2
+ import { DataTableValue } from '../../../Data/DataTableOptions';
3
+ import type { ColumnDataType } from '../Table/Column';
4
+ import type { RowObject as RowObjectType, CellType as DataTableCellType } from '../../../Data/DataTable';
5
+ import type DataConnectorType from '../../../Data/Connectors/DataConnectorType';
6
+ import type { DataConnectorTypeOptions } from '../../../Data/Connectors/DataConnectorType';
7
+ import type { MakeOptional, TypedArray } from '../../../Shared/Types';
8
+ import { DataProvider } from './DataProvider.js';
9
+ import DataTable from '../../../Data/DataTable.js';
10
+ /**
11
+ * Local data provider for the Grid.
12
+ *
13
+ * Uses a DataTable instances to serve data to the grid, applying query
14
+ * modifiers and persisting edits locally.
15
+ */
16
+ export declare class LocalDataProvider extends DataProvider {
17
+ static readonly tableChangeEventNames: readonly ["afterDeleteColumns", "afterDeleteRows", "afterSetCell", "afterSetColumns", "afterSetRows"];
18
+ /**
19
+ * The provider options.
20
+ */
21
+ readonly options: LocalDataProviderOptions;
22
+ /**
23
+ * The original table. Mutations (e.g. setValue) are applied here.
24
+ */
25
+ private dataTable?;
26
+ /**
27
+ * The connector instance used to populate the table.
28
+ */
29
+ private connector?;
30
+ /**
31
+ * The presentation table after applying query modifiers.
32
+ */
33
+ private presentationTable?;
34
+ /**
35
+ * The row count before pagination is applied.
36
+ */
37
+ private prePaginationRowCount?;
38
+ /**
39
+ * Unbind callbacks for DataTable events.
40
+ */
41
+ private dataTableEventDestructors;
42
+ /**
43
+ * Unbind callbacks for connector events.
44
+ */
45
+ private connectorEventDestructors;
46
+ /**
47
+ * Map of row IDs (from `idColumn`) to original data table row indexes.
48
+ * Set only when `options.idColumn` is configured.
49
+ */
50
+ private originalRowIndexesMap?;
51
+ init(): Promise<void>;
52
+ private initDataTable;
53
+ private setDataTable;
54
+ private handleTableChange;
55
+ private clearDataTableEvents;
56
+ private clearConnector;
57
+ private initConnector;
58
+ getColumnIds(): Promise<string[]>;
59
+ /**
60
+ * Returns the row ID for a given local row index. If not found, returns
61
+ * `undefined`.
62
+ *
63
+ * If the `data.idColumn` option is set, the row ID is the value of the
64
+ * row in the column with the given ID. Otherwise, the row ID is the
65
+ * original row index.
66
+ *
67
+ * @param rowIndex
68
+ * The local (presentation table) row index to get the row ID for.
69
+ */
70
+ getRowId(rowIndex: number): Promise<RowId | undefined>;
71
+ /**
72
+ * Returns the local (presentation table) row index for a given row ID. If
73
+ * not found, returns `undefined`.
74
+ *
75
+ * @param rowId
76
+ * The row ID to get the row index for. If the `data.idColumn` option is
77
+ * set, the row ID is the value of the row in the column with the given ID.
78
+ * Otherwise, the row ID is the original row index.
79
+ */
80
+ getRowIndex(rowId: RowId): Promise<number | undefined>;
81
+ /**
82
+ * Returns the original row index for a given local row index.
83
+ *
84
+ * @param localRowIndex
85
+ * The local row index to get the original row index for.
86
+ */
87
+ getOriginalRowIndexFromLocal(localRowIndex: number): Promise<number | undefined>;
88
+ /**
89
+ * Returns the local (presentation table) row index for a given original
90
+ * data table row index.
91
+ *
92
+ * @param originalRowIndex
93
+ * The original data table row index to get the presentation table row index
94
+ * for.
95
+ */
96
+ getLocalRowIndexFromOriginal(originalRowIndex: number): Promise<number | undefined>;
97
+ getRowObject(rowIndex: number): Promise<RowObjectType | undefined>;
98
+ getPrePaginationRowCount(): Promise<number>;
99
+ getRowCount(): Promise<number>;
100
+ getValue(columnId: string, rowIndex: number): Promise<DataTableCellType>;
101
+ setValue(value: DataTableCellType, columnId: string, rowId: RowId): Promise<void>;
102
+ /**
103
+ * Applies querying modifiers and updates the presentation table.
104
+ */
105
+ applyQuery(): Promise<void>;
106
+ destroy(): void;
107
+ getColumnDataType(columnId: string): Promise<ColumnDataType>;
108
+ /**
109
+ * Returns the current data table. When `presentation` is `true`, returns
110
+ * the presentation table (after modifiers).
111
+ *
112
+ * @param presentation
113
+ * Whether to return the presentation table (after modifiers).
114
+ *
115
+ * @return
116
+ * The data table.
117
+ */
118
+ getDataTable(presentation?: boolean): DataTable | undefined;
119
+ /**
120
+ * Checks if the object is an instance of DataConnector.
121
+ *
122
+ * @param connector
123
+ * The object to check.
124
+ *
125
+ * @returns `true` if the object is an instance of DataConnector, `false`
126
+ * otherwise.
127
+ */
128
+ private static isConnectorInstance;
129
+ }
130
+ export type GridDataConnectorTypeOptions = MakeOptional<DataConnectorTypeOptions, 'id'>;
131
+ export interface LocalDataProviderOptions extends DataProviderOptions {
132
+ providerType?: 'local';
133
+ /**
134
+ * Data table as a source of data for the grid.
135
+ */
136
+ dataTable?: DataTable;
137
+ /**
138
+ * Connector instance or options used to populate the data table.
139
+ */
140
+ connector?: GridDataConnectorTypeOptions | DataConnectorType;
141
+ /**
142
+ * Columns data to initialize the Grid with.
143
+ */
144
+ columns?: Record<string, Array<DataTableValue> | TypedArray>;
145
+ /**
146
+ * Automatically update the grid when the data table changes. It is disabled
147
+ * by default unles the pagination is enabled.
148
+ *
149
+ * Use this option if you want the polling to update the grid when the data
150
+ * table changes.
151
+ *
152
+ * @default false
153
+ */
154
+ updateOnChange?: boolean;
155
+ /**
156
+ * The column ID that contains the stable, unique row IDs. If not
157
+ * provided, the original row index is used as the row ID.
158
+ */
159
+ idColumn?: string;
160
+ }
161
+ declare module './DataProviderType' {
162
+ interface DataProviderTypeRegistry {
163
+ local: typeof LocalDataProvider;
164
+ }
165
+ }