@highcharts/grid-pro 2.2.0 → 2.3.1

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 (274) 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/ContainerComponent.js +0 -1
  20. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +6 -8
  21. package/es-modules/Accessibility/Components/LegendComponent.js +1 -2
  22. package/es-modules/Accessibility/Components/MenuComponent.js +1 -3
  23. package/es-modules/Accessibility/Components/NavigatorComponent.js +3 -4
  24. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +1 -3
  25. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +22 -11
  26. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +3 -7
  27. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +0 -1
  28. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +3 -5
  29. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +1 -4
  30. package/es-modules/Accessibility/Components/ZoomComponent.js +1 -2
  31. package/es-modules/Accessibility/FocusBorder.js +6 -7
  32. package/es-modules/Accessibility/KeyboardNavigation.js +1 -2
  33. package/es-modules/Accessibility/KeyboardNavigationHandler.js +1 -2
  34. package/es-modules/Accessibility/Options/A11yDefaults.d.ts +11 -0
  35. package/es-modules/Accessibility/Options/A11yDefaults.js +11 -0
  36. package/es-modules/Accessibility/Options/DeprecatedOptions.d.ts +58 -0
  37. package/es-modules/Accessibility/Options/DeprecatedOptions.js +8 -4
  38. package/es-modules/Accessibility/Options/LangDefaults.js +9 -0
  39. package/es-modules/Accessibility/ProxyElement.d.ts +2 -2
  40. package/es-modules/Accessibility/ProxyElement.js +4 -7
  41. package/es-modules/Accessibility/ProxyProvider.js +1 -2
  42. package/es-modules/Accessibility/Utils/Announcer.js +2 -3
  43. package/es-modules/Accessibility/Utils/ChartUtilities.js +1 -3
  44. package/es-modules/Accessibility/Utils/EventProvider.d.ts +2 -2
  45. package/es-modules/Accessibility/Utils/EventProvider.js +6 -2
  46. package/es-modules/Accessibility/Utils/HTMLUtilities.js +1 -3
  47. package/es-modules/Core/Animation/AnimationUtilities.js +1 -2
  48. package/es-modules/Core/Animation/Fx.js +1 -2
  49. package/es-modules/Core/Callback.d.ts +9 -2
  50. package/es-modules/Core/Chart/Chart.js +56 -42
  51. package/es-modules/Core/Chart/Chart3D.js +1 -2
  52. package/es-modules/Core/Chart/ChartDefaults.js +11 -0
  53. package/es-modules/Core/Chart/ChartNavigationComposition.js +0 -1
  54. package/es-modules/Core/Chart/ChartOptions.d.ts +8 -0
  55. package/es-modules/Core/Chart/GanttChart.js +1 -2
  56. package/es-modules/Core/Chart/MapChart.js +3 -2
  57. package/es-modules/Core/Chart/StockChart.js +2 -3
  58. package/es-modules/Core/Color/Color.js +1 -3
  59. package/es-modules/Core/Defaults.js +36 -10
  60. package/es-modules/Core/Delaunay.d.ts +1 -0
  61. package/es-modules/Core/Delaunay.js +312 -0
  62. package/es-modules/Core/Foundation.js +1 -3
  63. package/es-modules/Core/Geometry/CircleUtilities.js +1 -2
  64. package/es-modules/Core/Globals.js +1 -1
  65. package/es-modules/Core/HttpUtilities.js +1 -2
  66. package/es-modules/Core/MSPointer.js +1 -3
  67. package/es-modules/Core/Math3D.js +1 -2
  68. package/es-modules/Core/Options.d.ts +6 -2
  69. package/es-modules/Core/Pointer.js +23 -4
  70. package/es-modules/Core/PointerEvent.d.ts +2 -0
  71. package/es-modules/Core/Renderer/HTML/AST.js +2 -2
  72. package/es-modules/Core/Renderer/HTML/HTMLAttributes.d.ts +3 -0
  73. package/es-modules/Core/Renderer/HTML/HTMLElement.js +1 -2
  74. package/es-modules/Core/Renderer/RendererUtilities.js +34 -20
  75. package/es-modules/Core/Renderer/SVG/SVGRenderer.d.ts +1 -1
  76. package/es-modules/Core/Renderer/SVG/Symbols.d.ts +2 -2
  77. package/es-modules/Core/Responsive.d.ts +4 -2
  78. package/es-modules/Core/Responsive.js +10 -4
  79. package/es-modules/Core/Templating.d.ts +1 -1
  80. package/es-modules/Core/Templating.js +3 -4
  81. package/es-modules/Core/Time.d.ts +8 -0
  82. package/es-modules/Core/Time.js +2 -2
  83. package/es-modules/Core/Tooltip.d.ts +4 -8
  84. package/es-modules/Core/Tooltip.js +100 -81
  85. package/es-modules/Core/TooltipOptions.d.ts +44 -1
  86. package/es-modules/Core/Utilities.d.ts +25 -665
  87. package/es-modules/Core/Utilities.js +21 -1400
  88. package/es-modules/Data/ColumnUtils.d.ts +83 -80
  89. package/es-modules/Data/ColumnUtils.js +103 -113
  90. package/es-modules/Data/Connectors/CSVConnector.d.ts +9 -14
  91. package/es-modules/Data/Connectors/CSVConnector.js +3 -4
  92. package/es-modules/Data/Connectors/DataConnector.d.ts +56 -58
  93. package/es-modules/Data/Connectors/DataConnector.js +37 -56
  94. package/es-modules/Data/Connectors/GoogleSheetsConnector.d.ts +40 -42
  95. package/es-modules/Data/Connectors/GoogleSheetsConnector.js +73 -88
  96. package/es-modules/Data/Connectors/GoogleSheetsConnectorOptions.d.ts +4 -2
  97. package/es-modules/Data/Connectors/HTMLTableConnector.d.ts +23 -28
  98. package/es-modules/Data/Connectors/HTMLTableConnector.js +3 -4
  99. package/es-modules/Data/Connectors/JSONConnector.d.ts +9 -14
  100. package/es-modules/Data/Connectors/JSONConnector.js +3 -4
  101. package/es-modules/Data/Converters/CSVConverter.d.ts +5 -5
  102. package/es-modules/Data/Converters/CSVConverter.js +3 -4
  103. package/es-modules/Data/Converters/CSVConverterOptions.d.ts +2 -2
  104. package/es-modules/Data/Converters/DataConverter.d.ts +76 -78
  105. package/es-modules/Data/Converters/DataConverter.js +26 -53
  106. package/es-modules/Data/Converters/DataConverterUtils.d.ts +88 -81
  107. package/es-modules/Data/Converters/DataConverterUtils.js +169 -181
  108. package/es-modules/Data/Converters/GoogleSheetsConverter.d.ts +4 -4
  109. package/es-modules/Data/Converters/GoogleSheetsConverter.js +3 -3
  110. package/es-modules/Data/Converters/GoogleSheetsConverterOptions.d.ts +2 -2
  111. package/es-modules/Data/Converters/HTMLTableConverter.d.ts +4 -4
  112. package/es-modules/Data/Converters/HTMLTableConverter.js +2 -3
  113. package/es-modules/Data/Converters/HTMLTableConverterOptions.d.ts +2 -2
  114. package/es-modules/Data/Converters/JSONConverter.d.ts +7 -7
  115. package/es-modules/Data/Converters/JSONConverter.js +6 -6
  116. package/es-modules/Data/Converters/JSONConverterOptions.d.ts +2 -2
  117. package/es-modules/Data/DataCursor.d.ts +65 -70
  118. package/es-modules/Data/DataCursor.js +119 -139
  119. package/es-modules/Data/DataEvent.d.ts +55 -57
  120. package/es-modules/Data/DataPool.d.ts +10 -17
  121. package/es-modules/Data/DataPool.js +21 -10
  122. package/es-modules/Data/DataTable.d.ts +111 -113
  123. package/es-modules/Data/DataTable.js +3 -3
  124. package/es-modules/Data/DataTableCore.d.ts +9 -9
  125. package/es-modules/Data/DataTableCore.js +2 -2
  126. package/es-modules/Data/Formula/FormulaParser.js +1 -2
  127. package/es-modules/Data/Formula/FormulaProcessor.js +1 -2
  128. package/es-modules/Data/Modifiers/ChainModifier.d.ts +29 -34
  129. package/es-modules/Data/Modifiers/ChainModifier.js +7 -8
  130. package/es-modules/Data/Modifiers/DataModifier.d.ts +36 -41
  131. package/es-modules/Data/Modifiers/DataModifier.js +31 -53
  132. package/es-modules/Data/Modifiers/FilterModifier.d.ts +4 -4
  133. package/es-modules/Data/Modifiers/FilterModifier.js +3 -4
  134. package/es-modules/Data/Modifiers/FilterModifierOptions.d.ts +3 -2
  135. package/es-modules/Data/Modifiers/InvertModifier.d.ts +4 -4
  136. package/es-modules/Data/Modifiers/InvertModifier.js +3 -4
  137. package/es-modules/Data/Modifiers/MathModifier.d.ts +5 -4
  138. package/es-modules/Data/Modifiers/RangeModifier.d.ts +4 -4
  139. package/es-modules/Data/Modifiers/RangeModifier.js +3 -4
  140. package/es-modules/Data/Modifiers/SortModifier.d.ts +6 -11
  141. package/es-modules/Data/Modifiers/SortModifier.js +3 -4
  142. package/es-modules/Data/Modifiers/SortModifierOptions.d.ts +3 -3
  143. package/es-modules/Grid/Core/Accessibility/Accessibility.d.ts +1 -1
  144. package/es-modules/Grid/Core/Accessibility/Accessibility.js +5 -6
  145. package/es-modules/Grid/Core/Data/DataProvider.d.ts +97 -0
  146. package/es-modules/Grid/Core/Data/DataProvider.js +89 -0
  147. package/es-modules/Grid/Core/Data/DataProviderRegistry.d.ts +20 -0
  148. package/es-modules/Grid/Core/Data/DataProviderRegistry.js +52 -0
  149. package/es-modules/Grid/Core/Data/DataProviderType.d.ts +19 -0
  150. package/es-modules/Grid/Core/Data/DataProviderType.js +15 -0
  151. package/es-modules/Grid/Core/Data/LocalDataProvider.d.ts +165 -0
  152. package/es-modules/Grid/Core/Data/LocalDataProvider.js +341 -0
  153. package/es-modules/Grid/Core/Defaults.js +4 -2
  154. package/es-modules/Grid/Core/Globals.d.ts +20 -16
  155. package/es-modules/Grid/Core/Globals.js +10 -8
  156. package/es-modules/Grid/Core/Grid.d.ts +31 -22
  157. package/es-modules/Grid/Core/Grid.js +217 -139
  158. package/es-modules/Grid/Core/GridUtils.d.ts +33 -0
  159. package/es-modules/Grid/Core/GridUtils.js +50 -3
  160. package/es-modules/Grid/Core/Options.d.ts +145 -4
  161. package/es-modules/Grid/Core/Pagination/Pagination.d.ts +3 -0
  162. package/es-modules/Grid/Core/Pagination/Pagination.js +68 -28
  163. package/es-modules/Grid/Core/Pagination/PaginationOptions.d.ts +4 -0
  164. package/es-modules/Grid/Core/Querying/FilteringController.js +1 -2
  165. package/es-modules/Grid/Core/Querying/PaginationController.d.ts +3 -3
  166. package/es-modules/Grid/Core/Querying/PaginationController.js +7 -6
  167. package/es-modules/Grid/Core/Querying/QueryingController.d.ts +1 -1
  168. package/es-modules/Grid/Core/Querying/QueryingController.js +2 -26
  169. package/es-modules/Grid/Core/Responsive/ResponsiveComposition.d.ts +53 -0
  170. package/es-modules/Grid/Core/Responsive/ResponsiveComposition.js +272 -0
  171. package/es-modules/Grid/Core/Responsive/ResponsiveOptions.d.ts +58 -0
  172. package/es-modules/Grid/Core/Responsive/ResponsiveOptions.js +15 -0
  173. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js +2 -3
  174. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.d.ts +1 -1
  175. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.js +3 -4
  176. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.d.ts +1 -1
  177. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.js +2 -2
  178. package/es-modules/Grid/Core/Table/Actions/ColumnSorting.d.ts +17 -1
  179. package/es-modules/Grid/Core/Table/Actions/ColumnSorting.js +58 -15
  180. package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.js +1 -3
  181. package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.d.ts +57 -3
  182. package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.js +411 -118
  183. package/es-modules/Grid/Core/Table/Body/CellContextMenu.d.ts +11 -0
  184. package/es-modules/Grid/Core/Table/Body/CellContextMenu.js +84 -0
  185. package/es-modules/Grid/Core/Table/Body/TableCell.d.ts +27 -13
  186. package/es-modules/Grid/Core/Table/Body/TableCell.js +74 -25
  187. package/es-modules/Grid/Core/Table/Body/TableRow.d.ts +7 -15
  188. package/es-modules/Grid/Core/Table/Body/TableRow.js +24 -19
  189. package/es-modules/Grid/Core/Table/Cell.d.ts +16 -3
  190. package/es-modules/Grid/Core/Table/Cell.js +36 -3
  191. package/es-modules/Grid/Core/Table/CellContent/TextContent.js +3 -8
  192. package/es-modules/Grid/Core/Table/Column.d.ts +10 -4
  193. package/es-modules/Grid/Core/Table/Column.js +23 -34
  194. package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js +9 -8
  195. package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.js +4 -3
  196. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.d.ts +5 -0
  197. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js +7 -2
  198. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.js +1 -2
  199. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.js +1 -2
  200. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.js +2 -3
  201. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js +1 -2
  202. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.js +1 -2
  203. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.d.ts +0 -1
  204. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.js +4 -14
  205. package/es-modules/Grid/Core/Table/Header/HeaderCell.d.ts +6 -1
  206. package/es-modules/Grid/Core/Table/Header/HeaderCell.js +33 -13
  207. package/es-modules/Grid/Core/Table/Header/HeaderRow.js +4 -5
  208. package/es-modules/Grid/Core/Table/Header/TableHeader.d.ts +1 -1
  209. package/es-modules/Grid/Core/Table/Header/TableHeader.js +3 -3
  210. package/es-modules/Grid/Core/Table/Row.d.ts +1 -1
  211. package/es-modules/Grid/Core/Table/Row.js +2 -2
  212. package/es-modules/Grid/Core/Table/Table.d.ts +38 -12
  213. package/es-modules/Grid/Core/Table/Table.js +184 -91
  214. package/es-modules/Grid/Core/UI/ContextMenuButton.d.ts +6 -7
  215. package/es-modules/Grid/Core/UI/ContextMenuButton.js +5 -3
  216. package/es-modules/Grid/Core/UI/Popup.js +7 -9
  217. package/es-modules/Grid/Core/UI/SvgIcons.d.ts +42 -7
  218. package/es-modules/Grid/Core/UI/SvgIcons.js +206 -33
  219. package/es-modules/Grid/Core/UI/Toolbar.d.ts +5 -0
  220. package/es-modules/Grid/Core/UI/ToolbarButton.d.ts +4 -12
  221. package/es-modules/Grid/Core/UI/ToolbarButton.js +8 -26
  222. package/es-modules/Grid/Pro/CellEditing/CellEditMode.d.ts +2 -2
  223. package/es-modules/Grid/Pro/CellEditing/CellEditing.js +10 -10
  224. package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js +1 -2
  225. package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.d.ts +1 -1
  226. package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js +4 -2
  227. package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.d.ts +2 -2
  228. package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js +1 -2
  229. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.d.ts +2 -2
  230. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js +1 -2
  231. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.d.ts +2 -2
  232. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js +1 -2
  233. package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js +1 -2
  234. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js +1 -2
  235. package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js +1 -2
  236. package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js +1 -2
  237. package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js +1 -2
  238. package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.d.ts +2 -2
  239. package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js +1 -2
  240. package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js +1 -2
  241. package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js +1 -2
  242. package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js +1 -2
  243. package/es-modules/Grid/Pro/ColumnTypes/Validator.js +34 -32
  244. package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.d.ts +1 -1
  245. package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js +3 -4
  246. package/es-modules/Grid/Pro/Credits/CreditsProComposition.d.ts +1 -1
  247. package/es-modules/Grid/Pro/Credits/CreditsProComposition.js +1 -3
  248. package/es-modules/Grid/Pro/Data/DataSourceHelper.d.ts +74 -0
  249. package/es-modules/Grid/Pro/Data/DataSourceHelper.js +256 -0
  250. package/es-modules/Grid/Pro/Data/QuerySerializer.d.ts +46 -0
  251. package/es-modules/Grid/Pro/Data/QuerySerializer.js +169 -0
  252. package/es-modules/Grid/Pro/Data/RemoteDataProvider.d.ts +187 -0
  253. package/es-modules/Grid/Pro/Data/RemoteDataProvider.js +500 -0
  254. package/es-modules/Grid/Pro/Export/Exporting.js +1 -2
  255. package/es-modules/Grid/Pro/Export/ExportingComposition.js +1 -2
  256. package/es-modules/Grid/Pro/GridEvents.js +1 -2
  257. package/es-modules/Grid/Pro/Pagination/PaginationComposition.d.ts +0 -1
  258. package/es-modules/Grid/Pro/Pagination/PaginationComposition.js +1 -2
  259. package/es-modules/Shared/BaseForm.js +1 -2
  260. package/es-modules/Shared/DownloadURL.js +1 -2
  261. package/es-modules/Shared/TimeBase.js +3 -3
  262. package/es-modules/Shared/Types.d.ts +7 -0
  263. package/es-modules/Shared/Utilities.d.ts +576 -0
  264. package/es-modules/Shared/Utilities.js +1360 -0
  265. package/es-modules/masters/grid-pro.src.d.ts +15 -11
  266. package/es-modules/masters/grid-pro.src.js +12 -5
  267. package/grid-pro.d.ts +15 -11
  268. package/grid-pro.js +3 -3
  269. package/grid-pro.js.map +1 -1
  270. package/grid-pro.src.d.ts +15 -11
  271. package/grid-pro.src.js +13854 -11395
  272. package/package.json +1 -1
  273. package/es-modules/Grid/Core/Pagination/Icons.d.ts +0 -7
  274. package/es-modules/Grid/Core/Pagination/Icons.js +0 -7
@@ -16,8 +16,7 @@
16
16
  import { CellRenderer } from '../CellRenderer.js';
17
17
  import { registerRenderer } from '../CellRendererRegistry.js';
18
18
  import DateTimeInputContent from '../ContentTypes/DateTimeInputContent.js';
19
- import U from '../../../../Core/Utilities.js';
20
- const { merge } = U;
19
+ import { merge } from '../../../../Shared/Utilities.js';
21
20
  /* *
22
21
  *
23
22
  * Class
@@ -16,8 +16,7 @@
16
16
  import { CellRenderer } from '../CellRenderer.js';
17
17
  import { registerRenderer } from '../CellRendererRegistry.js';
18
18
  import NumberInputContent from '../ContentTypes/NumberInputContent.js';
19
- import U from '../../../../Core/Utilities.js';
20
- const { merge } = U;
19
+ import { merge } from '../../../../Shared/Utilities.js';
21
20
  /* *
22
21
  *
23
22
  * Class
@@ -17,8 +17,7 @@
17
17
  import { CellRenderer } from '../CellRenderer.js';
18
18
  import { registerRenderer } from '../CellRendererRegistry.js';
19
19
  import SelectContent from '../ContentTypes/SelectContent.js';
20
- import U from '../../../../Core/Utilities.js';
21
- const { merge } = U;
20
+ import { merge } from '../../../../Shared/Utilities.js';
22
21
  /* *
23
22
  *
24
23
  * Class
@@ -1,7 +1,7 @@
1
1
  import type { AnyRecord } from '../../../../Shared/Types';
2
2
  import type Column from '../../../Core/Table/Column';
3
3
  import type TableCell from '../../../Core/Table/Body/TableCell';
4
- import type DataTable from '../../../../Data/DataTable';
4
+ import type { CellType as DataTableCellType } from '../../../../Data/DataTable';
5
5
  import type { EditModeRendererTypeName } from '../../CellEditing/CellEditingComposition';
6
6
  import { CellRenderer, CellRendererOptions } from '../CellRenderer.js';
7
7
  import SparklineContent from '../ContentTypes/SparklineContent.js';
@@ -33,7 +33,7 @@ declare class SparklineRenderer extends CellRenderer {
33
33
  */
34
34
  export interface SparklineRendererOptions extends CellRendererOptions {
35
35
  type: 'sparkline';
36
- chartOptions?: (((this: TableCell, data: DataTable.CellType) => AnyRecord) | AnyRecord);
36
+ chartOptions?: (((this: TableCell, data: DataTableCellType) => AnyRecord) | AnyRecord);
37
37
  }
38
38
  declare module '../CellRendererType' {
39
39
  interface CellRendererTypeRegistry {
@@ -17,8 +17,7 @@
17
17
  import { CellRenderer } from '../CellRenderer.js';
18
18
  import { registerRenderer } from '../CellRendererRegistry.js';
19
19
  import SparklineContent from '../ContentTypes/SparklineContent.js';
20
- import U from '../../../../Core/Utilities.js';
21
- const { merge } = U;
20
+ import { merge } from '../../../../Shared/Utilities.js';
22
21
  /* *
23
22
  *
24
23
  * Class
@@ -17,8 +17,7 @@
17
17
  import { CellRenderer } from '../CellRenderer.js';
18
18
  import { registerRenderer } from '../CellRendererRegistry.js';
19
19
  import TextInputContent from '../ContentTypes/TextInputContent.js';
20
- import U from '../../../../Core/Utilities.js';
21
- const { merge } = U;
20
+ import { merge } from '../../../../Shared/Utilities.js';
22
21
  /* *
23
22
  *
24
23
  * Class
@@ -16,8 +16,7 @@
16
16
  import { CellRenderer } from '../CellRenderer.js';
17
17
  import { registerRenderer } from '../CellRendererRegistry.js';
18
18
  import TextContent from '../../../Core/Table/CellContent/TextContent.js';
19
- import U from '../../../../Core/Utilities.js';
20
- const { merge } = U;
19
+ import { merge } from '../../../../Shared/Utilities.js';
21
20
  /* *
22
21
  *
23
22
  * Class
@@ -16,8 +16,7 @@
16
16
  import { CellRenderer } from '../CellRenderer.js';
17
17
  import { registerRenderer } from '../CellRendererRegistry.js';
18
18
  import TimeInputContent from '../ContentTypes/TimeInputContent.js';
19
- import U from '../../../../Core/Utilities.js';
20
- const { merge } = U;
19
+ import { merge } from '../../../../Shared/Utilities.js';
21
20
  /* *
22
21
  *
23
22
  * Class
@@ -16,9 +16,8 @@
16
16
  import AST from '../../../Core/Renderer/HTML/AST.js';
17
17
  import Globals from '../../Core/Globals.js';
18
18
  import GridUtils from '../../Core/GridUtils.js';
19
- import U from '../../../Core/Utilities.js';
19
+ import { defined } from '../../../Shared/Utilities.js';
20
20
  const { makeDiv, setHTMLContent } = GridUtils;
21
- const { defined } = U;
22
21
  /* *
23
22
  *
24
23
  * Class
@@ -217,32 +216,6 @@ Validator.rulesRegistry = {
217
216
  Number(rawValue) === 1 || Number(rawValue) === 0),
218
217
  notification: 'Value has to be a boolean.'
219
218
  },
220
- ignoreCaseUnique: {
221
- validate: function ({ rawValue }) {
222
- const oldValue = String(this.value).toLowerCase();
223
- const rowValueString = rawValue.toLowerCase();
224
- if (oldValue === rowValueString) {
225
- return true;
226
- }
227
- const columnData = this.column.data;
228
- const isDuplicate = columnData?.some((value) => String(value).toLowerCase() ===
229
- rowValueString);
230
- return !isDuplicate;
231
- },
232
- notification: 'Value must be unique within this column (case-insensitive).'
233
- },
234
- unique: {
235
- validate: function ({ rawValue }) {
236
- const oldValue = this.value;
237
- if (oldValue === rawValue) {
238
- return true;
239
- }
240
- const columnData = this.column.data;
241
- const isDuplicate = columnData?.some((value) => value === rawValue);
242
- return !isDuplicate;
243
- },
244
- notification: 'Value must be unique within this column (case-sensitive).'
245
- },
246
219
  arrayNumber: {
247
220
  validate: function ({ rawValue }) {
248
221
  return rawValue
@@ -256,9 +229,8 @@ Validator.rulesRegistry = {
256
229
  try {
257
230
  JSON.parse(rawValue);
258
231
  return true;
259
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
260
232
  }
261
- catch (e) {
233
+ catch {
262
234
  return false;
263
235
  }
264
236
  },
@@ -271,8 +243,38 @@ Validator.rulesRegistry = {
271
243
  return arrayNumberValidate({ rawValue }) ||
272
244
  jsonValidate({ rawValue });
273
245
  },
274
- // eslint-disable-next-line max-len
275
- notification: 'Value should be a valid JSON or a list of numbers separated by commas.'
246
+ notification: 'Value should be a valid JSON or a list of numbers ' +
247
+ 'separated by commas.'
248
+ },
249
+ ignoreCaseUnique: {
250
+ validate: function ({ rawValue }) {
251
+ const oldValue = String(this.value).toLowerCase();
252
+ const rowValueString = rawValue.toLowerCase();
253
+ if (oldValue === rowValueString) {
254
+ return true;
255
+ }
256
+ // Local dataset only
257
+ // TODO(enhancement): Implement this for remote dataset.
258
+ const columnData = this.column.data;
259
+ const isDuplicate = columnData?.some((value) => (String(value).toLowerCase() ===
260
+ rowValueString));
261
+ return !isDuplicate;
262
+ },
263
+ notification: 'Value must be unique within this column (case-insensitive).'
264
+ },
265
+ unique: {
266
+ validate: function ({ rawValue }) {
267
+ const oldValue = this.value;
268
+ if (oldValue === rawValue) {
269
+ return true;
270
+ }
271
+ // Local dataset only
272
+ // TODO(enhancement): Implement this for remote dataset.
273
+ const columnData = this.column.data;
274
+ const isDuplicate = columnData?.some((value) => value === rawValue);
275
+ return !isDuplicate;
276
+ },
277
+ notification: 'Value must be unique within this column (case-sensitive).'
276
278
  }
277
279
  };
278
280
  /**
@@ -14,7 +14,7 @@ declare module '../../Core/Table/Table' {
14
14
  /**
15
15
  * The validator object.
16
16
  */
17
- validator: Validator;
17
+ validator?: Validator;
18
18
  }
19
19
  }
20
20
  declare module '../../Pro/CellEditing/CellEditingComposition' {
@@ -15,8 +15,7 @@
15
15
  'use strict';
16
16
  import Validator from './Validator.js';
17
17
  import Globals from '../../Core/Globals.js';
18
- import U from '../../../Core/Utilities.js';
19
- const { addEvent, pushUnique } = U;
18
+ import { addEvent, pushUnique } from '../../../Shared/Utilities.js';
20
19
  /* *
21
20
  *
22
21
  * Composition
@@ -33,7 +32,7 @@ export function compose(TableClass) {
33
32
  if (!pushUnique(Globals.composed, 'Validator')) {
34
33
  return;
35
34
  }
36
- addEvent(TableClass, 'afterInit', initValidatorComposition);
35
+ addEvent(TableClass, 'beforeInit', initValidatorComposition);
37
36
  addEvent(TableClass, 'afterDestroy', destroy);
38
37
  }
39
38
  /**
@@ -46,7 +45,7 @@ function initValidatorComposition() {
46
45
  * Callback function called after table destroy.
47
46
  */
48
47
  function destroy() {
49
- this.validator.destroy();
48
+ this.validator?.destroy();
50
49
  }
51
50
  /* *
52
51
  *
@@ -13,7 +13,7 @@ declare module '../../Core/Options' {
13
13
  /**
14
14
  * Options for the credits label.
15
15
  *
16
- * Try it: {@link https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/grid-pro/credits | Credits options}
16
+ * Try it: {@link https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/grid-pro/basic/credits | Credits options}
17
17
  */
18
18
  credits?: CreditsOptions;
19
19
  }
@@ -16,9 +16,8 @@
16
16
  'use strict';
17
17
  import CreditsPro from './CreditsPro.js';
18
18
  import Globals from '../../Core/Globals.js';
19
- import U from '../../../Core/Utilities.js';
20
19
  import { defaultOptions } from '../../Core/Defaults.js';
21
- const { addEvent, merge, pushUnique } = U;
20
+ import { addEvent, merge, pushUnique } from '../../../Shared/Utilities.js';
22
21
  /* *
23
22
  *
24
23
  * Composition
@@ -38,7 +37,6 @@ export function compose(GridClass) {
38
37
  merge(true, defaultOptions, {
39
38
  credits: CreditsPro.defaultOptions
40
39
  });
41
- // TODO: Change to `beforeLoad` after upgrading grid update.
42
40
  addEvent(GridClass, 'afterRenderViewport', initCredits);
43
41
  }
44
42
  /**
@@ -0,0 +1,74 @@
1
+ import type { RemoteFetchCallbackResult } from './RemoteDataProvider';
2
+ import type QueryingController from '../../Core/Querying/QueryingController';
3
+ /**
4
+ * Builds a URL with query parameters for fetching data from the remote server.
5
+ *
6
+ * @param options
7
+ * The options for building the URL.
8
+ *
9
+ * @param state
10
+ * The query state containing the query, offset and limit.
11
+ *
12
+ * @returns
13
+ * The complete URL string with all query parameters.
14
+ */
15
+ export declare function buildUrl(options: DataSourceOptions, state: QueryState): string;
16
+ /**
17
+ * Fetches data from the remote server using the data source options.
18
+ *
19
+ * @param options
20
+ * The options for fetching data from the remote server.
21
+ *
22
+ * @param state
23
+ * The query state containing the query, offset and limit.
24
+ *
25
+ * @returns
26
+ * The fetched data.
27
+ */
28
+ export declare function dataSourceFetch(options: DataSourceOptions, state: QueryState): Promise<RemoteFetchCallbackResult>;
29
+ /**
30
+ * Serialized configuration alternatively to `fetchCallback`.
31
+ */
32
+ export interface DataSourceOptions {
33
+ /**
34
+ * The URL template to be used to fetch data from the remote server.
35
+ * Available template variables:
36
+ * - `page` - The current page number.
37
+ * - `pageSize` - The current page size.
38
+ * - `offset` - The current offset ((page - 1) * pageSize).
39
+ * - `limit` - Alias to `pageSize`.
40
+ * - `filter` - The filter conditions.
41
+ * - `sortBy` - The sort by conditions.
42
+ * - `sortOrder` - The sort order.
43
+ *
44
+ * Example: `https://api.example.com/data?page={page}&pageSize={pageSize}`
45
+ *
46
+ * This list can be extended by adding custom template variables to the
47
+ * `templateVariables` option.
48
+ */
49
+ urlTemplate: string;
50
+ /**
51
+ * Template variables to be replaced in the urlTemplate.
52
+ */
53
+ templateVariables?: Record<string, (state: QueryState) => string>;
54
+ /**
55
+ * If `true`, empty query parameters are omitted from the URL.
56
+ * @default true
57
+ */
58
+ omitEmpty?: boolean;
59
+ /**
60
+ * Callback to parse the response from the remote server.
61
+ */
62
+ parseResponse?: (res: Response) => Promise<RemoteFetchCallbackResult>;
63
+ /**
64
+ * Timeout (ms) for the remote request. Set to 0 to disable.
65
+ * @default 30000
66
+ */
67
+ fetchTimeout?: number;
68
+ }
69
+ export interface QueryState {
70
+ query: QueryingController;
71
+ offset: number;
72
+ limit: number;
73
+ signal?: AbortSignal;
74
+ }
@@ -0,0 +1,256 @@
1
+ /* *
2
+ *
3
+ * Remote Data Provider 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
+ import T from '../../../Core/Templating.js';
18
+ const { format } = T;
19
+ /* *
20
+ *
21
+ * Definitions
22
+ *
23
+ * */
24
+ /**
25
+ * Mapping from Grid filter operators to standard API filter conditions.
26
+ */
27
+ const filterOperatorMap = {
28
+ '==': 'equals',
29
+ '===': 'equals',
30
+ '!=': 'doesNotEqual',
31
+ '!==': 'doesNotEqual',
32
+ '>': 'greaterThan',
33
+ '>=': 'greaterThanOrEqualTo',
34
+ '<': 'lessThan',
35
+ '<=': 'lessThanOrEqualTo',
36
+ contains: 'contains',
37
+ notContains: 'doesNotContain',
38
+ startsWith: 'beginsWith',
39
+ endsWith: 'endsWith',
40
+ empty: 'empty',
41
+ notEmpty: 'notEmpty'
42
+ };
43
+ /**
44
+ * Recursively extracts filter conditions from the Grid's FilterCondition
45
+ * structure into a flat array of API filter conditions.
46
+ *
47
+ * @param condition
48
+ * The filter condition from the Grid's filtering modifier.
49
+ *
50
+ * @param filterColumns
51
+ * The array to accumulate filter conditions into.
52
+ *
53
+ * @returns
54
+ * The accumulated filter conditions array.
55
+ */
56
+ function extractFilterConditions(condition, filterColumns = []) {
57
+ if (!condition) {
58
+ return filterColumns;
59
+ }
60
+ if (condition.operator === 'and' || condition.operator === 'or') {
61
+ if (condition.conditions) {
62
+ for (const subCondition of condition.conditions) {
63
+ extractFilterConditions(subCondition, filterColumns);
64
+ }
65
+ }
66
+ }
67
+ else if (condition.columnId || condition.condition?.columnId) {
68
+ const conditionToUse = condition.columnId ?
69
+ condition : condition.condition;
70
+ let key = conditionToUse.operator;
71
+ if (condition.operator === 'not') {
72
+ key = condition.operator +
73
+ conditionToUse.operator.charAt(0).toUpperCase() +
74
+ conditionToUse.operator.slice(1);
75
+ }
76
+ const mapped = filterOperatorMap[key] || conditionToUse.operator;
77
+ if (conditionToUse.columnId) {
78
+ filterColumns.push({
79
+ id: conditionToUse.columnId,
80
+ condition: mapped,
81
+ value: conditionToUse.value
82
+ });
83
+ }
84
+ }
85
+ return filterColumns;
86
+ }
87
+ /**
88
+ * Returns the active sortings from the query state.
89
+ *
90
+ * @param state
91
+ * The query state.
92
+ *
93
+ * @returns
94
+ * The active sortings.
95
+ */
96
+ const getActiveSortings = (state) => {
97
+ const { currentSortings, currentSorting } = state.query.sorting;
98
+ return (currentSortings ?? (currentSorting ? [currentSorting] : [])).filter((sorting) => defined(sorting?.columnId) && defined(sorting.order));
99
+ };
100
+ const defaultTemplateVariables = {
101
+ page: (state) => (Math.floor(state.offset / (state.limit || 1)) + 1).toFixed(),
102
+ pageSize: (state) => state.limit.toFixed(),
103
+ offset: (state) => state.offset.toFixed(),
104
+ limit: (state) => state.limit.toFixed(),
105
+ format: () => 'js',
106
+ filter: (state) => {
107
+ const filterColumns = [];
108
+ const filterCondition = state.query.filtering.modifier?.options?.condition;
109
+ if (filterCondition) {
110
+ extractFilterConditions(filterCondition, filterColumns);
111
+ }
112
+ if (!filterColumns.length) {
113
+ return '';
114
+ }
115
+ return JSON.stringify({ columns: filterColumns });
116
+ },
117
+ sortBy: (state) => {
118
+ const sortings = getActiveSortings(state);
119
+ if (!sortings.length) {
120
+ return '';
121
+ }
122
+ return sortings.map((sorting) => sorting.columnId).join(',');
123
+ },
124
+ sortOrder: (state) => {
125
+ const sortings = getActiveSortings(state);
126
+ if (!sortings.length) {
127
+ return '';
128
+ }
129
+ const sortOrders = sortings.map((sorting) => sorting.order);
130
+ const uniqueOrders = Array.from(new Set(sortOrders));
131
+ return uniqueOrders.length === 1 ?
132
+ uniqueOrders[0] :
133
+ sortOrders.join(',');
134
+ }
135
+ };
136
+ const defaultParseResponse = async (res) => {
137
+ if (!res.ok) {
138
+ let message = `DataSourceHelper: request failed with status ${res.status} ${res.statusText}`;
139
+ try {
140
+ const body = await res.text();
141
+ if (body) {
142
+ message += ` - ${body}`;
143
+ }
144
+ }
145
+ catch {
146
+ // Ignore response body parsing errors for error responses.
147
+ }
148
+ throw new Error(message);
149
+ }
150
+ const { data, meta } = await res.json();
151
+ return {
152
+ columns: data || {},
153
+ totalRowCount: meta?.totalRowCount || 0,
154
+ rowIds: meta?.rowIds
155
+ };
156
+ };
157
+ /**
158
+ * Builds a URL with query parameters for fetching data from the remote server.
159
+ *
160
+ * @param options
161
+ * The options for building the URL.
162
+ *
163
+ * @param state
164
+ * The query state containing the query, offset and limit.
165
+ *
166
+ * @returns
167
+ * The complete URL string with all query parameters.
168
+ */
169
+ export function buildUrl(options, state) {
170
+ const { urlTemplate, templateVariables, omitEmpty } = options;
171
+ const variables = {
172
+ ...defaultTemplateVariables,
173
+ ...templateVariables
174
+ };
175
+ const context = {};
176
+ // Populate context with template variables in form of getter functions
177
+ // so that only the variables that are actually used in the URL are
178
+ // evaluated.
179
+ Object.keys(variables).forEach((key) => {
180
+ const value = variables[key];
181
+ Object.defineProperty(context, key, {
182
+ enumerable: true,
183
+ get: () => value(state)
184
+ });
185
+ });
186
+ const res = format(urlTemplate, context);
187
+ if (omitEmpty ?? true) {
188
+ return res.replace(/&([^=&]+)=([^&]*)/g, (_, key, value) => (value ? `&${key}=${value}` : ''));
189
+ }
190
+ return res;
191
+ }
192
+ /**
193
+ * Fetches data from the remote server using the data source options.
194
+ *
195
+ * @param options
196
+ * The options for fetching data from the remote server.
197
+ *
198
+ * @param state
199
+ * The query state containing the query, offset and limit.
200
+ *
201
+ * @returns
202
+ * The fetched data.
203
+ */
204
+ export async function dataSourceFetch(options, state) {
205
+ const { parseResponse = defaultParseResponse, fetchTimeout = 30000 } = options;
206
+ try {
207
+ const url = buildUrl(options, state);
208
+ const controller = fetchTimeout > 0 ? new AbortController() : null;
209
+ const externalSignal = state.signal;
210
+ let timeoutId;
211
+ if (controller && externalSignal) {
212
+ if (externalSignal.aborted) {
213
+ controller.abort();
214
+ }
215
+ else {
216
+ externalSignal.addEventListener('abort', () => {
217
+ controller.abort();
218
+ }, { once: true });
219
+ }
220
+ }
221
+ if (controller) {
222
+ timeoutId = setTimeout(() => {
223
+ controller.abort();
224
+ }, fetchTimeout);
225
+ }
226
+ try {
227
+ const signal = controller?.signal ?? externalSignal;
228
+ const res = signal ?
229
+ await fetch(url, { signal }) :
230
+ await fetch(url);
231
+ const data = await parseResponse(res);
232
+ return data;
233
+ }
234
+ finally {
235
+ if (timeoutId) {
236
+ clearTimeout(timeoutId);
237
+ }
238
+ }
239
+ }
240
+ catch (err) {
241
+ if (err instanceof DOMException && err.name === 'AbortError') {
242
+ return {
243
+ columns: {},
244
+ totalRowCount: 0,
245
+ rowIds: []
246
+ };
247
+ }
248
+ // eslint-disable-next-line no-console
249
+ console.error('Error fetching data from remote server.\n', err);
250
+ return {
251
+ columns: {},
252
+ totalRowCount: 0,
253
+ rowIds: []
254
+ };
255
+ }
256
+ }
@@ -0,0 +1,46 @@
1
+ export interface QueryFingerprintInput {
2
+ sorting: {
3
+ modifier?: {
4
+ options?: unknown;
5
+ };
6
+ };
7
+ filtering: {
8
+ modifier?: {
9
+ options?: unknown;
10
+ };
11
+ };
12
+ pagination: {
13
+ enabled: boolean;
14
+ currentPage: number;
15
+ currentPageSize: number;
16
+ };
17
+ }
18
+ /**
19
+ * Creates a deterministic fingerprint of the current query state.
20
+ *
21
+ * @param input
22
+ * Minimal query-like object (duck-typed) containing sorting, filtering and
23
+ * pagination state.
24
+ */
25
+ export declare function createQueryFingerprint(input: QueryFingerprintInput): string;
26
+ /**
27
+ * Serializes a filter condition into a deterministic string.
28
+ *
29
+ * @param condition
30
+ * Filter condition (serializable object, callback, or primitive).
31
+ */
32
+ export declare function serializeFilterCondition(condition: unknown): string;
33
+ /**
34
+ * Serializes an arbitrary value into a deterministic string.
35
+ *
36
+ * @param value
37
+ * Value to serialize.
38
+ */
39
+ export declare function serializeValue(value: unknown): string;
40
+ /**
41
+ * Small deterministic hash for strings (djb2-ish), returned as base36.
42
+ *
43
+ * @param str
44
+ * String to hash.
45
+ */
46
+ export declare function hashString(str: string): string;