@refinitiv-ui/efx-grid 0.0.0-dev.12023565035.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (864) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +61 -0
  3. package/lib/column-dragging/es6/ColumnDragging.d.ts +51 -0
  4. package/lib/column-dragging/es6/ColumnDragging.js +968 -0
  5. package/lib/column-dragging/es6/index.d.ts +1 -0
  6. package/lib/column-dragging/es6/index.js +1 -0
  7. package/lib/column-format-dialog/index.d.ts +2 -0
  8. package/lib/column-format-dialog/index.js +2 -0
  9. package/lib/column-format-dialog/lib/column-format-dialog.d.ts +77 -0
  10. package/lib/column-format-dialog/lib/column-format-dialog.js +2688 -0
  11. package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
  12. package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
  13. package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
  14. package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
  15. package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
  16. package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
  17. package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  18. package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
  19. package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
  20. package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
  21. package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
  22. package/lib/column-format-dialog/lib/locale/translation.js +18 -0
  23. package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
  24. package/lib/column-format-dialog/lib/preview-table.js +982 -0
  25. package/lib/column-format-dialog/themes/base.less +429 -0
  26. package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
  27. package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
  28. package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  29. package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
  30. package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
  31. package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
  32. package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  33. package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
  34. package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
  35. package/lib/column-format-dialog/themes/elemental/index.less +5 -0
  36. package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
  37. package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
  38. package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
  39. package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
  40. package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
  41. package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  42. package/lib/column-format-dialog/themes/elemental/light.js +16 -0
  43. package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
  44. package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
  45. package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
  46. package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
  47. package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
  48. package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
  49. package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  50. package/lib/column-format-dialog/themes/halo/dark.js +16 -0
  51. package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
  52. package/lib/column-format-dialog/themes/halo/index.less +5 -0
  53. package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
  54. package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
  55. package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
  56. package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
  57. package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
  58. package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
  59. package/lib/column-format-dialog/themes/halo/light.js +16 -0
  60. package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
  61. package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
  62. package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
  63. package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
  64. package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
  65. package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
  66. package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
  67. package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
  68. package/lib/column-format-dialog/themes/luna/index.less +5 -0
  69. package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
  70. package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  71. package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
  72. package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
  73. package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
  74. package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  75. package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
  76. package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
  77. package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
  78. package/lib/column-format-dialog/themes/solar/index.less +5 -0
  79. package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
  80. package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  81. package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
  82. package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
  83. package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
  84. package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  85. package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
  86. package/lib/column-selection-dialog/index.d.ts +2 -0
  87. package/lib/column-selection-dialog/index.js +2 -0
  88. package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +66 -0
  89. package/lib/column-selection-dialog/lib/column-selection-dialog.js +2034 -0
  90. package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
  91. package/lib/column-selection-dialog/lib/locale/translation-de.js +20 -0
  92. package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
  93. package/lib/column-selection-dialog/lib/locale/translation-en.js +20 -0
  94. package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
  95. package/lib/column-selection-dialog/lib/locale/translation-ja.js +20 -0
  96. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  97. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +20 -0
  98. package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
  99. package/lib/column-selection-dialog/lib/locale/translation-zh.js +20 -0
  100. package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
  101. package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
  102. package/lib/column-selection-dialog/themes/base.less +258 -0
  103. package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
  104. package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
  105. package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  106. package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
  107. package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
  108. package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
  109. package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  110. package/lib/column-selection-dialog/themes/elemental/dark.js +8 -0
  111. package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
  112. package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
  113. package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
  114. package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
  115. package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
  116. package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
  117. package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
  118. package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  119. package/lib/column-selection-dialog/themes/elemental/light.js +8 -0
  120. package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +25 -0
  121. package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
  122. package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
  123. package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
  124. package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
  125. package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
  126. package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  127. package/lib/column-selection-dialog/themes/halo/dark.js +8 -0
  128. package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
  129. package/lib/column-selection-dialog/themes/halo/index.less +6 -0
  130. package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
  131. package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
  132. package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
  133. package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
  134. package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
  135. package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
  136. package/lib/column-selection-dialog/themes/halo/light.js +8 -0
  137. package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
  138. package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  139. package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
  140. package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
  141. package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
  142. package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  143. package/lib/column-selection-dialog/themes/solar/charcoal.js +8 -0
  144. package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +5 -0
  145. package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
  146. package/lib/column-selection-dialog/themes/solar/index.less +6 -0
  147. package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
  148. package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  149. package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
  150. package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
  151. package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
  152. package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  153. package/lib/column-selection-dialog/themes/solar/pearl.js +8 -0
  154. package/lib/core/dist/core.css +1 -0
  155. package/lib/core/dist/core.js +33910 -0
  156. package/lib/core/dist/core.min.js +1 -0
  157. package/lib/core/es6/data/ColumnStats.d.ts +42 -0
  158. package/lib/core/es6/data/ColumnStats.js +428 -0
  159. package/lib/core/es6/data/DataCache.d.ts +43 -0
  160. package/lib/core/es6/data/DataCache.js +597 -0
  161. package/lib/core/es6/data/DataTable.d.ts +156 -0
  162. package/lib/core/es6/data/DataTable.js +2206 -0
  163. package/lib/core/es6/data/DataView.d.ts +332 -0
  164. package/lib/core/es6/data/DataView.js +4144 -0
  165. package/lib/core/es6/data/Segment.d.ts +91 -0
  166. package/lib/core/es6/data/Segment.js +1001 -0
  167. package/lib/core/es6/data/SegmentCollection.d.ts +84 -0
  168. package/lib/core/es6/data/SegmentCollection.js +713 -0
  169. package/lib/core/es6/data/WrappedView.d.ts +290 -0
  170. package/lib/core/es6/data/WrappedView.js +1320 -0
  171. package/lib/core/es6/grid/Core.d.ts +455 -0
  172. package/lib/core/es6/grid/Core.js +6196 -0
  173. package/lib/core/es6/grid/ILayoutGrid.d.ts +212 -0
  174. package/lib/core/es6/grid/ILayoutGrid.js +706 -0
  175. package/lib/core/es6/grid/LayoutGrid.d.ts +37 -0
  176. package/lib/core/es6/grid/LayoutGrid.js +2975 -0
  177. package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +28 -0
  178. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +1241 -0
  179. package/lib/core/es6/grid/components/Cell.d.ts +52 -0
  180. package/lib/core/es6/grid/components/Cell.js +826 -0
  181. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +21 -0
  182. package/lib/core/es6/grid/components/CellFloatingPanel.js +130 -0
  183. package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
  184. package/lib/core/es6/grid/components/CellSpan.js +99 -0
  185. package/lib/core/es6/grid/components/CellSpans.d.ts +40 -0
  186. package/lib/core/es6/grid/components/CellSpans.js +368 -0
  187. package/lib/core/es6/grid/components/Column.d.ts +22 -0
  188. package/lib/core/es6/grid/components/Column.js +618 -0
  189. package/lib/core/es6/grid/components/ElementWrapper.d.ts +127 -0
  190. package/lib/core/es6/grid/components/ElementWrapper.js +718 -0
  191. package/lib/core/es6/grid/components/HScrollbar.d.ts +28 -0
  192. package/lib/core/es6/grid/components/HScrollbar.js +241 -0
  193. package/lib/core/es6/grid/components/Scrollbar.d.ts +63 -0
  194. package/lib/core/es6/grid/components/Scrollbar.js +1413 -0
  195. package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
  196. package/lib/core/es6/grid/components/StretchedCells.js +342 -0
  197. package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
  198. package/lib/core/es6/grid/components/VScrollbar.js +139 -0
  199. package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
  200. package/lib/core/es6/grid/components/VirtualItems.js +51 -0
  201. package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
  202. package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
  203. package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
  204. package/lib/core/es6/grid/event/EventListeners.js +166 -0
  205. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +155 -0
  206. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1977 -0
  207. package/lib/core/es6/grid/util/CellBoundPainter.d.ts +16 -0
  208. package/lib/core/es6/grid/util/CellBoundPainter.js +171 -0
  209. package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
  210. package/lib/core/es6/grid/util/Conflator.js +191 -0
  211. package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
  212. package/lib/core/es6/grid/util/Reverter.js +79 -0
  213. package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
  214. package/lib/core/es6/grid/util/SectionSettings.js +679 -0
  215. package/lib/core/es6/grid/util/SelectionList.d.ts +54 -0
  216. package/lib/core/es6/grid/util/SelectionList.js +491 -0
  217. package/lib/core/es6/grid/util/TrackLayout.d.ts +92 -0
  218. package/lib/core/es6/grid/util/TrackLayout.js +902 -0
  219. package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
  220. package/lib/core/es6/grid/util/Virtualizer.js +340 -0
  221. package/lib/core/es6/grid/util/util.d.ts +20 -0
  222. package/lib/core/es6/grid/util/util.js +391 -0
  223. package/lib/core/es6/index.d.ts +79 -0
  224. package/lib/core/es6/index.js +125 -0
  225. package/lib/core/es6/tr-grid-theme.d.ts +5 -0
  226. package/lib/core/es6/tr-grid-theme.js +5 -0
  227. package/lib/filter-dialog/index.d.ts +2 -0
  228. package/lib/filter-dialog/index.js +2 -0
  229. package/lib/filter-dialog/lib/checkbox-list.d.ts +52 -0
  230. package/lib/filter-dialog/lib/checkbox-list.js +444 -0
  231. package/lib/filter-dialog/lib/filter-dialog.d.ts +75 -0
  232. package/lib/filter-dialog/lib/filter-dialog.js +1160 -0
  233. package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
  234. package/lib/filter-dialog/lib/locale/translation-de.js +40 -0
  235. package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
  236. package/lib/filter-dialog/lib/locale/translation-en.js +40 -0
  237. package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
  238. package/lib/filter-dialog/lib/locale/translation-ja.js +40 -0
  239. package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  240. package/lib/filter-dialog/lib/locale/translation-zh-hant.js +40 -0
  241. package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
  242. package/lib/filter-dialog/lib/locale/translation-zh.js +40 -0
  243. package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
  244. package/lib/filter-dialog/lib/locale/translation.js +18 -0
  245. package/lib/filter-dialog/themes/base-checkbox.less +42 -0
  246. package/lib/filter-dialog/themes/base.less +191 -0
  247. package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
  248. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
  249. package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  250. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
  251. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
  252. package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
  253. package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
  254. package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  255. package/lib/filter-dialog/themes/elemental/dark.js +11 -0
  256. package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
  257. package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
  258. package/lib/filter-dialog/themes/elemental/index.less +6 -0
  259. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
  260. package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
  261. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
  262. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
  263. package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
  264. package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
  265. package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  266. package/lib/filter-dialog/themes/elemental/light.js +11 -0
  267. package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
  268. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
  269. package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
  270. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
  271. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
  272. package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
  273. package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
  274. package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  275. package/lib/filter-dialog/themes/halo/dark.js +11 -0
  276. package/lib/filter-dialog/themes/halo/defaults.less +3 -0
  277. package/lib/filter-dialog/themes/halo/filter-dialog.less +15 -0
  278. package/lib/filter-dialog/themes/halo/index.less +6 -0
  279. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
  280. package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
  281. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
  282. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
  283. package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
  284. package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
  285. package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
  286. package/lib/filter-dialog/themes/halo/light.js +11 -0
  287. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
  288. package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  289. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
  290. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
  291. package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
  292. package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
  293. package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  294. package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
  295. package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
  296. package/lib/filter-dialog/themes/solar/defaults.less +3 -0
  297. package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
  298. package/lib/filter-dialog/themes/solar/index.less +6 -0
  299. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
  300. package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  301. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
  302. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
  303. package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
  304. package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
  305. package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  306. package/lib/filter-dialog/themes/solar/pearl.js +11 -0
  307. package/lib/formatters/es6/CoralButtonFormatter.d.ts +20 -0
  308. package/lib/formatters/es6/CoralButtonFormatter.js +45 -0
  309. package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
  310. package/lib/formatters/es6/CoralCheckboxFormatter.js +50 -0
  311. package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
  312. package/lib/formatters/es6/CoralComboBoxFormatter.js +103 -0
  313. package/lib/formatters/es6/CoralIconFormatter.d.ts +21 -0
  314. package/lib/formatters/es6/CoralIconFormatter.js +50 -0
  315. package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
  316. package/lib/formatters/es6/CoralInputFormatter.js +45 -0
  317. package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +20 -0
  318. package/lib/formatters/es6/CoralRadioButtonFormatter.js +85 -0
  319. package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
  320. package/lib/formatters/es6/CoralSelectFormatter.js +71 -0
  321. package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
  322. package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
  323. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
  324. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
  325. package/lib/formatters/es6/EFButtonFormatter.d.ts +20 -0
  326. package/lib/formatters/es6/EFButtonFormatter.js +45 -0
  327. package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
  328. package/lib/formatters/es6/EFCheckboxFormatter.js +50 -0
  329. package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
  330. package/lib/formatters/es6/EFComboBoxFormatter.js +78 -0
  331. package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
  332. package/lib/formatters/es6/EFDateTimePickerFormatter.js +60 -0
  333. package/lib/formatters/es6/EFIconFormatter.d.ts +21 -0
  334. package/lib/formatters/es6/EFIconFormatter.js +50 -0
  335. package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
  336. package/lib/formatters/es6/EFNumberFieldFormatter.js +45 -0
  337. package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +20 -0
  338. package/lib/formatters/es6/EFRadioButtonFormatter.js +132 -0
  339. package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
  340. package/lib/formatters/es6/EFSelectFormatter.js +76 -0
  341. package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
  342. package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
  343. package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
  344. package/lib/formatters/es6/EFToggleFormatter.js +47 -0
  345. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
  346. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
  347. package/lib/formatters/es6/FormatterBuilder.d.ts +26 -0
  348. package/lib/formatters/es6/FormatterBuilder.js +493 -0
  349. package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
  350. package/lib/formatters/es6/NumericInputFormatter.js +64 -0
  351. package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
  352. package/lib/formatters/es6/PercentBarFormatter.js +62 -0
  353. package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
  354. package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
  355. package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
  356. package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
  357. package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
  358. package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
  359. package/lib/formatters/es6/SimpleTickerFormatter.d.ts +23 -0
  360. package/lib/formatters/es6/SimpleTickerFormatter.js +66 -0
  361. package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
  362. package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
  363. package/lib/formatters/es6/TextFormatter.d.ts +12 -0
  364. package/lib/formatters/es6/TextFormatter.js +35 -0
  365. package/lib/formatters/es6/index.d.ts +64 -0
  366. package/lib/formatters/es6/index.js +88 -0
  367. package/lib/grid/index.d.ts +2 -0
  368. package/lib/grid/index.js +3 -0
  369. package/lib/grid/lib/efx-grid.d.ts +53 -0
  370. package/lib/grid/lib/efx-grid.js +444 -0
  371. package/lib/grid/themes/base.less +137 -0
  372. package/lib/grid/themes/ds/dark/css/native-elements.css +0 -0
  373. package/lib/grid/themes/ds/dark/efx-grid.js +4 -0
  374. package/lib/grid/themes/ds/dark/es5/all-elements.js +2 -0
  375. package/lib/grid/themes/ds/dark/imports/all-elements.js +1 -0
  376. package/lib/grid/themes/ds/dark/imports/custom-elements.js +1 -0
  377. package/lib/grid/themes/ds/dark/imports/native-elements.js +0 -0
  378. package/lib/grid/themes/ds/dark.js +3 -0
  379. package/lib/grid/themes/ds/efx-grid.less +207 -0
  380. package/lib/grid/themes/ds/index.less +3 -0
  381. package/lib/grid/themes/ds/light/css/native-elements.css +0 -0
  382. package/lib/grid/themes/ds/light/efx-grid.js +4 -0
  383. package/lib/grid/themes/ds/light/es5/all-elements.js +2 -0
  384. package/lib/grid/themes/ds/light/imports/all-elements.js +1 -0
  385. package/lib/grid/themes/ds/light/imports/custom-elements.js +1 -0
  386. package/lib/grid/themes/ds/light/imports/native-elements.js +0 -0
  387. package/lib/grid/themes/ds/light.js +3 -0
  388. package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
  389. package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
  390. package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
  391. package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
  392. package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
  393. package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
  394. package/lib/grid/themes/halo/dark.js +3 -0
  395. package/lib/grid/themes/halo/efx-grid.less +127 -0
  396. package/lib/grid/themes/halo/index.less +3 -0
  397. package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
  398. package/lib/grid/themes/halo/light/efx-grid.js +4 -0
  399. package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
  400. package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
  401. package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
  402. package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
  403. package/lib/grid/themes/halo/light.js +3 -0
  404. package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
  405. package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
  406. package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
  407. package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
  408. package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
  409. package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
  410. package/lib/grid/themes/solar/charcoal.js +3 -0
  411. package/lib/grid/themes/solar/efx-grid.less +27 -0
  412. package/lib/grid/themes/solar/index.less +3 -0
  413. package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
  414. package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
  415. package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
  416. package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
  417. package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
  418. package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
  419. package/lib/grid/themes/solar/pearl.js +3 -0
  420. package/lib/index.d.ts +100 -0
  421. package/lib/index.js +100 -0
  422. package/lib/row-segmenting/es6/RowSegmenting.d.ts +115 -0
  423. package/lib/row-segmenting/es6/RowSegmenting.js +1182 -0
  424. package/lib/row-segmenting/es6/index.d.ts +1 -0
  425. package/lib/row-segmenting/es6/index.js +1 -0
  426. package/lib/rt-grid/dist/rt-grid.js +54547 -0
  427. package/lib/rt-grid/dist/rt-grid.min.js +1 -0
  428. package/lib/rt-grid/es6/ColumnDefinition.d.ts +174 -0
  429. package/lib/rt-grid/es6/ColumnDefinition.js +1203 -0
  430. package/lib/rt-grid/es6/DataConnector.d.ts +43 -0
  431. package/lib/rt-grid/es6/DataConnector.js +290 -0
  432. package/lib/rt-grid/es6/FieldDefinition.d.ts +40 -0
  433. package/lib/rt-grid/es6/FieldDefinition.js +560 -0
  434. package/lib/rt-grid/es6/Grid.d.ts +376 -0
  435. package/lib/rt-grid/es6/Grid.js +4653 -0
  436. package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
  437. package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
  438. package/lib/rt-grid/es6/ReferenceCounter.d.ts +40 -0
  439. package/lib/rt-grid/es6/ReferenceCounter.js +251 -0
  440. package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
  441. package/lib/rt-grid/es6/RowDefSorter.js +231 -0
  442. package/lib/rt-grid/es6/RowDefinition.d.ts +156 -0
  443. package/lib/rt-grid/es6/RowDefinition.js +1478 -0
  444. package/lib/rt-grid/es6/SnapshotFiller.d.ts +36 -0
  445. package/lib/rt-grid/es6/SnapshotFiller.js +537 -0
  446. package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
  447. package/lib/rt-grid/es6/StyleLoader.js +47 -0
  448. package/lib/rt-grid/es6/index.d.ts +8 -0
  449. package/lib/rt-grid/es6/index.js +43 -0
  450. package/lib/statistics-row/es6/StatisticsRow.d.ts +68 -0
  451. package/lib/statistics-row/es6/StatisticsRow.js +807 -0
  452. package/lib/statistics-row/es6/index.d.ts +1 -0
  453. package/lib/statistics-row/es6/index.js +1 -0
  454. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +46 -0
  455. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +617 -0
  456. package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
  457. package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
  458. package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +70 -0
  459. package/lib/tr-grid-cell-selection/es6/CellSelection.js +1695 -0
  460. package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
  461. package/lib/tr-grid-cell-selection/es6/index.js +1 -0
  462. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +82 -0
  463. package/lib/tr-grid-checkbox/es6/Checkbox.js +1704 -0
  464. package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
  465. package/lib/tr-grid-checkbox/es6/index.js +1 -0
  466. package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
  467. package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +817 -0
  468. package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
  469. package/lib/tr-grid-column-fitter/es6/index.js +1 -0
  470. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +91 -0
  471. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +617 -0
  472. package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
  473. package/lib/tr-grid-column-formatting/es6/index.js +1 -0
  474. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +110 -0
  475. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +2028 -0
  476. package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
  477. package/lib/tr-grid-column-grouping/es6/index.js +1 -0
  478. package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
  479. package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1010 -0
  480. package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
  481. package/lib/tr-grid-column-resizing/es6/index.js +1 -0
  482. package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +77 -0
  483. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +1405 -0
  484. package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
  485. package/lib/tr-grid-column-selection/es6/index.js +1 -0
  486. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +160 -0
  487. package/lib/tr-grid-column-stack/es6/ColumnStack.js +2155 -0
  488. package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
  489. package/lib/tr-grid-column-stack/es6/index.js +1 -0
  490. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +100 -0
  491. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +1513 -0
  492. package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
  493. package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
  494. package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
  495. package/lib/tr-grid-content-wrap/es6/ContentWrap.js +519 -0
  496. package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
  497. package/lib/tr-grid-content-wrap/es6/index.js +1 -0
  498. package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
  499. package/lib/tr-grid-contextmenu/es6/ContextMenu.js +453 -0
  500. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
  501. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +138 -0
  502. package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +41 -0
  503. package/lib/tr-grid-contextmenu/es6/MenuItem.js +285 -0
  504. package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +33 -0
  505. package/lib/tr-grid-contextmenu/es6/PopupMenu.js +303 -0
  506. package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
  507. package/lib/tr-grid-contextmenu/es6/index.js +1 -0
  508. package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +64 -0
  509. package/lib/tr-grid-filter-input/es6/FilterInput.js +1027 -0
  510. package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
  511. package/lib/tr-grid-filter-input/es6/index.js +1 -0
  512. package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +45 -0
  513. package/lib/tr-grid-heat-map/es6/HeatMap.js +401 -0
  514. package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
  515. package/lib/tr-grid-heat-map/es6/index.js +1 -0
  516. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +148 -0
  517. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +2671 -0
  518. package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
  519. package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
  520. package/lib/tr-grid-pagination/es6/Pagination.d.ts +58 -0
  521. package/lib/tr-grid-pagination/es6/Pagination.js +433 -0
  522. package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
  523. package/lib/tr-grid-pagination/es6/index.js +1 -0
  524. package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
  525. package/lib/tr-grid-percent-bar/es6/PercentBar.js +804 -0
  526. package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
  527. package/lib/tr-grid-percent-bar/es6/index.js +1 -0
  528. package/lib/tr-grid-printer/es6/CellWriter.d.ts +50 -0
  529. package/lib/tr-grid-printer/es6/CellWriter.js +234 -0
  530. package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +13 -0
  531. package/lib/tr-grid-printer/es6/ColumnWriter.js +23 -0
  532. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +33 -0
  533. package/lib/tr-grid-printer/es6/GridPrinter.js +794 -0
  534. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +39 -0
  535. package/lib/tr-grid-printer/es6/PrintTrait.js +494 -0
  536. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +57 -0
  537. package/lib/tr-grid-printer/es6/SectionWriter.js +238 -0
  538. package/lib/tr-grid-printer/es6/index.d.ts +1 -0
  539. package/lib/tr-grid-printer/es6/index.js +1 -0
  540. package/lib/tr-grid-range-bar/es6/LEDGuage.d.ts +39 -0
  541. package/lib/tr-grid-range-bar/es6/LEDGuage.js +261 -0
  542. package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +56 -0
  543. package/lib/tr-grid-range-bar/es6/RangeBar.js +514 -0
  544. package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
  545. package/lib/tr-grid-range-bar/es6/index.js +1 -0
  546. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +81 -0
  547. package/lib/tr-grid-row-dragging/es6/RowDragging.js +1479 -0
  548. package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
  549. package/lib/tr-grid-row-dragging/es6/index.js +1 -0
  550. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +159 -0
  551. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +2568 -0
  552. package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
  553. package/lib/tr-grid-row-filtering/es6/index.js +1 -0
  554. package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +123 -0
  555. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1728 -0
  556. package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
  557. package/lib/tr-grid-row-grouping/es6/index.js +1 -0
  558. package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +75 -0
  559. package/lib/tr-grid-row-selection/es6/RowSelection.js +1447 -0
  560. package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
  561. package/lib/tr-grid-row-selection/es6/index.js +1 -0
  562. package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +64 -0
  563. package/lib/tr-grid-rowcoloring/es6/RowColoring.js +615 -0
  564. package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
  565. package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
  566. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +72 -0
  567. package/lib/tr-grid-textformatting/es6/TextFormatting.js +543 -0
  568. package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
  569. package/lib/tr-grid-textformatting/es6/index.js +1 -0
  570. package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +27 -0
  571. package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
  572. package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
  573. package/lib/tr-grid-titlewrap/es6/index.js +1 -0
  574. package/lib/tr-grid-util/es6/CellPainter.d.ts +142 -0
  575. package/lib/tr-grid-util/es6/CellPainter.js +1183 -0
  576. package/lib/tr-grid-util/es6/Color.d.ts +40 -0
  577. package/lib/tr-grid-util/es6/Color.js +210 -0
  578. package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
  579. package/lib/tr-grid-util/es6/Conflator.js +193 -0
  580. package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
  581. package/lib/tr-grid-util/es6/CoralItems.js +42 -0
  582. package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
  583. package/lib/tr-grid-util/es6/DateTime.js +508 -0
  584. package/lib/tr-grid-util/es6/Deferred.d.ts +16 -0
  585. package/lib/tr-grid-util/es6/Deferred.js +108 -0
  586. package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
  587. package/lib/tr-grid-util/es6/Delay.js +96 -0
  588. package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
  589. package/lib/tr-grid-util/es6/Dom.js +350 -0
  590. package/lib/tr-grid-util/es6/DragUI.d.ts +20 -0
  591. package/lib/tr-grid-util/es6/DragUI.js +263 -0
  592. package/lib/tr-grid-util/es6/ElementObserver.d.ts +12 -0
  593. package/lib/tr-grid-util/es6/ElementObserver.js +134 -0
  594. package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
  595. package/lib/tr-grid-util/es6/ElementWrapper.js +84 -0
  596. package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
  597. package/lib/tr-grid-util/es6/ElfDate.js +164 -0
  598. package/lib/tr-grid-util/es6/ElfUtil.d.ts +46 -0
  599. package/lib/tr-grid-util/es6/ElfUtil.js +637 -0
  600. package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
  601. package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
  602. package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +24 -0
  603. package/lib/tr-grid-util/es6/ExpanderIcon.js +120 -0
  604. package/lib/tr-grid-util/es6/ExpressionParser.d.ts +10 -0
  605. package/lib/tr-grid-util/es6/ExpressionParser.js +408 -0
  606. package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
  607. package/lib/tr-grid-util/es6/Ext.js +52 -0
  608. package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
  609. package/lib/tr-grid-util/es6/FieldFormatter.js +440 -0
  610. package/lib/tr-grid-util/es6/FilterBuilder.d.ts +54 -0
  611. package/lib/tr-grid-util/es6/FilterBuilder.js +580 -0
  612. package/lib/tr-grid-util/es6/FilterOperators.d.ts +56 -0
  613. package/lib/tr-grid-util/es6/FilterOperators.js +255 -0
  614. package/lib/tr-grid-util/es6/GridPlugin.d.ts +86 -0
  615. package/lib/tr-grid-util/es6/GridPlugin.js +1055 -0
  616. package/lib/tr-grid-util/es6/GroupDefinitions.d.ts +74 -0
  617. package/lib/tr-grid-util/es6/GroupDefinitions.js +642 -0
  618. package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
  619. package/lib/tr-grid-util/es6/Icon.js +62 -0
  620. package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
  621. package/lib/tr-grid-util/es6/MouseDownTrait.js +250 -0
  622. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +40 -0
  623. package/lib/tr-grid-util/es6/MultiTableManager.js +611 -0
  624. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +85 -0
  625. package/lib/tr-grid-util/es6/NumberFormatter.js +528 -0
  626. package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
  627. package/lib/tr-grid-util/es6/PercentBar.js +600 -0
  628. package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
  629. package/lib/tr-grid-util/es6/Perf.js +163 -0
  630. package/lib/tr-grid-util/es6/Popup.d.ts +98 -0
  631. package/lib/tr-grid-util/es6/Popup.js +991 -0
  632. package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
  633. package/lib/tr-grid-util/es6/RangeBar.js +260 -0
  634. package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
  635. package/lib/tr-grid-util/es6/RequestQueue.js +228 -0
  636. package/lib/tr-grid-util/es6/RowPainter.d.ts +60 -0
  637. package/lib/tr-grid-util/es6/RowPainter.js +448 -0
  638. package/lib/tr-grid-util/es6/SubTable.d.ts +78 -0
  639. package/lib/tr-grid-util/es6/SubTable.js +642 -0
  640. package/lib/tr-grid-util/es6/Table.d.ts +146 -0
  641. package/lib/tr-grid-util/es6/Table.js +832 -0
  642. package/lib/tr-grid-util/es6/TextHighlighter.d.ts +16 -0
  643. package/lib/tr-grid-util/es6/TextHighlighter.js +268 -0
  644. package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
  645. package/lib/tr-grid-util/es6/TickCodes.js +33 -0
  646. package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
  647. package/lib/tr-grid-util/es6/Timer.js +49 -0
  648. package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
  649. package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
  650. package/lib/tr-grid-util/es6/Util.d.ts +66 -0
  651. package/lib/tr-grid-util/es6/Util.js +508 -0
  652. package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
  653. package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
  654. package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
  655. package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
  656. package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
  657. package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
  658. package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
  659. package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
  660. package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
  661. package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
  662. package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
  663. package/lib/tr-grid-util/es6/formula/Formula.js +890 -0
  664. package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
  665. package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
  666. package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
  667. package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
  668. package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
  669. package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
  670. package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
  671. package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
  672. package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
  673. package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
  674. package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
  675. package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
  676. package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
  677. package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
  678. package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
  679. package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
  680. package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
  681. package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
  682. package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
  683. package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
  684. package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
  685. package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
  686. package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
  687. package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
  688. package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
  689. package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
  690. package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
  691. package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
  692. package/lib/tr-grid-util/es6/index.d.ts +65 -0
  693. package/lib/tr-grid-util/es6/index.js +102 -0
  694. package/lib/tr-grid-util/es6/jet/Adc.d.ts +9 -0
  695. package/lib/tr-grid-util/es6/jet/Adc.js +268 -0
  696. package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
  697. package/lib/tr-grid-util/es6/jet/CollectionDict.js +151 -0
  698. package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +136 -0
  699. package/lib/tr-grid-util/es6/jet/DataGenerator.js +860 -0
  700. package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
  701. package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
  702. package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
  703. package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
  704. package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
  705. package/lib/tr-grid-util/es6/jet/MockJET.js +71 -0
  706. package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
  707. package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
  708. package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +82 -0
  709. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +890 -0
  710. package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +48 -0
  711. package/lib/tr-grid-util/es6/jet/MockRTK.js +82 -0
  712. package/lib/tr-grid-util/es6/jet/MockUtil.d.ts +7 -0
  713. package/lib/tr-grid-util/es6/jet/MockUtil.js +25 -0
  714. package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
  715. package/lib/tr-grid-util/es6/jet/index.js +18 -0
  716. package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
  717. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +111 -0
  718. package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
  719. package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
  720. package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
  721. package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
  722. package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
  723. package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
  724. package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
  725. package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
  726. package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
  727. package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
  728. package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
  729. package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
  730. package/lib/tr-grid-util/es6/locale/translation.js +18 -0
  731. package/lib/types/es6/AutoTooltip.d.ts +46 -0
  732. package/lib/types/es6/CellSelection.d.ts +70 -0
  733. package/lib/types/es6/Checkbox.d.ts +82 -0
  734. package/lib/types/es6/ColumnDragging.d.ts +51 -0
  735. package/lib/types/es6/ColumnFitter.d.ts +56 -0
  736. package/lib/types/es6/ColumnFormatting.d.ts +92 -0
  737. package/lib/types/es6/ColumnGrouping.d.ts +107 -0
  738. package/lib/types/es6/ColumnResizing.d.ts +68 -0
  739. package/lib/types/es6/ColumnSelection.d.ts +77 -0
  740. package/lib/types/es6/ColumnStack.d.ts +160 -0
  741. package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
  742. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +41 -0
  743. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
  744. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +289 -0
  745. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +23 -0
  746. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +41 -0
  747. package/lib/types/es6/CompositeGrid/Plugin.d.ts +30 -0
  748. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +32 -0
  749. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +44 -0
  750. package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
  751. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
  752. package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
  753. package/lib/types/es6/ConditionalColoring.d.ts +100 -0
  754. package/lib/types/es6/ContentWrap.d.ts +43 -0
  755. package/lib/types/es6/ContextMenu.d.ts +83 -0
  756. package/lib/types/es6/CoralButtonFormatter.d.ts +20 -0
  757. package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
  758. package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
  759. package/lib/types/es6/CoralIconFormatter.d.ts +21 -0
  760. package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
  761. package/lib/types/es6/CoralRadioButtonFormatter.d.ts +20 -0
  762. package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
  763. package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
  764. package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
  765. package/lib/types/es6/Core/data/DataCache.d.ts +43 -0
  766. package/lib/types/es6/Core/data/DataTable.d.ts +156 -0
  767. package/lib/types/es6/Core/data/DataView.d.ts +332 -0
  768. package/lib/types/es6/Core/data/Segment.d.ts +91 -0
  769. package/lib/types/es6/Core/data/SegmentCollection.d.ts +84 -0
  770. package/lib/types/es6/Core/data/WrappedView.d.ts +290 -0
  771. package/lib/types/es6/Core/grid/Core.d.ts +455 -0
  772. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +212 -0
  773. package/lib/types/es6/Core/grid/LayoutGrid.d.ts +37 -0
  774. package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +28 -0
  775. package/lib/types/es6/Core/grid/components/Cell.d.ts +52 -0
  776. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +21 -0
  777. package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
  778. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +40 -0
  779. package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
  780. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +127 -0
  781. package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +28 -0
  782. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +63 -0
  783. package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
  784. package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
  785. package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
  786. package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
  787. package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
  788. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +155 -0
  789. package/lib/types/es6/Core/grid/util/CellBoundPainter.d.ts +16 -0
  790. package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
  791. package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
  792. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
  793. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +54 -0
  794. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +92 -0
  795. package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
  796. package/lib/types/es6/Core/grid/util/util.d.ts +20 -0
  797. package/lib/types/es6/Core/index.d.ts +79 -0
  798. package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
  799. package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
  800. package/lib/types/es6/EFButtonFormatter.d.ts +20 -0
  801. package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
  802. package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
  803. package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
  804. package/lib/types/es6/EFIconFormatter.d.ts +21 -0
  805. package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
  806. package/lib/types/es6/EFRadioButtonFormatter.d.ts +20 -0
  807. package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
  808. package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
  809. package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
  810. package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
  811. package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
  812. package/lib/types/es6/ExtensionOptions.d.ts +58 -0
  813. package/lib/types/es6/Extensions.d.ts +63 -0
  814. package/lib/types/es6/FilterInput.d.ts +64 -0
  815. package/lib/types/es6/FormatterBuilder.d.ts +26 -0
  816. package/lib/types/es6/GridFormatter.d.ts +63 -0
  817. package/lib/types/es6/HeatMap.d.ts +45 -0
  818. package/lib/types/es6/InCellEditing.d.ts +148 -0
  819. package/lib/types/es6/MenuEventAPI.d.ts +22 -0
  820. package/lib/types/es6/MenuItem.d.ts +41 -0
  821. package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
  822. package/lib/types/es6/Pagination.d.ts +58 -0
  823. package/lib/types/es6/PercentBar.d.ts +60 -0
  824. package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
  825. package/lib/types/es6/PopupMenu.d.ts +33 -0
  826. package/lib/types/es6/RangeBar.d.ts +39 -0
  827. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +176 -0
  828. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +43 -0
  829. package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +40 -0
  830. package/lib/types/es6/RealtimeGrid/Grid.d.ts +413 -0
  831. package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
  832. package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +40 -0
  833. package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
  834. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +156 -0
  835. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +36 -0
  836. package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
  837. package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
  838. package/lib/types/es6/RowColoring.d.ts +64 -0
  839. package/lib/types/es6/RowDragging.d.ts +81 -0
  840. package/lib/types/es6/RowFiltering.d.ts +159 -0
  841. package/lib/types/es6/RowGrouping.d.ts +123 -0
  842. package/lib/types/es6/RowSegmenting.d.ts +109 -0
  843. package/lib/types/es6/RowSelection.d.ts +75 -0
  844. package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
  845. package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
  846. package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
  847. package/lib/types/es6/SimpleTickerFormatter.d.ts +23 -0
  848. package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
  849. package/lib/types/es6/StatisticsRow.d.ts +68 -0
  850. package/lib/types/es6/TextFormatter.d.ts +12 -0
  851. package/lib/types/es6/TextFormatting.d.ts +72 -0
  852. package/lib/types/es6/TitleWrap.d.ts +27 -0
  853. package/lib/types/es6/Zoom.d.ts +52 -0
  854. package/lib/types/es6/index.d.ts +80 -0
  855. package/lib/types/index.d.ts +1 -0
  856. package/lib/utils/index.d.ts +7 -0
  857. package/lib/utils/index.js +7 -0
  858. package/lib/versions.json +37 -0
  859. package/lib/window-exporter.js +18 -0
  860. package/lib/zoom/es6/Zoom.d.ts +52 -0
  861. package/lib/zoom/es6/Zoom.js +438 -0
  862. package/lib/zoom/es6/index.d.ts +1 -0
  863. package/lib/zoom/es6/index.js +1 -0
  864. package/package.json +69 -0
@@ -0,0 +1,1704 @@
1
+ import {Ext} from '../../tr-grid-util/es6/Ext.js';
2
+ import {GridPlugin} from '../../tr-grid-util/es6/GridPlugin.js';
3
+ import {ElfUtil} from '../../tr-grid-util/es6/ElfUtil.js';
4
+ import {injectCss, prettifyCss} from "../../tr-grid-util/es6/Util.js";
5
+
6
+ /** @typedef {Object} CheckboxPlugin~Options
7
+ * @description Available options describing `checkbox` object specified in grid's option
8
+ * @property {boolean=} rowSelection=false If enabled, grid row will be selected as checkbox is checked.
9
+ * @property {string=} field="CHECK_BOX" Field that will be used for storing check state
10
+ * @property {string=} disablingField="CHECK_BOX_DISABLED" Field that will be used for storing disabling state
11
+ * @property {Function=} checkboxCreated=null Function handler for checkboxCreated event
12
+ * @property {Function=} checkboxBinding=null Function handler for checkboxBinding event
13
+ * @property {Function=} clicked=null Function handler for checkbox clicked event
14
+ * @property {number=} width=34 Width for checkbox column
15
+ * @property {boolean=} topCheckboxHandler=true If disabled, when clicked on header row checkbox it will not perform default behavior
16
+ */
17
+
18
+ /** @typedef {Object} CheckboxPlugin~ColumnOptions
19
+ * @property {boolean=} checkboxColumn=false If enabled, the correspondence column will use as checkbox column.
20
+ */
21
+
22
+ /** @event CheckboxPlugin#checkboxCreated
23
+ * @description Fired on each creation of checkbox element
24
+ * @property {Element} input Checkbox element that is an alias to `checkbox`
25
+ * @property {Element} checkbox Checkbox element
26
+ * @property {Object} cell Grid Cell object
27
+ * @property {Object} section Grid ILayoutGrid object
28
+ * @property {Object} grid Core Grid object
29
+ * @property {number} colIndex
30
+ * @property {number} rowIndex
31
+ */
32
+
33
+ /** @event CheckboxPlugin#checkboxBinding
34
+ * @description Fired on each rendering of checkbox element
35
+ * @property {Element} checkbox Checkbox element
36
+ * @property {Object} rowData
37
+ * @property {number} rowIndex
38
+ */
39
+
40
+ /** @event CheckboxPlugin#clicked
41
+ * @property {Element} checkbox element
42
+ * @property {number} rowIndex
43
+ * @property {boolean} checked
44
+ * @property {string} checkState
45
+ */
46
+
47
+
48
+ /** @constructor
49
+ * @extends {GridPlugin}
50
+ * @param {CheckboxPlugin~Options=} options
51
+ */
52
+ let CheckboxPlugin = function (options) {
53
+ let t = this;
54
+ t._onPreSectionRender = t._onPreSectionRender.bind(t);
55
+ t._onPostSectionDataBinding = t._onPostSectionDataBinding.bind(t);
56
+ t._onCheckboxClicked = t._onCheckboxClicked.bind(t);
57
+ t._onCheckboxKeydown = t._onCheckboxKeydown.bind(t);
58
+ t._onCheckboxMousedown = t._onCheckboxMousedown.bind(t);
59
+ t._onColumnIndexChanged = t._onColumnIndexChanged.bind(t);
60
+ t._onColumnAdded = t._onColumnAdded.bind(t);
61
+ t._requestUIPopulation = t._requestUIPopulation.bind(t);
62
+ t._populateUIs = t._populateUIs.bind(t);
63
+ t._isCheckboxDisabled = t._isCheckboxDisabled.bind(t);
64
+ t.selectAll = t.selectAll.bind(t);
65
+ t.deselectAll = t.deselectAll.bind(t);
66
+ t._hosts = [];
67
+
68
+ if(options) {
69
+ t.config({"checkbox": options});
70
+ }
71
+ };
72
+ Ext.inherits(CheckboxPlugin, GridPlugin);
73
+
74
+ /** @type {Function}
75
+ * @private
76
+ */
77
+ CheckboxPlugin._emptyFunc = function () { };
78
+ /** @private
79
+ * @function
80
+ * @param {Object} view DataView object
81
+ * @param {string} rid
82
+ * @return {boolean}
83
+ */
84
+ CheckboxPlugin._isRowExpansion = function (view, rid) {
85
+ return view.isRowExpansion(rid); // WARNING: isRowExpansion() is available only in DataView and not DataTable
86
+ };
87
+ /** @private
88
+ * @function
89
+ * @param {Object} view DataView object
90
+ * @param {Function} disablingGetter
91
+ * @param {string} rid
92
+ * @return {boolean}
93
+ */
94
+ CheckboxPlugin._checkableRow = function (view, disablingGetter, rid) {
95
+ if(disablingGetter(view, rid)) {
96
+ return false;
97
+ }
98
+ if(CheckboxPlugin._isRowExpansion(view, rid)) {
99
+ return false;
100
+ }
101
+ return true;
102
+ };
103
+ /** @private
104
+ * @function
105
+ * @param {Element} elem
106
+ */
107
+ CheckboxPlugin._addDisabledProp = function (elem) {
108
+ elem.setAttribute("disabled", "");
109
+ };
110
+ /** @private
111
+ * @function
112
+ * @param {Element} elem
113
+ */
114
+ CheckboxPlugin._removeDisabledProp = function (elem) {
115
+ elem.removeAttribute("disabled");
116
+ };
117
+ /** @private
118
+ * @function
119
+ * @param {Element} elem
120
+ * @param {string} prop
121
+ * @param {boolean} bool
122
+ */
123
+ CheckboxPlugin._setBooleanProp = function (elem, prop, bool) {
124
+ if(bool) {
125
+ elem.setAttribute(prop, "");
126
+ } else {
127
+ elem.removeAttribute(prop);
128
+ }
129
+ };
130
+ /** Collect member row that is in the given view and all members in collapsed group.
131
+ * @private
132
+ * @param {Object} dv DataView object
133
+ * @param {!Array.<string>} rids
134
+ * @param {string} rid
135
+ * @return {!Array.<string>} rids
136
+ */
137
+ CheckboxPlugin._collectRowMemberId = function (dv, rids, rid) {
138
+ if(rid) {
139
+ let subGroup = dv.getGroupByRowId(rid);
140
+ if(subGroup) {
141
+ if(subGroup.isCollapsed()) {
142
+ return rids.concat(subGroup.getAllRowIds(true));
143
+ }
144
+ } else {
145
+ rids.push(rid);
146
+ }
147
+ }
148
+ return rids;
149
+ };
150
+
151
+
152
+ /** @type {number}
153
+ * @private
154
+ */
155
+ CheckboxPlugin.prototype._width = 34;
156
+ /** @type {number}
157
+ * @private
158
+ */
159
+ CheckboxPlugin.prototype._displayColumn = -1;
160
+ /** @type {number}
161
+ * @private
162
+ */
163
+ CheckboxPlugin.prototype._userCheckboxIdx = -1;
164
+ /** @type {number}
165
+ * @private
166
+ */
167
+ CheckboxPlugin.prototype._updateTimer = 0;
168
+ /** @type {boolean}
169
+ * @private
170
+ */
171
+ CheckboxPlugin.prototype._initializing = false;
172
+ /** @type {number}
173
+ * @private
174
+ */
175
+ CheckboxPlugin.prototype._coralCheckboxVer = -1; // Contains version number of the coral checkbox, -1 means not initialize yet
176
+ /** @type {string}
177
+ * @private
178
+ */
179
+ CheckboxPlugin.prototype._checkboxField = "CHECK_BOX";
180
+ /** @type {string}
181
+ * @private
182
+ */
183
+ CheckboxPlugin.prototype._disablingField = "CHECK_BOX_DISABLED";
184
+ /** @type {boolean}
185
+ * @private
186
+ */
187
+ CheckboxPlugin.prototype._autoRowSelection = false;
188
+ /** @type {boolean}
189
+ * @private
190
+ */
191
+ CheckboxPlugin.prototype._topCheckboxHandler = true;
192
+ /** @type {string}
193
+ * @private
194
+ */
195
+ CheckboxPlugin.prototype._anchorRowId = "";
196
+
197
+
198
+ /** @type {Object.<string, number>}
199
+ * @private
200
+ */
201
+ CheckboxPlugin._exceptions = {
202
+ "filterInputs": 1,
203
+ "bottomPadding": 1
204
+ };
205
+ /** @type {string}
206
+ * @private
207
+ */
208
+ CheckboxPlugin._styles = prettifyCss([
209
+ ".tr-checkbox-column input[type='checkbox'], .tr-checkbox-column input+label", [
210
+ "cursor: pointer;"
211
+ ],
212
+ ".column.tr-checkbox-column.tr-align-left .cell", [
213
+ "text-align: left;"
214
+ ],
215
+ ".column.tr-checkbox-column.tr-align-right .cell", [
216
+ "text-align: right;"
217
+ ]
218
+ ]);
219
+ /** @private
220
+ * @param {Object} grid core grid object
221
+ */
222
+ CheckboxPlugin._applyStyles = function(grid) {
223
+ if(grid && !grid._checkboxStyles) { // TODO: Support run-time theme loading
224
+ grid._checkboxStyles = true; // Prevent loading the same style twice
225
+ injectCss(CheckboxPlugin._styles, grid.getElement());
226
+ }
227
+ };
228
+
229
+ /** @type {number}
230
+ * @private
231
+ */
232
+ CheckboxPlugin._runningId = 0;
233
+
234
+ /** @private
235
+ * @function
236
+ * @param {*} val
237
+ * @return {string}
238
+ */
239
+ CheckboxPlugin._toCheckState = function (val) {
240
+ if(val === "partial") {
241
+ return "partial";
242
+ } else {
243
+ return (val) ? "checked" : "unchecked";
244
+ }
245
+ };
246
+ /** @private
247
+ * @function
248
+ * @param {Element} chkbox
249
+ * @return {string}
250
+ */
251
+ CheckboxPlugin._getCheckState = function (chkbox) {
252
+ if(chkbox.style.display == "none" || chkbox.hasAttribute("disabled")) { // slow
253
+ return "";
254
+ }
255
+ // WORKAROUND
256
+ // in elf v3, v4 chkbox.indeterminate can represent 'partial' state
257
+ // but we check class 'square-shape' instead to support elf v1 and native checkbox input
258
+ else if(chkbox.classList.contains('square-shape')) {
259
+ return "partial";
260
+ } else if(chkbox.checked) {
261
+ return "checked";
262
+ } else {
263
+ return "unchecked";
264
+ }
265
+ };
266
+ /** @private
267
+ * @function
268
+ * @param {Element} chkbox
269
+ * @param {string} state
270
+ * @return {number} Return non-zero value if there is a state change
271
+ */
272
+ CheckboxPlugin._setCheckState = function (chkbox, state) {
273
+ if(chkbox._forceNewState) { // WORKAROUND: to force checkbox move to next state
274
+ state = chkbox._forceNewState;
275
+ chkbox._forceNewState = null;
276
+ } else if(CheckboxPlugin._getCheckState(chkbox) === state) { // Process change only when necessary
277
+ return 0;
278
+ }
279
+
280
+ if(state === "partial") {
281
+ chkbox.classList.add("square-shape");
282
+ // Elf v3 will clear indeterminate state when setting checked property
283
+ chkbox.checked = (this._coralCheckboxVer < 3); // WARNING: This is not a conventional standard
284
+ chkbox.setAttribute("indeterminate", "");
285
+ } else {
286
+ chkbox.classList.remove("square-shape");
287
+ chkbox.checked = (state === "checked");
288
+ chkbox.removeAttribute("indeterminate");
289
+ }
290
+ // WORKAROUND: to force detech _prevState of check box
291
+ chkbox._prevState = state;
292
+ return 1;
293
+ };
294
+ /** @private
295
+ * @function
296
+ * @param {string} curState checked|unchecked|partial
297
+ * @return {string} Return new state checked|unchecked
298
+ */
299
+ CheckboxPlugin._toggleState = function (curState) {
300
+ // WARNING: When clicking indeterminated checkbox, it should result in selecting all (checked)
301
+ return (curState == "checked" || curState == "partial") ? "unchecked" : "checked";
302
+ };
303
+ /** @private
304
+ * @function
305
+ * @param {string} curState
306
+ * @param {string} state
307
+ * @return {string} checked|unchecked|partial
308
+ */
309
+ CheckboxPlugin._mergeState = function(curState, state) {
310
+ if(curState) {
311
+ if(state) {
312
+ if(curState !== state) {
313
+ return "partial";
314
+ }
315
+ } else {
316
+ return curState;
317
+ }
318
+ }
319
+ return state;
320
+ };
321
+ /** @private
322
+ * @function
323
+ * @param {Array.<string>} states
324
+ * @return {string} checked|unchecked|partial
325
+ */
326
+ CheckboxPlugin._mergeStates = function(states) {
327
+ let state = "";
328
+ for(let i = states.length; --i >= 0; ) {
329
+ state = CheckboxPlugin._mergeState(state, states[i]);
330
+ if(state === "partial") {
331
+ return state;
332
+ }
333
+ }
334
+ return state;
335
+ };
336
+
337
+ /** @public
338
+ * @return {string}
339
+ */
340
+ CheckboxPlugin.prototype.getName = function () {
341
+ return "CheckboxPlugin"; // Read Only
342
+ };
343
+ /** @public
344
+ * @param {Object} host core grid object
345
+ * @param {Object=} options
346
+ */
347
+ CheckboxPlugin.prototype.initialize = function (host, options) {
348
+ if(this._hosts.indexOf(host) >= 0) { return; }
349
+ this._hosts.push(host);
350
+
351
+ host.listen("preSectionRender", this._onPreSectionRender);
352
+ host.listen("postSectionDataBinding", this._onPostSectionDataBinding);
353
+
354
+ host.listen("columnAdded", this._onColumnIndexChanged);
355
+ host.listen("columnAdded", this._onColumnAdded);
356
+ host.listen("columnMoved", this._onColumnIndexChanged);
357
+ host.listen("columnRemoved", this._onColumnIndexChanged);
358
+
359
+ this.config(options);
360
+ CheckboxPlugin._applyStyles(host);
361
+
362
+ this._requestUIPopulation();
363
+ };
364
+ /** @public
365
+ * @param {Object} host core grid object
366
+ */
367
+ CheckboxPlugin.prototype.unload = function (host) {
368
+ let at = this._hosts.indexOf(host);
369
+ if(at < 0) { return; }
370
+
371
+ host.unlisten("preSectionRender", this._onPreSectionRender);
372
+ host.unlisten("postSectionDataBinding", this._onPostSectionDataBinding);
373
+
374
+ host.unlisten("columnAdded", this._onColumnIndexChanged);
375
+ host.unlisten("columnAdded", this._onColumnAdded);
376
+ host.unlisten("columnMoved", this._onColumnIndexChanged);
377
+ host.unlisten("columnRemoved", this._onColumnIndexChanged);
378
+
379
+ this._hosts.splice(at, 1);
380
+
381
+ if(!this._hosts.length) {
382
+ this._compositeGrid = null;
383
+ if(this._updateTimer) {
384
+ clearTimeout(this._updateTimer);
385
+ this._updateTimer = 0;
386
+ }
387
+ }
388
+ };
389
+ /** Remove redundant built-in feature
390
+ * @public
391
+ * @param {string} optionName
392
+ * @param {*} optionVal
393
+ * @return {*} The transformed value of the option
394
+ */
395
+ CheckboxPlugin.prototype.beforeProcessOption = function (optionName, optionVal) {
396
+ if(optionName == "checkboxSelector") {
397
+ return null; // eslint-disable-line
398
+ }
399
+ return; // eslint-disable-line
400
+ };
401
+
402
+ /** @public
403
+ * @param {Object=} options
404
+ */
405
+ CheckboxPlugin.prototype.config = function (options) {
406
+ if(!options) { return; }
407
+
408
+ let chkboxOpt = /** @type{Object} */(options["checkbox"]);
409
+ if(!chkboxOpt) {
410
+ return;
411
+ }
412
+
413
+ let val;
414
+ val = chkboxOpt["rowSelection"]; // previously named "selectCheckedRow"
415
+ if(val != null) {
416
+ this._autoRowSelection = val ? true : false;
417
+ }
418
+ val = chkboxOpt["field"];
419
+ if(val) {
420
+ this._checkboxField = val;
421
+ }
422
+ val = chkboxOpt["disablingField"];
423
+ if(val) {
424
+ this._disablingField = val;
425
+ }
426
+ val = chkboxOpt["width"];
427
+ if(val) {
428
+ this._width = val;
429
+ }
430
+ val = chkboxOpt["topCheckboxHandler"];
431
+ if(val != null) {
432
+ this._topCheckboxHandler = val ? true : false;
433
+ }
434
+
435
+ this.addListener(chkboxOpt, "checkboxCreated");
436
+ this.addListener(chkboxOpt, "clicked");
437
+ this.addListener(chkboxOpt, "checkboxBinding");
438
+ };
439
+
440
+ /** @public
441
+ * @param {Object=} gridOptions
442
+ * @return {!Object}
443
+ */
444
+ CheckboxPlugin.prototype.getConfigObject = function (gridOptions) {
445
+ let obj = gridOptions || {};
446
+
447
+ let columns = obj.columns;
448
+ if(!columns) {
449
+ columns = obj.columns = [];
450
+ }
451
+
452
+ let len = this.getColumnCount();
453
+ for(let i = 0; i < len; ++i) {
454
+ let col = columns[i];
455
+ if(!col) {
456
+ col = columns[i] = {};
457
+ }
458
+
459
+ let colOptions = this._getColumnData(i);
460
+ if(colOptions.isCheckboxColumn || i === this._userCheckboxIdx) {
461
+ col.checkboxColumn = true;
462
+ }
463
+ }
464
+
465
+ let extOptions = obj.checkbox;
466
+ if(!extOptions) {
467
+ extOptions = obj.checkbox = {};
468
+ }
469
+
470
+ if(this._autoRowSelection) {
471
+ extOptions.rowSelection = true;
472
+ }
473
+
474
+ if(this._checkboxField !== "CHECK_BOX") {
475
+ extOptions.field = this._checkboxField;
476
+ }
477
+
478
+ if(this._disablingField !== "CHECK_BOX_DISABLED") {
479
+ extOptions.disablingField = this._disablingField;
480
+ }
481
+
482
+ if(this._width !== 34) {
483
+ extOptions.width = this._width;
484
+ }
485
+
486
+ return obj;
487
+ };
488
+
489
+ /** @public
490
+ * @ignore
491
+ * @param {Element} elem
492
+ * @param {Object} config
493
+ * @param {boolean} runTime Indicates that this is runtime loading
494
+ */
495
+ CheckboxPlugin.prototype.beforeInit = function(elem, config, runTime) {
496
+ if(runTime) {
497
+ return; // Since this is runTime loading, there is no point of processing config object.
498
+ }
499
+ let t = this;
500
+ t._displayColumn = -1;
501
+
502
+ // Add missing fields to avoid shifting of data due to adding of checkbox column
503
+ let columns = config["columns"];
504
+ if(config.dataModel) {
505
+ config.dataModel = t._prepareData(columns, config.dataModel);
506
+ }
507
+ if(config.staticDataRows) {
508
+ config.staticDataRows = t._prepareData(columns, config.staticDataRows);
509
+ }
510
+
511
+ let chbxConfig = config["checkbox"];
512
+ if(chbxConfig) {
513
+ // Set checkbox column width here to ensure the column width will not blink during the initialization
514
+ if(chbxConfig["width"] != null) {
515
+ t._width = chbxConfig["width"];
516
+ }
517
+
518
+ if(chbxConfig["field"] != null) {
519
+ t._checkboxField = chbxConfig["field"];
520
+ }
521
+ }
522
+
523
+ t._userCheckboxIdx = t._findCheckboxColumnIndexFromConfig(columns);
524
+ if(t._userCheckboxIdx >= 0) {
525
+ t._genCheckboxColumn(columns[t._userCheckboxIdx]);
526
+ } else {
527
+ columns.unshift(t._genCheckboxColumn());
528
+ t._userCheckboxIdx = 0; // TODO: This _userCheckboxIdx has some misleading meaning
529
+ }
530
+ };
531
+
532
+ /** @private
533
+ * @param {Object=} userObj
534
+ * @return {!Object} checkbox column config
535
+ */
536
+ CheckboxPlugin.prototype._genCheckboxColumn = function (userObj) {
537
+ let defaultObj = {
538
+ width: this._width,
539
+ sortable: false,
540
+ focusable: true,
541
+ className: "tr-checkbox-column", // For rt-grid
542
+ classes: { "tr-checkbox-column": 1 }, // For composite grid
543
+ noResizing: true, // ColumnResizing Extension
544
+ resizable: false, // ResizableTitlePlugin
545
+ title: "",
546
+ tooltip: "",
547
+ // headerRenderer: CheckboxPlugin._emptyFunc, // rt-grid support
548
+ filterInput: { disabled: true },
549
+ field: this._checkboxField,
550
+ notRealTimeField: true, // Checkbox column is not a real-time field
551
+ checkboxColumn: true,
552
+ binding: CheckboxPlugin._emptyFunc, // rt-grid binding
553
+ formatter: { // composite-grid binding,
554
+ renderTitle: CheckboxPlugin._emptyFunc,
555
+ render: CheckboxPlugin._emptyFunc,
556
+ bind: CheckboxPlugin._emptyFunc
557
+ }
558
+ };
559
+
560
+ if(userObj && !userObj.autoGenerated) {
561
+ if(userObj.field && this._checkboxField === "CHECK_BOX") {
562
+ this._checkboxField = userObj.field;
563
+ }
564
+ if(userObj.width && this._width === 34) {
565
+ this._width = +userObj.width;
566
+ }
567
+
568
+ for(let key in defaultObj) {
569
+ let userVal = userObj[key];
570
+ if(userVal == null) {
571
+ userObj[key] = defaultObj[key];
572
+ }
573
+ }
574
+ return userObj;
575
+ }
576
+
577
+ defaultObj.autoGenerated = true;
578
+ return defaultObj;
579
+ };
580
+
581
+ /** @private
582
+ * @param {Array.<Object>} columns
583
+ * @param {Array.<Object>|Object} dataModel
584
+ * @return {Object} data model
585
+ */
586
+ CheckboxPlugin.prototype._prepareData = function (columns, dataModel) {
587
+ let model = dataModel;
588
+ if(Array.isArray(dataModel)) {
589
+ model = { data: dataModel };
590
+ }
591
+ if(model.data && !model.fields) {
592
+ // if data is 2D then we should add fields into dataModel
593
+ if(Array.isArray(model.data[0])) {
594
+ model.fields = this._getFieldsFromColumns(columns);
595
+ }
596
+ }
597
+
598
+ return model;
599
+ };
600
+
601
+ /** @private
602
+ * @param {Array.<Object>} columns
603
+ * @return {Array.<string>} list of fields
604
+ */
605
+ CheckboxPlugin.prototype._getFieldsFromColumns = function (columns) {
606
+ let colCount = columns.length;
607
+ let fields = new Array(colCount);
608
+ for(let c = 0; c < colCount; c++) {
609
+ let col = columns[c];
610
+ if(!col) {
611
+ fields[c] = "";
612
+ } else if(typeof col === "string") {
613
+ fields[c] = col;
614
+ } else {
615
+ fields[c] = col.field || "";
616
+ }
617
+ }
618
+ return fields;
619
+ };
620
+
621
+ /** @private
622
+ * @param {Array.<Object>} columns
623
+ * @return {number} Return negative number if the column not found
624
+ */
625
+ CheckboxPlugin.prototype._findCheckboxColumnIndexFromConfig = function (columns) {
626
+ if(Array.isArray(columns)) {
627
+ let colCount = columns.length;
628
+ for(let i = 0; i < colCount; i++) {
629
+ let col = columns[i];
630
+ if(col && col.checkboxColumn) {
631
+ return i;
632
+ }
633
+ }
634
+ }
635
+ return -1;
636
+ };
637
+
638
+ /** @public
639
+ * @return {number} Return negative number if the column not found
640
+ */
641
+ CheckboxPlugin.prototype.getCheckboxColumnIndex = function () {
642
+ if(this._displayColumn < 0) {
643
+ let host = this._hosts[0];
644
+ let colCount = host ? host.getColumnCount() : 0;
645
+ for(let c = 0; c < colCount; ++c) {
646
+ let colData = this._getColumnData(c, host);
647
+ if(colData && colData.isCheckboxColumn) {
648
+ this._displayColumn = c;
649
+ break;
650
+ }
651
+ }
652
+ }
653
+ return this._displayColumn;
654
+ };
655
+ /** @public
656
+ * @function
657
+ * @param {number}
658
+ * @return {number} Return negative number if the column not found
659
+ */
660
+ CheckboxPlugin.prototype.getDisplayColumn = CheckboxPlugin.prototype.getCheckboxColumnIndex;
661
+ /** @public
662
+ * @param {Object} sectionRef Grid SectionReference object
663
+ * @param {number} rowIndex
664
+ * @return {Element}
665
+ */
666
+ CheckboxPlugin.prototype.getCheckbox = function (sectionRef, rowIndex) {
667
+ let host = this._hosts[0];
668
+ let sectionSettings = host.getSectionSettings(sectionRef);
669
+ if(sectionSettings) {
670
+ return this._getCheckbox(sectionSettings, rowIndex);
671
+ }
672
+
673
+ return null;
674
+ };
675
+
676
+
677
+ /** @private
678
+ * @param {Object} sectionSettings Grid sectionSettings object
679
+ * @param {number} colIndex
680
+ * @param {number} rowIndex
681
+ * @return {Element}
682
+ */
683
+ CheckboxPlugin.prototype._createCheckbox = function (sectionSettings, colIndex, rowIndex) {
684
+ let section = sectionSettings.getSection();
685
+
686
+ let cell = section.getCell(colIndex, rowIndex);
687
+ if(!cell) {
688
+ return null;
689
+ }
690
+ let content = cell.getContent();
691
+ if(content && content._chkbox) {
692
+ return content;
693
+ }
694
+
695
+ if(this._coralCheckboxVer === -1) {
696
+ this._coralCheckboxVer = ElfUtil.hasComponent("ef-checkbox");
697
+ }
698
+
699
+ let chkbox;
700
+ if(this._coralCheckboxVer) {
701
+ chkbox = document.createElement("ef-checkbox");
702
+ } else {
703
+ chkbox = document.createElement("input");
704
+ chkbox.setAttribute("type", "checkbox");
705
+ }
706
+ chkbox._chkbox = true;
707
+
708
+ chkbox.addEventListener("click", this._onCheckboxClicked, false);
709
+ chkbox.addEventListener("keydown", this._onCheckboxKeydown, false);
710
+ chkbox.addEventListener("mousedown", this._onCheckboxMousedown, false);
711
+ // chkbox.addEventListener("checked-changed", this._onCheckboxClicked, false); // Elf v3
712
+
713
+ cell.setContent(chkbox);
714
+ let sectionType = sectionSettings.getType();
715
+ if(sectionType === "title") {
716
+ chkbox.setAttribute("aria-label", "all rows");
717
+ }
718
+
719
+ if(!this._coralCheckboxVer) { // Workaround for UIFR theme styling
720
+ let lbl = document.createElement("label");
721
+ let id = "tr_grid_checkbox_" + CheckboxPlugin._runningId++;
722
+ chkbox.setAttribute("id", id);
723
+ lbl.setAttribute("for", id);
724
+ chkbox.parentElement.appendChild(lbl); // HACK
725
+ }
726
+
727
+ this._dispatch("checkboxCreated", {
728
+ "input": chkbox
729
+ , "checkbox": chkbox
730
+ , "cell": cell
731
+ , "colIndex": colIndex
732
+ , "rowIndex": rowIndex
733
+ , "grid": this._hosts[0]
734
+ , "section": section
735
+ , "sectionType": sectionType
736
+ });
737
+
738
+ return chkbox;
739
+ };
740
+
741
+
742
+ /** Select/check all checkboxes that are not affected by filtering and pagination logics. This is equivalent to ticking the checkbox at the top header section of the grid
743
+ * @public
744
+ */
745
+ CheckboxPlugin.prototype.selectAll = function () {
746
+ this.checkAll(true);
747
+ };
748
+ /** Deselect/uncheck all checkboxes that are not affected by filtering and pagination logics. This is equivalent to un-ticking the checkbox at the top header section of the grid
749
+ * @public
750
+ * @param {boolean} check
751
+ */
752
+ CheckboxPlugin.prototype.deselectAll = function () {
753
+ this.checkAll(false);
754
+ };
755
+ /** Select/check all spicified content checkboxes that are in view
756
+ * @public
757
+ * @param {Array.<number|string>} rowRefs
758
+ * @param {boolean} checked
759
+ */
760
+ CheckboxPlugin.prototype.selectCheckboxes = function (rowRefs) {
761
+ this.setCheckStates(rowRefs, true);
762
+ };
763
+ /** Select/check all spicified content checkboxes that are in view
764
+ * @public
765
+ * @param {Array.<number|string>} rowRefs
766
+ * @param {boolean} checked
767
+ */
768
+ CheckboxPlugin.prototype.deselectCheckboxes = function (rowRefs) {
769
+ this.setCheckStates(rowRefs, false);
770
+ };
771
+ /** Set check state to all spicified content checkboxes that are in view
772
+ * @public
773
+ * @param {Array.<number|string>} rowRefs
774
+ * @param {boolean} checked
775
+ */
776
+ CheckboxPlugin.prototype.setCheckStates = function (rowRefs, checked) {
777
+ if(!rowRefs) {
778
+ return;
779
+ }
780
+ let ary = Array.isArray(rowRefs) ? rowRefs : [rowRefs];
781
+ let len = ary.length;
782
+ if(!len) {
783
+ return;
784
+ }
785
+
786
+ // TODO: Support multi-table mode
787
+ let host = this._hosts[0];
788
+ let sectionSettings = host.getSectionSettings("content");
789
+ let dv = sectionSettings.getDataSource();
790
+ if(!dv) {
791
+ return;
792
+ }
793
+
794
+ let rids = [];
795
+ let i;
796
+ for(i = 0; i < len; ++i) {
797
+ let ref = ary[i];
798
+ let rid = (typeof ref === "string") ? ref : dv.getRowId(ref);
799
+ rids = CheckboxPlugin._collectRowMemberId(dv, rids, rid);
800
+ }
801
+ if(rids.length) {
802
+ rids = rids.filter(CheckboxPlugin._checkableRow.bind(null, dv, this._isCheckboxDisabled));
803
+ this._setColumnData(dv, this._checkboxField, checked, rids);
804
+ }
805
+ };
806
+
807
+ /** This is equivalent to clicking the checkbox at the top header section of the grid. <br>
808
+ * Use {@link CheckboxPlugin#setAllCheckStates} to set all states regardless of filtering and pagination
809
+ * @public
810
+ * @param {boolean} checked Truthy or Falsy value
811
+ * @see {@link CheckboxPlugin#setAllCheckStates}
812
+ */
813
+ CheckboxPlugin.prototype.checkAll = function (checked) {
814
+ let state = CheckboxPlugin._toCheckState(checked != null ? checked : true);
815
+ let host = this._hosts[0];
816
+ let titles = host ? host.getAllSectionSettings("title") : null;
817
+ if(!titles) return;
818
+
819
+ let rootSettings;
820
+ for(let i = 0; i < titles.length; ++i) { // Find the root settings
821
+ if(titles[i].getChildren()) {
822
+ rootSettings = titles[i];
823
+ break;
824
+ }
825
+ }
826
+ if(!rootSettings) { return; }
827
+
828
+ this._setSectionState(rootSettings, state);
829
+ this._setDescendantCheckState(rootSettings, state);
830
+ };
831
+ /** Set state for all checkboxes regardless of filtering and pagination
832
+ * @public
833
+ * @param {boolean} checked Truthy or Falsy value
834
+ * @see {@link CheckboxPlugin#checkAll}
835
+ */
836
+ CheckboxPlugin.prototype.setAllCheckStates = function (checked) {
837
+ checked = checked ? true : false;
838
+ let host = this._hosts[0];
839
+ let dv = host ? host.getDataSource() : null;
840
+ let dt = dv ? dv.getDataSource() : null;
841
+
842
+ if(dt) {
843
+ // TODO: Check if we need to omit disabled checkboxes
844
+ let rids = dt.getAllRowIds(true); // TODO: Check if we can use shallow copy
845
+ this._setColumnData(dv, this._checkboxField, checked, rids);
846
+ }
847
+ };
848
+
849
+ /** Set state for all checkboxes regardless of pagination, state would be apply to all filtered data
850
+ * @public
851
+ * @param {boolean=} checked Truthy or Falsy value
852
+ * @see {@link CheckboxPlugin#checkAll}
853
+ */
854
+ CheckboxPlugin.prototype.selectAllPages = function (checked) {
855
+ let host = this._hosts[0];
856
+ let dv = host ? host.getDataSource() : null;
857
+ if(!dv) {
858
+ return;
859
+ }
860
+
861
+ let allRids = dv.getSortedRowIds(true); // All row ids with filter applied, including disabled and pagination
862
+ allRids = allRids.filter(CheckboxPlugin._checkableRow.bind(null, dv, this._isCheckboxDisabled));
863
+
864
+ let state = checked != null ? checked : true;
865
+ this._setColumnData(dv, this._checkboxField, state, allRids);
866
+ };
867
+
868
+ /** @public
869
+ * @param {number|string} rowRef Row id in the data table or row index
870
+ * @param {boolean} disabled Truthy or Falsy value
871
+ */
872
+ CheckboxPlugin.prototype.disableCheckbox = function(rowRef, disabled) {
873
+ let host = this._hosts[0];
874
+ let dv = host ? host.getDataSource() : null;
875
+ if(!dv) { return; }
876
+
877
+ if(typeof rowRef === "string") {
878
+ // TODO: should allow invisible row
879
+ rowRef = dv.getRowIndex(rowRef);
880
+ }
881
+
882
+ if(rowRef == null || rowRef < 0) {
883
+ return;
884
+ }
885
+
886
+ this._setData(dv, rowRef, this._disablingField, disabled !== false);
887
+ };
888
+ /** @private
889
+ * @param {Object} view DataView object
890
+ * @param {string} rowId in the data table or row index
891
+ * @returns {boolean} disabled Truthy or Falsy value
892
+ */
893
+ CheckboxPlugin.prototype._isCheckboxDisabled = function(view, rowId) {
894
+ let rowData = this._getRowFromId(view, rowId);
895
+ if(rowData) {
896
+ return rowData[this._disablingField] ? true : false;
897
+ }
898
+ return false;
899
+ };
900
+
901
+ /** @public
902
+ * @param {number|string} rowRef Row id in the data table or row index
903
+ */
904
+ CheckboxPlugin.prototype.enableCheckbox = function(rowRef) {
905
+ this.disableCheckbox(rowRef, false);
906
+ };
907
+
908
+ /** WARNING: Index is not reliable when use with row grouping due to dynamic nature of the features (e.g. expanding and collapsing of the group). <br>
909
+ * Please use {@link CheckboxPlugin#getSelectedRowData} instead. <br>
910
+ * Current behavior is to get selected index from un-filtered rows.
911
+ * @public
912
+ * @param {Object} sectionRef Grid SectionReference object
913
+ * @param {string=} state Specifies state for searching. Default is "checked"
914
+ * @return {!Array.<number>} the indices are relative to the specified section
915
+ * @see {@link CheckboxPlugin#getSelectedRowData}
916
+ */
917
+ CheckboxPlugin.prototype.getAllCheckedIndices = function (sectionRef, state) {
918
+ let ary = [];
919
+ let colIndex = this.getCheckboxColumnIndex();
920
+ let host = colIndex >= 0 ? this._hosts[0] : null;
921
+ let sectionSettings = host ? host.getSectionSettings(sectionRef) : null;
922
+
923
+ if(sectionSettings) {
924
+ if(state == null) { state = "checked"; }
925
+ let r, rowCount;
926
+ if(this._isDataBound(sectionSettings)) {
927
+ let dv = sectionSettings.getDataSource();
928
+ let rowIds = dv.getVisibleRowIds(true); // Filter and pagination are applied
929
+ rowCount = rowIds.length;
930
+ for(r = 0; r < rowCount; ++r) {
931
+ let rowData = this._getRowFromId(dv, rowIds[r]);
932
+ if(rowData) {
933
+ if(CheckboxPlugin._toCheckState(rowData[this._checkboxField]) === state) {
934
+ ary.push(r);
935
+ }
936
+ }
937
+ }
938
+ } else {
939
+ let section = sectionSettings.getSection();
940
+ rowCount = section.getRowCount();
941
+ for(r = 0; r < rowCount; ++r) {
942
+ let chkbox = this._getCheckbox(section, r);
943
+ if(CheckboxPlugin._getCheckState(chkbox) === state) {
944
+ ary.push(r);
945
+ }
946
+ }
947
+ }
948
+ }
949
+ return ary;
950
+ };
951
+
952
+ /** Return selected rows, excluding rows that are filtered or hidden due to pagination.
953
+ * @public
954
+ * @param {string=} field="" When field is not provided, entire rowData is returned. If field is specified, field values will be returned. Use "ROW_ID" as the field for retrieving internal row ids.
955
+ * @return {!Array} Returns selected rows
956
+ */
957
+ CheckboxPlugin.prototype.getFilteredSelectedData = function (field) {
958
+ let host = this._hosts[0];
959
+ return this._getSelectedRowData(host ? host.getDataSource() : null, field);
960
+ };
961
+
962
+ /** Returns all selected rows, even if the rows are filtered or hidden due to group collapsing or pagination. <br>
963
+ * Note that the results are NOT shown in order of the current appearance (i.e. sorting has no impact).
964
+ * @public
965
+ * @param {string=} field="" When field is not provided, entire rowData is returned. If field is specified, field values will be returned. Use "ROW_ID" as the field for retrieving internal row ids.
966
+ * @return {!Array} Returns selected rows
967
+ * @example
968
+ * chkBoxExtension.getSelectedRowData(); // Get all selected row data in this format [{}, {}, ... RowData objects, {}]
969
+ * chkBoxExtension.getSelectedRowData("field"); // Get all field values from selected row data in this format [value1, value2, ... values, valueN]
970
+ */
971
+ CheckboxPlugin.prototype.getAllSelectedData = function (field) {
972
+ let host = this._hosts[0];
973
+ let dv = host ? host.getDataSource() : null;
974
+ let dt = dv ? dv.getDataSource() : null; // get All selected Data we use dataTable instead
975
+ return this._getSelectedRowData(dt, field);
976
+ };
977
+
978
+ /** Alias of {@link CheckboxPlugin#getAllSelectedData}
979
+ * @public
980
+ * @function
981
+ * @param {string=} field="" When field is not provided, entire rowData is returned. If field is specified, field values will be returned. Use "ROW_ID" as the field for retrieving internal row ids.
982
+ * @return {!Array} Returns selected rows
983
+ */
984
+ CheckboxPlugin.prototype.getSelectedRowData = CheckboxPlugin.prototype.getAllSelectedData;
985
+
986
+ /** @private
987
+ * @param {Object} dataSource DataView or DataTable object
988
+ * @return {!Array} Returns selected row ids
989
+ */
990
+ CheckboxPlugin.prototype._getSelectedRowIds = function (dataSource) {
991
+ if(!dataSource || this.getCheckboxColumnIndex() < 0) {
992
+ return [];
993
+ }
994
+
995
+ let rowIds = this._getRowMemberIdsInView(dataSource);
996
+ let rowCount = rowIds.length;
997
+ let selRowIds = [];
998
+ let i, rowId;
999
+ for(i = 0; i < rowCount; ++i) {
1000
+ rowId = rowIds[i];
1001
+ if(this._getCheckboxValue(dataSource, rowId)) {
1002
+ selRowIds.push(rowId);
1003
+ }
1004
+ }
1005
+ return selRowIds;
1006
+ };
1007
+
1008
+ /** @private
1009
+ * @param {Object} dataSource DataView or DataTable object
1010
+ * @param {string=} field="" When field is not provided, entire rowData is returned. If field is specified, field values will be returned. Use "ROW_ID" as the field for retrieving internal row ids.
1011
+ * @return {!Array} Returns selected rows
1012
+ */
1013
+ CheckboxPlugin.prototype._getSelectedRowData = function (dataSource, field) {
1014
+ let selRowIds = this._getSelectedRowIds(dataSource);
1015
+ let i, rowCount = selRowIds.length;
1016
+ if(field === "ROW_ID" || rowCount === 0) {
1017
+ return selRowIds; // Row Ids
1018
+ } else {
1019
+ let selRows = new Array(rowCount);
1020
+ for(i = 0; i < rowCount; ++i) {
1021
+ selRows[i] = this._getRowFromId(dataSource, selRowIds[i]);
1022
+ }
1023
+ if(field) {
1024
+ let values = new Array(rowCount);
1025
+ for(i = 0; i < rowCount; ++i) {
1026
+ values[i] = selRows[i][field];
1027
+ }
1028
+ return values; // Field values
1029
+ } else {
1030
+ return selRows; // Row objects
1031
+ }
1032
+ }
1033
+ };
1034
+
1035
+ /** @private
1036
+ * @function
1037
+ * @param {Object} dv DataView
1038
+ * @param {string} rowId
1039
+ * @return {boolean} Check State
1040
+ */
1041
+ CheckboxPlugin.prototype._getRowFromId = function (dv, rowId) {
1042
+ return this._rowGetter(dv.getRowData(rowId));
1043
+ };
1044
+ /** @private
1045
+ * @param {Object} dv DataView
1046
+ * @param {string} rowId
1047
+ * @return {boolean} Check State
1048
+ */
1049
+ CheckboxPlugin.prototype._getCheckboxValue = function (dv, rowId) {
1050
+ let row = this._getRowFromId(dv, rowId);
1051
+ if(row) {
1052
+ return row[this._checkboxField] ? true : false;
1053
+ }
1054
+ return false;
1055
+ };
1056
+ /** @private
1057
+ * @param {Object} dv DataView
1058
+ * @return {string} state
1059
+ */
1060
+ CheckboxPlugin.prototype._getGroupState = function (dv) {
1061
+ if(!dv) {
1062
+ return "unchecked";
1063
+ }
1064
+
1065
+ let rowIds = null;
1066
+ if(dv.getGroupLevel && dv.getGroupLevel() === 0) { // Root group
1067
+ rowIds = this._getRowMemberIdsInView(dv);
1068
+ } else { // Subgroup
1069
+ rowIds = dv.getAllRowIds(true); // Getting shallow copy and excluding header rows
1070
+ rowIds = rowIds.filter(CheckboxPlugin._checkableRow.bind(null, dv, this._isCheckboxDisabled));
1071
+ }
1072
+
1073
+ let len = rowIds.length;
1074
+ if(!len) {
1075
+ return "unchecked";
1076
+ }
1077
+
1078
+ let state = "";
1079
+ for(let i = 0; i < len; ++i) {
1080
+ state = CheckboxPlugin._mergeState(
1081
+ state,
1082
+ CheckboxPlugin._toCheckState(this._getCheckboxValue(dv, rowIds[i]))
1083
+ );
1084
+ }
1085
+ return state;
1086
+ };
1087
+ /** @private
1088
+ * @param {Object} dv DataView
1089
+ * @return {boolean} state
1090
+ */
1091
+ CheckboxPlugin.prototype._getGroupDisabledState = function (dv) {
1092
+ if(!dv) {
1093
+ return false;
1094
+ }
1095
+
1096
+ let rowIds = this._getRowMemberIdsInView(dv);
1097
+ let len = rowIds.length;
1098
+ for(let i = 0; i < len; ++i) {
1099
+ if(!this._isCheckboxDisabled(dv, rowIds[i])) {
1100
+ return false;
1101
+ }
1102
+ }
1103
+ return true;
1104
+ };
1105
+ /** @private
1106
+ * @param {Object} sectionSettings Grid sectionSettings object
1107
+ * @return {string}
1108
+ */
1109
+ CheckboxPlugin.prototype._getSectionState = function (sectionSettings) {
1110
+ if(this._isDataBound(sectionSettings)) {
1111
+ return this._getGroupState(sectionSettings.getDataSource());
1112
+ } else {
1113
+ let checkboxes = this._getAllCheckboxes(sectionSettings);
1114
+ let states = checkboxes.map(CheckboxPlugin._getCheckState);
1115
+ return CheckboxPlugin._mergeStates(states);
1116
+ }
1117
+ };
1118
+ /** @private
1119
+ * @param {Object} sectionSettings Section or SectionSettings
1120
+ * @param {number} rowIndex
1121
+ * @return {Element}
1122
+ */
1123
+ CheckboxPlugin.prototype._getCheckbox = function (sectionSettings, rowIndex) {
1124
+ let section = sectionSettings.getSection ? sectionSettings.getSection() : sectionSettings;
1125
+ let chkbox = /** @type{Element} */(section.getCellContent(this._displayColumn, rowIndex));
1126
+ if(!chkbox) {
1127
+ return null;
1128
+ } else if(chkbox.tagName === "EF-CHECKBOX") {
1129
+ return chkbox;
1130
+ } else if(chkbox.type === "checkbox") {
1131
+ return chkbox;
1132
+ } else {
1133
+ return null;
1134
+ }
1135
+ };
1136
+ /** @private
1137
+ * @param {Object} sectionSettings Grid sectionSettings object
1138
+ * @param {Array.<Element>=} ary
1139
+ * @return {!Array.<Element>}
1140
+ */
1141
+ CheckboxPlugin.prototype._getAllCheckboxes = function (sectionSettings, ary) {
1142
+ ary = ary || [];
1143
+
1144
+ let section = sectionSettings.getSection();
1145
+ let fi = section.getFirstIndexInView();
1146
+ let li = section.getLastIndexInView();
1147
+ for(let r = fi; r <= li; ++r) { // WARNING: Index could be shifted
1148
+ let chkbox = this._getCheckbox(sectionSettings, r);
1149
+ if(chkbox) { // WARNING: Index is shifted
1150
+ ary.push(chkbox);
1151
+ }
1152
+ }
1153
+ return ary;
1154
+ };
1155
+
1156
+ /** @private
1157
+ * @param {Object} sectionSettings Grid sectionSettings object
1158
+ * @param {string} state
1159
+ */
1160
+ CheckboxPlugin.prototype._setDescendantCheckState = function (sectionSettings, state) {
1161
+ if(!this._topCheckboxHandler){
1162
+ return;
1163
+ }
1164
+ let children = sectionSettings.getChildren();
1165
+ if(children) {
1166
+ for(let i = 0; i < children.length; ++i) {
1167
+ let child = children[i];
1168
+ this._setSectionState(child, state);
1169
+ this._setDescendantCheckState(child, state);
1170
+ }
1171
+ }
1172
+ };
1173
+ /** @private
1174
+ * @param {Object} sectionSettings Grid sectionSettings object
1175
+ * @param {string=} callerState
1176
+ * @param {Object=} dv DataView
1177
+ */
1178
+ CheckboxPlugin.prototype._syncAscendantState = function (sectionSettings, callerState, dv) {
1179
+ let parent = sectionSettings.getParent();
1180
+ let host = this._hosts[0];
1181
+ if(!host || !parent || !parent.getSection().isVisible()) { return; }
1182
+
1183
+ let i;
1184
+ let state = callerState || "";
1185
+ if(state !== "partial") {
1186
+ if(!callerState) {
1187
+ sectionSettings = null; // Force checking state of the caller
1188
+ }
1189
+
1190
+ let children = parent.getChildren();
1191
+ if(children) {
1192
+ for(i = children.length; --i >= 0; ) {
1193
+ let child = children[i];
1194
+ if(child !== sectionSettings) {
1195
+ let childState = this._getSectionState(child);
1196
+ state = CheckboxPlugin._mergeState(childState, state);
1197
+ if(state === "partial") {
1198
+ break;
1199
+ }
1200
+ }
1201
+ }
1202
+ }
1203
+ }
1204
+
1205
+ // sync disable status to header checkbox
1206
+ if(dv) {
1207
+ let titleSection = host.getSectionSettings("title");
1208
+ let disabled = this._getGroupDisabledState(dv);
1209
+ let checkboxes = this._getAllCheckboxes(titleSection);
1210
+ checkboxes.forEach(disabled ? CheckboxPlugin._addDisabledProp : CheckboxPlugin._removeDisabledProp);
1211
+ }
1212
+
1213
+ this._setSectionState(parent, state);
1214
+ this._syncAscendantState(parent, state);
1215
+ };
1216
+ /** @private
1217
+ * @param {Object} sectionSettings Grid sectionSettings object
1218
+ * @param {string} state
1219
+ */
1220
+ CheckboxPlugin.prototype._setSectionState = function (sectionSettings, state) {
1221
+ if(!state) {
1222
+ return;
1223
+ }
1224
+
1225
+ if(this._isDataBound(sectionSettings)) {
1226
+ let checked = (state !== "unchecked");
1227
+ let dv = /** @type{DataView} */(sectionSettings.getDataSource());
1228
+ let memberRids = this._getRowMemberIdsInView(dv);
1229
+ this._setColumnData(dv, this._checkboxField, checked, memberRids);
1230
+ } else {
1231
+ let checkboxes = this._getAllCheckboxes(sectionSettings);
1232
+ for(let i = checkboxes.length; --i >= 0; ) {
1233
+ CheckboxPlugin._setCheckState(checkboxes[i], state);
1234
+ }
1235
+ }
1236
+ };
1237
+
1238
+ /** similar to check section type = content
1239
+ * @private
1240
+ * @param {Object} sectionSettings Grid sectionSettings object
1241
+ * @return {boolean}
1242
+ */
1243
+ CheckboxPlugin.prototype._isDataBound = function (sectionSettings) {
1244
+ if(this._checkboxField) {
1245
+ if(sectionSettings.getDataSource()) {
1246
+ if(sectionSettings.getType() === "content") {
1247
+ return true;
1248
+ }
1249
+ }
1250
+ }
1251
+ return false;
1252
+ };
1253
+
1254
+ /** @private
1255
+ * @param {Object=} e
1256
+ */
1257
+ CheckboxPlugin.prototype._onColumnIndexChanged = function (e) {
1258
+ this._displayColumn = -1;
1259
+ };
1260
+ /** @private
1261
+ * @param {Object=} e
1262
+ */
1263
+ CheckboxPlugin.prototype._onColumnAdded = function(e) {
1264
+ if(this._initializing) {
1265
+ return;
1266
+ }
1267
+
1268
+ let host = this._hosts[0];
1269
+ if(host) {
1270
+ let column = e.context;
1271
+ if(column) {
1272
+ if(column.checkboxColumn) { // Ignore this if we already have one
1273
+ let existingCheckbox = this.getCheckboxColumnIndex();
1274
+ if(existingCheckbox < 0) { // Only if there is no existing checkbox column
1275
+ this._displayColumn = e.colIndex;
1276
+ let colData = this._newColumnData(e.colIndex, host);
1277
+ colData.isCheckboxColumn = true; // Mark the column for later referencing
1278
+ // TODO: Extend or replace the column options with our checkbox column
1279
+ }
1280
+ }
1281
+ this._requestUIPopulation();
1282
+ }
1283
+ }
1284
+ };
1285
+ /** @private
1286
+ * @param {Object=} e
1287
+ */
1288
+ CheckboxPlugin.prototype._requestUIPopulation = function (e) {
1289
+ if(!this._updateTimer) {
1290
+ this._updateTimer = setTimeout(this._populateUIs, 50);
1291
+ }
1292
+ };
1293
+
1294
+ /** @private */
1295
+ CheckboxPlugin.prototype._populateUIs = function () {
1296
+ this._updateTimer = 0;
1297
+
1298
+ if(this._initializing) { return; }
1299
+
1300
+ let host = this._hosts[0];
1301
+ if(!host) { return; }
1302
+
1303
+ this._initializing = true;
1304
+
1305
+ if(this._userCheckboxIdx >= 0) {
1306
+ // TODO: Ensure that the index is valid with current grid UI
1307
+ this._displayColumn = this._userCheckboxIdx;
1308
+ this._userCheckboxIdx = -1;
1309
+ } else {
1310
+ this._displayColumn = -1; // Force updating to avoid duplication with existing checkbox column
1311
+ this.getCheckboxColumnIndex();
1312
+
1313
+ if(this._displayColumn < 0) {
1314
+ // In case checkbox extension doesn't load during grid beforeInit (eg. load checkbox extension at runtime)
1315
+ let chbxCol = this._genCheckboxColumn();
1316
+ if(this._compositeGrid) { // TODO: This could be unnecessary workaround
1317
+ let model = this._compositeGrid.getModel();
1318
+ let columns = model ? model.columns : null;
1319
+ if(columns) {
1320
+ columns.unshift(chbxCol); // TODO: Check if this is appropriate
1321
+ }
1322
+ host.insertColumn(0, chbxCol); // preSectionRender and columnAdded is fired
1323
+ } else if(this._realTimeGrid) { // TODO: Handle multiple grids
1324
+ this._realTimeGrid.insertColumn(chbxCol, 0);
1325
+ }
1326
+
1327
+ this._displayColumn = 0;
1328
+ }
1329
+ }
1330
+
1331
+ let colData = this._newColumnData(this._displayColumn, host);
1332
+ colData.isCheckboxColumn = true; // Mark the column for later referencing
1333
+
1334
+ // HACK: for filter-input extension
1335
+ let filterInput = colData.filterInputOption;
1336
+ if(!filterInput) {
1337
+ filterInput = colData.filterInputOption = {};
1338
+ }
1339
+ filterInput.disabled = true;
1340
+
1341
+ this._createCheckboxes(host.getSectionSettings("title")); // For title
1342
+ host.requestRowRefresh(); // For content
1343
+ this._initializing = false;
1344
+ };
1345
+
1346
+ /** @private
1347
+ * @param {Event} e
1348
+ * @param {boolean=} toggling
1349
+ */
1350
+ CheckboxPlugin.prototype._onCheckboxChanged = function (e, toggling) {
1351
+ let chkbox = e ? /** @type{Element} */(e.currentTarget) : null;
1352
+ if(!chkbox) {
1353
+ return;
1354
+ }
1355
+
1356
+ // after checkbox change by user clicked action
1357
+ // the checkbox state is change only 'unchecked' or 'checked' only
1358
+ // so we must remove 'square-shape' class that use in only 'partial' state
1359
+ chkbox.classList.remove('square-shape');
1360
+
1361
+ let newState = CheckboxPlugin._getCheckState(chkbox);
1362
+ if(toggling) {
1363
+ newState = CheckboxPlugin._toggleState(newState);
1364
+ }
1365
+ let checked = newState !== "unchecked";
1366
+
1367
+ let host = this._hosts[0];
1368
+ let pos = host.getRelativePosition(e); // Getting row index
1369
+ let sectionSettings = pos["sectionSettings"];
1370
+ if(!sectionSettings) {
1371
+ return; // Unsuccessful hit testing
1372
+ }
1373
+
1374
+ if(this._isDataBound(sectionSettings)) {
1375
+ let dv = sectionSettings.getDataSource();
1376
+ let rowIndex = pos["rowIndex"];
1377
+ let rid = dv.getRowId(rowIndex);
1378
+
1379
+ if(this._isCheckboxDisabled(dv, rid)) { // TODO: Check if this is necessary
1380
+ return;
1381
+ }
1382
+
1383
+
1384
+ let changeRange = null;
1385
+ if(e.shiftKey && this._anchorRowId) { // Select/deselect range of checkboxes
1386
+ let prevIndex = dv.getRowIndex(this._anchorRowId);
1387
+ if(prevIndex >= 0) {
1388
+ let i;
1389
+ if(prevIndex < rowIndex) {
1390
+ changeRange = [];
1391
+ for(i = prevIndex; i <= rowIndex; ++i) {
1392
+ changeRange.push(i);
1393
+ }
1394
+ } else if(rowIndex < prevIndex) {
1395
+ changeRange = [];
1396
+ for(i = rowIndex; i <= prevIndex; ++i) {
1397
+ changeRange.push(i);
1398
+ }
1399
+ }
1400
+ }
1401
+ }
1402
+
1403
+ if(changeRange) {
1404
+ this.setCheckStates(changeRange, !e.altKey);
1405
+ } else {
1406
+ let subGroup = dv.getGroupByRowId(rid);
1407
+ if(subGroup) {
1408
+ let rowMemberIds = this._getRowMemberIdsOfSubgroup(dv, subGroup);
1409
+ this._setColumnData(dv, this._checkboxField, checked, rowMemberIds);
1410
+
1411
+ // WORKAROUND: to force group move to next state from partial state
1412
+ if(newState === 'checked' && chkbox._prevState === 'partial') {
1413
+ chkbox._forceNewState = newState;
1414
+ }
1415
+ } else {
1416
+ this._setData(dv, rowIndex, this._checkboxField, checked);
1417
+ }
1418
+ }
1419
+ }
1420
+
1421
+ this._setDescendantCheckState(sectionSettings, newState); // This only works with root section where root UI is linked with its children section.
1422
+ this._syncAscendantState(sectionSettings); // The clicked row may be a member of row group and thus the state has to be calculated
1423
+
1424
+ if(this.hasListener("clicked")) {
1425
+ pos["checkbox"] = chkbox;
1426
+ pos["checkState"] = newState;
1427
+ pos["checked"] = checked;
1428
+ this._dispatch("clicked", pos);
1429
+ }
1430
+
1431
+ e.stopPropagation();
1432
+ };
1433
+
1434
+ /** @public
1435
+ * @description Check/Uncheck a specified row by a simulated mouse click input. This is for testing purpose.
1436
+ * @ignore
1437
+ * @param {Object} sectionRef Grid SectionReference object
1438
+ * @param {number} rowIndex
1439
+ * @param {Object=} context
1440
+ */
1441
+ CheckboxPlugin.prototype.toggleCheckByMouse = function(sectionRef, rowIndex, context) {
1442
+ let eventObj = context || {};
1443
+ eventObj.sectionType = sectionRef;
1444
+ eventObj = this._mockMouseEvent(this._displayColumn, rowIndex, eventObj);
1445
+
1446
+ let checkbox = this.getCheckbox(sectionRef, rowIndex);
1447
+ if(!checkbox) {
1448
+ return;
1449
+ }
1450
+ let curState = CheckboxPlugin._getCheckState(checkbox);
1451
+ CheckboxPlugin._setBooleanProp(checkbox, "checked", curState !== "checked");
1452
+ eventObj.currentTarget = eventObj.target = checkbox;
1453
+
1454
+ this._onCheckboxMousedown(eventObj);
1455
+ this._onCheckboxClicked(eventObj);
1456
+ };
1457
+ /** @public
1458
+ * @description Supply an keyboard input. This is for testing purpose.
1459
+ * @ignore
1460
+ * @param {string} keyName
1461
+ * @param {number} rowIndex
1462
+ * @param {Object} context
1463
+ */
1464
+ CheckboxPlugin.prototype.supplyKey = function(keyName, rowIndex, context) {
1465
+ let checkbox = this.getCheckbox("content", rowIndex);
1466
+ let eventObj = this._mockKeyboardEvent(keyName, context);
1467
+ eventObj.currentTarget = eventObj.target = checkbox;
1468
+ this._onCheckboxKeydown(eventObj);
1469
+ };
1470
+
1471
+ /** @private
1472
+ * @param {Event} e
1473
+ */
1474
+ CheckboxPlugin.prototype._onCheckboxClicked = function (e) {
1475
+ let v1 = this._coralCheckboxVer === 1;
1476
+ if(v1) {
1477
+ // Workaround for duplicate event from ef-checkbox
1478
+ if(e.target.tagName === "LABEL") {
1479
+ return;
1480
+ }
1481
+ }
1482
+
1483
+ // State of the ef-checkbox will not be reflected immediately after click in ELF v1
1484
+ this._onCheckboxChanged(e, v1);
1485
+ };
1486
+ /** @private
1487
+ * @param {Event} e
1488
+ */
1489
+ CheckboxPlugin.prototype._onCheckboxKeydown = function (e) {
1490
+ let keyCode = e.keyCode;
1491
+ if(keyCode === 32) {
1492
+ this._onCheckboxMousedown(e); // Set anchor if no shift key is pressed
1493
+ this._onCheckboxChanged(e, true);
1494
+ e.preventDefault();
1495
+ } if(keyCode === 38 || keyCode === 40) { // Arrow key up and down
1496
+ let host = this._hosts[0];
1497
+ let pos = host.getRelativePosition(e.currentTarget);
1498
+ if(pos.sectionType === "content") {
1499
+ let dv = host.getDataSource();
1500
+ let offset = (keyCode === 38) ? -1 : 1;
1501
+ let nextIndex = pos.rowIndex + offset;
1502
+ let rowId = dv.getRowId(nextIndex);
1503
+ if(rowId) {
1504
+ host.scrollToRow(null, nextIndex);
1505
+ let chkbox = this._getCheckbox(pos.section, nextIndex);
1506
+ if(chkbox) {
1507
+ chkbox.focus();
1508
+ }
1509
+ e.preventDefault();
1510
+ }
1511
+ }
1512
+
1513
+
1514
+ }
1515
+ };
1516
+ /** @private
1517
+ * @param {Event} e
1518
+ */
1519
+ CheckboxPlugin.prototype._onCheckboxMousedown = function (e) {
1520
+ if(!e.shiftKey) {
1521
+ this._anchorRowId = "";
1522
+ let host = this._hosts[0];
1523
+ let pos = host.getRelativePosition(e.currentTarget);
1524
+ if(pos.sectionType === "content") {
1525
+ let dv = host.getDataSource();
1526
+ this._anchorRowId = dv.getRowId(pos.rowIndex);
1527
+ }
1528
+ }
1529
+ };
1530
+
1531
+ /** get member items in view. the items in view are items on current page and already filtered , include items in collapsed group
1532
+ * @private
1533
+ * @param {Object} view Root DataView object
1534
+ * @param {Object} targetGroup Subgroup DataView object
1535
+ * @return {!Array.<string>} list of row member ids of group in view
1536
+ */
1537
+ CheckboxPlugin.prototype._getRowMemberIdsOfSubgroup = function (view, targetGroup) {
1538
+ let memberIds = this._getRowMemberIdsInView(view); // Slow
1539
+
1540
+ // WARNING: Subgroup header row may not be in the view
1541
+ let subgroupMembers = targetGroup.isCollapsed() ? targetGroup.getAllRowIds(true) : targetGroup.getVisibleRowIds(true);
1542
+ let beginPos = 0;
1543
+ let result = [];
1544
+ let len = subgroupMembers.length;
1545
+ // TODO: Use object map instead of indexOf for checking
1546
+ for(let i = 0; i < len; i++) {
1547
+ let subgroupMember = subgroupMembers[i];
1548
+ let pos = memberIds.indexOf(subgroupMember, beginPos);
1549
+ if(pos >= 0) {
1550
+ beginPos = pos + 1;
1551
+ result.push(subgroupMember);
1552
+ }
1553
+ }
1554
+
1555
+ return result;
1556
+ };
1557
+
1558
+ /** Get all member rows that are in the given view and all members in a collapsed group. This excludes group header row ids.
1559
+ * Only valid row ids are returned. Row expansions and disabled rows are excluded.
1560
+ * @private
1561
+ * @param {Object} view DataView or DataTable object
1562
+ * @return {!Array.<string>} list of row member ids in view
1563
+ */
1564
+ CheckboxPlugin.prototype._getRowMemberIdsInView = function (view) {
1565
+ if(view.getDataSource()) { // check is dataView
1566
+ // TODO: support multi-level grouping
1567
+ // if view is DataView -> view.getVisibleRowIds(true) will get member and group rowIds in view
1568
+ let rids = view.isCollapsed() ? view.getAllRowIds(true) : view.getVisibleRowIds(true); // get All member and group rowIds
1569
+ let len = rids.length;
1570
+ let allRids = [];
1571
+ for(let i = 0; i < len; i++) { // loop check whether rowIds is group or just row member
1572
+ allRids = CheckboxPlugin._collectRowMemberId(view, allRids, rids[i]);
1573
+ }
1574
+
1575
+ // if view is DataView, the intention is to get data with applied filter/hidden. row expansion should also filtered out.
1576
+ return allRids.filter(CheckboxPlugin._checkableRow.bind(null, view, this._isCheckboxDisabled));
1577
+ } else {
1578
+ // if view is DataTable -> view.getAllRowIds(true) will get all member in grid regardless of hidden/filtered state.
1579
+ return view.getAllRowIds(true);
1580
+ }
1581
+ };
1582
+
1583
+ /** @private
1584
+ * @param {Object} e
1585
+ */
1586
+ CheckboxPlugin.prototype._onPreSectionRender = function (e) {
1587
+ let displayCol = this.getCheckboxColumnIndex();
1588
+ if(displayCol < e["fromColIndex"] || displayCol >= e["toColIndex"]) {
1589
+ return;
1590
+ }
1591
+
1592
+ let sectionSettings = /** @type{SectionSettings} */(e["sectionSettings"]);
1593
+ if(sectionSettings.getType() !== "title") {
1594
+ return;
1595
+ }
1596
+ this._createCheckboxes(sectionSettings, e["fromRowIndex"], e["toRowIndex"]);
1597
+ };
1598
+
1599
+ /** @private
1600
+ * @param {Object} sectionSettings core grid sectionSettings
1601
+ * @param {number=} fromRow
1602
+ * @param {number=} toRow
1603
+ */
1604
+ CheckboxPlugin.prototype._createCheckboxes = function (sectionSettings, fromRow, toRow) {
1605
+ let displayCol = this.getCheckboxColumnIndex();
1606
+ if(displayCol < 0) {
1607
+ return;
1608
+ }
1609
+ if(!sectionSettings) {
1610
+ return;
1611
+ }
1612
+ if(CheckboxPlugin._exceptions[sectionSettings.getSectionName()]) {
1613
+ return;
1614
+ }
1615
+
1616
+ let section = sectionSettings.getSection();
1617
+ let fi = (fromRow != null) ? fromRow : section.getFirstIndexInView();
1618
+ let li = (toRow != null) ? toRow : section.getLastIndexInView() + 1;
1619
+
1620
+ for(let r = fi; r < li; ++r) {
1621
+ this._createCheckbox(sectionSettings, displayCol, r);
1622
+ }
1623
+ };
1624
+ /** @private
1625
+ * @param {Object} e
1626
+ */
1627
+ CheckboxPlugin.prototype._onPostSectionDataBinding = function (e) {
1628
+ if(!this._checkboxField) {
1629
+ return;
1630
+ }
1631
+ let displayCol = this.getCheckboxColumnIndex();
1632
+ if(displayCol < 0) { return; }
1633
+
1634
+ let section = /** @type{ILayoutGrid} */(e["section"]);
1635
+ let dv = /** @type{DataView} */(e["dataSource"]);
1636
+
1637
+ let fromR = /** @type{number} */(e["fromRowIndex"]);
1638
+ if(dv.hasGroup()) { // This is because we need to update group header when any group member is updated
1639
+ fromR = section.getFirstIndexInView();
1640
+ }
1641
+
1642
+ let toR = /** @type{number} */(e["toRowIndex"]);
1643
+ let bindingCount = toR - fromR;
1644
+ if(bindingCount <= 0) {
1645
+ return;
1646
+ }
1647
+
1648
+ let checkboxes = new Array(bindingCount);
1649
+
1650
+ let i, rowIndex, chkbox, rowData;
1651
+ let arg = null;
1652
+ let hasBinding = this.hasListener("checkboxBinding");
1653
+ if(hasBinding) {
1654
+ arg = {
1655
+ "colIndex": displayCol
1656
+ };
1657
+ }
1658
+
1659
+ let sectionSettings = /** @type{SectionSettings} */(e["sectionSettings"]);
1660
+ for(i = 0; i < bindingCount; ++i) {
1661
+ rowIndex = fromR + i;
1662
+ chkbox = checkboxes[i] = this._getCheckbox(sectionSettings, rowIndex);
1663
+ if(!chkbox) {
1664
+ chkbox = checkboxes[i] = this._createCheckbox(sectionSettings, this._displayColumn, rowIndex);
1665
+ }
1666
+ chkbox.setAttribute("aria-label", "row " + rowIndex);
1667
+ let rowId = dv.getRowId(rowIndex); // Slow
1668
+ rowData = this._getRowFromId(dv, rowId);
1669
+ if(hasBinding && chkbox) {
1670
+ arg["checkbox"] = chkbox;
1671
+ arg["rowIndex"] = rowIndex;
1672
+ arg["rowData"] = rowData;
1673
+ this._dispatch("checkboxBinding", arg);
1674
+ }
1675
+
1676
+ let disabled = false;
1677
+ let state = "";
1678
+ if(rowData) {
1679
+ state = CheckboxPlugin._toCheckState(rowData[this._checkboxField]);
1680
+ disabled = rowData[this._disablingField] === true;
1681
+ } else { // Group header row has no rowData
1682
+ let groupSetting = dv.getGroupByRowId(rowId);
1683
+ disabled = this._getGroupDisabledState(groupSetting);
1684
+ state = disabled ? "unchecked" : this._getGroupState(groupSetting);
1685
+ }
1686
+ if(this._autoRowSelection) {
1687
+ section.setSelectedRow(rowIndex, (rowData || false) && state === "checked");
1688
+ }
1689
+
1690
+ if(chkbox) {
1691
+ CheckboxPlugin._setBooleanProp(chkbox, "disabled", disabled);
1692
+ CheckboxPlugin._setCheckState(chkbox, state);
1693
+ }
1694
+ }
1695
+
1696
+ if(e.actualUpdate) {
1697
+ this._syncAscendantState(e["sectionSettings"], null, dv);
1698
+ }
1699
+ };
1700
+
1701
+
1702
+
1703
+ export default CheckboxPlugin;
1704
+ export { CheckboxPlugin, CheckboxPlugin as Checkbox, CheckboxPlugin as CheckboxExtension };