@highcharts/grid-pro 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (442) hide show
  1. package/README.md +35 -0
  2. package/css/grid-pro.css +1756 -0
  3. package/es-modules/Accessibility/A11yI18n.d.ts +95 -0
  4. package/es-modules/Accessibility/A11yI18n.js +290 -0
  5. package/es-modules/Accessibility/Accessibility.d.ts +116 -0
  6. package/es-modules/Accessibility/Accessibility.js +402 -0
  7. package/es-modules/Accessibility/AccessibilityComponent.d.ts +97 -0
  8. package/es-modules/Accessibility/AccessibilityComponent.js +147 -0
  9. package/es-modules/Accessibility/Components/AnnotationsA11y.d.ts +43 -0
  10. package/es-modules/Accessibility/Components/AnnotationsA11y.js +160 -0
  11. package/es-modules/Accessibility/Components/ContainerComponent.d.ts +48 -0
  12. package/es-modules/Accessibility/Components/ContainerComponent.js +142 -0
  13. package/es-modules/Accessibility/Components/InfoRegionsComponent.d.ts +144 -0
  14. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +555 -0
  15. package/es-modules/Accessibility/Components/LegendComponent.d.ts +124 -0
  16. package/es-modules/Accessibility/Components/LegendComponent.js +474 -0
  17. package/es-modules/Accessibility/Components/MenuComponent.d.ts +93 -0
  18. package/es-modules/Accessibility/Components/MenuComponent.js +430 -0
  19. package/es-modules/Accessibility/Components/NavigatorComponent.d.ts +57 -0
  20. package/es-modules/Accessibility/Components/NavigatorComponent.js +235 -0
  21. package/es-modules/Accessibility/Components/RangeSelectorComponent.d.ts +126 -0
  22. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +473 -0
  23. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.d.ts +18 -0
  24. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +234 -0
  25. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.d.ts +87 -0
  26. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +309 -0
  27. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.d.ts +53 -0
  28. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +130 -0
  29. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.d.ts +28 -0
  30. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +415 -0
  31. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.d.ts +114 -0
  32. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +721 -0
  33. package/es-modules/Accessibility/Components/ZoomComponent.d.ts +96 -0
  34. package/es-modules/Accessibility/Components/ZoomComponent.js +314 -0
  35. package/es-modules/Accessibility/FocusBorder.d.ts +40 -0
  36. package/es-modules/Accessibility/FocusBorder.js +301 -0
  37. package/es-modules/Accessibility/HighContrastMode.d.ts +35 -0
  38. package/es-modules/Accessibility/HighContrastMode.js +100 -0
  39. package/es-modules/Accessibility/HighContrastTheme.d.ts +11 -0
  40. package/es-modules/Accessibility/HighContrastTheme.js +212 -0
  41. package/es-modules/Accessibility/KeyboardNavigation.d.ts +133 -0
  42. package/es-modules/Accessibility/KeyboardNavigation.js +450 -0
  43. package/es-modules/Accessibility/KeyboardNavigationHandler.d.ts +48 -0
  44. package/es-modules/Accessibility/KeyboardNavigationHandler.js +126 -0
  45. package/es-modules/Accessibility/Options/A11yDefaults.d.ts +68 -0
  46. package/es-modules/Accessibility/Options/A11yDefaults.js +971 -0
  47. package/es-modules/Accessibility/Options/DeprecatedOptions.d.ts +22 -0
  48. package/es-modules/Accessibility/Options/DeprecatedOptions.js +265 -0
  49. package/es-modules/Accessibility/Options/LangDefaults.d.ts +4 -0
  50. package/es-modules/Accessibility/Options/LangDefaults.js +440 -0
  51. package/es-modules/Accessibility/ProxyElement.d.ts +78 -0
  52. package/es-modules/Accessibility/ProxyElement.js +223 -0
  53. package/es-modules/Accessibility/ProxyProvider.d.ts +90 -0
  54. package/es-modules/Accessibility/ProxyProvider.js +315 -0
  55. package/es-modules/Accessibility/Utils/Announcer.d.ts +26 -0
  56. package/es-modules/Accessibility/Utils/Announcer.js +90 -0
  57. package/es-modules/Accessibility/Utils/ChartUtilities.d.ts +90 -0
  58. package/es-modules/Accessibility/Utils/ChartUtilities.js +298 -0
  59. package/es-modules/Accessibility/Utils/DOMElementProvider.d.ts +20 -0
  60. package/es-modules/Accessibility/Utils/DOMElementProvider.js +69 -0
  61. package/es-modules/Accessibility/Utils/EventProvider.d.ts +26 -0
  62. package/es-modules/Accessibility/Utils/EventProvider.js +65 -0
  63. package/es-modules/Accessibility/Utils/HTMLUtilities.d.ts +108 -0
  64. package/es-modules/Accessibility/Utils/HTMLUtilities.js +319 -0
  65. package/es-modules/Core/Animation/AnimationUtilities.d.ts +107 -0
  66. package/es-modules/Core/Animation/AnimationUtilities.js +200 -0
  67. package/es-modules/Core/Animation/Fx.d.ts +130 -0
  68. package/es-modules/Core/Animation/Fx.js +388 -0
  69. package/es-modules/Core/Chart/Chart.d.ts +1009 -0
  70. package/es-modules/Core/Chart/Chart.js +3008 -0
  71. package/es-modules/Core/Chart/Chart3D.d.ts +276 -0
  72. package/es-modules/Core/Chart/Chart3D.js +1686 -0
  73. package/es-modules/Core/Chart/ChartDefaults.d.ts +8 -0
  74. package/es-modules/Core/Chart/ChartDefaults.js +1304 -0
  75. package/es-modules/Core/Chart/ChartNavigationComposition.d.ts +55 -0
  76. package/es-modules/Core/Chart/ChartNavigationComposition.js +90 -0
  77. package/es-modules/Core/Chart/GanttChart.d.ts +74 -0
  78. package/es-modules/Core/Chart/GanttChart.js +189 -0
  79. package/es-modules/Core/Chart/MapChart.d.ts +132 -0
  80. package/es-modules/Core/Chart/MapChart.js +232 -0
  81. package/es-modules/Core/Chart/StockChart.d.ts +117 -0
  82. package/es-modules/Core/Chart/StockChart.js +641 -0
  83. package/es-modules/Core/Color/Color.d.ts +112 -0
  84. package/es-modules/Core/Color/Color.js +418 -0
  85. package/es-modules/Core/Color/Palettes.d.ts +84 -0
  86. package/es-modules/Core/Color/Palettes.js +23 -0
  87. package/es-modules/Core/Defaults.d.ts +42 -0
  88. package/es-modules/Core/Defaults.js +2977 -0
  89. package/es-modules/Core/Foundation.d.ts +19 -0
  90. package/es-modules/Core/Foundation.js +63 -0
  91. package/es-modules/Core/Geometry/CircleUtilities.d.ts +189 -0
  92. package/es-modules/Core/Geometry/CircleUtilities.js +388 -0
  93. package/es-modules/Core/Geometry/GeometryUtilities.d.ts +48 -0
  94. package/es-modules/Core/Geometry/GeometryUtilities.js +105 -0
  95. package/es-modules/Core/Geometry/PolygonClip.d.ts +19 -0
  96. package/es-modules/Core/Geometry/PolygonClip.js +96 -0
  97. package/es-modules/Core/Globals.d.ts +110 -0
  98. package/es-modules/Core/Globals.js +127 -0
  99. package/es-modules/Core/HttpUtilities.d.ts +61 -0
  100. package/es-modules/Core/HttpUtilities.js +214 -0
  101. package/es-modules/Core/MSPointer.d.ts +74 -0
  102. package/es-modules/Core/MSPointer.js +218 -0
  103. package/es-modules/Core/Math3D.d.ts +117 -0
  104. package/es-modules/Core/Math3D.js +250 -0
  105. package/es-modules/Core/Pointer.d.ts +590 -0
  106. package/es-modules/Core/Pointer.js +1631 -0
  107. package/es-modules/Core/Renderer/HTML/AST.d.ts +163 -0
  108. package/es-modules/Core/Renderer/HTML/AST.js +562 -0
  109. package/es-modules/Core/Renderer/HTML/HTMLElement.d.ts +76 -0
  110. package/es-modules/Core/Renderer/HTML/HTMLElement.js +471 -0
  111. package/es-modules/Core/Renderer/RendererRegistry.d.ts +29 -0
  112. package/es-modules/Core/Renderer/RendererRegistry.js +76 -0
  113. package/es-modules/Core/Renderer/RendererUtilities.d.ts +26 -0
  114. package/es-modules/Core/Renderer/RendererUtilities.js +172 -0
  115. package/es-modules/Core/Responsive.d.ts +55 -0
  116. package/es-modules/Core/Responsive.js +260 -0
  117. package/es-modules/Core/Templating.d.ts +125 -0
  118. package/es-modules/Core/Templating.js +428 -0
  119. package/es-modules/Core/Time.d.ts +69 -0
  120. package/es-modules/Core/Time.js +172 -0
  121. package/es-modules/Core/Tooltip.d.ts +297 -0
  122. package/es-modules/Core/Tooltip.js +1377 -0
  123. package/es-modules/Core/Utilities.d.ts +770 -0
  124. package/es-modules/Core/Utilities.js +1989 -0
  125. package/es-modules/Data/ColumnUtils.d.ts +87 -0
  126. package/es-modules/Data/ColumnUtils.js +140 -0
  127. package/es-modules/Data/Connectors/CSVConnector.d.ts +63 -0
  128. package/es-modules/Data/Connectors/CSVConnector.js +149 -0
  129. package/es-modules/Data/Connectors/CSVConnectorOptions.d.ts +149 -0
  130. package/es-modules/Data/Connectors/DataConnector.d.ts +204 -0
  131. package/es-modules/Data/Connectors/DataConnector.js +345 -0
  132. package/es-modules/Data/Connectors/DataConnectorOptions.d.ts +87 -0
  133. package/es-modules/Data/Connectors/DataConnectorType.d.ts +45 -0
  134. package/es-modules/Data/Connectors/GoogleSheetsConnector.d.ts +65 -0
  135. package/es-modules/Data/Connectors/GoogleSheetsConnector.js +226 -0
  136. package/es-modules/Data/Connectors/GoogleSheetsConnectorOptions.d.ts +167 -0
  137. package/es-modules/Data/Connectors/HTMLTableConnector.d.ts +77 -0
  138. package/es-modules/Data/Connectors/HTMLTableConnector.js +119 -0
  139. package/es-modules/Data/Connectors/HTMLTableConnectorOptions.d.ts +49 -0
  140. package/es-modules/Data/Connectors/JSONConnector.d.ts +64 -0
  141. package/es-modules/Data/Connectors/JSONConnector.js +156 -0
  142. package/es-modules/Data/Connectors/JSONConnectorOptions.d.ts +185 -0
  143. package/es-modules/Data/Converters/CSVConverter.d.ts +64 -0
  144. package/es-modules/Data/Converters/CSVConverter.js +374 -0
  145. package/es-modules/Data/Converters/CSVConverterOptions.d.ts +53 -0
  146. package/es-modules/Data/Converters/DataConverter.d.ts +168 -0
  147. package/es-modules/Data/Converters/DataConverter.js +387 -0
  148. package/es-modules/Data/Converters/DataConverterType.d.ts +40 -0
  149. package/es-modules/Data/Converters/DataConverterUtils.d.ts +82 -0
  150. package/es-modules/Data/Converters/DataConverterUtils.js +216 -0
  151. package/es-modules/Data/Converters/GoogleSheetsConverter.d.ts +46 -0
  152. package/es-modules/Data/Converters/GoogleSheetsConverter.js +135 -0
  153. package/es-modules/Data/Converters/GoogleSheetsConverterOptions.d.ts +52 -0
  154. package/es-modules/Data/Converters/HTMLTableConverter.d.ts +72 -0
  155. package/es-modules/Data/Converters/HTMLTableConverter.js +362 -0
  156. package/es-modules/Data/Converters/HTMLTableConverterOptions.d.ts +51 -0
  157. package/es-modules/Data/Converters/JSONConverter.d.ts +99 -0
  158. package/es-modules/Data/Converters/JSONConverter.js +239 -0
  159. package/es-modules/Data/Converters/JSONConverterOptions.d.ts +52 -0
  160. package/es-modules/Data/DataCursor.d.ts +176 -0
  161. package/es-modules/Data/DataCursor.js +379 -0
  162. package/es-modules/Data/DataEvent.d.ts +81 -0
  163. package/es-modules/Data/DataEvent.js +14 -0
  164. package/es-modules/Data/DataPool.d.ts +130 -0
  165. package/es-modules/Data/DataPool.js +257 -0
  166. package/es-modules/Data/DataPoolOptions.d.ts +66 -0
  167. package/es-modules/Data/DataTable.d.ts +563 -0
  168. package/es-modules/Data/DataTable.js +930 -0
  169. package/es-modules/Data/DataTableCore.d.ts +165 -0
  170. package/es-modules/Data/DataTableCore.js +316 -0
  171. package/es-modules/Data/DataTableOptions.d.ts +25 -0
  172. package/es-modules/Data/DataTableOptions.js +15 -0
  173. package/es-modules/Data/Formula/Formula.d.ts +21 -0
  174. package/es-modules/Data/Formula/Formula.js +54 -0
  175. package/es-modules/Data/Formula/FormulaParser.d.ts +31 -0
  176. package/es-modules/Data/Formula/FormulaParser.js +488 -0
  177. package/es-modules/Data/Formula/FormulaProcessor.d.ts +155 -0
  178. package/es-modules/Data/Formula/FormulaProcessor.js +529 -0
  179. package/es-modules/Data/Formula/FormulaTypes.d.ts +138 -0
  180. package/es-modules/Data/Formula/FormulaTypes.js +135 -0
  181. package/es-modules/Data/Formula/Functions/ABS.d.ts +19 -0
  182. package/es-modules/Data/Formula/Functions/ABS.js +67 -0
  183. package/es-modules/Data/Formula/Functions/AND.d.ts +20 -0
  184. package/es-modules/Data/Formula/Functions/AND.js +59 -0
  185. package/es-modules/Data/Formula/Functions/AVERAGE.d.ts +20 -0
  186. package/es-modules/Data/Formula/Functions/AVERAGE.js +74 -0
  187. package/es-modules/Data/Formula/Functions/AVERAGEA.d.ts +20 -0
  188. package/es-modules/Data/Formula/Functions/AVERAGEA.js +90 -0
  189. package/es-modules/Data/Formula/Functions/COUNT.d.ts +20 -0
  190. package/es-modules/Data/Formula/Functions/COUNT.js +65 -0
  191. package/es-modules/Data/Formula/Functions/COUNTA.d.ts +20 -0
  192. package/es-modules/Data/Formula/Functions/COUNTA.js +71 -0
  193. package/es-modules/Data/Formula/Functions/IF.d.ts +21 -0
  194. package/es-modules/Data/Formula/Functions/IF.js +54 -0
  195. package/es-modules/Data/Formula/Functions/ISNA.d.ts +20 -0
  196. package/es-modules/Data/Formula/Functions/ISNA.js +52 -0
  197. package/es-modules/Data/Formula/Functions/MAX.d.ts +20 -0
  198. package/es-modules/Data/Formula/Functions/MAX.js +69 -0
  199. package/es-modules/Data/Formula/Functions/MEDIAN.d.ts +20 -0
  200. package/es-modules/Data/Formula/Functions/MEDIAN.js +78 -0
  201. package/es-modules/Data/Formula/Functions/MIN.d.ts +20 -0
  202. package/es-modules/Data/Formula/Functions/MIN.js +69 -0
  203. package/es-modules/Data/Formula/Functions/MOD.d.ts +20 -0
  204. package/es-modules/Data/Formula/Functions/MOD.js +63 -0
  205. package/es-modules/Data/Formula/Functions/MODE.d.ts +41 -0
  206. package/es-modules/Data/Formula/Functions/MODE.js +149 -0
  207. package/es-modules/Data/Formula/Functions/NOT.d.ts +20 -0
  208. package/es-modules/Data/Formula/Functions/NOT.js +60 -0
  209. package/es-modules/Data/Formula/Functions/OR.d.ts +20 -0
  210. package/es-modules/Data/Formula/Functions/OR.js +62 -0
  211. package/es-modules/Data/Formula/Functions/PRODUCT.d.ts +20 -0
  212. package/es-modules/Data/Formula/Functions/PRODUCT.js +68 -0
  213. package/es-modules/Data/Formula/Functions/SUM.d.ts +20 -0
  214. package/es-modules/Data/Formula/Functions/SUM.js +65 -0
  215. package/es-modules/Data/Formula/Functions/XOR.d.ts +20 -0
  216. package/es-modules/Data/Formula/Functions/XOR.js +81 -0
  217. package/es-modules/Data/Modifiers/ChainModifier.d.ts +128 -0
  218. package/es-modules/Data/Modifiers/ChainModifier.js +231 -0
  219. package/es-modules/Data/Modifiers/ChainModifierOptions.d.ts +20 -0
  220. package/es-modules/Data/Modifiers/ChainModifierOptions.js +14 -0
  221. package/es-modules/Data/Modifiers/DataModifier.d.ts +117 -0
  222. package/es-modules/Data/Modifiers/DataModifier.js +202 -0
  223. package/es-modules/Data/Modifiers/DataModifierEvent.d.ts +28 -0
  224. package/es-modules/Data/Modifiers/DataModifierEvent.js +15 -0
  225. package/es-modules/Data/Modifiers/DataModifierOptions.d.ts +11 -0
  226. package/es-modules/Data/Modifiers/DataModifierOptions.js +15 -0
  227. package/es-modules/Data/Modifiers/DataModifierType.d.ts +44 -0
  228. package/es-modules/Data/Modifiers/FilterModifier.d.ts +53 -0
  229. package/es-modules/Data/Modifiers/FilterModifier.js +172 -0
  230. package/es-modules/Data/Modifiers/FilterModifierOptions.d.ts +110 -0
  231. package/es-modules/Data/Modifiers/FilterModifierOptions.js +14 -0
  232. package/es-modules/Data/Modifiers/InvertModifier.d.ts +48 -0
  233. package/es-modules/Data/Modifiers/InvertModifier.js +116 -0
  234. package/es-modules/Data/Modifiers/InvertModifierOptions.d.ts +11 -0
  235. package/es-modules/Data/Modifiers/InvertModifierOptions.js +15 -0
  236. package/es-modules/Data/Modifiers/MathModifier.d.ts +68 -0
  237. package/es-modules/Data/Modifiers/MathModifier.js +165 -0
  238. package/es-modules/Data/Modifiers/MathModifierOptions.d.ts +50 -0
  239. package/es-modules/Data/Modifiers/MathModifierOptions.js +14 -0
  240. package/es-modules/Data/Modifiers/RangeModifier.d.ts +46 -0
  241. package/es-modules/Data/Modifiers/RangeModifier.js +96 -0
  242. package/es-modules/Data/Modifiers/RangeModifierOptions.d.ts +22 -0
  243. package/es-modules/Data/Modifiers/RangeModifierOptions.js +15 -0
  244. package/es-modules/Data/Modifiers/SortModifier.d.ts +54 -0
  245. package/es-modules/Data/Modifiers/SortModifier.js +144 -0
  246. package/es-modules/Data/Modifiers/SortModifierOptions.d.ts +44 -0
  247. package/es-modules/Data/Modifiers/SortModifierOptions.js +14 -0
  248. package/es-modules/Grid/Core/Accessibility/A11yOptions.d.ts +148 -0
  249. package/es-modules/Grid/Core/Accessibility/A11yOptions.js +17 -0
  250. package/es-modules/Grid/Core/Accessibility/Accessibility.d.ts +115 -0
  251. package/es-modules/Grid/Core/Accessibility/Accessibility.js +231 -0
  252. package/es-modules/Grid/Core/Credits.d.ts +57 -0
  253. package/es-modules/Grid/Core/Credits.js +125 -0
  254. package/es-modules/Grid/Core/Defaults.d.ts +20 -0
  255. package/es-modules/Grid/Core/Defaults.js +148 -0
  256. package/es-modules/Grid/Core/Globals.d.ts +103 -0
  257. package/es-modules/Grid/Core/Globals.js +134 -0
  258. package/es-modules/Grid/Core/Grid.d.ts +295 -0
  259. package/es-modules/Grid/Core/Grid.js +730 -0
  260. package/es-modules/Grid/Core/GridUtils.d.ts +110 -0
  261. package/es-modules/Grid/Core/GridUtils.js +191 -0
  262. package/es-modules/Grid/Core/Options.d.ts +599 -0
  263. package/es-modules/Grid/Core/Options.js +16 -0
  264. package/es-modules/Grid/Core/Pagination/Icons.d.ts +7 -0
  265. package/es-modules/Grid/Core/Pagination/Icons.js +7 -0
  266. package/es-modules/Grid/Core/Pagination/Pagination.d.ts +278 -0
  267. package/es-modules/Grid/Core/Pagination/Pagination.js +842 -0
  268. package/es-modules/Grid/Core/Pagination/PaginationOptions.d.ts +228 -0
  269. package/es-modules/Grid/Core/Querying/FilteringController.d.ts +66 -0
  270. package/es-modules/Grid/Core/Querying/FilteringController.js +256 -0
  271. package/es-modules/Grid/Core/Querying/PaginationController.d.ts +50 -0
  272. package/es-modules/Grid/Core/Querying/PaginationController.js +101 -0
  273. package/es-modules/Grid/Core/Querying/QueryingController.d.ts +58 -0
  274. package/es-modules/Grid/Core/Querying/QueryingController.js +127 -0
  275. package/es-modules/Grid/Core/Querying/SortingController.d.ts +67 -0
  276. package/es-modules/Grid/Core/Querying/SortingController.js +136 -0
  277. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.d.ts +114 -0
  278. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js +351 -0
  279. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.d.ts +14 -0
  280. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.js +86 -0
  281. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.d.ts +19 -0
  282. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.js +80 -0
  283. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.d.ts +52 -0
  284. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.js +81 -0
  285. package/es-modules/Grid/Core/Table/Actions/ColumnSorting.d.ts +56 -0
  286. package/es-modules/Grid/Core/Table/Actions/ColumnSorting.js +170 -0
  287. package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.d.ts +55 -0
  288. package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.js +182 -0
  289. package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.d.ts +87 -0
  290. package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.js +346 -0
  291. package/es-modules/Grid/Core/Table/Body/TableCell.d.ts +88 -0
  292. package/es-modules/Grid/Core/Table/Body/TableCell.js +231 -0
  293. package/es-modules/Grid/Core/Table/Body/TableRow.d.ts +79 -0
  294. package/es-modules/Grid/Core/Table/Body/TableRow.js +177 -0
  295. package/es-modules/Grid/Core/Table/Cell.d.ts +92 -0
  296. package/es-modules/Grid/Core/Table/Cell.js +223 -0
  297. package/es-modules/Grid/Core/Table/CellContent/CellContent.d.ts +30 -0
  298. package/es-modules/Grid/Core/Table/CellContent/CellContent.js +40 -0
  299. package/es-modules/Grid/Core/Table/CellContent/TextContent.d.ts +19 -0
  300. package/es-modules/Grid/Core/Table/CellContent/TextContent.js +98 -0
  301. package/es-modules/Grid/Core/Table/Column.d.ts +136 -0
  302. package/es-modules/Grid/Core/Table/Column.js +230 -0
  303. package/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.d.ts +7 -0
  304. package/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.js +62 -0
  305. package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.d.ts +32 -0
  306. package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.js +68 -0
  307. package/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.d.ts +7 -0
  308. package/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.js +53 -0
  309. package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.d.ts +7 -0
  310. package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js +63 -0
  311. package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.d.ts +92 -0
  312. package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.js +194 -0
  313. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.d.ts +68 -0
  314. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js +187 -0
  315. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.d.ts +29 -0
  316. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.js +77 -0
  317. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.d.ts +13 -0
  318. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.js +79 -0
  319. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.d.ts +12 -0
  320. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.js +71 -0
  321. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuPopup.d.ts +12 -0
  322. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuPopup.js +66 -0
  323. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.d.ts +25 -0
  324. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.js +65 -0
  325. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.d.ts +12 -0
  326. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js +81 -0
  327. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.d.ts +12 -0
  328. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.js +80 -0
  329. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.d.ts +11 -0
  330. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.js +81 -0
  331. package/es-modules/Grid/Core/Table/Header/HeaderCell.d.ts +70 -0
  332. package/es-modules/Grid/Core/Table/Header/HeaderCell.js +225 -0
  333. package/es-modules/Grid/Core/Table/Header/HeaderRow.d.ts +53 -0
  334. package/es-modules/Grid/Core/Table/Header/HeaderRow.js +182 -0
  335. package/es-modules/Grid/Core/Table/Header/TableHeader.d.ts +65 -0
  336. package/es-modules/Grid/Core/Table/Header/TableHeader.js +159 -0
  337. package/es-modules/Grid/Core/Table/Row.d.ts +76 -0
  338. package/es-modules/Grid/Core/Table/Row.js +131 -0
  339. package/es-modules/Grid/Core/Table/Table.d.ts +181 -0
  340. package/es-modules/Grid/Core/Table/Table.js +399 -0
  341. package/es-modules/Grid/Core/UI/Button.d.ts +31 -0
  342. package/es-modules/Grid/Core/UI/Button.js +16 -0
  343. package/es-modules/Grid/Core/UI/ContextMenu.d.ts +38 -0
  344. package/es-modules/Grid/Core/UI/ContextMenu.js +132 -0
  345. package/es-modules/Grid/Core/UI/ContextMenuButton.d.ts +126 -0
  346. package/es-modules/Grid/Core/UI/ContextMenuButton.js +183 -0
  347. package/es-modules/Grid/Core/UI/Popup.d.ts +149 -0
  348. package/es-modules/Grid/Core/UI/Popup.js +271 -0
  349. package/es-modules/Grid/Core/UI/SvgIcons.d.ts +53 -0
  350. package/es-modules/Grid/Core/UI/SvgIcons.js +158 -0
  351. package/es-modules/Grid/Core/UI/Toolbar.d.ts +16 -0
  352. package/es-modules/Grid/Core/UI/Toolbar.js +16 -0
  353. package/es-modules/Grid/Core/UI/ToolbarButton.d.ts +135 -0
  354. package/es-modules/Grid/Core/UI/ToolbarButton.js +191 -0
  355. package/es-modules/Grid/Pro/CellEditing/CellEditMode.d.ts +112 -0
  356. package/es-modules/Grid/Pro/CellEditing/CellEditing.d.ts +80 -0
  357. package/es-modules/Grid/Pro/CellEditing/CellEditing.js +211 -0
  358. package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.d.ts +123 -0
  359. package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js +198 -0
  360. package/es-modules/Grid/Pro/CellRendering/CellContentPro.d.ts +23 -0
  361. package/es-modules/Grid/Pro/CellRendering/CellContentPro.js +45 -0
  362. package/es-modules/Grid/Pro/CellRendering/CellRenderer.d.ts +50 -0
  363. package/es-modules/Grid/Pro/CellRendering/CellRenderer.js +41 -0
  364. package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.d.ts +18 -0
  365. package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.js +58 -0
  366. package/es-modules/Grid/Pro/CellRendering/CellRendererType.d.ts +48 -0
  367. package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.d.ts +18 -0
  368. package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js +79 -0
  369. package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.d.ts +30 -0
  370. package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.js +122 -0
  371. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.d.ts +12 -0
  372. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.js +39 -0
  373. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.d.ts +66 -0
  374. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.js +145 -0
  375. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.d.ts +12 -0
  376. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.js +38 -0
  377. package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.d.ts +58 -0
  378. package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js +158 -0
  379. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.d.ts +58 -0
  380. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.js +173 -0
  381. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.d.ts +28 -0
  382. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js +157 -0
  383. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.d.ts +58 -0
  384. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js +168 -0
  385. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.d.ts +13 -0
  386. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.js +41 -0
  387. package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.d.ts +50 -0
  388. package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js +65 -0
  389. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.d.ts +37 -0
  390. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js +65 -0
  391. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRendererBase.d.ts +26 -0
  392. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRendererBase.js +16 -0
  393. package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.d.ts +37 -0
  394. package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js +64 -0
  395. package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.d.ts +52 -0
  396. package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js +64 -0
  397. package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.d.ts +74 -0
  398. package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js +66 -0
  399. package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.d.ts +45 -0
  400. package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js +89 -0
  401. package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.d.ts +54 -0
  402. package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js +65 -0
  403. package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.d.ts +43 -0
  404. package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js +74 -0
  405. package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.d.ts +37 -0
  406. package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js +64 -0
  407. package/es-modules/Grid/Pro/ColumnTypes/ColumnDataType.d.ts +29 -0
  408. package/es-modules/Grid/Pro/ColumnTypes/Validator.d.ts +118 -0
  409. package/es-modules/Grid/Pro/ColumnTypes/Validator.js +270 -0
  410. package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.d.ts +32 -0
  411. package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js +63 -0
  412. package/es-modules/Grid/Pro/Credits/CreditsPro.d.ts +35 -0
  413. package/es-modules/Grid/Pro/Credits/CreditsPro.js +112 -0
  414. package/es-modules/Grid/Pro/Credits/CreditsProComposition.d.ts +28 -0
  415. package/es-modules/Grid/Pro/Credits/CreditsProComposition.js +61 -0
  416. package/es-modules/Grid/Pro/Export/Exporting.d.ts +68 -0
  417. package/es-modules/Grid/Pro/Export/Exporting.js +202 -0
  418. package/es-modules/Grid/Pro/Export/ExportingComposition.d.ts +68 -0
  419. package/es-modules/Grid/Pro/Export/ExportingComposition.js +55 -0
  420. package/es-modules/Grid/Pro/GridEvents.d.ts +119 -0
  421. package/es-modules/Grid/Pro/GridEvents.js +107 -0
  422. package/es-modules/Grid/Pro/Pagination/PaginationComposition.d.ts +75 -0
  423. package/es-modules/Grid/Pro/Pagination/PaginationComposition.js +76 -0
  424. package/es-modules/Grid/Pro/highcharts.d.ts +7 -0
  425. package/es-modules/Grid/index.d.ts +5 -0
  426. package/es-modules/Grid/index.js +19 -0
  427. package/es-modules/Shared/BaseForm.d.ts +49 -0
  428. package/es-modules/Shared/BaseForm.js +126 -0
  429. package/es-modules/Shared/DownloadURL.d.ts +85 -0
  430. package/es-modules/Shared/DownloadURL.js +198 -0
  431. package/es-modules/Shared/LangOptionsCore.d.ts +27 -0
  432. package/es-modules/Shared/TimeBase.d.ts +353 -0
  433. package/es-modules/Shared/TimeBase.js +830 -0
  434. package/es-modules/Shared/Types.d.ts +48 -0
  435. package/es-modules/masters/grid-pro.src.d.ts +99 -0
  436. package/es-modules/masters/grid-pro.src.js +129 -0
  437. package/grid-pro.d.ts +50 -0
  438. package/grid-pro.js +12 -0
  439. package/grid-pro.js.map +1 -0
  440. package/grid-pro.src.d.ts +50 -0
  441. package/grid-pro.src.js +26623 -0
  442. package/package.json +21 -0
@@ -0,0 +1,830 @@
1
+ /* *
2
+ *
3
+ * (c) 2010-2025 Torstein Honsi
4
+ *
5
+ * License: www.highcharts.com/license
6
+ *
7
+ * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
8
+ *
9
+ * */
10
+ 'use strict';
11
+ import H from '../Core/Globals.js';
12
+ const { pageLang, win } = H;
13
+ import U from '../Core/Utilities.js';
14
+ const { defined, error, extend, isNumber, isObject, isString, merge, objectEach, pad, splat, timeUnits, ucfirst } = U;
15
+ /* *
16
+ *
17
+ * Constants
18
+ *
19
+ * */
20
+ // To do: Remove this when we no longer need support for Safari < v14.1
21
+ const hasOldSafariBug = H.isSafari &&
22
+ win.Intl &&
23
+ !win.Intl.DateTimeFormat.prototype.formatRange;
24
+ const isDateTimeFormatOptions = (obj) => obj.main === void 0;
25
+ /* *
26
+ *
27
+ * Class
28
+ *
29
+ * */
30
+ /* eslint-disable no-invalid-this, valid-jsdoc */
31
+ /**
32
+ * The Time class. Time settings are applied in general for each page using
33
+ * `Highcharts.setOptions`, or individually for each Chart item through the
34
+ * [time](https://api.highcharts.com/highcharts/time) options set.
35
+ *
36
+ * The Time object is available from {@link Highcharts.Chart#time}, which refers
37
+ * to `Highcharts.time` unless individual time settings are applied for each
38
+ * chart.
39
+ *
40
+ * When configuring time settings for individual chart instances, be aware that
41
+ * using `Highcharts.dateFormat` or `Highcharts.time.dateFormat` within
42
+ * formatter callbacks relies on the global time object, which applies the
43
+ * global language and time zone settings. To ensure charts with local time
44
+ * settings function correctly, use `chart.time.dateFormat? instead. However,
45
+ * the recommended best practice is to use `setOptions` to define global time
46
+ * settings unless specific configurations are needed for each chart.
47
+ *
48
+ * @example
49
+ * // Apply time settings globally
50
+ * Highcharts.setOptions({
51
+ * time: {
52
+ * timezone: 'Europe/London'
53
+ * }
54
+ * });
55
+ *
56
+ * // Apply time settings by instance
57
+ * const chart = Highcharts.chart('container', {
58
+ * time: {
59
+ * timezone: 'America/New_York'
60
+ * },
61
+ * series: [{
62
+ * data: [1, 4, 3, 5]
63
+ * }]
64
+ * });
65
+ *
66
+ * // Use the Time object of a chart instance
67
+ * console.log(
68
+ * 'Current time in New York',
69
+ * chart.time.dateFormat('%Y-%m-%d %H:%M:%S', Date.now())
70
+ * );
71
+ *
72
+ * // Standalone use
73
+ * const time = new Highcharts.Time({
74
+ * timezone: 'America/New_York'
75
+ * });
76
+ * const s = time.dateFormat('%Y-%m-%d %H:%M:%S', Date.UTC(2020, 0, 1));
77
+ * console.log(s); // => 2019-12-31 19:00:00
78
+ *
79
+ * @since 6.0.5
80
+ *
81
+ * @class
82
+ * @name Highcharts.Time
83
+ *
84
+ * @param {Highcharts.TimeOptions} [options] Time options as defined in
85
+ * [chart.options.time](/highcharts/time).
86
+ */
87
+ class TimeBase {
88
+ /* *
89
+ *
90
+ * Constructors
91
+ *
92
+ * */
93
+ constructor(options, lang) {
94
+ /* *
95
+ *
96
+ * Properties
97
+ *
98
+ * */
99
+ this.options = {
100
+ timezone: 'UTC'
101
+ };
102
+ this.variableTimezone = false;
103
+ this.Date = win.Date;
104
+ this.update(options);
105
+ this.lang = lang;
106
+ }
107
+ /* *
108
+ *
109
+ * Functions
110
+ *
111
+ * */
112
+ /**
113
+ * Update the Time object with current options. It is called internally on
114
+ * initializing Highcharts, after running `Highcharts.setOptions` and on
115
+ * `Chart.update`.
116
+ *
117
+ * @private
118
+ * @function Highcharts.Time#update
119
+ *
120
+ * @param {Highcharts.TimeOptions} [options]
121
+ *
122
+ */
123
+ update(options = {}) {
124
+ this.dTLCache = {};
125
+ this.options = options = merge(true, this.options, options);
126
+ const { timezoneOffset, useUTC, locale } = options;
127
+ // Allow using a different Date class
128
+ this.Date = options.Date || win.Date || Date;
129
+ // Assign the time zone. Handle the legacy, deprecated `useUTC` option.
130
+ let timezone = options.timezone;
131
+ if (defined(useUTC)) {
132
+ timezone = useUTC ? 'UTC' : void 0;
133
+ }
134
+ // The Etc/GMT time zones do not support offsets with half-hour
135
+ // resolutions
136
+ if (timezoneOffset && timezoneOffset % 60 === 0) {
137
+ timezone = 'Etc/GMT' + ((timezoneOffset > 0 ? '+' : '')) + timezoneOffset / 60;
138
+ }
139
+ /*
140
+ * The time object has options allowing for variable time zones, meaning
141
+ * the axis ticks or series data needs to consider this.
142
+ */
143
+ this.variableTimezone = timezone !== 'UTC' &&
144
+ timezone?.indexOf('Etc/GMT') !== 0;
145
+ this.timezone = timezone;
146
+ // Update locale.
147
+ if (this.lang && locale) {
148
+ this.lang.locale = locale;
149
+ }
150
+ // Assign default time formats from locale strings
151
+ ['months', 'shortMonths', 'weekdays', 'shortWeekdays'].forEach((name) => {
152
+ const isMonth = /months/i.test(name), isShort = /short/.test(name), options = {
153
+ timeZone: 'UTC'
154
+ };
155
+ options[isMonth ? 'month' : 'weekday'] = isShort ? 'short' : 'long';
156
+ this[name] = (isMonth ?
157
+ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] :
158
+ [3, 4, 5, 6, 7, 8, 9]).map((position) => this.dateFormat(options, (isMonth ? 31 : 1) * 24 * 36e5 * position));
159
+ });
160
+ }
161
+ /**
162
+ * Get a date in terms of numbers (year, month, day etc) for further
163
+ * processing. Takes the current `timezone` setting into account. Inverse of
164
+ * `makeTime` and the native `Date` constructor and `Date.UTC`.
165
+ *
166
+ * The date is returned in array format with the following indices:
167
+ *
168
+ * 0: year,
169
+ * 1: month (zero based),
170
+ * 2: day,
171
+ * 3: hours,
172
+ * 4: minutes,
173
+ * 5: seconds,
174
+ * 6: milliseconds,
175
+ * 7: weekday (Sunday as 0)
176
+ *
177
+ * @function Highcharts.Time#toParts
178
+ *
179
+ * @param {number|Date} [timestamp]
180
+ * The timestamp in milliseconds since January 1st 1970.
181
+ * A Date object is also accepted.
182
+ *
183
+ * @return {Array<number>} The date parts in array format.
184
+ */
185
+ toParts(timestamp) {
186
+ const [weekday, dayOfMonth, month, year, hours, minutes, seconds] = this.dateTimeFormat({
187
+ weekday: 'narrow',
188
+ day: 'numeric',
189
+ month: 'numeric',
190
+ year: 'numeric',
191
+ hour: 'numeric',
192
+ minute: 'numeric',
193
+ second: 'numeric'
194
+ }, timestamp, 'es')
195
+ // The ', ' splitter is for all modern browsers:
196
+ // L, 6/3/2023, 14:30:00
197
+ // The ' ' splitter is for legacy Safari with no comma between date
198
+ // and time (#22445):
199
+ // L, 6/3/2023 14:30:00
200
+ .split(/(?:, | |\/|:)/g);
201
+ return [
202
+ year,
203
+ +month - 1,
204
+ dayOfMonth,
205
+ hours,
206
+ minutes,
207
+ seconds,
208
+ // Milliseconds
209
+ Math.floor(Number(timestamp) || 0) % 1000,
210
+ // Spanish weekday index
211
+ 'DLMXJVS'.indexOf(weekday)
212
+ ].map(Number);
213
+ }
214
+ /**
215
+ * Shorthand to get a cached `Intl.DateTimeFormat` instance.
216
+ */
217
+ dateTimeFormat(options, timestamp, locale = this.options.locale || pageLang) {
218
+ const cacheKey = JSON.stringify(options) + locale;
219
+ if (isString(options)) {
220
+ options = this.str2dtf(options);
221
+ }
222
+ let dTL = this.dTLCache[cacheKey];
223
+ if (!dTL) {
224
+ options.timeZone ?? (options.timeZone = this.timezone);
225
+ try {
226
+ dTL = new Intl.DateTimeFormat(locale, options);
227
+ }
228
+ catch (e) {
229
+ if (/Invalid time zone/i.test(e.message)) {
230
+ error(34);
231
+ options.timeZone = 'UTC';
232
+ dTL = new Intl.DateTimeFormat(locale, options);
233
+ }
234
+ else {
235
+ error(e.message, false);
236
+ }
237
+ }
238
+ }
239
+ this.dTLCache[cacheKey] = dTL;
240
+ return dTL?.format(timestamp) || '';
241
+ }
242
+ /**
243
+ * Take a locale-aware string format and return a full DateTimeFormat in
244
+ * object form.
245
+ */
246
+ str2dtf(s, dtf = {}) {
247
+ const mapping = {
248
+ L: { fractionalSecondDigits: 3 },
249
+ S: { second: '2-digit' },
250
+ M: { minute: 'numeric' },
251
+ H: { hour: '2-digit' },
252
+ k: { hour: 'numeric' },
253
+ E: { weekday: 'narrow' },
254
+ a: { weekday: 'short' },
255
+ A: { weekday: 'long' },
256
+ d: { day: '2-digit' },
257
+ e: { day: 'numeric' },
258
+ b: { month: 'short' },
259
+ B: { month: 'long' },
260
+ m: { month: '2-digit' },
261
+ o: { month: 'numeric' },
262
+ y: { year: '2-digit' },
263
+ Y: { year: 'numeric' }
264
+ };
265
+ Object.keys(mapping).forEach((key) => {
266
+ if (s.indexOf(key) !== -1) {
267
+ extend(dtf, mapping[key]);
268
+ }
269
+ });
270
+ return dtf;
271
+ }
272
+ /**
273
+ * Make a time and returns milliseconds. Similar to `Date.UTC`, but takes
274
+ * the current `timezone` setting into account.
275
+ *
276
+ * @function Highcharts.Time#makeTime
277
+ *
278
+ * @param {number} year
279
+ * The year
280
+ *
281
+ * @param {number} month
282
+ * The month. Zero-based, so January is 0.
283
+ *
284
+ * @param {number} [date=1]
285
+ * The day of the month
286
+ *
287
+ * @param {number} [hours=0]
288
+ * The hour of the day, 0-23.
289
+ *
290
+ * @param {number} [minutes=0]
291
+ * The minutes
292
+ *
293
+ * @param {number} [seconds=0]
294
+ * The seconds
295
+ *
296
+ * @return {number}
297
+ * The time in milliseconds since January 1st 1970.
298
+ */
299
+ makeTime(year, month, date = 1, hours = 0, minutes, seconds, milliseconds) {
300
+ // eslint-disable-next-line new-cap
301
+ let d = this.Date.UTC(year, month, date, hours, minutes || 0, seconds || 0, milliseconds || 0);
302
+ if (this.timezone !== 'UTC') {
303
+ const offset = this.getTimezoneOffset(d);
304
+ d += offset;
305
+ // Adjustments close to DST transitions
306
+ if (
307
+ // Optimize for speed by limiting the number of calls to
308
+ // `getTimezoneOffset`. According to
309
+ // https://en.wikipedia.org/wiki/Daylight_saving_time_by_country,
310
+ // DST change may only occur in these months.
311
+ [2, 3, 8, 9, 10, 11].indexOf(month) !== -1 &&
312
+ // DST transitions occur only in the night-time
313
+ (hours < 5 || hours > 20)) {
314
+ const newOffset = this.getTimezoneOffset(d);
315
+ if (offset !== newOffset) {
316
+ d += newOffset - offset;
317
+ // A special case for transitioning from summer time to winter
318
+ // time. When the clock is set back, the same time is repeated
319
+ // twice, i.e. 02:30 am is repeated since the clock is set back
320
+ // from 3 am to 2 am. We need to make the same time as local
321
+ // Date does.
322
+ }
323
+ else if (offset - 36e5 === this.getTimezoneOffset(d - 36e5) &&
324
+ !hasOldSafariBug) {
325
+ d -= 36e5;
326
+ }
327
+ }
328
+ }
329
+ return d;
330
+ }
331
+ /**
332
+ * Parse a datetime string. Unless the string contains time zone
333
+ * information, apply the current `timezone` from options. If the argument
334
+ * is a number, return it.
335
+ *
336
+ * @function Highcharts.Time#parse
337
+ * @param {string|number|undefined} s The datetime string to parse
338
+ * @return {number|undefined} Parsed JavaScript timestamp
339
+ */
340
+ parse(s) {
341
+ if (!isString(s)) {
342
+ return s ?? void 0;
343
+ }
344
+ s = s
345
+ // Firefox fails on YYYY/MM/DD
346
+ .replace(/\//g, '-')
347
+ // Replace some non-standard notations
348
+ .replace(/(GMT|UTC)/, '');
349
+ // Extend shorthand hour timezone offset like +02
350
+ // .replace(/([+-][0-9]{2})$/, '$1:00');
351
+ // Check if the string has time zone information
352
+ const hasTimezone = s.indexOf('Z') > -1 ||
353
+ /([+-][0-9]{2}):?[0-9]{2}$/.test(s),
354
+ // YYYY-MM-DD and YYYY-MM are always UTC
355
+ isYYYYMMDD = /^[0-9]{4}-[0-9]{2}(-[0-9]{2}|)$/.test(s);
356
+ if (!hasTimezone && !isYYYYMMDD) {
357
+ s += 'Z';
358
+ }
359
+ const ts = Date.parse(s);
360
+ if (isNumber(ts)) {
361
+ // Unless the string contains time zone information, convert from
362
+ // the local time result of `Date.parse` via UTC into the current
363
+ // timezone of the time object.
364
+ return ts + ((!hasTimezone || isYYYYMMDD) ?
365
+ this.getTimezoneOffset(ts) :
366
+ 0);
367
+ }
368
+ }
369
+ /**
370
+ * Get the time zone offset based on the current timezone information as
371
+ * set in the global options.
372
+ *
373
+ * @function Highcharts.Time#getTimezoneOffset
374
+ *
375
+ * @param {number} timestamp
376
+ * The JavaScript timestamp to inspect.
377
+ *
378
+ * @return {number}
379
+ * The timezone offset in minutes compared to UTC.
380
+ */
381
+ getTimezoneOffset(timestamp) {
382
+ if (this.timezone !== 'UTC') {
383
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
384
+ const [date, gmt, hours, colon, minutes = 0] = this.dateTimeFormat({ timeZoneName: 'shortOffset' }, timestamp, 'en')
385
+ .split(/(GMT|:)/)
386
+ .map(Number), offset = -(hours + minutes / 60) * 60 * 60000;
387
+ // Possible future NaNs stop here
388
+ if (isNumber(offset)) {
389
+ return offset;
390
+ }
391
+ }
392
+ return 0;
393
+ }
394
+ /**
395
+ * Formats a JavaScript date timestamp (milliseconds since January 1 1970)
396
+ * into a human readable date string.
397
+ *
398
+ * The `format` parameter accepts two types of values:
399
+ * - An object containing settings that are passed directly on to
400
+ * [Intl.DateTimeFormat.prototype.format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format).
401
+ * - A format string containing either individual or locale-aware format
402
+ * keys. **Individual keys**, for example `%Y-%m-%d`, are listed below.
403
+ * **Locale-aware keys** are grouped by square brackets, for example
404
+ * `%[Ymd]`. The order of keys within the square bracket doesn't affect
405
+ * the output, which is determined by the locale. See example below.
406
+ * Internally, the locale-aware format keys are just a shorthand for the
407
+ * full object formats, but are particularly practical in
408
+ * [templating](https://www.highcharts.com/docs/chart-concepts/templating)
409
+ * where full object definitions are not an option.
410
+ *
411
+ * The available string format keys are listed below. Additional formats can
412
+ * be given in the {@link Highcharts.dateFormats} hook.
413
+ *
414
+ * Supported format keys:
415
+ * | Key | Description | Notes on locale-aware format |
416
+ * -------|----------------------------------------------|-------|
417
+ * | `%A` | Long weekday, like 'Monday' | |
418
+ * | `%a` | Short weekday, like 'Mon' | |
419
+ * | `%E` | Narrow weekday, single character | |
420
+ * | `%d` | Two digit day of the month, 01 to 31 | |
421
+ * | `%e` | Day of the month, 1 through 31 | |
422
+ * | `%w` | Day of the week, 0 through 6 | N/A |
423
+ * | `%v` | The prefix "week from", read from `lang.weekFrom` | N/A |
424
+ * | `%b` | Short month, like 'Jan' | |
425
+ * | `%B` | Long month, like 'January' | |
426
+ * | `%m` | Two digit month number, 01 through 12 | |
427
+ * | `%o` | Month number, 1 through 12 | |
428
+ * | `%y` | Two digits year, like 24 for 2024 | |
429
+ * | `%Y` | Four digits year, like 2024 | |
430
+ * | `%H` | Two digits hours in 24h format, 00 through 23 | Depending on the locale, 12h format may be instered. |
431
+ * | `%k` | Hours in 24h format, 0 through 23 | Depending on the locale, 12h format may be instered. |
432
+ * | `%I` | Two digits hours in 12h format, 00 through 11 | N/A. The locale determines the hour format. |
433
+ * | `%l` | Hours in 12h format, 1 through 12 | N/A. The locale determines the hour format. |
434
+ * | `%M` | Two digits minutes, 00 through 59 | |
435
+ * | `%p` | Upper case AM or PM | N/A. The locale determines whether to add AM and PM. |
436
+ * | `%P` | Lower case AM or PM | N/A. The locale determines whether to add AM and PM. |
437
+ * | `%S` | Two digits seconds, 00 through 59 | |
438
+ * | `%L` | Milliseconds (naming from Ruby) | |
439
+ *
440
+ * @example
441
+ * // Object format, US English
442
+ * const time1 = new Highcharts.Time({ locale: 'en-US' });
443
+ * console.log(
444
+ * time1.dateFormat({
445
+ * day: 'numeric',
446
+ * month: 'short',
447
+ * year: 'numeric',
448
+ * hour: 'numeric',
449
+ * minute: 'numeric'
450
+ * }, Date.UTC(2024, 11, 31))
451
+ * ); // => Dec 31, 2024, 12:00 AM
452
+ *
453
+ * // Object format, British English
454
+ * const time2 = new Highcharts.Time({ locale: 'en-GB' });
455
+ * console.log(
456
+ * time2.dateFormat({
457
+ * day: 'numeric',
458
+ * month: 'short',
459
+ * year: 'numeric',
460
+ * hour: 'numeric',
461
+ * minute: 'numeric'
462
+ * }, Date.UTC(2024, 11, 31))
463
+ * ); // => 31 Dec 2024, 00:00
464
+ *
465
+ * // Individual key string replacement
466
+ * const time3 = new Highcharts.Time();
467
+ * console.log(
468
+ * time3.dateFormat('%Y-%m-%d %H:%M:%S', Date.UTC(2024, 11, 31))
469
+ * ); // => 2024-12-31 00:00:00
470
+ *
471
+ * // Locale-aware keys, US English
472
+ * const time4 = new Highcharts.Time({ locale: 'en-US' });
473
+ * console.log(
474
+ * time4.dateFormat('%[YebHM]', Date.UTC(2024, 11, 31))
475
+ * ); // => Dec 31, 2024, 12:00 AM
476
+ *
477
+ * // Locale-aware keys, British English
478
+ * const time5 = new Highcharts.Time({ locale: 'en-GB' });
479
+ * console.log(
480
+ * time5.dateFormat('%[YebHM]', Date.UTC(2024, 11, 31))
481
+ * ); // => 31 Dec 2024, 00:00
482
+ *
483
+ * // Mixed locale-aware and individual keys
484
+ * console.log(
485
+ * time5.dateFormat('%[Yeb], %H:%M', Date.UTC(2024, 11, 31))
486
+ * ); // => 31 Dec 2024, 00:00
487
+ *
488
+ * @function Highcharts.Time#dateFormat
489
+ *
490
+ * @param {string|Highcharts.DateTimeFormatOptions} format
491
+ * The desired string format where various time representations are
492
+ * prefixed with %, or an object representing the locale-aware format
493
+ * options.
494
+ *
495
+ * @param {number} [timestamp]
496
+ * The JavaScript timestamp.
497
+ *
498
+ * @param {boolean} [upperCaseFirst=false]
499
+ * Upper case first letter in the return.
500
+ *
501
+ * @return {string}
502
+ * The formatted date.
503
+ */
504
+ dateFormat(format, timestamp, upperCaseFirst) {
505
+ const lang = this.lang;
506
+ if (!defined(timestamp) || isNaN(timestamp)) {
507
+ return lang?.invalidDate || '';
508
+ }
509
+ format = format ?? '%Y-%m-%d %H:%M:%S';
510
+ // First, identify and replace locale-aware formats like %[Ymd]
511
+ if (isString(format)) {
512
+ const localeAwareRegex = /%\[([a-zA-Z]+)\]/g;
513
+ let match;
514
+ while ((match = localeAwareRegex.exec(format))) {
515
+ format = format.replace(match[0], this.dateTimeFormat(match[1], timestamp, lang?.locale));
516
+ }
517
+ }
518
+ // Then, replace static formats like %Y, %m, %d etc.
519
+ if (isString(format) && format.indexOf('%') !== -1) {
520
+ const time = this, [fullYear, month, dayOfMonth, hours, minutes, seconds, milliseconds, weekday] = this.toParts(timestamp), langWeekdays = lang?.weekdays || this.weekdays, shortWeekdays = lang?.shortWeekdays || this.shortWeekdays, months = lang?.months || this.months, shortMonths = lang?.shortMonths || this.shortMonths,
521
+ // List all format keys. Custom formats can be added from the
522
+ // outside.
523
+ replacements = extend({
524
+ // Day
525
+ // Short weekday, like 'Mon'
526
+ a: shortWeekdays ?
527
+ shortWeekdays[weekday] :
528
+ langWeekdays[weekday].substr(0, 3),
529
+ // Long weekday, like 'Monday'
530
+ A: langWeekdays[weekday],
531
+ // Two digit day of the month, 01 to 31
532
+ d: pad(dayOfMonth),
533
+ // Day of the month, 1 through 31
534
+ e: pad(dayOfMonth, 2, ' '),
535
+ // Day of the week, 0 through 6
536
+ w: weekday,
537
+ // Week (none implemented)
538
+ // 'W': weekNumber(),
539
+ v: lang?.weekFrom ?? '',
540
+ // Month
541
+ // Short month, like 'Jan'
542
+ b: shortMonths[month],
543
+ // Long month, like 'January'
544
+ B: months[month],
545
+ // Two digit month number, 01 through 12
546
+ m: pad(month + 1),
547
+ // Month number, 1 through 12 (#8150)
548
+ o: month + 1,
549
+ // Year
550
+ // Two digits year, like 09 for 2009
551
+ y: fullYear.toString().substr(2, 2),
552
+ // Four digits year, like 2009
553
+ Y: fullYear,
554
+ // Time
555
+ // Two digits hours in 24h format, 00 through 23
556
+ H: pad(hours),
557
+ // Hours in 24h format, 0 through 23
558
+ k: hours,
559
+ // Two digits hours in 12h format, 00 through 11
560
+ I: pad((hours % 12) || 12),
561
+ // Hours in 12h format, 1 through 12
562
+ l: (hours % 12) || 12,
563
+ // Two digits minutes, 00 through 59
564
+ M: pad(minutes),
565
+ // Upper case AM or PM
566
+ p: hours < 12 ? 'AM' : 'PM',
567
+ // Lower case AM or PM
568
+ P: hours < 12 ? 'am' : 'pm',
569
+ // Two digits seconds, 00 through 59
570
+ S: pad(seconds),
571
+ // Milliseconds (naming from Ruby)
572
+ L: pad(milliseconds, 3)
573
+ }, H.dateFormats);
574
+ // Do the replaces
575
+ objectEach(replacements, function (val, key) {
576
+ if (isString(format)) {
577
+ // Regex would do it in one line, but this is faster
578
+ while (format.indexOf('%' + key) !== -1) {
579
+ format = format.replace('%' + key, typeof val === 'function' ?
580
+ val.call(time, timestamp) :
581
+ val);
582
+ }
583
+ }
584
+ });
585
+ }
586
+ else if (isObject(format)) {
587
+ const tzHours = (this.getTimezoneOffset(timestamp) || 0) /
588
+ (60000 * 60), timeZone = this.timezone || ('Etc/GMT' + (tzHours >= 0 ? '+' : '') + tzHours), { prefix = '', suffix = '' } = format;
589
+ format = prefix + this.dateTimeFormat(extend({ timeZone }, format), timestamp) + suffix;
590
+ }
591
+ // Optionally sentence-case the string and return
592
+ return upperCaseFirst ? ucfirst(format) : format;
593
+ }
594
+ /**
595
+ * Resolve legacy formats of dateTimeLabelFormats (strings and arrays) into
596
+ * an object.
597
+ * @private
598
+ * @param {string|Array<T>|Highcharts.Dictionary<T>} f
599
+ * General format description
600
+ * @return {Highcharts.Dictionary<T>}
601
+ * The object definition
602
+ */
603
+ resolveDTLFormat(f) {
604
+ if (!isObject(f, true)) { // Check for string or array
605
+ f = splat(f);
606
+ return {
607
+ main: f[0],
608
+ from: f[1],
609
+ to: f[2]
610
+ };
611
+ }
612
+ // Type-check DateTimeFormatOptions against DateTimeLabelFormatObject
613
+ if (isObject(f, true) && isDateTimeFormatOptions(f)) {
614
+ return { main: f };
615
+ }
616
+ return f;
617
+ }
618
+ /**
619
+ * Get the optimal date format for a point, based on a range.
620
+ *
621
+ * @private
622
+ * @function Highcharts.Time#getDateFormat
623
+ *
624
+ * @param {number} range
625
+ * The time range
626
+ *
627
+ * @param {number} timestamp
628
+ * The timestamp of the date
629
+ *
630
+ * @param {number} startOfWeek
631
+ * An integer representing the first day of the week, where 0 is
632
+ * Sunday.
633
+ *
634
+ * @param {Highcharts.Dictionary<string>} dateTimeLabelFormats
635
+ * A map of time units to formats.
636
+ *
637
+ * @return {string}
638
+ * The optimal date format for a point.
639
+ */
640
+ getDateFormat(range, timestamp, startOfWeek, dateTimeLabelFormats) {
641
+ const dateStr = this.dateFormat('%m-%d %H:%M:%S.%L', timestamp), blank = '01-01 00:00:00.000', strpos = {
642
+ millisecond: 15,
643
+ second: 12,
644
+ minute: 9,
645
+ hour: 6,
646
+ day: 3
647
+ };
648
+ let n = 'millisecond',
649
+ // For sub-millisecond data, #4223
650
+ lastN = n;
651
+ for (n in timeUnits) { // eslint-disable-line guard-for-in
652
+ // If the range is exactly one week and we're looking at a
653
+ // Sunday/Monday, go for the week format
654
+ if (range &&
655
+ range === timeUnits.week &&
656
+ +this.dateFormat('%w', timestamp) === startOfWeek &&
657
+ dateStr.substr(6) === blank.substr(6)) {
658
+ n = 'week';
659
+ break;
660
+ }
661
+ // The first format that is too great for the range
662
+ if (range && timeUnits[n] > range) {
663
+ n = lastN;
664
+ break;
665
+ }
666
+ // If the point is placed every day at 23:59, we need to show
667
+ // the minutes as well. #2637.
668
+ if (strpos[n] &&
669
+ dateStr.substr(strpos[n]) !== blank.substr(strpos[n])) {
670
+ break;
671
+ }
672
+ // Weeks are outside the hierarchy, only apply them on
673
+ // Mondays/Sundays like in the first condition
674
+ if (n !== 'week') {
675
+ lastN = n;
676
+ }
677
+ }
678
+ return this.resolveDTLFormat(dateTimeLabelFormats[n]).main;
679
+ }
680
+ }
681
+ /* *
682
+ *
683
+ * Default export
684
+ *
685
+ * */
686
+ export default TimeBase;
687
+ /* *
688
+ *
689
+ * API Declarations
690
+ *
691
+ * */
692
+ /**
693
+ * Normalized interval.
694
+ *
695
+ * @interface Highcharts.TimeNormalizedObject
696
+ */ /**
697
+ * The count.
698
+ *
699
+ * @name Highcharts.TimeNormalizedObject#count
700
+ * @type {number|undefined}
701
+ */ /**
702
+ * The interval in axis values (ms).
703
+ *
704
+ * @name Highcharts.TimeNormalizedObject#unitRange
705
+ * @type {number}
706
+ */
707
+ /**
708
+ * Function of an additional date format specifier.
709
+ *
710
+ * @callback Highcharts.TimeFormatCallbackFunction
711
+ *
712
+ * @param {number} timestamp
713
+ * The time to format.
714
+ *
715
+ * @return {string}
716
+ * The formatted portion of the date.
717
+ */
718
+ /**
719
+ * Time ticks.
720
+ *
721
+ * @interface Highcharts.AxisTickPositionsArray
722
+ * @extends global.Array<number>
723
+ */ /**
724
+ * @name Highcharts.AxisTickPositionsArray#info
725
+ * @type {Highcharts.TimeTicksInfoObject|undefined}
726
+ */
727
+ /**
728
+ * A callback to return the time zone offset for a given datetime. It
729
+ * takes the timestamp in terms of milliseconds since January 1 1970,
730
+ * and returns the timezone offset in minutes. This provides a hook
731
+ * for drawing time based charts in specific time zones using their
732
+ * local DST crossover dates, with the help of external libraries.
733
+ *
734
+ * @callback Highcharts.TimezoneOffsetCallbackFunction
735
+ *
736
+ * @param {number} timestamp
737
+ * Timestamp in terms of milliseconds since January 1 1970.
738
+ *
739
+ * @return {number}
740
+ * Timezone offset in minutes.
741
+ */
742
+ /**
743
+ * Options for formatting dates and times using the [Intl.DateTimeFormat](
744
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
745
+ * ) API, and extended with some custom options for Highcharts.
746
+ *
747
+ * @interface Highcharts.DateTimeFormatOptions
748
+ */ /**
749
+ * The locale matching algorithm to use.
750
+ *
751
+ * @name Highcharts.DateTimeFormatOptions#localeMatcher
752
+ * @type {string|undefined}
753
+ */ /**
754
+ * The time zone to use. The default is the browser's default time zone.
755
+ *
756
+ * @name Highcharts.DateTimeFormatOptions#timeZone
757
+ * @type {string|undefined}
758
+ */ /**
759
+ * Whether to use 12-hour time (as opposed to 24-hour time).
760
+ *
761
+ * @name Highcharts.DateTimeFormatOptions#hour12
762
+ * @type {'auto'|'always'|'never'|undefined}
763
+ */ /**
764
+ * The format matching algorithm to use.
765
+ *
766
+ * @name Highcharts.DateTimeFormatOptions#formatMatcher
767
+ * @type {string|undefined}
768
+ */ /**
769
+ * The representation of the weekday.
770
+ *
771
+ * @name Highcharts.DateTimeFormatOptions#weekday
772
+ * @type {'narrow'|'short'|'long'|undefined}
773
+ */ /**
774
+ * The representation of the era.
775
+ *
776
+ * @name Highcharts.DateTimeFormatOptions#era
777
+ * @type {'narrow'|'short'|'long'|undefined}
778
+ */ /**
779
+ * The representation of the year.
780
+ *
781
+ * @name Highcharts.DateTimeFormatOptions#year
782
+ * @type {'numeric'|'2-digit'|undefined}
783
+ */ /**
784
+ * The representation of the month.
785
+ * "narrow", "short", "long".
786
+ *
787
+ * @name Highcharts.DateTimeFormatOptions#month
788
+ * @type {'numeric'|'2-digit'|'narrow'|'short'|'long'|undefined}
789
+ */ /**
790
+ * The representation of the day.
791
+ *
792
+ * @name Highcharts.DateTimeFormatOptions#day
793
+ * @type {'numeric'|'2-digit'|undefined}
794
+ */ /**
795
+ * The representation of the hour.
796
+ *
797
+ * @name Highcharts.DateTimeFormatOptions#hour
798
+ * @type {'numeric'|'2-digit'|undefined}
799
+ */ /**
800
+ * The representation of the minute.
801
+ *
802
+ * @name Highcharts.DateTimeFormatOptions#minute
803
+ * @type {'numeric'|'2-digit'|undefined}
804
+ */ /**
805
+ * The representation of the second.
806
+ *
807
+ * @name Highcharts.DateTimeFormatOptions#second
808
+ * @type {'numeric'|'2-digit'|undefined}
809
+ */ /**
810
+ * The number of fractional digits to use. 3 means milliseconds.
811
+ *
812
+ * @name Highcharts.DateTimeFormatOptions#fractionalSecondDigits
813
+ * @type {number|undefined}
814
+ */ /**
815
+ * The representation of the time zone name.
816
+ *
817
+ * @name Highcharts.DateTimeFormatOptions#timeZoneName
818
+ * @type {'short'|'long'|undefined}
819
+ */ /**
820
+ * A prefix for the time string. Custom Highcharts option.
821
+ *
822
+ * @name Highcharts.DateTimeFormatOptions#prefix
823
+ * @type {'string'|undefined}
824
+ */ /**
825
+ * A suffix for the time string. Custom Highcharts option.
826
+ *
827
+ * @name Highcharts.DateTimeFormatOptions#suffix
828
+ * @type {'string'|undefined}
829
+ */
830
+ ''; // Keeps doclets above in JS file