@highcharts/grid-pro 2.0.0 → 2.1.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 (166) hide show
  1. package/css/grid-pro.css +93 -90
  2. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +2 -0
  3. package/es-modules/Accessibility/Options/LangDefaults.js +6 -1
  4. package/es-modules/Accessibility/Utils/ChartUtilities.js +3 -3
  5. package/es-modules/Core/Chart/Chart.js +1 -1
  6. package/es-modules/Core/Color/ColorString.d.ts +25 -0
  7. package/es-modules/Core/Color/ColorType.d.ts +43 -0
  8. package/es-modules/Core/Color/GradientColor.d.ts +57 -0
  9. package/es-modules/Core/Globals.js +1 -1
  10. package/es-modules/Core/Renderer/AlignObject.d.ts +37 -0
  11. package/es-modules/Core/Renderer/BBoxObject.d.ts +40 -0
  12. package/es-modules/Core/Renderer/CSSObject.d.ts +130 -0
  13. package/es-modules/Core/Renderer/DOMElementType.d.ts +36 -0
  14. package/es-modules/Core/Renderer/DashStyleValue.d.ts +28 -0
  15. package/es-modules/Core/Renderer/FontMetricsObject.d.ts +38 -0
  16. package/es-modules/Core/Renderer/HTML/HTMLAttributes.d.ts +57 -0
  17. package/es-modules/Core/Renderer/PolygonBoxObject.d.ts +19 -0
  18. package/es-modules/Core/Renderer/Position3DObject.d.ts +35 -0
  19. package/es-modules/Core/Renderer/PositionObject.d.ts +28 -0
  20. package/es-modules/Core/Renderer/RectangleObject.d.ts +35 -0
  21. package/es-modules/Core/Renderer/RendererType.d.ts +53 -0
  22. package/es-modules/Core/Renderer/SVG/ButtonThemeObject.d.ts +43 -0
  23. package/es-modules/Core/Renderer/SVG/SVGArc3D.d.ts +44 -0
  24. package/es-modules/Core/Renderer/SVG/SVGAttributes.d.ts +147 -0
  25. package/es-modules/Core/Renderer/SVG/SVGAttributes3D.d.ts +42 -0
  26. package/es-modules/Core/Renderer/SVG/SVGCuboid.d.ts +42 -0
  27. package/es-modules/Core/Renderer/SVG/SVGElementBase.d.ts +31 -0
  28. package/es-modules/Core/Renderer/SVG/SVGPath.d.ts +97 -0
  29. package/es-modules/Core/Renderer/SVG/SVGPath3D.d.ts +40 -0
  30. package/es-modules/Core/Renderer/SVG/SVGRendererBase.d.ts +31 -0
  31. package/es-modules/Core/Renderer/SVG/SymbolOptions.d.ts +41 -0
  32. package/es-modules/Core/Renderer/SVG/SymbolType.d.ts +50 -0
  33. package/es-modules/Core/Renderer/ShadowOptionsObject.d.ts +40 -0
  34. package/es-modules/Core/Renderer/SizeObject.d.ts +28 -0
  35. package/es-modules/Core/Templating.js +6 -7
  36. package/es-modules/Data/Connectors/DataConnector.js +3 -2
  37. package/es-modules/Data/Connectors/DataConnectorOptions.d.ts +1 -1
  38. package/es-modules/Data/DataTable.d.ts +1 -1
  39. package/es-modules/Data/DataTable.js +3 -2
  40. package/es-modules/Data/DataTableCore.js +15 -6
  41. package/es-modules/Grid/Core/Accessibility/Accessibility.d.ts +13 -15
  42. package/es-modules/Grid/Core/Credits.d.ts +0 -2
  43. package/es-modules/Grid/Core/Defaults.d.ts +20 -17
  44. package/es-modules/Grid/Core/Defaults.js +116 -114
  45. package/es-modules/Grid/Core/Globals.d.ts +108 -32
  46. package/es-modules/Grid/Core/Globals.js +98 -111
  47. package/es-modules/Grid/Core/Grid.d.ts +51 -17
  48. package/es-modules/Grid/Core/Grid.js +369 -79
  49. package/es-modules/Grid/Core/GridUtils.d.ts +96 -89
  50. package/es-modules/Grid/Core/GridUtils.js +143 -155
  51. package/es-modules/Grid/Core/Options.d.ts +3 -7
  52. package/es-modules/Grid/Core/Pagination/Icons.d.ts +4 -4
  53. package/es-modules/Grid/Core/Pagination/Pagination.d.ts +32 -57
  54. package/es-modules/Grid/Core/Pagination/Pagination.js +206 -214
  55. package/es-modules/Grid/Core/Pagination/PaginationOptions.d.ts +22 -15
  56. package/es-modules/Grid/Core/Querying/PaginationController.d.ts +32 -9
  57. package/es-modules/Grid/Core/Querying/PaginationController.js +58 -18
  58. package/es-modules/Grid/Core/Querying/SortingController.d.ts +7 -15
  59. package/es-modules/Grid/Core/Querying/SortingController.js +2 -3
  60. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.d.ts +1 -1
  61. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js +32 -4
  62. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.d.ts +3 -3
  63. package/es-modules/Grid/Core/Table/Actions/ColumnSorting.d.ts +3 -5
  64. package/es-modules/Grid/Core/Table/Actions/ColumnSorting.js +1 -5
  65. package/es-modules/Grid/Core/Table/Body/TableCell.d.ts +14 -10
  66. package/es-modules/Grid/Core/Table/Body/TableCell.js +22 -25
  67. package/es-modules/Grid/Core/Table/Body/TableRow.d.ts +0 -2
  68. package/es-modules/Grid/Core/Table/Cell.js +30 -0
  69. package/es-modules/Grid/Core/Table/CellContent/TextContent.d.ts +2 -7
  70. package/es-modules/Grid/Core/Table/CellContent/TextContent.js +25 -14
  71. package/es-modules/Grid/Core/Table/Column.d.ts +7 -9
  72. package/es-modules/Grid/Core/Table/Column.js +23 -1
  73. package/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.js +2 -2
  74. package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.d.ts +30 -23
  75. package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.js +39 -39
  76. package/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.js +1 -1
  77. package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js +2 -2
  78. package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.d.ts +6 -1
  79. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js +10 -0
  80. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.d.ts +2 -2
  81. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.d.ts +26 -24
  82. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.js +37 -39
  83. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.d.ts +1 -1
  84. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.d.ts +1 -1
  85. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.d.ts +1 -1
  86. package/es-modules/Grid/Core/Table/Header/HeaderCell.js +3 -4
  87. package/es-modules/Grid/Core/Table/Header/HeaderRow.d.ts +0 -2
  88. package/es-modules/Grid/Core/Table/Header/TableHeader.d.ts +0 -2
  89. package/es-modules/Grid/Core/Table/Table.d.ts +11 -13
  90. package/es-modules/Grid/Core/Table/Table.js +9 -5
  91. package/es-modules/Grid/Core/UI/Button.d.ts +1 -1
  92. package/es-modules/Grid/Core/UI/ContextMenu.d.ts +1 -1
  93. package/es-modules/Grid/Core/UI/ContextMenu.js +1 -1
  94. package/es-modules/Grid/Core/UI/ContextMenuButton.d.ts +39 -44
  95. package/es-modules/Grid/Core/UI/ContextMenuButton.js +4 -4
  96. package/es-modules/Grid/Core/UI/Popup.d.ts +17 -19
  97. package/es-modules/Grid/Core/UI/Popup.js +2 -1
  98. package/es-modules/Grid/Core/UI/SvgIcons.d.ts +49 -50
  99. package/es-modules/Grid/Core/UI/SvgIcons.js +114 -123
  100. package/es-modules/Grid/Core/UI/ToolbarButton.d.ts +46 -52
  101. package/es-modules/Grid/Core/UI/ToolbarButton.js +4 -3
  102. package/es-modules/Grid/Pro/CellEditing/CellEditing.d.ts +6 -8
  103. package/es-modules/Grid/Pro/CellEditing/CellEditing.js +8 -11
  104. package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.d.ts +27 -1
  105. package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js +149 -149
  106. package/es-modules/Grid/Pro/CellRendering/CellRenderer.d.ts +18 -20
  107. package/es-modules/Grid/Pro/CellRendering/CellRenderer.js +1 -1
  108. package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.d.ts +19 -17
  109. package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.js +28 -34
  110. package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.d.ts +12 -1
  111. package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js +41 -46
  112. package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.js +2 -2
  113. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.d.ts +2 -2
  114. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.d.ts +2 -2
  115. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.js +4 -2
  116. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.d.ts +2 -2
  117. package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js +3 -1
  118. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.js +3 -1
  119. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.d.ts +19 -8
  120. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js +17 -13
  121. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js +3 -1
  122. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.d.ts +2 -2
  123. package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.d.ts +18 -20
  124. package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js +3 -3
  125. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.d.ts +10 -12
  126. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js +3 -3
  127. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRendererBase.d.ts +17 -20
  128. package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.d.ts +10 -12
  129. package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js +3 -3
  130. package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.d.ts +20 -22
  131. package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js +3 -3
  132. package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.d.ts +40 -42
  133. package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js +3 -3
  134. package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.d.ts +16 -18
  135. package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js +14 -22
  136. package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.d.ts +22 -24
  137. package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js +3 -3
  138. package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.d.ts +10 -12
  139. package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js +3 -3
  140. package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.d.ts +10 -12
  141. package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js +3 -3
  142. package/es-modules/Grid/Pro/ColumnTypes/Validator.d.ts +46 -51
  143. package/es-modules/Grid/Pro/ColumnTypes/Validator.js +62 -77
  144. package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.d.ts +16 -3
  145. package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js +26 -31
  146. package/es-modules/Grid/Pro/Credits/CreditsPro.d.ts +0 -2
  147. package/es-modules/Grid/Pro/Credits/CreditsProComposition.d.ts +12 -11
  148. package/es-modules/Grid/Pro/Credits/CreditsProComposition.js +29 -31
  149. package/es-modules/Grid/Pro/Export/Exporting.d.ts +3 -3
  150. package/es-modules/Grid/Pro/Export/Exporting.js +35 -29
  151. package/es-modules/Grid/Pro/Export/ExportingComposition.d.ts +12 -11
  152. package/es-modules/Grid/Pro/Export/ExportingComposition.js +24 -26
  153. package/es-modules/Grid/Pro/GridEvents.d.ts +19 -1
  154. package/es-modules/Grid/Pro/GridEvents.js +6 -2
  155. package/es-modules/Grid/Pro/Pagination/PaginationComposition.d.ts +4 -11
  156. package/es-modules/Grid/Pro/Pagination/PaginationComposition.js +44 -45
  157. package/es-modules/Grid/index.d.ts +1 -0
  158. package/es-modules/masters/grid-pro.src.d.ts +62 -37
  159. package/es-modules/masters/grid-pro.src.js +37 -39
  160. package/grid-pro.d.ts +122 -48
  161. package/grid-pro.js +3 -6
  162. package/grid-pro.js.map +1 -1
  163. package/grid-pro.src.d.ts +122 -48
  164. package/grid-pro.src.js +6650 -6277
  165. package/package.json +13 -4
  166. package/es-modules/Grid/Pro/ColumnTypes/ColumnDataType.d.ts +0 -29
@@ -21,138 +21,129 @@
21
21
  *
22
22
  * */
23
23
  import Globals from '../Globals.js';
24
+ /**
25
+ * The registry of all Grid Svg icons with their SVG path data.
26
+ */
27
+ export const icons = {
28
+ filter: {
29
+ width: 16,
30
+ height: 14,
31
+ children: [{
32
+ d: 'M2.2571 2.77791C1.75287 2.21437 1.50076 1.93259 1.49125 1.69312C1.48299 1.48509 1.57238 1.28515 1.73292 1.15259C1.91773 1 2.29583 1 3.05202 1H12.9473C13.7035 1 14.0816 1 14.2664 1.15259C14.427 1.28515 14.5163 1.48509 14.5081 1.69312C14.4986 1.93259 14.2465 2.21437 13.7422 2.77791L9.93808 7.02962C9.83756 7.14196 9.78731 7.19813 9.75147 7.26205C9.71969 7.31875 9.69637 7.37978 9.68225 7.44323C9.66633 7.51476 9.66633 7.59013 9.66633 7.74087V11.3056C9.66633 11.436 9.66633 11.5011 9.64531 11.5575C9.62673 11.6073 9.59651 11.6519 9.55717 11.6877C9.51265 11.7281 9.45213 11.7524 9.33108 11.8008L7.06441 12.7074C6.81938 12.8054 6.69687 12.8545 6.59852 12.834C6.51251 12.8161 6.43704 12.765 6.3885 12.6918C6.333 12.6081 6.333 12.4762 6.333 12.2122V7.74087C6.333 7.59013 6.333 7.51476 6.31708 7.44323C6.30296 7.37978 6.27964 7.31875 6.24786 7.26205C6.21203 7.19813 6.16177 7.14196 6.06126 7.02962L2.2571 2.77791Z'
33
+ }]
34
+ },
35
+ menu: {
36
+ width: 4,
37
+ height: 12,
38
+ children: [{
39
+ d: 'M2.00016 6.66675C2.36835 6.66675 2.66683 6.36827 2.66683 6.00008C2.66683 5.63189 2.36835 5.33341 2.00016 5.33341C1.63197 5.33341 1.3335 5.63189 1.3335 6.00008C1.3335 6.36827 1.63197 6.66675 2.00016 6.66675Z'
40
+ }, {
41
+ d: 'M2.00016 2.00008C2.36835 2.00008 2.66683 1.7016 2.66683 1.33341C2.66683 0.965225 2.36835 0.666748 2.00016 0.666748C1.63197 0.666748 1.3335 0.965225 1.3335 1.33341C1.3335 1.7016 1.63197 2.00008 2.00016 2.00008Z'
42
+ }, {
43
+ d: 'M2.00016 11.3334C2.36835 11.3334 2.66683 11.0349 2.66683 10.6667C2.66683 10.2986 2.36835 10.0001 2.00016 10.0001C1.63197 10.0001 1.3335 10.2986 1.3335 10.6667C1.3335 11.0349 1.63197 11.3334 2.00016 11.3334Z'
44
+ }]
45
+ },
46
+ chevronRight: {
47
+ width: 6,
48
+ height: 10,
49
+ children: [{
50
+ d: 'M1 9L5 5L1 1',
51
+ 'stroke-width': 1.34
52
+ }]
53
+ },
54
+ checkmark: {
55
+ width: 12,
56
+ height: 9,
57
+ children: [{
58
+ d: 'M11.3332 1L3.99984 8.33333L0.666504 5'
59
+ }]
60
+ },
61
+ upDownArrows: {
62
+ width: 14,
63
+ height: 12,
64
+ children: [{
65
+ d: 'M3.66667 0.666748V11.3334M3.66667 11.3334L1 8.66675M3.66667 11.3334L6.33333 8.66675M10.3333 11.3334V0.666748M10.3333 0.666748L7.66667 3.33341M10.3333 0.666748L13 3.33341'
66
+ }]
67
+ },
68
+ sortAsc: {
69
+ width: 14,
70
+ height: 12,
71
+ children: [{
72
+ d: 'M3.66667 0.666748V11.3334M3.66667 11.3334L1 8.66675M3.66667 11.3334L6.33333 8.66675',
73
+ opacity: 0.2
74
+ }, {
75
+ d: 'M 10.3333 11.3334 V 0.6667 M 10.3333 0.6667 L 7.6667 3.3334 M 10.3333 0.6667 L 13 3.3334'
76
+ }]
77
+ },
78
+ sortDesc: {
79
+ width: 14,
80
+ height: 12,
81
+ children: [{
82
+ d: 'M3.66667 0.666748V11.3334M3.66667 11.3334L1 8.66675M3.66667 11.3334L6.33333 8.66675'
83
+ }, {
84
+ d: 'M 10.3333 11.3334 V 0.6667 M 10.3333 0.6667 L 7.6667 3.3334 M 10.3333 0.6667 L 13 3.3334',
85
+ opacity: 0.2
86
+ }]
87
+ }
88
+ };
89
+ /**
90
+ * The default path definitions for the Grid Svg icons.
91
+ */
92
+ export const pathDefaults = {
93
+ stroke: 'currentColor',
94
+ 'stroke-width': 1.33,
95
+ 'stroke-linecap': 'round',
96
+ 'stroke-linejoin': 'round'
97
+ };
24
98
  /* *
99
+ *
100
+ * Functions
101
+ *
102
+ * */
103
+ /**
104
+ * Creates an SVG icon element from the SvgIcons registry.
25
105
  *
26
- * Constants
106
+ * @param name
107
+ * The name of the icon from SvgIcons registry
27
108
  *
28
- * */
29
- /**
30
- * Registry of all Grid Svg icons with their SVG path data.
31
- * Icons are designed for a 24x24 viewBox and use stroke-based rendering.
109
+ * @param className
110
+ * CSS class name for the SVG element (default: 'hcg-icon')
111
+ *
112
+ * @returns
113
+ * SVG element with the specified icon
32
114
  */
33
- var SvgIcons;
34
- (function (SvgIcons) {
35
- /**
36
- * The registry of all Grid Svg icons with their SVG path data.
37
- */
38
- SvgIcons.icons = {
39
- filter: {
40
- width: 16,
41
- height: 14,
42
- children: [{
43
- d: 'M2.2571 2.77791C1.75287 2.21437 1.50076 1.93259 1.49125 1.69312C1.48299 1.48509 1.57238 1.28515 1.73292 1.15259C1.91773 1 2.29583 1 3.05202 1H12.9473C13.7035 1 14.0816 1 14.2664 1.15259C14.427 1.28515 14.5163 1.48509 14.5081 1.69312C14.4986 1.93259 14.2465 2.21437 13.7422 2.77791L9.93808 7.02962C9.83756 7.14196 9.78731 7.19813 9.75147 7.26205C9.71969 7.31875 9.69637 7.37978 9.68225 7.44323C9.66633 7.51476 9.66633 7.59013 9.66633 7.74087V11.3056C9.66633 11.436 9.66633 11.5011 9.64531 11.5575C9.62673 11.6073 9.59651 11.6519 9.55717 11.6877C9.51265 11.7281 9.45213 11.7524 9.33108 11.8008L7.06441 12.7074C6.81938 12.8054 6.69687 12.8545 6.59852 12.834C6.51251 12.8161 6.43704 12.765 6.3885 12.6918C6.333 12.6081 6.333 12.4762 6.333 12.2122V7.74087C6.333 7.59013 6.333 7.51476 6.31708 7.44323C6.30296 7.37978 6.27964 7.31875 6.24786 7.26205C6.21203 7.19813 6.16177 7.14196 6.06126 7.02962L2.2571 2.77791Z'
44
- }]
45
- },
46
- menu: {
47
- width: 4,
48
- height: 12,
49
- children: [{
50
- d: 'M2.00016 6.66675C2.36835 6.66675 2.66683 6.36827 2.66683 6.00008C2.66683 5.63189 2.36835 5.33341 2.00016 5.33341C1.63197 5.33341 1.3335 5.63189 1.3335 6.00008C1.3335 6.36827 1.63197 6.66675 2.00016 6.66675Z'
51
- }, {
52
- d: 'M2.00016 2.00008C2.36835 2.00008 2.66683 1.7016 2.66683 1.33341C2.66683 0.965225 2.36835 0.666748 2.00016 0.666748C1.63197 0.666748 1.3335 0.965225 1.3335 1.33341C1.3335 1.7016 1.63197 2.00008 2.00016 2.00008Z'
53
- }, {
54
- d: 'M2.00016 11.3334C2.36835 11.3334 2.66683 11.0349 2.66683 10.6667C2.66683 10.2986 2.36835 10.0001 2.00016 10.0001C1.63197 10.0001 1.3335 10.2986 1.3335 10.6667C1.3335 11.0349 1.63197 11.3334 2.00016 11.3334Z'
55
- }]
56
- },
57
- chevronRight: {
58
- width: 6,
59
- height: 10,
60
- children: [{
61
- d: 'M1 9L5 5L1 1',
62
- 'stroke-width': 1.34
63
- }]
64
- },
65
- checkmark: {
66
- width: 12,
67
- height: 9,
68
- children: [{
69
- d: 'M11.3332 1L3.99984 8.33333L0.666504 5'
70
- }]
71
- },
72
- upDownArrows: {
73
- width: 14,
74
- height: 12,
75
- children: [{
76
- d: 'M3.66667 0.666748V11.3334M3.66667 11.3334L1 8.66675M3.66667 11.3334L6.33333 8.66675M10.3333 11.3334V0.666748M10.3333 0.666748L7.66667 3.33341M10.3333 0.666748L13 3.33341'
77
- }]
78
- },
79
- sortAsc: {
80
- width: 14,
81
- height: 12,
82
- children: [{
83
- d: 'M3.66667 0.666748V11.3334M3.66667 11.3334L1 8.66675M3.66667 11.3334L6.33333 8.66675',
84
- opacity: 0.2
85
- }, {
86
- d: 'M 10.3333 11.3334 V 0.6667 M 10.3333 0.6667 L 7.6667 3.3334 M 10.3333 0.6667 L 13 3.3334'
87
- }]
88
- },
89
- sortDesc: {
90
- width: 14,
91
- height: 12,
92
- children: [{
93
- d: 'M3.66667 0.666748V11.3334M3.66667 11.3334L1 8.66675M3.66667 11.3334L6.33333 8.66675'
94
- }, {
95
- d: 'M 10.3333 11.3334 V 0.6667 M 10.3333 0.6667 L 7.6667 3.3334 M 10.3333 0.6667 L 13 3.3334',
96
- opacity: 0.2
97
- }]
98
- }
99
- };
100
- /**
101
- * The default path definitions for the Grid Svg icons.
102
- */
103
- SvgIcons.pathDefaults = {
104
- stroke: 'currentColor',
105
- 'stroke-width': 1.33,
106
- 'stroke-linecap': 'round',
107
- 'stroke-linejoin': 'round'
108
- };
109
- /* *
110
- *
111
- * Functions
112
- *
113
- * */
114
- /**
115
- * Creates an SVG icon element from the SvgIcons registry.
116
- *
117
- * @param name
118
- * The name of the icon from SvgIcons registry
119
- *
120
- * @param className
121
- * CSS class name for the SVG element (default: 'hcg-icon')
122
- *
123
- * @returns
124
- * SVG element with the specified icon
125
- */
126
- function createGridIcon(name, className = Globals.getClassName('icon')) {
127
- const createElement = (type) => document.createElementNS('http://www.w3.org/2000/svg', type);
128
- const { width = 16, height = 16, viewBox, fill, children } = SvgIcons.icons[name];
129
- const svg = createElement('svg');
130
- svg.setAttribute('width', width.toString());
131
- svg.setAttribute('height', height.toString());
132
- svg.setAttribute('viewBox', viewBox ?? `0 0 ${width} ${height}`);
133
- svg.setAttribute('fill', fill ?? 'none');
134
- for (const childDefinition of children ?? []) {
135
- const path = createElement('path');
136
- const attrKeys = new Set([
137
- ...Object.keys(childDefinition),
138
- ...Object.keys(SvgIcons.pathDefaults)
139
- ]);
140
- for (const attr of attrKeys) {
141
- const value = childDefinition[attr] ?? SvgIcons.pathDefaults[attr];
142
- if (value !== void 0) {
143
- path.setAttribute(attr, value.toString());
144
- }
115
+ export function createGridIcon(name, className = Globals.getClassName('icon')) {
116
+ const createElement = (type) => document.createElementNS('http://www.w3.org/2000/svg', type);
117
+ const { width = 16, height = 16, viewBox, fill, children } = icons[name];
118
+ const svg = createElement('svg');
119
+ svg.setAttribute('width', width.toString());
120
+ svg.setAttribute('height', height.toString());
121
+ svg.setAttribute('viewBox', viewBox ?? `0 0 ${width} ${height}`);
122
+ svg.setAttribute('fill', fill ?? 'none');
123
+ for (const childDefinition of children ?? []) {
124
+ const path = createElement('path');
125
+ const attrKeys = new Set([
126
+ ...Object.keys(childDefinition),
127
+ ...Object.keys(pathDefaults)
128
+ ]);
129
+ for (const attr of attrKeys) {
130
+ const value = childDefinition[attr] ?? pathDefaults[attr];
131
+ if (value !== void 0) {
132
+ path.setAttribute(attr, value.toString());
145
133
  }
146
- svg.appendChild(path);
147
134
  }
148
- svg.classList.add(className);
149
- return svg;
135
+ svg.appendChild(path);
150
136
  }
151
- SvgIcons.createGridIcon = createGridIcon;
152
- })(SvgIcons || (SvgIcons = {}));
137
+ svg.classList.add(className);
138
+ return svg;
139
+ }
153
140
  /* *
154
141
  *
155
142
  * Default Export
156
143
  *
157
144
  * */
158
- export default SvgIcons;
145
+ export default {
146
+ createGridIcon,
147
+ icons,
148
+ pathDefaults
149
+ };
@@ -1,8 +1,8 @@
1
1
  import type Toolbar from './Toolbar';
2
2
  import type Button from './Button';
3
3
  import type Popup from './Popup';
4
- import SvgIcons from './SvgIcons.js';
5
- import Globals from '../Globals.js';
4
+ import { GridIconName } from './SvgIcons.js';
5
+ import { ClassNameKey } from '../Globals.js';
6
6
  declare class ToolbarButton implements Button {
7
7
  /**
8
8
  * The wrapper element for the button.
@@ -37,7 +37,7 @@ declare class ToolbarButton implements Button {
37
37
  * The active indicator for the button.
38
38
  */
39
39
  private activeIndicator?;
40
- constructor(options: ToolbarButton.Options);
40
+ constructor(options: ToolbarButtonOptions);
41
41
  /**
42
42
  * Adds the button to the toolbar.
43
43
  *
@@ -53,17 +53,13 @@ declare class ToolbarButton implements Button {
53
53
  * @param icon
54
54
  * The icon to set.
55
55
  */
56
- setIcon(icon: SvgIcons.GridIconName): void;
56
+ setIcon(icon: GridIconName): void;
57
57
  setActive(active: boolean): void;
58
58
  setHighlighted(highlighted: boolean): void;
59
59
  /**
60
60
  * Destroys the button.
61
61
  */
62
62
  destroy(): void;
63
- /**
64
- * Initializes the state of the button.
65
- */
66
- protected refreshState(): void;
67
63
  /**
68
64
  * Handles the click event for the button.
69
65
  *
@@ -87,49 +83,47 @@ declare class ToolbarButton implements Button {
87
83
  */
88
84
  private removeEventListeners;
89
85
  }
90
- declare namespace ToolbarButton {
91
- /**
92
- * Options for the toolbar button.
93
- */
94
- interface Options {
95
- /**
96
- * The icon for the button.
97
- */
98
- icon: SvgIcons.GridIconName;
99
- /**
100
- * The class name key for the button.
101
- */
102
- classNameKey?: Globals.ClassNameKey;
103
- /**
104
- * The tooltip string for the button.
105
- */
106
- tooltip?: string;
107
- /**
108
- * Whether the button should be always visible.
109
- */
110
- alwaysVisible?: boolean;
111
- /**
112
- * The accessibility options for the button.
113
- */
114
- accessibility?: ToolbarButtonA11yOptions;
115
- /**
116
- * The click handler for the button.
117
- */
118
- onClick?: (event: MouseEvent, button: ToolbarButton) => void;
119
- }
120
- interface ToolbarButtonA11yOptions {
121
- /**
122
- * The aria label attribute for the button.
123
- */
124
- ariaLabel?: string;
125
- /**
126
- * The aria expanded attribute for the button.
127
- */
128
- ariaExpanded?: boolean;
129
- /**
130
- * The aria controls attribute for the button.
131
- */
132
- ariaControls?: string;
133
- }
86
+ /**
87
+ * Options for the toolbar button.
88
+ */
89
+ export interface ToolbarButtonOptions {
90
+ /**
91
+ * The icon for the button.
92
+ */
93
+ icon: GridIconName;
94
+ /**
95
+ * The class name key for the button.
96
+ */
97
+ classNameKey?: ClassNameKey;
98
+ /**
99
+ * The tooltip string for the button.
100
+ */
101
+ tooltip?: string;
102
+ /**
103
+ * Whether the button should be always visible.
104
+ */
105
+ alwaysVisible?: boolean;
106
+ /**
107
+ * The accessibility options for the button.
108
+ */
109
+ accessibility?: ToolbarButtonA11yOptions;
110
+ /**
111
+ * The click handler for the button.
112
+ */
113
+ onClick?: (event: MouseEvent, button: ToolbarButton) => void;
114
+ }
115
+ export interface ToolbarButtonA11yOptions {
116
+ /**
117
+ * The aria label attribute for the button.
118
+ */
119
+ ariaLabel?: string;
120
+ /**
121
+ * The aria expanded attribute for the button.
122
+ */
123
+ ariaExpanded?: boolean;
124
+ /**
125
+ * The aria controls attribute for the button.
126
+ */
127
+ ariaControls?: string;
134
128
  }
135
129
  export default ToolbarButton;
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * */
15
15
  'use strict';
16
- import SvgIcons from './SvgIcons.js';
16
+ import { createGridIcon } from './SvgIcons.js';
17
17
  import Globals from '../Globals.js';
18
18
  import GridUtils from '../GridUtils.js';
19
19
  const { makeHTMLElement } = GridUtils;
@@ -101,7 +101,7 @@ class ToolbarButton {
101
101
  */
102
102
  setIcon(icon) {
103
103
  this.icon?.remove();
104
- this.icon = SvgIcons.createGridIcon(icon);
104
+ this.icon = createGridIcon(icon);
105
105
  this.buttonEl?.appendChild(this.icon);
106
106
  }
107
107
  setActive(active) {
@@ -127,7 +127,8 @@ class ToolbarButton {
127
127
  delete this.toolbar;
128
128
  }
129
129
  /**
130
- * Initializes the state of the button.
130
+ * Refreshes the state of the button.
131
+ * @internal
131
132
  */
132
133
  refreshState() {
133
134
  // Do nothing, to be overridden by subclasses
@@ -69,12 +69,10 @@ declare class CellEditing {
69
69
  */
70
70
  private destroy;
71
71
  }
72
- declare namespace CellEditing {
73
- /**
74
- * The class names used by the CellEditing functionality.
75
- */
76
- const classNames: {
77
- readonly cellEditingContainer: string;
78
- };
79
- }
72
+ /**
73
+ * The class names used by the CellEditing functionality.
74
+ */
75
+ export declare const classNames: {
76
+ readonly cellEditingContainer: string;
77
+ };
80
78
  export default CellEditing;
@@ -163,8 +163,7 @@ class CellEditing {
163
163
  }
164
164
  this.containerElement = this.containerElement ||
165
165
  document.createElement('div');
166
- this.containerElement.className =
167
- CellEditing.classNames.cellEditingContainer;
166
+ this.containerElement.className = classNames.cellEditingContainer;
168
167
  this.editedCell?.htmlElement.appendChild(this.containerElement);
169
168
  this.editModeContent = cell.column.editModeRenderer?.render(cell, this.containerElement);
170
169
  this.editModeContent.getMainElement().focus();
@@ -192,17 +191,15 @@ class CellEditing {
192
191
  }
193
192
  /* *
194
193
  *
195
- * Namespace
194
+ * Declarations
196
195
  *
197
196
  * */
198
- (function (CellEditing) {
199
- /**
200
- * The class names used by the CellEditing functionality.
201
- */
202
- CellEditing.classNames = {
203
- cellEditingContainer: Globals.classNamePrefix + 'cell-editing-container'
204
- };
205
- })(CellEditing || (CellEditing = {}));
197
+ /**
198
+ * The class names used by the CellEditing functionality.
199
+ */
200
+ export const classNames = {
201
+ cellEditingContainer: Globals.classNamePrefix + 'cell-editing-container'
202
+ };
206
203
  /* *
207
204
  *
208
205
  * Default Export
@@ -1,6 +1,28 @@
1
1
  import type CellRendererType from '../CellRendering/CellRendererType';
2
+ import type Column from '../../Core/Table/Column';
3
+ import type { DeepPartial } from '../../../Shared/Types';
2
4
  import type { EditModeRenderer } from './CellEditMode';
5
+ import type Options from '../../Core/Options';
6
+ import type Table from '../../Core/Table/Table';
7
+ import type TableCell from '../../Core/Table/Body/TableCell';
3
8
  import CellEditing from './CellEditing.js';
9
+ /**
10
+ * Default options for the cell editing.
11
+ */
12
+ export declare const defaultOptions: DeepPartial<Options>;
13
+ /**
14
+ * Extends the grid classes with cell editing functionality.
15
+ *
16
+ * @param TableClass
17
+ * The class to extend.
18
+ *
19
+ * @param TableCellClass
20
+ * The class to extend.
21
+ *
22
+ * @param ColumnClass
23
+ * The class to extend.
24
+ */
25
+ export declare function compose(TableClass: typeof Table, TableCellClass: typeof TableCell, ColumnClass: typeof Column): void;
4
26
  export type EditModeRendererType = Extract<CellRendererType, EditModeRenderer>;
5
27
  export type EditModeRendererTypeName = EditModeRendererType['options']['type'];
6
28
  /**
@@ -120,4 +142,8 @@ declare module '../../Core/Options' {
120
142
  * The possible types of the edit message.
121
143
  */
122
144
  export type EditMsgType = 'started' | 'edited' | 'cancelled';
123
- export default CellEditingComposition;
145
+ declare const _default: {
146
+ compose: typeof compose;
147
+ defaultOptions: DeepPartial<Options>;
148
+ };
149
+ export default _default;