@refinitiv-ui/efx-grid 6.0.0-next.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 (837) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +61 -0
  3. package/lib/column-format-dialog/index.d.ts +1 -0
  4. package/lib/column-format-dialog/index.js +1 -0
  5. package/lib/column-format-dialog/lib/column-format-dialog.d.ts +64 -0
  6. package/lib/column-format-dialog/lib/column-format-dialog.js +2713 -0
  7. package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
  8. package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
  9. package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
  10. package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
  11. package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
  12. package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
  13. package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  14. package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
  15. package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
  16. package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
  17. package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
  18. package/lib/column-format-dialog/lib/locale/translation.js +18 -0
  19. package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
  20. package/lib/column-format-dialog/lib/preview-table.js +995 -0
  21. package/lib/column-format-dialog/themes/base.less +429 -0
  22. package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
  23. package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
  24. package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  25. package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
  26. package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
  27. package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
  28. package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  29. package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
  30. package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
  31. package/lib/column-format-dialog/themes/elemental/index.less +5 -0
  32. package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
  33. package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
  34. package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
  35. package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
  36. package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
  37. package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  38. package/lib/column-format-dialog/themes/elemental/light.js +16 -0
  39. package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
  40. package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
  41. package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
  42. package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
  43. package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
  44. package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
  45. package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  46. package/lib/column-format-dialog/themes/halo/dark.js +16 -0
  47. package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
  48. package/lib/column-format-dialog/themes/halo/index.less +5 -0
  49. package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
  50. package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
  51. package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
  52. package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
  53. package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
  54. package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
  55. package/lib/column-format-dialog/themes/halo/light.js +16 -0
  56. package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
  57. package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
  58. package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
  59. package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
  60. package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
  61. package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
  62. package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
  63. package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
  64. package/lib/column-format-dialog/themes/luna/index.less +5 -0
  65. package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
  66. package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  67. package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
  68. package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
  69. package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
  70. package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  71. package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
  72. package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
  73. package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
  74. package/lib/column-format-dialog/themes/solar/index.less +5 -0
  75. package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
  76. package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  77. package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
  78. package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
  79. package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
  80. package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  81. package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
  82. package/lib/column-selection-dialog/index.d.ts +1 -0
  83. package/lib/column-selection-dialog/index.js +1 -0
  84. package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +41 -0
  85. package/lib/column-selection-dialog/lib/column-selection-dialog.js +1410 -0
  86. package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
  87. package/lib/column-selection-dialog/lib/locale/translation-de.js +19 -0
  88. package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
  89. package/lib/column-selection-dialog/lib/locale/translation-en.js +19 -0
  90. package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
  91. package/lib/column-selection-dialog/lib/locale/translation-ja.js +19 -0
  92. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  93. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +19 -0
  94. package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
  95. package/lib/column-selection-dialog/lib/locale/translation-zh.js +19 -0
  96. package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
  97. package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
  98. package/lib/column-selection-dialog/themes/base.less +189 -0
  99. package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
  100. package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
  101. package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  102. package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
  103. package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
  104. package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
  105. package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  106. package/lib/column-selection-dialog/themes/elemental/dark.js +6 -0
  107. package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
  108. package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
  109. package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
  110. package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
  111. package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
  112. package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
  113. package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
  114. package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  115. package/lib/column-selection-dialog/themes/elemental/light.js +6 -0
  116. package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +22 -0
  117. package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
  118. package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
  119. package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
  120. package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
  121. package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
  122. package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  123. package/lib/column-selection-dialog/themes/halo/dark.js +6 -0
  124. package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
  125. package/lib/column-selection-dialog/themes/halo/index.less +6 -0
  126. package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
  127. package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
  128. package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
  129. package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
  130. package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
  131. package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
  132. package/lib/column-selection-dialog/themes/halo/light.js +6 -0
  133. package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
  134. package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  135. package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
  136. package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
  137. package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
  138. package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  139. package/lib/column-selection-dialog/themes/solar/charcoal.js +6 -0
  140. package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +1 -0
  141. package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
  142. package/lib/column-selection-dialog/themes/solar/index.less +6 -0
  143. package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
  144. package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  145. package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
  146. package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
  147. package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
  148. package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  149. package/lib/column-selection-dialog/themes/solar/pearl.js +6 -0
  150. package/lib/core/dist/core.css +1 -0
  151. package/lib/core/dist/core.js +28075 -0
  152. package/lib/core/dist/core.min.js +1 -0
  153. package/lib/core/es6/data/ColumnStats.d.ts +42 -0
  154. package/lib/core/es6/data/ColumnStats.js +428 -0
  155. package/lib/core/es6/data/DataCache.d.ts +81 -0
  156. package/lib/core/es6/data/DataCache.js +1317 -0
  157. package/lib/core/es6/data/DataTable.d.ts +125 -0
  158. package/lib/core/es6/data/DataTable.js +1655 -0
  159. package/lib/core/es6/data/DataView.d.ts +280 -0
  160. package/lib/core/es6/data/DataView.js +3654 -0
  161. package/lib/core/es6/data/Segment.d.ts +38 -0
  162. package/lib/core/es6/data/Segment.js +193 -0
  163. package/lib/core/es6/data/SegmentCollection.d.ts +58 -0
  164. package/lib/core/es6/data/SegmentCollection.js +431 -0
  165. package/lib/core/es6/grid/Core.d.ts +387 -0
  166. package/lib/core/es6/grid/Core.js +4939 -0
  167. package/lib/core/es6/grid/ILayoutGrid.d.ts +204 -0
  168. package/lib/core/es6/grid/ILayoutGrid.js +658 -0
  169. package/lib/core/es6/grid/LayoutGrid.d.ts +23 -0
  170. package/lib/core/es6/grid/LayoutGrid.js +2602 -0
  171. package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +18 -0
  172. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +907 -0
  173. package/lib/core/es6/grid/components/Cell.d.ts +50 -0
  174. package/lib/core/es6/grid/components/Cell.js +740 -0
  175. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +19 -0
  176. package/lib/core/es6/grid/components/CellFloatingPanel.js +123 -0
  177. package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
  178. package/lib/core/es6/grid/components/CellSpan.js +99 -0
  179. package/lib/core/es6/grid/components/CellSpans.d.ts +38 -0
  180. package/lib/core/es6/grid/components/CellSpans.js +341 -0
  181. package/lib/core/es6/grid/components/Column.d.ts +22 -0
  182. package/lib/core/es6/grid/components/Column.js +612 -0
  183. package/lib/core/es6/grid/components/ElementWrapper.d.ts +125 -0
  184. package/lib/core/es6/grid/components/ElementWrapper.js +714 -0
  185. package/lib/core/es6/grid/components/HScrollbar.d.ts +24 -0
  186. package/lib/core/es6/grid/components/HScrollbar.js +222 -0
  187. package/lib/core/es6/grid/components/Scrollbar.d.ts +61 -0
  188. package/lib/core/es6/grid/components/Scrollbar.js +1374 -0
  189. package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
  190. package/lib/core/es6/grid/components/StretchedCells.js +328 -0
  191. package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
  192. package/lib/core/es6/grid/components/VScrollbar.js +139 -0
  193. package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
  194. package/lib/core/es6/grid/components/VirtualItems.js +51 -0
  195. package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
  196. package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
  197. package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
  198. package/lib/core/es6/grid/event/EventListeners.js +163 -0
  199. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
  200. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +615 -0
  201. package/lib/core/es6/grid/plugins/Plugin.d.ts +28 -0
  202. package/lib/core/es6/grid/plugins/Plugin.js +272 -0
  203. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +127 -0
  204. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1707 -0
  205. package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
  206. package/lib/core/es6/grid/util/Conflator.js +191 -0
  207. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +18 -0
  208. package/lib/core/es6/grid/util/ElementFrameWork.js +227 -0
  209. package/lib/core/es6/grid/util/HttpRequest.d.ts +53 -0
  210. package/lib/core/es6/grid/util/HttpRequest.js +371 -0
  211. package/lib/core/es6/grid/util/PercentBar.d.ts +43 -0
  212. package/lib/core/es6/grid/util/PercentBar.js +390 -0
  213. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +41 -0
  214. package/lib/core/es6/grid/util/PercentBarRenderer.js +316 -0
  215. package/lib/core/es6/grid/util/RangeBar.d.ts +25 -0
  216. package/lib/core/es6/grid/util/RangeBar.js +255 -0
  217. package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
  218. package/lib/core/es6/grid/util/Reverter.js +79 -0
  219. package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
  220. package/lib/core/es6/grid/util/SectionSettings.js +674 -0
  221. package/lib/core/es6/grid/util/SelectionList.d.ts +50 -0
  222. package/lib/core/es6/grid/util/SelectionList.js +422 -0
  223. package/lib/core/es6/grid/util/TrackLayout.d.ts +84 -0
  224. package/lib/core/es6/grid/util/TrackLayout.js +850 -0
  225. package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
  226. package/lib/core/es6/grid/util/Virtualizer.js +340 -0
  227. package/lib/core/es6/grid/util/util.d.ts +18 -0
  228. package/lib/core/es6/grid/util/util.js +450 -0
  229. package/lib/core/es6/index.d.ts +84 -0
  230. package/lib/core/es6/index.js +132 -0
  231. package/lib/core/es6/tr-grid-theme.d.ts +5 -0
  232. package/lib/core/es6/tr-grid-theme.js +5 -0
  233. package/lib/filter-dialog/index.d.ts +1 -0
  234. package/lib/filter-dialog/index.js +1 -0
  235. package/lib/filter-dialog/lib/checkbox-list.d.ts +27 -0
  236. package/lib/filter-dialog/lib/checkbox-list.js +336 -0
  237. package/lib/filter-dialog/lib/filter-dialog.d.ts +53 -0
  238. package/lib/filter-dialog/lib/filter-dialog.js +860 -0
  239. package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
  240. package/lib/filter-dialog/lib/locale/translation-de.js +37 -0
  241. package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
  242. package/lib/filter-dialog/lib/locale/translation-en.js +37 -0
  243. package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
  244. package/lib/filter-dialog/lib/locale/translation-ja.js +37 -0
  245. package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  246. package/lib/filter-dialog/lib/locale/translation-zh-hant.js +37 -0
  247. package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
  248. package/lib/filter-dialog/lib/locale/translation-zh.js +37 -0
  249. package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
  250. package/lib/filter-dialog/lib/locale/translation.js +18 -0
  251. package/lib/filter-dialog/themes/base-checkbox.less +37 -0
  252. package/lib/filter-dialog/themes/base.less +102 -0
  253. package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
  254. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
  255. package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  256. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
  257. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
  258. package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
  259. package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
  260. package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  261. package/lib/filter-dialog/themes/elemental/dark.js +11 -0
  262. package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
  263. package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
  264. package/lib/filter-dialog/themes/elemental/index.less +6 -0
  265. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
  266. package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
  267. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
  268. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
  269. package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
  270. package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
  271. package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  272. package/lib/filter-dialog/themes/elemental/light.js +11 -0
  273. package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
  274. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
  275. package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
  276. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
  277. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
  278. package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
  279. package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
  280. package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  281. package/lib/filter-dialog/themes/halo/dark.js +11 -0
  282. package/lib/filter-dialog/themes/halo/defaults.less +3 -0
  283. package/lib/filter-dialog/themes/halo/filter-dialog.less +9 -0
  284. package/lib/filter-dialog/themes/halo/index.less +6 -0
  285. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
  286. package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
  287. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
  288. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
  289. package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
  290. package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
  291. package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
  292. package/lib/filter-dialog/themes/halo/light.js +11 -0
  293. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
  294. package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  295. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
  296. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
  297. package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
  298. package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
  299. package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  300. package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
  301. package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
  302. package/lib/filter-dialog/themes/solar/defaults.less +3 -0
  303. package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
  304. package/lib/filter-dialog/themes/solar/index.less +6 -0
  305. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
  306. package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  307. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
  308. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
  309. package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
  310. package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
  311. package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  312. package/lib/filter-dialog/themes/solar/pearl.js +11 -0
  313. package/lib/formatters/es6/CoralButtonFormatter.d.ts +22 -0
  314. package/lib/formatters/es6/CoralButtonFormatter.js +40 -0
  315. package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
  316. package/lib/formatters/es6/CoralCheckboxFormatter.js +45 -0
  317. package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
  318. package/lib/formatters/es6/CoralComboBoxFormatter.js +102 -0
  319. package/lib/formatters/es6/CoralIconFormatter.d.ts +23 -0
  320. package/lib/formatters/es6/CoralIconFormatter.js +45 -0
  321. package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
  322. package/lib/formatters/es6/CoralInputFormatter.js +40 -0
  323. package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +22 -0
  324. package/lib/formatters/es6/CoralRadioButtonFormatter.js +80 -0
  325. package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
  326. package/lib/formatters/es6/CoralSelectFormatter.js +66 -0
  327. package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
  328. package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
  329. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
  330. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
  331. package/lib/formatters/es6/EFButtonFormatter.d.ts +22 -0
  332. package/lib/formatters/es6/EFButtonFormatter.js +40 -0
  333. package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
  334. package/lib/formatters/es6/EFCheckboxFormatter.js +45 -0
  335. package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
  336. package/lib/formatters/es6/EFComboBoxFormatter.js +68 -0
  337. package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
  338. package/lib/formatters/es6/EFDateTimePickerFormatter.js +55 -0
  339. package/lib/formatters/es6/EFIconFormatter.d.ts +23 -0
  340. package/lib/formatters/es6/EFIconFormatter.js +45 -0
  341. package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
  342. package/lib/formatters/es6/EFNumberFieldFormatter.js +40 -0
  343. package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +22 -0
  344. package/lib/formatters/es6/EFRadioButtonFormatter.js +80 -0
  345. package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
  346. package/lib/formatters/es6/EFSelectFormatter.js +66 -0
  347. package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
  348. package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
  349. package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
  350. package/lib/formatters/es6/EFToggleFormatter.js +47 -0
  351. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
  352. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
  353. package/lib/formatters/es6/FormatterBuilder.d.ts +22 -0
  354. package/lib/formatters/es6/FormatterBuilder.js +334 -0
  355. package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
  356. package/lib/formatters/es6/NumericInputFormatter.js +64 -0
  357. package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
  358. package/lib/formatters/es6/PercentBarFormatter.js +62 -0
  359. package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
  360. package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
  361. package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
  362. package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
  363. package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
  364. package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
  365. package/lib/formatters/es6/SimpleTickerFormatter.d.ts +25 -0
  366. package/lib/formatters/es6/SimpleTickerFormatter.js +65 -0
  367. package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
  368. package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
  369. package/lib/formatters/es6/TextFormatter.d.ts +12 -0
  370. package/lib/formatters/es6/TextFormatter.js +30 -0
  371. package/lib/formatters/es6/index.d.ts +43 -0
  372. package/lib/formatters/es6/index.js +67 -0
  373. package/lib/grid/index.d.ts +1 -0
  374. package/lib/grid/index.js +2 -0
  375. package/lib/grid/lib/efx-grid.d.ts +32 -0
  376. package/lib/grid/lib/efx-grid.js +469 -0
  377. package/lib/grid/themes/base.less +134 -0
  378. package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
  379. package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
  380. package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
  381. package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
  382. package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
  383. package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
  384. package/lib/grid/themes/halo/dark.js +3 -0
  385. package/lib/grid/themes/halo/efx-grid.less +92 -0
  386. package/lib/grid/themes/halo/index.less +3 -0
  387. package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
  388. package/lib/grid/themes/halo/light/efx-grid.js +4 -0
  389. package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
  390. package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
  391. package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
  392. package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
  393. package/lib/grid/themes/halo/light.js +3 -0
  394. package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
  395. package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
  396. package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
  397. package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
  398. package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
  399. package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
  400. package/lib/grid/themes/solar/charcoal.js +3 -0
  401. package/lib/grid/themes/solar/efx-grid.less +27 -0
  402. package/lib/grid/themes/solar/index.less +3 -0
  403. package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
  404. package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
  405. package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
  406. package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
  407. package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
  408. package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
  409. package/lib/grid/themes/solar/pearl.js +3 -0
  410. package/lib/index.d.ts +102 -0
  411. package/lib/index.js +102 -0
  412. package/lib/row-segmenting/es6/RowSegmenting.d.ts +83 -0
  413. package/lib/row-segmenting/es6/RowSegmenting.js +592 -0
  414. package/lib/row-segmenting/es6/index.d.ts +1 -0
  415. package/lib/row-segmenting/es6/index.js +1 -0
  416. package/lib/rt-grid/dist/rt-grid.js +44672 -0
  417. package/lib/rt-grid/dist/rt-grid.min.js +1 -0
  418. package/lib/rt-grid/es6/ColumnDefinition.d.ts +141 -0
  419. package/lib/rt-grid/es6/ColumnDefinition.js +1074 -0
  420. package/lib/rt-grid/es6/DataConnector.d.ts +37 -0
  421. package/lib/rt-grid/es6/DataConnector.js +266 -0
  422. package/lib/rt-grid/es6/FieldDefinition.d.ts +20 -0
  423. package/lib/rt-grid/es6/FieldDefinition.js +418 -0
  424. package/lib/rt-grid/es6/Grid.d.ts +261 -0
  425. package/lib/rt-grid/es6/Grid.js +2893 -0
  426. package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
  427. package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
  428. package/lib/rt-grid/es6/ReferenceCounter.d.ts +38 -0
  429. package/lib/rt-grid/es6/ReferenceCounter.js +230 -0
  430. package/lib/rt-grid/es6/RowDefinition.d.ts +120 -0
  431. package/lib/rt-grid/es6/RowDefinition.js +873 -0
  432. package/lib/rt-grid/es6/SnapshotFiller.d.ts +21 -0
  433. package/lib/rt-grid/es6/SnapshotFiller.js +252 -0
  434. package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
  435. package/lib/rt-grid/es6/StyleLoader.js +47 -0
  436. package/lib/rt-grid/es6/index.d.ts +8 -0
  437. package/lib/rt-grid/es6/index.js +43 -0
  438. package/lib/statistics-row/es6/StatisticsRow.d.ts +67 -0
  439. package/lib/statistics-row/es6/StatisticsRow.js +786 -0
  440. package/lib/statistics-row/es6/index.d.ts +1 -0
  441. package/lib/statistics-row/es6/index.js +1 -0
  442. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +45 -0
  443. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +431 -0
  444. package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
  445. package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
  446. package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +67 -0
  447. package/lib/tr-grid-cell-selection/es6/CellSelection.js +1777 -0
  448. package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
  449. package/lib/tr-grid-cell-selection/es6/index.js +1 -0
  450. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +69 -0
  451. package/lib/tr-grid-checkbox/es6/Checkbox.js +1476 -0
  452. package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
  453. package/lib/tr-grid-checkbox/es6/index.js +1 -0
  454. package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
  455. package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +1000 -0
  456. package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
  457. package/lib/tr-grid-column-fitter/es6/index.js +1 -0
  458. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +89 -0
  459. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +615 -0
  460. package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
  461. package/lib/tr-grid-column-formatting/es6/index.js +1 -0
  462. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +60 -0
  463. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +913 -0
  464. package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
  465. package/lib/tr-grid-column-grouping/es6/index.js +1 -0
  466. package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
  467. package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1013 -0
  468. package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
  469. package/lib/tr-grid-column-resizing/es6/index.js +1 -0
  470. package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +70 -0
  471. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +928 -0
  472. package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
  473. package/lib/tr-grid-column-selection/es6/index.js +1 -0
  474. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +76 -0
  475. package/lib/tr-grid-column-stack/es6/ColumnStack.js +1227 -0
  476. package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
  477. package/lib/tr-grid-column-stack/es6/index.js +1 -0
  478. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +70 -0
  479. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +947 -0
  480. package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
  481. package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
  482. package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
  483. package/lib/tr-grid-content-wrap/es6/ContentWrap.js +478 -0
  484. package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
  485. package/lib/tr-grid-content-wrap/es6/index.js +1 -0
  486. package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
  487. package/lib/tr-grid-contextmenu/es6/ContextMenu.js +471 -0
  488. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
  489. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +133 -0
  490. package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +39 -0
  491. package/lib/tr-grid-contextmenu/es6/MenuItem.js +245 -0
  492. package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +29 -0
  493. package/lib/tr-grid-contextmenu/es6/PopupMenu.js +292 -0
  494. package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
  495. package/lib/tr-grid-contextmenu/es6/index.js +1 -0
  496. package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +57 -0
  497. package/lib/tr-grid-filter-input/es6/FilterInput.js +928 -0
  498. package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
  499. package/lib/tr-grid-filter-input/es6/index.js +1 -0
  500. package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +44 -0
  501. package/lib/tr-grid-heat-map/es6/HeatMap.js +394 -0
  502. package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
  503. package/lib/tr-grid-heat-map/es6/index.js +1 -0
  504. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +129 -0
  505. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +1977 -0
  506. package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
  507. package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
  508. package/lib/tr-grid-pagination/es6/Pagination.d.ts +57 -0
  509. package/lib/tr-grid-pagination/es6/Pagination.js +427 -0
  510. package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
  511. package/lib/tr-grid-pagination/es6/index.js +1 -0
  512. package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
  513. package/lib/tr-grid-percent-bar/es6/PercentBar.js +801 -0
  514. package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
  515. package/lib/tr-grid-percent-bar/es6/index.js +1 -0
  516. package/lib/tr-grid-printer/es6/CellWriter.d.ts +49 -0
  517. package/lib/tr-grid-printer/es6/CellWriter.js +226 -0
  518. package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +12 -0
  519. package/lib/tr-grid-printer/es6/ColumnWriter.js +21 -0
  520. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +32 -0
  521. package/lib/tr-grid-printer/es6/GridPrinter.js +761 -0
  522. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +38 -0
  523. package/lib/tr-grid-printer/es6/PrintTrait.js +481 -0
  524. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +54 -0
  525. package/lib/tr-grid-printer/es6/SectionWriter.js +205 -0
  526. package/lib/tr-grid-printer/es6/index.d.ts +1 -0
  527. package/lib/tr-grid-printer/es6/index.js +1 -0
  528. package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +39 -0
  529. package/lib/tr-grid-range-bar/es6/RangeBar.js +353 -0
  530. package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
  531. package/lib/tr-grid-range-bar/es6/index.js +1 -0
  532. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +53 -0
  533. package/lib/tr-grid-row-dragging/es6/RowDragging.js +794 -0
  534. package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
  535. package/lib/tr-grid-row-dragging/es6/index.js +1 -0
  536. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +118 -0
  537. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +1884 -0
  538. package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
  539. package/lib/tr-grid-row-filtering/es6/index.js +1 -0
  540. package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +109 -0
  541. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1541 -0
  542. package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
  543. package/lib/tr-grid-row-grouping/es6/index.js +1 -0
  544. package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +74 -0
  545. package/lib/tr-grid-row-selection/es6/RowSelection.js +1202 -0
  546. package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
  547. package/lib/tr-grid-row-selection/es6/index.js +1 -0
  548. package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +60 -0
  549. package/lib/tr-grid-rowcoloring/es6/RowColoring.js +611 -0
  550. package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
  551. package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
  552. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +77 -0
  553. package/lib/tr-grid-textformatting/es6/TextFormatting.js +574 -0
  554. package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
  555. package/lib/tr-grid-textformatting/es6/index.js +1 -0
  556. package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +29 -0
  557. package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
  558. package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
  559. package/lib/tr-grid-titlewrap/es6/index.js +1 -0
  560. package/lib/tr-grid-util/es6/CellPainter.d.ts +136 -0
  561. package/lib/tr-grid-util/es6/CellPainter.js +1128 -0
  562. package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
  563. package/lib/tr-grid-util/es6/Conflator.js +193 -0
  564. package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
  565. package/lib/tr-grid-util/es6/CoralItems.js +42 -0
  566. package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
  567. package/lib/tr-grid-util/es6/DateTime.js +508 -0
  568. package/lib/tr-grid-util/es6/Deferred.d.ts +14 -0
  569. package/lib/tr-grid-util/es6/Deferred.js +98 -0
  570. package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
  571. package/lib/tr-grid-util/es6/Delay.js +85 -0
  572. package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
  573. package/lib/tr-grid-util/es6/Dom.js +346 -0
  574. package/lib/tr-grid-util/es6/ElementObserver.d.ts +10 -0
  575. package/lib/tr-grid-util/es6/ElementObserver.js +101 -0
  576. package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
  577. package/lib/tr-grid-util/es6/ElementWrapper.js +83 -0
  578. package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
  579. package/lib/tr-grid-util/es6/ElfDate.js +163 -0
  580. package/lib/tr-grid-util/es6/ElfUtil.d.ts +33 -0
  581. package/lib/tr-grid-util/es6/ElfUtil.js +458 -0
  582. package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
  583. package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
  584. package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +27 -0
  585. package/lib/tr-grid-util/es6/ExpanderIcon.js +169 -0
  586. package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
  587. package/lib/tr-grid-util/es6/Ext.js +52 -0
  588. package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
  589. package/lib/tr-grid-util/es6/FieldFormatter.js +432 -0
  590. package/lib/tr-grid-util/es6/FilterBuilder.d.ts +48 -0
  591. package/lib/tr-grid-util/es6/FilterBuilder.js +521 -0
  592. package/lib/tr-grid-util/es6/FilterOperators.d.ts +41 -0
  593. package/lib/tr-grid-util/es6/FilterOperators.js +181 -0
  594. package/lib/tr-grid-util/es6/GridPlugin.d.ts +72 -0
  595. package/lib/tr-grid-util/es6/GridPlugin.js +747 -0
  596. package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
  597. package/lib/tr-grid-util/es6/Icon.js +61 -0
  598. package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
  599. package/lib/tr-grid-util/es6/MouseDownTrait.js +237 -0
  600. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +32 -0
  601. package/lib/tr-grid-util/es6/MultiTableManager.js +506 -0
  602. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +83 -0
  603. package/lib/tr-grid-util/es6/NumberFormatter.js +471 -0
  604. package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
  605. package/lib/tr-grid-util/es6/PercentBar.js +600 -0
  606. package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
  607. package/lib/tr-grid-util/es6/Perf.js +162 -0
  608. package/lib/tr-grid-util/es6/Popup.d.ts +84 -0
  609. package/lib/tr-grid-util/es6/Popup.js +818 -0
  610. package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
  611. package/lib/tr-grid-util/es6/RangeBar.js +259 -0
  612. package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
  613. package/lib/tr-grid-util/es6/RequestQueue.js +239 -0
  614. package/lib/tr-grid-util/es6/RowPainter.d.ts +23 -0
  615. package/lib/tr-grid-util/es6/RowPainter.js +188 -0
  616. package/lib/tr-grid-util/es6/SubTable.d.ts +74 -0
  617. package/lib/tr-grid-util/es6/SubTable.js +558 -0
  618. package/lib/tr-grid-util/es6/Table.d.ts +125 -0
  619. package/lib/tr-grid-util/es6/Table.js +790 -0
  620. package/lib/tr-grid-util/es6/TextHighlighter.d.ts +18 -0
  621. package/lib/tr-grid-util/es6/TextHighlighter.js +273 -0
  622. package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
  623. package/lib/tr-grid-util/es6/TickCodes.js +33 -0
  624. package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
  625. package/lib/tr-grid-util/es6/Timer.js +49 -0
  626. package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
  627. package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
  628. package/lib/tr-grid-util/es6/Util.d.ts +65 -0
  629. package/lib/tr-grid-util/es6/Util.js +528 -0
  630. package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
  631. package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
  632. package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
  633. package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
  634. package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
  635. package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
  636. package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
  637. package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
  638. package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
  639. package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
  640. package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
  641. package/lib/tr-grid-util/es6/formula/Formula.js +882 -0
  642. package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
  643. package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
  644. package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
  645. package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
  646. package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
  647. package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
  648. package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
  649. package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
  650. package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
  651. package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
  652. package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
  653. package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
  654. package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
  655. package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
  656. package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
  657. package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
  658. package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
  659. package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
  660. package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
  661. package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
  662. package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
  663. package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
  664. package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
  665. package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
  666. package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
  667. package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
  668. package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
  669. package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
  670. package/lib/tr-grid-util/es6/index.d.ts +63 -0
  671. package/lib/tr-grid-util/es6/index.js +99 -0
  672. package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
  673. package/lib/tr-grid-util/es6/jet/CollectionDict.js +141 -0
  674. package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +114 -0
  675. package/lib/tr-grid-util/es6/jet/DataGenerator.js +827 -0
  676. package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
  677. package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
  678. package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
  679. package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
  680. package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
  681. package/lib/tr-grid-util/es6/jet/MockJET.js +63 -0
  682. package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
  683. package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
  684. package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +72 -0
  685. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +564 -0
  686. package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +8 -0
  687. package/lib/tr-grid-util/es6/jet/MockRTK.js +43 -0
  688. package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
  689. package/lib/tr-grid-util/es6/jet/index.js +18 -0
  690. package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
  691. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +131 -0
  692. package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
  693. package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
  694. package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
  695. package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
  696. package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
  697. package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
  698. package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
  699. package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
  700. package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
  701. package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
  702. package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
  703. package/lib/tr-grid-util/es6/locale/translation.js +18 -0
  704. package/lib/types/es6/AutoTooltip.d.ts +45 -0
  705. package/lib/types/es6/CellSelection.d.ts +67 -0
  706. package/lib/types/es6/Checkbox.d.ts +69 -0
  707. package/lib/types/es6/ColumnFitter.d.ts +56 -0
  708. package/lib/types/es6/ColumnFormatting.d.ts +90 -0
  709. package/lib/types/es6/ColumnGrouping.d.ts +60 -0
  710. package/lib/types/es6/ColumnResizing.d.ts +68 -0
  711. package/lib/types/es6/ColumnSelection.d.ts +70 -0
  712. package/lib/types/es6/ColumnStack.d.ts +76 -0
  713. package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
  714. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +38 -0
  715. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
  716. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +287 -0
  717. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +22 -0
  718. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +44 -0
  719. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +30 -0
  720. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +42 -0
  721. package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
  722. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
  723. package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
  724. package/lib/types/es6/ConditionalColoring.d.ts +70 -0
  725. package/lib/types/es6/ContentWrap.d.ts +43 -0
  726. package/lib/types/es6/ContextMenu.d.ts +83 -0
  727. package/lib/types/es6/CoralButtonFormatter.d.ts +22 -0
  728. package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
  729. package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
  730. package/lib/types/es6/CoralIconFormatter.d.ts +23 -0
  731. package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
  732. package/lib/types/es6/CoralRadioButtonFormatter.d.ts +22 -0
  733. package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
  734. package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
  735. package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
  736. package/lib/types/es6/Core/data/DataCache.d.ts +81 -0
  737. package/lib/types/es6/Core/data/DataTable.d.ts +125 -0
  738. package/lib/types/es6/Core/data/DataView.d.ts +280 -0
  739. package/lib/types/es6/Core/data/Segment.d.ts +38 -0
  740. package/lib/types/es6/Core/data/SegmentCollection.d.ts +58 -0
  741. package/lib/types/es6/Core/grid/Core.d.ts +387 -0
  742. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +204 -0
  743. package/lib/types/es6/Core/grid/LayoutGrid.d.ts +23 -0
  744. package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +18 -0
  745. package/lib/types/es6/Core/grid/components/Cell.d.ts +50 -0
  746. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +19 -0
  747. package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
  748. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +38 -0
  749. package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
  750. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +125 -0
  751. package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +24 -0
  752. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +61 -0
  753. package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
  754. package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
  755. package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
  756. package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
  757. package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
  758. package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
  759. package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +28 -0
  760. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +127 -0
  761. package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
  762. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +18 -0
  763. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +53 -0
  764. package/lib/types/es6/Core/grid/util/PercentBar.d.ts +43 -0
  765. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +41 -0
  766. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +25 -0
  767. package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
  768. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
  769. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +50 -0
  770. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +84 -0
  771. package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
  772. package/lib/types/es6/Core/grid/util/util.d.ts +18 -0
  773. package/lib/types/es6/Core/index.d.ts +84 -0
  774. package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
  775. package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
  776. package/lib/types/es6/EFButtonFormatter.d.ts +22 -0
  777. package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
  778. package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
  779. package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
  780. package/lib/types/es6/EFIconFormatter.d.ts +23 -0
  781. package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
  782. package/lib/types/es6/EFRadioButtonFormatter.d.ts +22 -0
  783. package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
  784. package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
  785. package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
  786. package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
  787. package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
  788. package/lib/types/es6/ExtensionOptions.d.ts +52 -0
  789. package/lib/types/es6/Extensions.d.ts +61 -0
  790. package/lib/types/es6/FilterInput.d.ts +57 -0
  791. package/lib/types/es6/FormatterBuilder.d.ts +22 -0
  792. package/lib/types/es6/GridFormatter.d.ts +63 -0
  793. package/lib/types/es6/HeatMap.d.ts +44 -0
  794. package/lib/types/es6/InCellEditing.d.ts +129 -0
  795. package/lib/types/es6/MenuEventAPI.d.ts +22 -0
  796. package/lib/types/es6/MenuItem.d.ts +39 -0
  797. package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
  798. package/lib/types/es6/Pagination.d.ts +57 -0
  799. package/lib/types/es6/PercentBar.d.ts +60 -0
  800. package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
  801. package/lib/types/es6/PopupMenu.d.ts +29 -0
  802. package/lib/types/es6/RangeBar.d.ts +39 -0
  803. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +143 -0
  804. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +37 -0
  805. package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +20 -0
  806. package/lib/types/es6/RealtimeGrid/Grid.d.ts +263 -0
  807. package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
  808. package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +38 -0
  809. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +120 -0
  810. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +21 -0
  811. package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
  812. package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
  813. package/lib/types/es6/RowColoring.d.ts +60 -0
  814. package/lib/types/es6/RowDragging.d.ts +53 -0
  815. package/lib/types/es6/RowFiltering.d.ts +118 -0
  816. package/lib/types/es6/RowGrouping.d.ts +109 -0
  817. package/lib/types/es6/RowSegmenting.d.ts +83 -0
  818. package/lib/types/es6/RowSelection.d.ts +74 -0
  819. package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
  820. package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
  821. package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
  822. package/lib/types/es6/SimpleTickerFormatter.d.ts +25 -0
  823. package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
  824. package/lib/types/es6/StatisticsRow.d.ts +67 -0
  825. package/lib/types/es6/TextFormatter.d.ts +12 -0
  826. package/lib/types/es6/TextFormatting.d.ts +77 -0
  827. package/lib/types/es6/TitleWrap.d.ts +29 -0
  828. package/lib/types/es6/Zoom.d.ts +51 -0
  829. package/lib/types/es6/index.d.ts +76 -0
  830. package/lib/types/index.d.ts +1 -0
  831. package/lib/versions.json +36 -0
  832. package/lib/window-exporter.js +13 -0
  833. package/lib/zoom/es6/Zoom.d.ts +51 -0
  834. package/lib/zoom/es6/Zoom.js +419 -0
  835. package/lib/zoom/es6/index.d.ts +1 -0
  836. package/lib/zoom/es6/index.js +1 -0
  837. package/package.json +42 -0
@@ -0,0 +1,1541 @@
1
+ import { Ext } from "../../tr-grid-util/es6/Ext.js";
2
+ import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
3
+ import { ExpanderIcon } from "../../tr-grid-util/es6/ExpanderIcon.js";
4
+ import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
5
+ import { RowPainter } from "../../tr-grid-util/es6/RowPainter.js";
6
+
7
+ /** @typedef {Object} RowGroupingPlugin~Options
8
+ * @description The options can be specified by `rowGrouping` property of the main grid's options
9
+ * @property {boolean=} autoGroupRemoval=false Remove group that has no row member.
10
+ * @property {boolean=} autoGroupHiding=false Hide "null" or "undefined" group headers, while keeping the group's items intact.
11
+ * @property {(Array|Array.<Array>)=} predefinedGroups=null Add groups without content rows. Use 2D array for multi-level grouping.
12
+ * @property {RowGroupingPlugin~GroupCriteria=} groupBy=null GroupCriteria can be string, function, or array of string.
13
+ * @property {RowGroupingPlugin~GroupCriteria=} groupCriteria=null Alias to `groupBy`.
14
+ * @property {number=} displayColumn=0 Column Index for group header rendering.
15
+ * @property {boolean=} fixedDisplayColumn=false If enabled, displayColumn will remain in the same index, even if columns are shifted by insertion or removal.
16
+ * @property {boolean=} noCollapsible=false If enabled, arrows will be hidden and cell is not clickable. This flag takes precedence over `clickableCell` and `hiddenArrow`.
17
+ * @property {boolean=} clickableCell=true If disabled, clicking at cell will not expand that group
18
+ * @property {(boolean|number|Array.<number>)=} hiddenArrow Specify header levels which is a single number start from 1 or an array of number that want to hide arrow icon. If specify true all arrows will be hidden.
19
+ * @property {boolean=} contentAsHeader=false If enabled, second level group header rows are hidden, the first content rows become a header, cells are not be clickable, and arrows are hidden.
20
+ * @property {boolean=} headerSpanning=true If disabled, every cell on the group header row is displayed
21
+ * @property {boolean=} footerSpanning=false If enabled, only cells from the first column will be shown, spanning over other cells
22
+ * @property {RowGroupingPlugin~GroupSortLogic=} groupSortLogic=null Logic for group sorting. There is no sorting by default (i.e. groups are placed in order of their creation time)
23
+ * @property {boolean=} autoGroupSorting=false If enabled, group sorting will be performed after each `groupAdded` event
24
+ * @property {(boolean|number|Array.<number>)=} indentSize Use array to define indent for each group level. Use boolean to turn on or off indentation. Use number to define incremental step.
25
+ * @property {boolean=} colorTag If not specified, the color tag will be disabled when using extension without halo theme.
26
+ * @property {Function=} clicked=null Event handler when user clicks on arrows or cells
27
+ * @property {Function=} groupAdded=null Event handler
28
+ * @property {Function=} beforeGroupAdded=null Event handler
29
+ * @property {Function=} groupHeaderBinding=null Logic that will be executed on each group header row
30
+ * @property {Function=} groupFooterBinding=null Once defined, footer row will be added on each group
31
+ * @property {Function=} headerBinding=null Shorthand for `groupHeaderBinding`
32
+ * @property {Function=} footerBinding=null Shorthand for `groupFooterBinding`
33
+ * @property {Function=} nonGroupBinding=null This is used to clear any custom styling defined in groupHeaderBinding or groupFooterBinding
34
+ */
35
+
36
+ /** @event RowGroupingPlugin#clicked
37
+ * @description Fired when users click on UIs that trigger expanding or collapsing a group
38
+ * @type {Object}
39
+ * @property {number} rowIndex
40
+ * @property {boolean} expanded
41
+ * @property {Object} group Data view that represents currently clicked group header row
42
+ */
43
+ /** @event RowGroupingPlugin#beforeGroupAdded
44
+ * @description Fired each time before group added. Set property `cancel` to true to cancel adding of the new group
45
+ * @type {Object}
46
+ * @property {Object} dataView DataView instance
47
+ * @property {string} newGroupId
48
+ * @property {*} newGroupValue
49
+ * @property {string} newGroupRowId Unique row Id given for the group
50
+ */
51
+ /** @event RowGroupingPlugin#groupAdded
52
+ * @property {Object} dataView Parent DataView that create the new group
53
+ * @property {Object} newGroup Child DataView that is newly created
54
+ */
55
+
56
+ /** @event RowGroupingPlugin#groupFooterBinding
57
+ * @description Fired when footer of each group is rendered
58
+ * @type {Object}
59
+ * @property {object} rowData
60
+ * @property {number} colIndex
61
+ * @property {number} rowIndex
62
+ * @property {string} rowId
63
+ * @property {number} footerIndex
64
+ * @property {string} groupId
65
+ * @property {boolean} footerRow
66
+ * @property {Object} cell Grid cell instance
67
+ * @property {Object} section VirtualizedLayoutGrid
68
+ * @property {Object} dataSource Parent DataView of group
69
+ */
70
+ /** @event RowGroupingPlugin#groupHeaderBinding
71
+ * @description Fired when header of each group is rendered
72
+ * @type {Object}
73
+ * @property {object} rowData
74
+ * @property {number} colIndex
75
+ * @property {number} rowIndex
76
+ * @property {string} rowId
77
+ * @property {number} footerIndex
78
+ * @property {string} groupId
79
+ * @property {boolean} footerRow
80
+ * @property {Object} cell Grid cell instance
81
+ * @property {Object} section VirtualizedLayoutGrid
82
+ * @property {Object} dataSource Parent DataView of group
83
+ */
84
+ /** @event RowGroupingPlugin#nonGroupBinding
85
+ * @description Fired for each normal content row rendering
86
+ * @type {Object}
87
+ * @property {object} rowData
88
+ * @property {number} colIndex
89
+ * @property {number} rowIndex
90
+ * @property {string} rowId
91
+ * @property {Object} cell Grid cell instance
92
+ * @property {Object} section VirtualizedLayoutGrid
93
+ * @property {Object} dataSource Root DataView of all group
94
+ * @property {boolean} noIndent set this property to true to prevent cell add indent
95
+ */
96
+
97
+ /** @callback RowGroupingPlugin~GroupSortLogic
98
+ * @description Method parameters provided by `groupSortLogic` callback
99
+ * @param {*} grpValA Group value of the group in left hand side
100
+ * @param {*} grpValB Group value of the group in right hand side
101
+ * @param {Object=} grpDataViewA DataView of the group in left hand side
102
+ * @param {Object=} grpDataViewB DataView of the group in right hand side
103
+ * @return {number}
104
+ */
105
+
106
+ /** @typedef {string|Array.<string|Function>} RowGroupingPlugin~GroupCriteria
107
+ * @description GroupCriteria can be one of the following values: <br>
108
+ * <b>null</b> input will clear all existing grouping criteria <br>
109
+ * <b>string</b> input is treat as column/field name in the data table <br>
110
+ * <b>Function</b> input is for custom criteria <br>
111
+ * <b>Array</b> input will create multiple groups in tree like manner (nested group criteria)
112
+ */
113
+
114
+ /** @typedef {Object} RowGroupingPlugin~GroupingState
115
+ * @description state of groupings or JSON String
116
+ * @property {boolean} collapsed
117
+ * @property {(number|string)=} groupId
118
+ */
119
+
120
+ /** Creates groups based on the given criteria. Group should appears in order of data in the data view. Use {@link RowGroupingPlugin#sortGroups} to re-order groups manually.
121
+ * @constructor
122
+ * @extends {GridPlugin}
123
+ * @param {RowGroupingPlugin~Options=} options Extension's configuration object
124
+ */
125
+ var RowGroupingPlugin = function (options) {
126
+ var t = this;
127
+ t._onColumnIndexChanged = t._onColumnIndexChanged.bind(t);
128
+ t._getRowsForContentAsHeader = t._getRowsForContentAsHeader.bind(t);
129
+ t._onPostSectionDataBinding = t._onPostSectionDataBinding.bind(t);
130
+ t._onCellClicked = t._onCellClicked.bind(t);
131
+ t._onMapCriteria = t._onMapCriteria.bind(t);
132
+ t._onGroupCriteriaChanged = t._onGroupCriteriaChanged.bind(t);
133
+ t._onGroupAdded = t._onGroupAdded.bind(t);
134
+ t._onBeforeGroupAdded = t._onBeforeGroupAdded.bind(t);
135
+ t._updateCursor = t._updateCursor.bind(t);
136
+ t.updateHeaders = t.updateHeaders.bind(t);
137
+ t.sortGroups = t.sortGroups.bind(t);
138
+ t._onItemGroupColumnClicked = t._onItemGroupColumnClicked.bind(t);
139
+ t._onItemUnGroupColumnClicked = t._onItemUnGroupColumnClicked.bind(t);
140
+ t._onItemExpandAllClicked = t._onItemExpandAllClicked.bind(t);
141
+ t._onItemCollapseAllClicked = t._onItemCollapseAllClicked.bind(t);
142
+
143
+ t._criteria = [];
144
+ t._criteriaFuncs = [];
145
+ t._hosts = [];
146
+ t._indentSize = [0, 22, 37, 52, 67];
147
+ t.config({ "rowGrouping": options });
148
+ };
149
+ Ext.inherits(RowGroupingPlugin, GridPlugin);
150
+
151
+ /** @type {boolean}
152
+ * @private
153
+ */
154
+ RowGroupingPlugin.prototype._dirty = false;
155
+ /** @type {boolean}
156
+ * @private
157
+ */
158
+ RowGroupingPlugin.prototype._shouldUpdateDisplayColumn = true;
159
+ /** @type {!Array.<string|Function>}
160
+ * @private
161
+ */
162
+ RowGroupingPlugin.prototype._criteria;
163
+ /** @type {!Array.<Function>}
164
+ * @private
165
+ */
166
+ RowGroupingPlugin.prototype._criteriaFuncs;
167
+ /** @type {Array}
168
+ * @private
169
+ */
170
+ RowGroupingPlugin.prototype._predefinedGroups = null;
171
+ /** @type {Function}
172
+ * @private
173
+ */
174
+ RowGroupingPlugin.prototype._groupSortFunction;
175
+
176
+ /** @type {boolean}
177
+ * @private
178
+ */
179
+ RowGroupingPlugin.prototype._disabled = false;
180
+ /** @type {boolean}
181
+ * @private
182
+ */
183
+ RowGroupingPlugin.prototype._fixedDisplayColumn = -1;
184
+ /** @type {number}
185
+ * @private
186
+ */
187
+ RowGroupingPlugin.prototype._displayColumn = 0; // Target prospect column
188
+ /** @type {number}
189
+ * @private
190
+ */
191
+ RowGroupingPlugin.prototype._headerColumn = -1; // Actual display column
192
+ /** @type {string}
193
+ * @private
194
+ */
195
+ RowGroupingPlugin.prototype._headerColumnField = ''; // Actual display column field
196
+ /** @type {!Array.<number>}
197
+ * @private
198
+ */
199
+ RowGroupingPlugin.prototype._indentSize = null;
200
+ /** @type {boolean}
201
+ * @private
202
+ */
203
+ RowGroupingPlugin.prototype._noCollapsible = false;
204
+ /** @type {boolean}
205
+ * @private
206
+ */
207
+ RowGroupingPlugin.prototype._headerSpanning = true;
208
+ /** @type {boolean}
209
+ * @private
210
+ */
211
+ RowGroupingPlugin.prototype._footerSpanning = false;
212
+ /** @type {boolean}
213
+ * @private
214
+ */
215
+ RowGroupingPlugin.prototype._autoGroupSorting = false;
216
+ /** @type {number}
217
+ * @private
218
+ */
219
+ RowGroupingPlugin.prototype._sortingTimer = 0;
220
+ /** @type {number}
221
+ * @private
222
+ */
223
+ RowGroupingPlugin.prototype._footerRows = 0;
224
+ /** @type {boolean}
225
+ * @private
226
+ */
227
+ RowGroupingPlugin.prototype._autoGroupRemoval = false;
228
+ /** @type {boolean}
229
+ * @private
230
+ */
231
+ RowGroupingPlugin.prototype._autoGroupHiding = false;
232
+ /** @type {boolean}
233
+ * @private
234
+ */
235
+ RowGroupingPlugin.prototype._contentAsHeader = false;
236
+ /** @type {number}
237
+ * @private
238
+ */
239
+ RowGroupingPlugin.prototype._timerId = 0;
240
+ /** @type {string}
241
+ * @private
242
+ */
243
+ RowGroupingPlugin._iconName = ""; // static variable
244
+ /** @type {boolean}
245
+ * @private
246
+ */
247
+ RowGroupingPlugin.prototype._clickableCell = true;
248
+ /** @type {boolean|Object}
249
+ * @private
250
+ */
251
+ RowGroupingPlugin.prototype._hiddenArrow = false;
252
+ /** @type {boolean}
253
+ * @private
254
+ */
255
+ RowGroupingPlugin.prototype._clickDisabled = false;
256
+ /** @type {Object}
257
+ * @private
258
+ */
259
+ RowGroupingPlugin.prototype._rowPainter = null;
260
+ /** @type {boolean|null}
261
+ * @private
262
+ */
263
+ RowGroupingPlugin.prototype._colorTag = null;
264
+
265
+ /** @type {Function}
266
+ * @private
267
+ */
268
+ RowGroupingPlugin.prototype._criteriaGetter = null;
269
+
270
+
271
+ /** @private
272
+ * @function
273
+ * @param {string} field
274
+ * @param {Object} dvRowData
275
+ * @return {Array.<string>}
276
+ */
277
+ RowGroupingPlugin._defaultCriteriaGetter = function (field, dvRowData) {
278
+ var val = dvRowData[field];
279
+ return RowGroupingPlugin._toArrayOfString(val);
280
+ };
281
+ /** @private
282
+ * @function
283
+ * @param {string} field
284
+ * @param {Object} dvRowData
285
+ * @return {Array.<string>}
286
+ */
287
+ RowGroupingPlugin._rowDefCriteriaGetter = function (field, dvRowData) {
288
+ var rowData = /** @type{Object} */(dvRowData.ROW_DEF.getRowData());
289
+ var val = rowData[field];
290
+ return RowGroupingPlugin._toArrayOfString(val);
291
+ };
292
+ /** @private
293
+ * @function
294
+ * @param {string|Array} data
295
+ * @return {Array.<string>}
296
+ */
297
+ RowGroupingPlugin._toArrayOfString = function (data) {
298
+ if(Array.isArray(data)) {
299
+ return data.map(String);
300
+ } else {
301
+ return [data + ""];
302
+ }
303
+ };
304
+
305
+ /** @private
306
+ * @param {Array.<Object>} columns
307
+ * @return {number} Return negative number if the column not found
308
+ * Note: _findCheckboxColumnIndexFromConfig function is duplicated in CheckboxExtension
309
+ */
310
+ RowGroupingPlugin.prototype._findCheckboxColumnIndexFromConfig = function (columns) {
311
+ if (!Array.isArray(columns)) return -1;
312
+ var index = -1, c = columns.length;
313
+ for (var i = 0; i < c; i++) {
314
+ if (columns[i].checkboxColumn) {
315
+ index = i;
316
+ break;
317
+ }
318
+ }
319
+ return index;
320
+ };
321
+
322
+ /** Convert built-in grid config to extension config
323
+ * @public
324
+ * @param {string} optionName
325
+ * @param {*} optionVal
326
+ * @return {*} The transformed value of the option
327
+ */
328
+ RowGroupingPlugin.prototype.beforeProcessOption = function (optionName, optionVal) {
329
+ if (optionName == "rowGrouping" && optionVal) {
330
+ this.config({ "rowGrouping": optionVal });
331
+ return null; // eslint-disable-line
332
+ }
333
+ return; // eslint-disable-line
334
+ };
335
+
336
+ /** @private
337
+ * @override
338
+ */
339
+ RowGroupingPlugin.prototype._afterInit = function () {
340
+ if (this._realTimeGrid) {
341
+ this._criteriaGetter = RowGroupingPlugin._rowDefCriteriaGetter;
342
+ } else {
343
+ this._criteriaGetter = RowGroupingPlugin._defaultCriteriaGetter;
344
+ }
345
+ this._shouldUpdateDisplayColumn = true;
346
+ this._applyGrouping();
347
+ };
348
+
349
+ /** @public
350
+ * @return {string}
351
+ */
352
+ RowGroupingPlugin.prototype.getName = function () {
353
+ return "RowGroupingPlugin"; // Read Only
354
+ };
355
+
356
+ /** @public
357
+ * @ignore
358
+ * @param {Element} elem
359
+ * @param {Object} config
360
+ */
361
+ RowGroupingPlugin.prototype.beforeInit = function(elem, config) {
362
+ // Set default indentSize here
363
+ if (ElfUtil.isHaloTheme()) {
364
+ // only for halo theme
365
+ this._indentSize = [0, 30, 50, 70, 90];
366
+ } else {
367
+ this._indentSize = [0, 22, 37, 52, 67];
368
+ }
369
+ };
370
+
371
+ /** @public
372
+ * @param {Object} host core grid object
373
+ * @param {Object=} options
374
+ */
375
+ RowGroupingPlugin.prototype.initialize = function (host, options) {
376
+ if (this._hosts.indexOf(host) >= 0) {
377
+ return;
378
+ }
379
+
380
+ this._hosts.push(host);
381
+
382
+ ExpanderIcon.loadExpanderStyles();
383
+ ExpanderIcon.injectExpanderStyles(host.getElement());
384
+
385
+ host.unloadPlugin("CollapsibleHeaderPlugin");
386
+ host.listen("columnMoved", this._onColumnIndexChanged);
387
+ host.listen("columnAdded", this._onColumnIndexChanged);
388
+ host.listen("columnRemoved", this._onColumnIndexChanged);
389
+ host.listen("postSectionDataBinding", this._onPostSectionDataBinding);
390
+
391
+ this.config(options);
392
+
393
+ var enabled = this._colorTag != null ? this._colorTag : ElfUtil.isHaloTheme();
394
+ RowPainter.disableColorTag(host, enabled === false);
395
+ RowPainter.applyGroupingStyles(host);
396
+
397
+ this._applyGrouping(); // TODO: Support run-time theme loading
398
+ };
399
+ /** @public
400
+ * @param {Object=} host core grid object
401
+ */
402
+ RowGroupingPlugin.prototype.unload = function (host) {
403
+ var at = this._hosts.indexOf(host);
404
+ if (at < 0) {
405
+ return;
406
+ }
407
+
408
+ host.unlisten("columnMoved", this._onColumnIndexChanged);
409
+ host.unlisten("columnAdded", this._onColumnIndexChanged);
410
+ host.unlisten("columnRemoved", this._onColumnIndexChanged);
411
+ host.unlisten("postSectionDataBinding", this._onPostSectionDataBinding);
412
+
413
+ this._hosts.splice(at, 1);
414
+
415
+ this._dispose();
416
+
417
+ if (!this._hosts.length) {
418
+ this._compositeGrid = null;
419
+ if (this._timerId) {
420
+ clearTimeout(this._timerId);
421
+ this._timerId = 0;
422
+ }
423
+ if (this._sortingTimer) {
424
+ clearTimeout(this._sortingTimer);
425
+ this._sortingTimer = 0;
426
+ }
427
+ }
428
+ };
429
+
430
+ /** @public
431
+ * @param {Object=} options Grid configuration object
432
+ */
433
+ RowGroupingPlugin.prototype.config = function (options) {
434
+ if (!options) { return; }
435
+
436
+ var option = options.rowGrouping;
437
+ if (option) {
438
+ if (option.autoGroupRemoval != null) {
439
+ this._autoGroupRemoval = !!option.autoGroupRemoval;
440
+ }
441
+ if (option.autoGroupHiding != null) {
442
+ this._autoGroupHiding = !!option.autoGroupHiding;
443
+ }
444
+ if (option.headerSpanning != null) {
445
+ this._headerSpanning = !!option.headerSpanning;
446
+ }
447
+ if (option.footerSpanning != null) {
448
+ this._footerSpanning = !!option.footerSpanning;
449
+ }
450
+ if (option.autoGroupSorting != null) {
451
+ this._autoGroupSorting = !!option.autoGroupSorting;
452
+ }
453
+ if (option.predefinedGroups != null) {
454
+ this.setPredefinedGroups(option.predefinedGroups);
455
+ }
456
+ if (option.groupBy || option.groupCriteria) {
457
+ this.setGroupingCriteria(option.groupBy || option.groupCriteria);
458
+ }
459
+ if (typeof option.displayColumn === "number") {
460
+ this._displayColumn = option.displayColumn;
461
+ }
462
+ if (option.fixedDisplayColumn != null) {
463
+ this._fixedDisplayColumn = option.fixedDisplayColumn ? this._displayColumn : -1;
464
+ }
465
+ if (typeof option.groupSortLogic === "function") {
466
+ this.setGroupSortingLogic(option.groupSortLogic);
467
+ }
468
+ if (!option.groupHeaderBinding && option.headerBinding) {
469
+ option.groupHeaderBinding = option.headerBinding;
470
+ }
471
+ if (!option.groupFooterBinding && option.footerBinding) {
472
+ option.groupFooterBinding = option.footerBinding;
473
+ }
474
+ if (option.hiddenArrow != null) {
475
+ var hiddenOption = option.hiddenArrow;
476
+ if (Array.isArray(hiddenOption)) {
477
+ var len = hiddenOption.length;
478
+ this._hiddenArrow = {};
479
+ for (var i = 0; i < len; i++) {
480
+ this._hiddenArrow[hiddenOption[i]] = true;
481
+ }
482
+ } else if (typeof hiddenOption === "number") {
483
+ this._hiddenArrow = {};
484
+ this._hiddenArrow[hiddenOption] = true;
485
+ } else {
486
+ this._hiddenArrow = !!option.hiddenArrow;
487
+ }
488
+ }
489
+ if (option.contentAsHeader != null) {
490
+ this._contentAsHeader = !!option.contentAsHeader;
491
+ }
492
+ if (option.clickableCell != null) {
493
+ this._clickableCell = !!option.clickableCell;
494
+ }
495
+ var indentSize = option.indentSize;
496
+ if (indentSize != null) {
497
+ if (typeof indentSize === "boolean") {
498
+ if (!indentSize) {
499
+ this._indentSize = [0];
500
+ } // TODO: Handle default case
501
+ } else if (typeof indentSize === "number") {
502
+ this._indentSize = new Array(5);
503
+ for (var j = 0; j < 5; j++) {
504
+ this._indentSize[j] = indentSize * j;
505
+ }
506
+ } else if (Array.isArray(indentSize)) {
507
+ this._indentSize = indentSize;
508
+ }
509
+ }
510
+ if (option.noCollapsible != null) {
511
+ this._noCollapsible = !!option.noCollapsible;
512
+ if (this._noCollapsible) {
513
+ this._indentSize = [0]; // Content will not be indented
514
+ }
515
+ }
516
+ if (this._contentAsHeader || this._noCollapsible) { // contentAsHeader has higher priority than hiddenArrow
517
+ this._clickableCell = false; // Cells are not clickable
518
+ this._hiddenArrow = true; // Arrows are hidden
519
+ }
520
+
521
+ this.addListener(option, "clicked");
522
+ this.addListener(option, "groupAdded");
523
+ this.addListener(option, "beforeGroupAdded");
524
+ this.addListener(option, "groupHeaderBinding");
525
+ this.addListener(option, "nonGroupBinding");
526
+ this.addListener(option, "groupFooterBinding");
527
+ if (this.hasListener("groupFooterBinding")) {
528
+ this._footerRows = 1;
529
+ }
530
+ this._rowPainter = new RowPainter({
531
+ clickableCell: this._clickableCell,
532
+ headerSpanning: this._headerSpanning,
533
+ footerSpanning: this._footerSpanning,
534
+ onCellClicked: this._onCellClicked
535
+ });
536
+ if (option.colorTag != null) {
537
+ this._colorTag = option.colorTag;
538
+ }
539
+ }
540
+
541
+ if (this._fixedDisplayColumn < 0) {
542
+ var checkboxColumnIndex = this._findCheckboxColumnIndexFromConfig(options.columns);
543
+ if (checkboxColumnIndex >= 0) { // has checkbox column
544
+ /** 27/04/21
545
+ * NOTE:: checkbox column could be
546
+ * 1. insert from the left side of _displayColumn
547
+ * 2. insert from the right side of _displayColumn
548
+ * 3. place at specific column (no column inserted)
549
+ * But row grouping can't distinguish of this 3 posibilities.
550
+ * But for now, (2) is not implement yet
551
+ * and method (3) is not public to user yet
552
+ * so we will assume that only (1) is occur at the moment and we will only support (1)
553
+ */
554
+
555
+ // if checkbox column is insert to the left then we will +1 rowGroping display column
556
+ if (checkboxColumnIndex <= this._displayColumn) {
557
+ this._displayColumn++;
558
+ }
559
+ }
560
+ }
561
+ };
562
+
563
+ /** @public
564
+ * @param {Object=} gridOptions
565
+ * @return {!Object}
566
+ */
567
+ RowGroupingPlugin.prototype.getConfigObject = function (gridOptions) {
568
+ var obj = gridOptions || {};
569
+
570
+ var extOptions = obj.rowGrouping;
571
+ if(!extOptions) {
572
+ extOptions = obj.rowGrouping = {};
573
+ }
574
+ if(this._autoGroupRemoval) {
575
+ extOptions.autoGroupRemoval = this._autoGroupRemoval;
576
+ }
577
+ if(this._autoGroupHiding) {
578
+ extOptions.autoGroupHiding = this._autoGroupHiding;
579
+ }
580
+ if(this._predefinedGroups) {
581
+ extOptions.predefinedGroups = this._predefinedGroups;
582
+ }
583
+ var criterion = this._criteria.filter(isNonFunction);
584
+ if(criterion.length) {
585
+ extOptions.groupBy = criterion;
586
+ }
587
+ if(this._displayColumn > 0) {
588
+ extOptions.displayColumn = this._displayColumn;
589
+ }
590
+ if(this._fixedDisplayColumn >= 0) {
591
+ extOptions.fixedDisplayColumn = true;
592
+ }
593
+ if (this._noCollapsible) {
594
+ extOptions.noCollapsible = this._noCollapsible;
595
+ }
596
+ extOptions.clickableCell = this._clickableCell;
597
+ if(this._hiddenArrow) {
598
+ if(this._hiddenArrow === true) {
599
+ extOptions.hiddenArrow = true;
600
+ } else {
601
+ var hiddenArrows = extOptions.hiddenArrow = [];
602
+ for(var key in this._hiddenArrow) {
603
+ hiddenArrows.push(+key);
604
+ }
605
+ }
606
+ }
607
+ if(this._contentAsHeader) {
608
+ extOptions.contentAsHeader = this._contentAsHeader;
609
+ }
610
+ if(!this._headerSpanning) {
611
+ extOptions.headerSpanning = this._headerSpanning;
612
+ }
613
+ if(this._footerSpanning) {
614
+ extOptions.headerSpanning = this._footerSpanning;
615
+ }
616
+ if(this._autoGroupSorting) {
617
+ extOptions.autoGroupSorting = this._autoGroupSorting;
618
+ }
619
+ extOptions.indentSize = this._indentSize;
620
+
621
+ if(this._colorTag != null) {
622
+ extOptions.colorTag = this._colorTag;
623
+ }
624
+
625
+ return obj;
626
+ };
627
+
628
+ /** Function for ColumnMenuExtension to collect config of column menu
629
+ * @public
630
+ * @param {number} colIndex Column index
631
+ * @param {Object} config Column Menu configuration
632
+ * @return {!Object}
633
+ */
634
+ RowGroupingPlugin.prototype.getColumnMenu = function (colIndex, config) {
635
+ if (!config) {
636
+ config = {};
637
+ }
638
+
639
+ var menus = config.menus;
640
+ if (!menus) {
641
+ menus = config.menus = [];
642
+ }
643
+
644
+ var menu = menus[0];
645
+ if (!menu) {
646
+ menu = menus[0] = {
647
+ menuItems: []
648
+ };
649
+ }
650
+
651
+ // Menu items for this extension
652
+ var field = this._getField(colIndex);
653
+ var isGrouping = this.hasGroupingCriteria();
654
+ var extMenuItems = [{
655
+ indexScore: 200,
656
+ label: "Group",
657
+ group: "FREQUENTLY_USED",
658
+ subMenu: {
659
+ menuItems: [{
660
+ indexScore: 220,
661
+ label: "Expand All",
662
+ group: "FREQUENTLY_USED",
663
+ click: this._onItemExpandAllClicked,
664
+ disabled: !isGrouping
665
+ }, {
666
+ indexScore: 210,
667
+ label: "Collapse All",
668
+ group: "FREQUENTLY_USED",
669
+ click: this._onItemCollapseAllClicked,
670
+ disabled: !isGrouping
671
+ }]
672
+ }
673
+ }];
674
+
675
+ if (!this._hasInGroupCriteria(field)) {
676
+ extMenuItems[0].subMenu.menuItems.push({
677
+ indexScore: 230,
678
+ label: "Group by This Column",
679
+ group: "FREQUENTLY_USED",
680
+ value: { colIndex: colIndex },
681
+ click: this._onItemGroupColumnClicked
682
+ });
683
+ } else {
684
+ extMenuItems[0].subMenu.menuItems.push({
685
+ indexScore: 230,
686
+ label: "Un-Group by This Column",
687
+ group: "FREQUENTLY_USED",
688
+ value: { colIndex: colIndex },
689
+ click: this._onItemUnGroupColumnClicked
690
+ });
691
+ }
692
+
693
+ // Push menu items to config
694
+ Array.prototype.push.apply(menu.menuItems, extMenuItems);
695
+
696
+ return config;
697
+ };
698
+
699
+ /** @private
700
+ * @param {Object} e
701
+ */
702
+ RowGroupingPlugin.prototype._onItemGroupColumnClicked = function (e) {
703
+ var field = this._getField(e.currentTarget.value.colIndex);
704
+ this._addGroup(field);
705
+ this._hideColumnMenu();
706
+ };
707
+
708
+ /** @private
709
+ * @param {Object} e
710
+ */
711
+ RowGroupingPlugin.prototype._onItemUnGroupColumnClicked = function (e) {
712
+ var field = this._getField(e.currentTarget.value.colIndex);
713
+ this._ungroup(field);
714
+ this._hideColumnMenu();
715
+ };
716
+
717
+ /** @private
718
+ * @param {Object} e
719
+ */
720
+ RowGroupingPlugin.prototype._onItemExpandAllClicked = function (e) {
721
+ this.expandAll();
722
+ this._hideColumnMenu();
723
+ };
724
+
725
+ /** @private
726
+ * @param {Object} e
727
+ */
728
+ RowGroupingPlugin.prototype._onItemCollapseAllClicked = function (e) {
729
+ this.collapseAll();
730
+ this._hideColumnMenu();
731
+ };
732
+
733
+ /** @private
734
+ */
735
+ RowGroupingPlugin.prototype._hideColumnMenu = function () {
736
+ var host = this._hosts[0];
737
+ var columnMenuExt = host.getPlugin('ColumnMenuPlugin');
738
+ if (columnMenuExt) columnMenuExt.hide();
739
+ };
740
+
741
+ /** @private
742
+ * @param {string} field
743
+ */
744
+ RowGroupingPlugin.prototype._addGroup = function (field) {
745
+ var criteria = this.getGroupingCriteria();
746
+ var index = criteria.indexOf(field);
747
+ if (index < 0) {
748
+ criteria.push(field);
749
+ }
750
+ this._dirty = true;
751
+ this._applyGrouping();
752
+ };
753
+
754
+ /** @private
755
+ * @param {string} field
756
+ */
757
+ RowGroupingPlugin.prototype._ungroup = function (field) {
758
+ var criteria = this.getGroupingCriteria();
759
+ var index = criteria.indexOf(field);
760
+ if (index >= 0) {
761
+ criteria.splice(index, 1);
762
+ }
763
+ this._dirty = true;
764
+ this._applyGrouping();
765
+ };
766
+
767
+ /** @public
768
+ * @return {!Array.<string>}
769
+ */
770
+ RowGroupingPlugin.prototype.getGroupingCriteria = function () {
771
+ return this._criteria;
772
+ };
773
+ /** @public
774
+ * @return {boolean}
775
+ */
776
+ RowGroupingPlugin.prototype.hasGroupingCriteria = function () {
777
+ return this._criteria.length > 0;
778
+ };
779
+
780
+ /** Check specific field is in group criteria
781
+ * @private
782
+ * @param {string} field
783
+ * @return {boolean}
784
+ */
785
+ RowGroupingPlugin.prototype._hasInGroupCriteria = function (field) {
786
+ return this._criteria.indexOf(field) >= 0;
787
+ };
788
+
789
+ /** Each duplicate values in the given columns will be grouped together. Number of generated groups will equal to number of unique values in the given columns.
790
+ * @public
791
+ * @param {RowGroupingPlugin~GroupCriteria} criteria <br>
792
+ * Null input will clear all existing grouping criteria. <br>
793
+ * String input is treat as column name in data table <br>
794
+ * Array input will create mutilple groups in tree like manner (nested group criteria) <br>
795
+ * Any previous given values will be cleared out after calling this method
796
+ */
797
+ RowGroupingPlugin.prototype.setGroupingCriteria = function (criteria) {
798
+ if (this._criteria.length > 0) {
799
+ this._dirty = true;
800
+ this._criteria.length = 0;
801
+ }
802
+ if ((typeof criteria === "string") || (typeof criteria === "function")) {
803
+ this._dirty = true;
804
+ this._criteria.push(/** @type{string|Function} */(criteria));
805
+ } else if (Array.isArray(criteria)) {
806
+ this._dirty = true;
807
+ this._criteria = /** @type{!Array.<string>} */(criteria.concat());
808
+ }
809
+
810
+ this._applyGrouping();
811
+ };
812
+ /** Alias for {@link RowGroupingPlugin#setGroupingCriteria}
813
+ * @public
814
+ * @function
815
+ * @param {RowGroupingPlugin~GroupCriteria} criteria
816
+ * @see {@link RowGroupingPlugin#setGroupingCriteria}
817
+ */
818
+ RowGroupingPlugin.prototype.groupBy = RowGroupingPlugin.prototype.setGroupingCriteria;
819
+
820
+ /** @private */
821
+ RowGroupingPlugin.prototype._applyGrouping = function () {
822
+ if (!this._dirty || !this._criteriaGetter) {
823
+ return;
824
+ }
825
+
826
+ var dv = this.getDataView();
827
+ if (!dv) {
828
+ return;
829
+ }
830
+ if(typeof dv.enableContentAsHeader === "function") {
831
+ dv.enableContentAsHeader(this._contentAsHeader);
832
+ }
833
+ if (this._criteria.length) {
834
+ dv.listen("groupCriteriaChanged", this._onGroupCriteriaChanged);
835
+ dv.listen("groupAdded", this._onGroupAdded);
836
+ dv.listen("beforeGroupAdded", this._onBeforeGroupAdded);
837
+
838
+ if (this._autoGroupRemoval && dv.enableAutoGroupRemoval) {
839
+ dv.enableAutoGroupRemoval();
840
+ }
841
+ if (this._autoGroupHiding && dv.enableAutoGroupHiding) {
842
+ dv.enableAutoGroupHiding();
843
+ }
844
+ if (this._predefinedGroups) {
845
+ dv.setPredefinedGroups(this._predefinedGroups);
846
+ }
847
+
848
+ this._criteriaFuncs = this._criteria.map(this._onMapCriteria);
849
+ dv.groupBy(this._criteriaFuncs);
850
+ this.sortGroups();
851
+ } else {
852
+ this._clearSectionStyles(this._headerColumn);
853
+ dv.groupBy(null);
854
+ }
855
+
856
+ this._dirty = false;
857
+ };
858
+ /** @public
859
+ * @return {Object} DataView instance
860
+ */
861
+ RowGroupingPlugin.prototype.getDataView = function () {
862
+ var host = this._hosts[0];
863
+ if (host) {
864
+ return host.getDataSource();
865
+ }
866
+ return null;
867
+ };
868
+
869
+ /** @public
870
+ * @param {RowGroupingPlugin~GroupSortLogic} sortFunction Comparer function for comparing the order of 2 groups. The function should take at least 2 parameters. <br>
871
+ * The function should return -1 if the first parameter should comes first, 1 for the other way, and 0 if they are equal. <br>
872
+ * The two first parameters passed to the function are group value that separates group. <br>
873
+ * The two last parameters passed to the function are data views of corresponding group.
874
+ * @example
875
+ * var compare = function(grpA, grpB, dataViewA, dataViewB) {
876
+ * return (grpA <= grpB) ? -1 : 1;
877
+ * }
878
+ * var dstp = new RowGroupingExtension();
879
+ * dstp.setGroupSortingLogic(compare);
880
+ */
881
+ RowGroupingPlugin.prototype.setGroupSortingLogic = function (sortFunction) {
882
+ this._groupSortFunction = sortFunction;
883
+ };
884
+
885
+ /** Get the current group sort function. If none specified by setGroupSortingLogic() return <br>
886
+ * standard string sort function.
887
+ * @public
888
+ * @return {Function}
889
+ */
890
+ RowGroupingPlugin.prototype.getGroupSortingLogic = function () {
891
+ if (this._groupSortFunction) {
892
+ return this._groupSortFunction;
893
+ } else {
894
+ return RowGroupingPlugin._standardGroupSortFunction; // WARNING: To external method
895
+ }
896
+ };
897
+
898
+ /** Specify empty group in case of grouping values are known prior to requesting data
899
+ * @public
900
+ * @param {Array|Array.<Array>} predefinedGroups <br>
901
+ * Values in the given array should be matched the value coming from a data table, or else no content is added to the group <br>
902
+ * Use null value to clear all predefined groups. <br>
903
+ * Use 2D array to specify nested groups. <br>
904
+ * Any previous given values will be cleared out after calling this method
905
+ */
906
+ RowGroupingPlugin.prototype.setPredefinedGroups = function (predefinedGroups) {
907
+ if (predefinedGroups && !Array.isArray(predefinedGroups)) {
908
+ return;
909
+ }
910
+ this._predefinedGroups = predefinedGroups;
911
+
912
+ var dv = this.getDataView();
913
+ if (dv) {
914
+ dv.setPredefinedGroups(this._predefinedGroups);
915
+ }
916
+ };
917
+
918
+ /** Trigger group sorting logic -- re-sort the existing groups. This will not continuously apply to each data update.
919
+ * @public
920
+ */
921
+ RowGroupingPlugin.prototype.sortGroups = function () {
922
+ this._sortingTimer = 0;
923
+ if (this._groupSortFunction) {
924
+ var dv = this.getDataView();
925
+ if (dv) {
926
+ dv.sortGroups(this._groupSortFunction);
927
+ }
928
+ }
929
+ };
930
+
931
+ /** @private
932
+ * @param {Object} e
933
+ */
934
+ RowGroupingPlugin.prototype._onPostSectionDataBinding = function (e) {
935
+ if (!this._disabled) {
936
+
937
+ this._updateHeader(
938
+ e.sectionSettings,
939
+ e.fromRowIndex,
940
+ e.toRowIndex - 1
941
+ );
942
+ }
943
+ };
944
+
945
+ /** @private
946
+ * @param {*} valA
947
+ * @param {*} valB
948
+ * @return {number}
949
+ */
950
+ RowGroupingPlugin._standardGroupSortFunction = function (valA, valB) {
951
+ var strA = "" + valA;
952
+ var strB = "" + valB;
953
+ if (strA < strB) {
954
+ return -1;
955
+ }
956
+ if (strA > strB) {
957
+ return 1;
958
+ }
959
+ return 0;
960
+ };
961
+
962
+ /** @private
963
+ * @param {Object=} dv DataView
964
+ * @return {boolean}
965
+ */
966
+ RowGroupingPlugin.prototype._isArrowHidden = function(dv) {
967
+ if (this._hiddenArrow && dv) { // Object or boolean
968
+ if (this._hiddenArrow === true) {
969
+ return true;
970
+ } else { // Object map
971
+ var lvl = dv.getGroupLevel();
972
+ if (this._hiddenArrow[lvl]) {
973
+ return true;
974
+ }
975
+ }
976
+ }
977
+ return false;
978
+ };
979
+
980
+ /** @private
981
+ * @param {Object} settings SectionSettings
982
+ * @return {boolean}
983
+ */
984
+ RowGroupingPlugin.prototype._hasGroupHeader = function (settings) {
985
+ if (settings && settings.getType() === "content") {
986
+ var dv = settings.getDataSource();
987
+ if (dv) {
988
+ return dv.hasGroup();
989
+ }
990
+ }
991
+ return false;
992
+ };
993
+
994
+ /** @private
995
+ * @param {number} colIndex
996
+ */
997
+ RowGroupingPlugin.prototype._clearSectionStyles = function (colIndex) {
998
+ var host = this._hosts[0];
999
+ if (!host || !(colIndex >= 0)) {
1000
+ return;
1001
+ }
1002
+ // TODO: Optimize by checking isHeaderColumn flag
1003
+
1004
+ var sections = host.getAllSections("content");
1005
+ var rowPainter = this._rowPainter;
1006
+ for (var i = sections.length; --i >= 0;) {
1007
+ var section = sections[i];
1008
+
1009
+ var fi = section.getFirstIndexInView();
1010
+ var li = section.getLastIndexInView();
1011
+ for (var r = fi; r <= li; r++) {
1012
+ rowPainter.removeHeaderStyle(section, colIndex, r);
1013
+ }
1014
+ }
1015
+ };
1016
+
1017
+ /** retrive headerColumn index
1018
+ * @private
1019
+ * @return {number} headerColumn index, return -1 = not found
1020
+ */
1021
+ RowGroupingPlugin.prototype._getHeaderColumnIndex = function () {
1022
+ var colCount = this.getColumnCount();
1023
+ for (var columnIndex = 0; columnIndex < colCount; columnIndex++) {
1024
+ if (this._getColumnOption(columnIndex, "isHeaderColumn")) {
1025
+ return columnIndex;
1026
+ }
1027
+ }
1028
+ return -1;
1029
+ };
1030
+
1031
+ /** @private
1032
+ * @param {Object} e
1033
+ */
1034
+ RowGroupingPlugin.prototype._onGroupCriteriaChanged = function (e) {
1035
+ var dv = e.sender;
1036
+
1037
+ if (dv.hasGroup()) {
1038
+ if (this._fixedDisplayColumn < 0 // no fixed index
1039
+ || this._displayColumn < 0 || this._displayColumn >= this.getColumnCount() // _displayColumn not in range of column
1040
+ || this._getHeaderColumnIndex() < 0 // and not found headerColumn
1041
+ ) {
1042
+ // reset _displayColumn = 0 and updatDisplayColumn
1043
+ // this._displayColumn = 0;
1044
+ this._shouldUpdateDisplayColumn = true;
1045
+ this._updateDisplayColumn();
1046
+ }
1047
+ } else {
1048
+ // if not have group then we will clear display column
1049
+ this._shouldUpdateDisplayColumn = true;
1050
+ this._updateDisplayColumn();
1051
+ }
1052
+ };
1053
+ /** @private
1054
+ * @param {Object} e
1055
+ */
1056
+ RowGroupingPlugin.prototype._onGroupAdded = function (e) {
1057
+ if (this._footerRows) {
1058
+ e.newGroup.addFooter(this._footerRows);
1059
+ }
1060
+ this._dispatch("groupAdded", e);
1061
+
1062
+ if (this._autoGroupSorting) {
1063
+ if (!this._sortingTimer) {
1064
+ this._sortingTimer = setTimeout(this.sortGroups, 100);
1065
+ }
1066
+ }
1067
+ };
1068
+ /** @private
1069
+ * @param {Object} e
1070
+ */
1071
+ RowGroupingPlugin.prototype._onBeforeGroupAdded = function (e) {
1072
+ if (this._contentAsHeader) {
1073
+ if (e.dataView.getGroupLevel() >= this._criteria.length - 1) {
1074
+ e.hideHeaderRow = true;
1075
+ }
1076
+ }
1077
+ this._dispatch("beforeGroupAdded", e);
1078
+ };
1079
+
1080
+ /** @private
1081
+ * @return {number}
1082
+ */
1083
+ RowGroupingPlugin.prototype._updateDisplayColumn = function () {
1084
+ if (this._shouldUpdateDisplayColumn) {
1085
+ this._shouldUpdateDisplayColumn = false;
1086
+
1087
+ var host = this._hosts[0];
1088
+ var c, colCount = host.getColumnCount();
1089
+ this._headerColumn = this._getHeaderColumnIndex();
1090
+
1091
+ if (this._displayColumn < 0) {
1092
+ if (this._headerColumn < 0) { // if header column not found we will use column field instead
1093
+ for (c = 0; c < colCount; ++c) {
1094
+ if (this._headerColumnField === this._getField(c)) {
1095
+ this._displayColumn = c;
1096
+ break;
1097
+ }
1098
+ }
1099
+ } else {
1100
+ this._displayColumn = this._headerColumn;
1101
+ }
1102
+ }
1103
+
1104
+ var tgtHeaderColumn = -1;
1105
+ if (this._displayColumn >= 0) {
1106
+ for (c = this._displayColumn; c < colCount; ++c) {
1107
+ if (host.isColumnVisible(c)) {
1108
+ if (!this._getColumnOption(c, "isCheckboxColumn")) {
1109
+ tgtHeaderColumn = c;
1110
+ break;
1111
+ }
1112
+ }
1113
+ }
1114
+ }
1115
+
1116
+ if (this._headerColumn !== tgtHeaderColumn) {
1117
+ this._clearSectionStyles(this._headerColumn);
1118
+ if (this._headerColumn >= 0) {
1119
+ var colData = this._getColumnData(this._headerColumn);
1120
+ if (colData) {
1121
+ colData.isHeaderColumn = false;
1122
+ }
1123
+ }
1124
+
1125
+ if (tgtHeaderColumn >= 0) {
1126
+ colData = this._newColumnData(tgtHeaderColumn);
1127
+ colData.isHeaderColumn = true;
1128
+ this._headerColumnField = this._getField(tgtHeaderColumn);
1129
+ }
1130
+ this._headerColumn = tgtHeaderColumn;
1131
+ }
1132
+ }
1133
+
1134
+ return this._headerColumn;
1135
+ };
1136
+
1137
+ /** TODO: Need to support when column reordered
1138
+ * @private
1139
+ * @param {Object} settings SectionSettings
1140
+ * @param {number=} firstRowIndex
1141
+ * @param {number=} lastRowIndex INCLUSIVE
1142
+ */
1143
+ RowGroupingPlugin.prototype._updateHeader = function (settings, firstRowIndex, lastRowIndex) {
1144
+ if (!this._hasGroupHeader(settings)) {
1145
+ return;
1146
+ }
1147
+
1148
+ var headerColumn = this._updateDisplayColumn();
1149
+ if (headerColumn < 0) {
1150
+ return;
1151
+ } else if (!this._getColumnOption(headerColumn, "isHeaderColumn")) {
1152
+ return; // Workaround: Newly inserted column doesn't have the flag
1153
+ }
1154
+
1155
+ var dataSource = settings.getDataSource();
1156
+ var section = settings.getSection();
1157
+ var fi = (firstRowIndex != null) ? firstRowIndex : section.getFirstIndexInView();
1158
+ var li = (lastRowIndex != null) ? lastRowIndex : section.getLastIndexInView();
1159
+ var rowsForContentHeader = this._getRowsForContentAsHeader();
1160
+
1161
+ var maxColWidth = -1; // -1 means no limit
1162
+ var colCell = section.getCell(headerColumn, 0, false);
1163
+ if (!this._headerSpanning && colCell) {
1164
+ maxColWidth = colCell.getWidth() - 27; // Ensure padding will subtract icon width (25px for halo, 27px for solar)
1165
+ }
1166
+
1167
+ var colCount = section.getColumnCount();
1168
+ var nonGroupListener = this.hasListener("nonGroupBinding");
1169
+ var curGroupLevel = dataSource.getGroupLevel(fi);
1170
+ var arg = {
1171
+ section: section,
1172
+ colCount: colCount
1173
+ };
1174
+ var currentGroup;
1175
+ var needCal = this._autoGroupHiding || this._contentAsHeader;
1176
+
1177
+ for (var c = 0; c < colCount; c++) {
1178
+ if(this._getColumnOption(c, "isCheckboxColumn")) {
1179
+ arg.checkboxColumnIndex = c;
1180
+ break;
1181
+ }
1182
+ }
1183
+
1184
+ var rowPainter = this._rowPainter;
1185
+ for (var r = fi; r <= li; r++) {
1186
+ var indentOffset = 0;
1187
+ var rowId = dataSource.getRowId(r); // Slow
1188
+ var cell = section.getCell(headerColumn, r, false); // Work only one row
1189
+ if (!cell) { // There may be no header to be updated
1190
+ continue;
1191
+ }
1192
+
1193
+ arg.cell = cell;
1194
+ arg.rowIndex = r;
1195
+ arg.colIndex = headerColumn;
1196
+ arg.rowId = rowId;
1197
+ arg.rowData = this._rowGetter(dataSource.getRowData(rowId));
1198
+ arg.noIndent = false;
1199
+
1200
+ rowPainter.removeHeaderStyle(section, headerColumn, r);
1201
+ var groupView = dataSource.getGroupByRowId(rowId);
1202
+ if (groupView) { // Header Render
1203
+ currentGroup = groupView;
1204
+ curGroupLevel = groupView.getGroupLevel();
1205
+
1206
+ arg.footerIndex = groupView.getFooterRowIndex(rowId);
1207
+ var footerRow = arg.footerRow = (arg.footerIndex >= 0);
1208
+ arg.groupId = groupView.getGroupId();
1209
+ arg.dataSource = groupView;
1210
+ arg.collapsed = groupView.isCollapsed();
1211
+
1212
+ arg.hiddenArrow = (footerRow || this._isArrowHidden(groupView)) ? true : false;
1213
+ } else { // Content Render
1214
+ if(needCal) {
1215
+ currentGroup = dataSource.getGroup(rowId); // Slow
1216
+ curGroupLevel = currentGroup.getGroupLevel();
1217
+ }
1218
+
1219
+ var grp = rowsForContentHeader[rowId];
1220
+ if (grp || nonGroupListener) {
1221
+ arg.dataSource = dataSource;
1222
+ arg.footerIndex = null;
1223
+ arg.groupId = null;
1224
+
1225
+ if (grp) {
1226
+ arg.collapsed = grp.isCollapsed();
1227
+ rowPainter.applyContentAsHeaderStyle(arg);
1228
+ }
1229
+
1230
+ if (nonGroupListener) {
1231
+ arg.rowData = this._rowGetter(dataSource.getRowData(rowId));
1232
+ }
1233
+ }
1234
+ if (grp) { // In contentHeader mode indent in contentHeader will same the parent header when group level 2
1235
+ indentOffset = -2;
1236
+ } else {
1237
+ // In contentHeader mode with 1 level the content indent more than contentHeader 1
1238
+ if(this._contentAsHeader && this._criteria.length > 1) {
1239
+ indentOffset = -1;
1240
+ }
1241
+ }
1242
+ }
1243
+
1244
+ arg.groupLevel = curGroupLevel;
1245
+
1246
+ var rowLevel;
1247
+ var nonGroupRow = this._autoGroupHiding && currentGroup.getGroupValue() == null && curGroupLevel === 1 && !this._contentAsHeader;
1248
+ arg.nonGroupRow = nonGroupRow;
1249
+
1250
+ if (arg.noIndent || nonGroupRow) { // if user specific indent level, and if group hidden
1251
+ rowLevel = 0;
1252
+ } else if (groupView) { // group header
1253
+ rowLevel = curGroupLevel - 1;
1254
+ } else { // content
1255
+ rowLevel = curGroupLevel + indentOffset; // content have indent more than header 1
1256
+ if(rowLevel < 0) {
1257
+ rowLevel = 0;
1258
+ }
1259
+ }
1260
+
1261
+ var indentSize = this._indentSize[rowLevel];
1262
+ if (indentSize == null) {
1263
+ var len = this._indentSize.length;
1264
+ indentSize = this._indentSize[len - 1];
1265
+ }
1266
+ if (maxColWidth > -1 && maxColWidth < indentSize) {
1267
+ indentSize = maxColWidth;
1268
+ }
1269
+
1270
+ arg.indentSize = indentSize;
1271
+
1272
+ if (groupView) {
1273
+ rowPainter.applyHeaderStyle(arg);
1274
+ this._dispatch(footerRow ? "groupFooterBinding" : "groupHeaderBinding", arg);
1275
+ } else {
1276
+ rowPainter.applyRowStyle(arg);
1277
+ this._dispatch("nonGroupBinding", arg);
1278
+ }
1279
+ }
1280
+ if(!this._updateCursorTimer) {
1281
+ this._updateCursorTimer = setTimeout(this._updateCursor, 100);
1282
+ }
1283
+ };
1284
+
1285
+ /** @private
1286
+ * @return {Object}
1287
+ */
1288
+ RowGroupingPlugin.prototype._getRowsForContentAsHeader = function () {
1289
+ if (!this._contentAsHeader) return {};
1290
+
1291
+ var result = {};
1292
+ var dv = this.getDataView();
1293
+ var allGroups = dv.getAllGroups();
1294
+ for (var grpId in allGroups) {
1295
+ var grp = allGroups[grpId];
1296
+ if (!grp.hasGroup()) { // Deepest level group
1297
+ var firstRowId = grp.getAllRowIds()[0]; // Prepare first row in group for contentAsHeader mode to use.
1298
+ if (firstRowId) {
1299
+ result[firstRowId] = grp;
1300
+ }
1301
+ }
1302
+ }
1303
+ return result;
1304
+ };
1305
+
1306
+ /** @private
1307
+ * @param {Object} e
1308
+ */
1309
+ RowGroupingPlugin.prototype._onColumnIndexChanged = function (e) {
1310
+ if (this._fixedDisplayColumn >= 0) {
1311
+ this._displayColumn = this._fixedDisplayColumn;
1312
+ this.updateHeaders(); // Instant updating
1313
+ } else {
1314
+ if (this._headerColumn >= 0) {
1315
+ this._displayColumn = -1; // Index will move along current display
1316
+ }
1317
+ if (!this._timerId) {
1318
+ this._timerId = setTimeout(this.updateHeaders, 50);
1319
+ }
1320
+ }
1321
+ };
1322
+
1323
+ /** @public */
1324
+ RowGroupingPlugin.prototype.updateHeaders = function () {
1325
+ this._timerId = 0;
1326
+ this._shouldUpdateDisplayColumn = true;
1327
+ var host = this._hosts[0];
1328
+ if (!host || this._disabled) {
1329
+ return;
1330
+ }
1331
+
1332
+ var settingList = host.getAllSectionSettings("content");
1333
+ for (var i = settingList.length; --i >= 0;) {
1334
+ this._updateHeader(settingList[i]);
1335
+ }
1336
+ };
1337
+
1338
+ /** @private
1339
+ * @param {string} rowId
1340
+ * @param {boolean=} opt_collapsed=true
1341
+ */
1342
+ RowGroupingPlugin.prototype._collapseDataRowId = function (rowId, opt_collapsed) {
1343
+ var dv = this.getDataView();
1344
+ if (dv) {
1345
+ var rowsForContentHeader = this._getRowsForContentAsHeader();
1346
+ var grp = rowsForContentHeader[rowId];
1347
+ if (grp) {
1348
+ grp.collapse(opt_collapsed);
1349
+ }
1350
+ }
1351
+ };
1352
+
1353
+ /** @private
1354
+ * @param {MouseEvent} e
1355
+ */
1356
+ RowGroupingPlugin.prototype._onCellClicked = function (e) {
1357
+ if (this._clickDisabled) { return; }
1358
+
1359
+ var changed = false;
1360
+ var host = this._hosts[0];
1361
+ var info = host.getRelativePosition(e);
1362
+ var cellElem = info.cell ? info.cell.getElement() : null;
1363
+ if(!cellElem) {
1364
+ return;
1365
+ }
1366
+
1367
+ var collapsed = cellElem.classList.contains("closed");
1368
+ var rowIndex = info.rowIndex;
1369
+ var settings = info.sectionSettings;
1370
+
1371
+ var dv = settings.getDataSource();
1372
+ var rowId = dv.getRowId(rowIndex);
1373
+ var grpView = dv.getGroupByRowId(rowId);
1374
+ if (grpView) {
1375
+ changed = true;
1376
+ grpView.collapse(!collapsed);
1377
+ } else if (this._contentAsHeader) {
1378
+ changed = true;
1379
+ this._collapseDataRowId(rowId, !collapsed);
1380
+ }
1381
+ if (changed) {
1382
+ if (collapsed) {
1383
+ cellElem.classList.remove("closed");
1384
+ } else {
1385
+ cellElem.classList.add("closed");
1386
+ }
1387
+ }
1388
+
1389
+ info.expanded = collapsed; // After toggled
1390
+ info.group = grpView;
1391
+ this._dispatch("clicked", info);
1392
+ };
1393
+
1394
+ /** @private */
1395
+ RowGroupingPlugin.prototype._updateCursor = function () {
1396
+ var host = this._hosts[0]; // TODO: Make this work for multi-table
1397
+ if (host) {
1398
+ var disableExpander = false;
1399
+ var disableFolder = false;
1400
+ if (!this._clickableCell) {
1401
+ disableFolder = true;
1402
+ }
1403
+ if (this._clickDisabled) {
1404
+ disableExpander = true;
1405
+ disableFolder = true;
1406
+ }
1407
+ if (disableExpander) {
1408
+ host.addClass("expander-disabled");
1409
+ } else {
1410
+ host.removeClass("expander-disabled");
1411
+ }
1412
+ if (disableFolder) {
1413
+ host.addClass("folder-disabled");
1414
+ } else {
1415
+ host.removeClass("folder-disabled");
1416
+ }
1417
+ }
1418
+ this._updateCursorTimer = 0;
1419
+ };
1420
+
1421
+ /** @private
1422
+ * @param {string|Function} field
1423
+ * @return {Function} Row data
1424
+ */
1425
+ RowGroupingPlugin.prototype._onMapCriteria = function (field) {
1426
+ if (typeof field === "string") {
1427
+ return this._criteriaGetter.bind(null, field);
1428
+ }
1429
+ return field;
1430
+ };
1431
+
1432
+ /** @public
1433
+ * @param {boolean=} opt_expanded
1434
+ */
1435
+ RowGroupingPlugin.prototype.expandAll = function (opt_expanded) {
1436
+ this.collapseAll(opt_expanded === false);
1437
+ };
1438
+
1439
+ /** @public
1440
+ * @param {boolean=} opt_collapsed
1441
+ */
1442
+ RowGroupingPlugin.prototype.collapseAll = function (opt_collapsed) {
1443
+ var dv = this.getDataView();
1444
+ if (dv) {
1445
+ dv.collapseAllGroups(opt_collapsed);
1446
+ }
1447
+ };
1448
+
1449
+ /** @public
1450
+ * @param {string} groupRowId
1451
+ * @param {boolean=} opt_expanded
1452
+ */
1453
+ RowGroupingPlugin.prototype.expand = function (groupRowId, opt_expanded) {
1454
+ this.collapse(groupRowId, opt_expanded === false);
1455
+ };
1456
+ /** @public
1457
+ * @param {string} groupRowId
1458
+ * @param {boolean=} opt_collapsed
1459
+ */
1460
+ RowGroupingPlugin.prototype.collapse = function (groupRowId, opt_collapsed) {
1461
+ var dv = this.getDataView();
1462
+ if (dv) {
1463
+ var grp = dv.getGroup(groupRowId);
1464
+ if (grp) {
1465
+ grp.collapse(opt_collapsed);
1466
+ }
1467
+ }
1468
+ };
1469
+
1470
+ /** @public
1471
+ * @param {boolean=} opt_disabled
1472
+ */
1473
+ RowGroupingPlugin.prototype.disableClicking = function (opt_disabled) {
1474
+ this._clickDisabled = opt_disabled !== false;
1475
+ this._updateCursor();
1476
+ };
1477
+
1478
+ /** Returns an array of states (collapsed or expanded)
1479
+ * @public
1480
+ * @returns {Array.<RowGroupingPlugin~GroupingState>}
1481
+ */
1482
+ RowGroupingPlugin.prototype.getGroupingStates = function () {
1483
+ var dv = this.getDataView();
1484
+
1485
+ return dv.getAllGroups().map(function (group) {
1486
+ return {
1487
+ groupId: group.getGroupId(),
1488
+ collapsed: group.isCollapsed()
1489
+ };
1490
+ });
1491
+ };
1492
+
1493
+ /** Set state for groups
1494
+ * @public
1495
+ * @param {Array.<RowGroupingPlugin~GroupingState>|string} states Array state of groupings or JSON String
1496
+ */
1497
+ RowGroupingPlugin.prototype.setGroupingStates = function (states) {
1498
+ if (typeof states === 'string') {
1499
+ states = JSON.parse(states);
1500
+ }
1501
+
1502
+ for (var i = 0; i < states.length; i++) {
1503
+ var state = states[i];
1504
+ var groupRowId = state.groupId == null ? i : state.groupId;
1505
+ this.collapse(groupRowId, state.collapsed);
1506
+ }
1507
+ };
1508
+
1509
+ /** Fixed display column to stay at the same position even though the column has been moved, or shifted by removing and inserting column
1510
+ * @public
1511
+ * @param {boolean=} opt_enabled
1512
+ */
1513
+ RowGroupingPlugin.prototype.enableFixedDisplayColumn = function (opt_enabled) {
1514
+ this._fixedDisplayColumn = (opt_enabled !== false) ? this._displayColumn : -1;
1515
+ };
1516
+
1517
+ /** @public
1518
+ * @param {(boolean|number)=} opt_num
1519
+ */
1520
+ RowGroupingPlugin.prototype.enableFooterRow = function (opt_num) {
1521
+ if(opt_num == null || opt_num === true) {
1522
+ opt_num = 1;
1523
+ } else if(opt_num <= 0) { // Including false and null
1524
+ opt_num = 0;
1525
+ }
1526
+
1527
+ this._footerRows = /** @type{number} */(opt_num);
1528
+ };
1529
+
1530
+ /** @function
1531
+ * @param {Object} obj
1532
+ * @return {boolean}
1533
+ */
1534
+ function isNonFunction(obj) {
1535
+ return obj ? (typeof obj !== "function") : false;
1536
+ }
1537
+
1538
+
1539
+
1540
+ export default RowGroupingPlugin;
1541
+ export { RowGroupingPlugin, RowGroupingPlugin as RowGrouping, RowGroupingPlugin as RowGroupingExtension };