@refinitiv-ui/efx-grid 6.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (837) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +61 -0
  3. package/lib/column-format-dialog/index.d.ts +1 -0
  4. package/lib/column-format-dialog/index.js +1 -0
  5. package/lib/column-format-dialog/lib/column-format-dialog.d.ts +64 -0
  6. package/lib/column-format-dialog/lib/column-format-dialog.js +2713 -0
  7. package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
  8. package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
  9. package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
  10. package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
  11. package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
  12. package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
  13. package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  14. package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
  15. package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
  16. package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
  17. package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
  18. package/lib/column-format-dialog/lib/locale/translation.js +18 -0
  19. package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
  20. package/lib/column-format-dialog/lib/preview-table.js +995 -0
  21. package/lib/column-format-dialog/themes/base.less +429 -0
  22. package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
  23. package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
  24. package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  25. package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
  26. package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
  27. package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
  28. package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  29. package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
  30. package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
  31. package/lib/column-format-dialog/themes/elemental/index.less +5 -0
  32. package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
  33. package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
  34. package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
  35. package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
  36. package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
  37. package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  38. package/lib/column-format-dialog/themes/elemental/light.js +16 -0
  39. package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
  40. package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
  41. package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
  42. package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
  43. package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
  44. package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
  45. package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  46. package/lib/column-format-dialog/themes/halo/dark.js +16 -0
  47. package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
  48. package/lib/column-format-dialog/themes/halo/index.less +5 -0
  49. package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
  50. package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
  51. package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
  52. package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
  53. package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
  54. package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
  55. package/lib/column-format-dialog/themes/halo/light.js +16 -0
  56. package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
  57. package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
  58. package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
  59. package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
  60. package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
  61. package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
  62. package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
  63. package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
  64. package/lib/column-format-dialog/themes/luna/index.less +5 -0
  65. package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
  66. package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  67. package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
  68. package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
  69. package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
  70. package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  71. package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
  72. package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
  73. package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
  74. package/lib/column-format-dialog/themes/solar/index.less +5 -0
  75. package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
  76. package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  77. package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
  78. package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
  79. package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
  80. package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  81. package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
  82. package/lib/column-selection-dialog/index.d.ts +1 -0
  83. package/lib/column-selection-dialog/index.js +1 -0
  84. package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +41 -0
  85. package/lib/column-selection-dialog/lib/column-selection-dialog.js +1410 -0
  86. package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
  87. package/lib/column-selection-dialog/lib/locale/translation-de.js +19 -0
  88. package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
  89. package/lib/column-selection-dialog/lib/locale/translation-en.js +19 -0
  90. package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
  91. package/lib/column-selection-dialog/lib/locale/translation-ja.js +19 -0
  92. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  93. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +19 -0
  94. package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
  95. package/lib/column-selection-dialog/lib/locale/translation-zh.js +19 -0
  96. package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
  97. package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
  98. package/lib/column-selection-dialog/themes/base.less +189 -0
  99. package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
  100. package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
  101. package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  102. package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
  103. package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
  104. package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
  105. package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  106. package/lib/column-selection-dialog/themes/elemental/dark.js +6 -0
  107. package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
  108. package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
  109. package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
  110. package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
  111. package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
  112. package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
  113. package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
  114. package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  115. package/lib/column-selection-dialog/themes/elemental/light.js +6 -0
  116. package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +22 -0
  117. package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
  118. package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
  119. package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
  120. package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
  121. package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
  122. package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  123. package/lib/column-selection-dialog/themes/halo/dark.js +6 -0
  124. package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
  125. package/lib/column-selection-dialog/themes/halo/index.less +6 -0
  126. package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
  127. package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
  128. package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
  129. package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
  130. package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
  131. package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
  132. package/lib/column-selection-dialog/themes/halo/light.js +6 -0
  133. package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
  134. package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  135. package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
  136. package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
  137. package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
  138. package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  139. package/lib/column-selection-dialog/themes/solar/charcoal.js +6 -0
  140. package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +1 -0
  141. package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
  142. package/lib/column-selection-dialog/themes/solar/index.less +6 -0
  143. package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
  144. package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  145. package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
  146. package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
  147. package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
  148. package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  149. package/lib/column-selection-dialog/themes/solar/pearl.js +6 -0
  150. package/lib/core/dist/core.css +1 -0
  151. package/lib/core/dist/core.js +28075 -0
  152. package/lib/core/dist/core.min.js +1 -0
  153. package/lib/core/es6/data/ColumnStats.d.ts +42 -0
  154. package/lib/core/es6/data/ColumnStats.js +428 -0
  155. package/lib/core/es6/data/DataCache.d.ts +81 -0
  156. package/lib/core/es6/data/DataCache.js +1317 -0
  157. package/lib/core/es6/data/DataTable.d.ts +125 -0
  158. package/lib/core/es6/data/DataTable.js +1655 -0
  159. package/lib/core/es6/data/DataView.d.ts +280 -0
  160. package/lib/core/es6/data/DataView.js +3654 -0
  161. package/lib/core/es6/data/Segment.d.ts +38 -0
  162. package/lib/core/es6/data/Segment.js +193 -0
  163. package/lib/core/es6/data/SegmentCollection.d.ts +58 -0
  164. package/lib/core/es6/data/SegmentCollection.js +431 -0
  165. package/lib/core/es6/grid/Core.d.ts +387 -0
  166. package/lib/core/es6/grid/Core.js +4939 -0
  167. package/lib/core/es6/grid/ILayoutGrid.d.ts +204 -0
  168. package/lib/core/es6/grid/ILayoutGrid.js +658 -0
  169. package/lib/core/es6/grid/LayoutGrid.d.ts +23 -0
  170. package/lib/core/es6/grid/LayoutGrid.js +2602 -0
  171. package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +18 -0
  172. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +907 -0
  173. package/lib/core/es6/grid/components/Cell.d.ts +50 -0
  174. package/lib/core/es6/grid/components/Cell.js +740 -0
  175. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +19 -0
  176. package/lib/core/es6/grid/components/CellFloatingPanel.js +123 -0
  177. package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
  178. package/lib/core/es6/grid/components/CellSpan.js +99 -0
  179. package/lib/core/es6/grid/components/CellSpans.d.ts +38 -0
  180. package/lib/core/es6/grid/components/CellSpans.js +341 -0
  181. package/lib/core/es6/grid/components/Column.d.ts +22 -0
  182. package/lib/core/es6/grid/components/Column.js +612 -0
  183. package/lib/core/es6/grid/components/ElementWrapper.d.ts +125 -0
  184. package/lib/core/es6/grid/components/ElementWrapper.js +714 -0
  185. package/lib/core/es6/grid/components/HScrollbar.d.ts +24 -0
  186. package/lib/core/es6/grid/components/HScrollbar.js +222 -0
  187. package/lib/core/es6/grid/components/Scrollbar.d.ts +61 -0
  188. package/lib/core/es6/grid/components/Scrollbar.js +1374 -0
  189. package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
  190. package/lib/core/es6/grid/components/StretchedCells.js +328 -0
  191. package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
  192. package/lib/core/es6/grid/components/VScrollbar.js +139 -0
  193. package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
  194. package/lib/core/es6/grid/components/VirtualItems.js +51 -0
  195. package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
  196. package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
  197. package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
  198. package/lib/core/es6/grid/event/EventListeners.js +163 -0
  199. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
  200. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +615 -0
  201. package/lib/core/es6/grid/plugins/Plugin.d.ts +28 -0
  202. package/lib/core/es6/grid/plugins/Plugin.js +272 -0
  203. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +127 -0
  204. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1707 -0
  205. package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
  206. package/lib/core/es6/grid/util/Conflator.js +191 -0
  207. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +18 -0
  208. package/lib/core/es6/grid/util/ElementFrameWork.js +227 -0
  209. package/lib/core/es6/grid/util/HttpRequest.d.ts +53 -0
  210. package/lib/core/es6/grid/util/HttpRequest.js +371 -0
  211. package/lib/core/es6/grid/util/PercentBar.d.ts +43 -0
  212. package/lib/core/es6/grid/util/PercentBar.js +390 -0
  213. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +41 -0
  214. package/lib/core/es6/grid/util/PercentBarRenderer.js +316 -0
  215. package/lib/core/es6/grid/util/RangeBar.d.ts +25 -0
  216. package/lib/core/es6/grid/util/RangeBar.js +255 -0
  217. package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
  218. package/lib/core/es6/grid/util/Reverter.js +79 -0
  219. package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
  220. package/lib/core/es6/grid/util/SectionSettings.js +674 -0
  221. package/lib/core/es6/grid/util/SelectionList.d.ts +50 -0
  222. package/lib/core/es6/grid/util/SelectionList.js +422 -0
  223. package/lib/core/es6/grid/util/TrackLayout.d.ts +84 -0
  224. package/lib/core/es6/grid/util/TrackLayout.js +850 -0
  225. package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
  226. package/lib/core/es6/grid/util/Virtualizer.js +340 -0
  227. package/lib/core/es6/grid/util/util.d.ts +18 -0
  228. package/lib/core/es6/grid/util/util.js +450 -0
  229. package/lib/core/es6/index.d.ts +84 -0
  230. package/lib/core/es6/index.js +132 -0
  231. package/lib/core/es6/tr-grid-theme.d.ts +5 -0
  232. package/lib/core/es6/tr-grid-theme.js +5 -0
  233. package/lib/filter-dialog/index.d.ts +1 -0
  234. package/lib/filter-dialog/index.js +1 -0
  235. package/lib/filter-dialog/lib/checkbox-list.d.ts +27 -0
  236. package/lib/filter-dialog/lib/checkbox-list.js +336 -0
  237. package/lib/filter-dialog/lib/filter-dialog.d.ts +53 -0
  238. package/lib/filter-dialog/lib/filter-dialog.js +860 -0
  239. package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
  240. package/lib/filter-dialog/lib/locale/translation-de.js +37 -0
  241. package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
  242. package/lib/filter-dialog/lib/locale/translation-en.js +37 -0
  243. package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
  244. package/lib/filter-dialog/lib/locale/translation-ja.js +37 -0
  245. package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  246. package/lib/filter-dialog/lib/locale/translation-zh-hant.js +37 -0
  247. package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
  248. package/lib/filter-dialog/lib/locale/translation-zh.js +37 -0
  249. package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
  250. package/lib/filter-dialog/lib/locale/translation.js +18 -0
  251. package/lib/filter-dialog/themes/base-checkbox.less +37 -0
  252. package/lib/filter-dialog/themes/base.less +102 -0
  253. package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
  254. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
  255. package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  256. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
  257. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
  258. package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
  259. package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
  260. package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  261. package/lib/filter-dialog/themes/elemental/dark.js +11 -0
  262. package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
  263. package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
  264. package/lib/filter-dialog/themes/elemental/index.less +6 -0
  265. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
  266. package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
  267. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
  268. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
  269. package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
  270. package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
  271. package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  272. package/lib/filter-dialog/themes/elemental/light.js +11 -0
  273. package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
  274. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
  275. package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
  276. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
  277. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
  278. package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
  279. package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
  280. package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  281. package/lib/filter-dialog/themes/halo/dark.js +11 -0
  282. package/lib/filter-dialog/themes/halo/defaults.less +3 -0
  283. package/lib/filter-dialog/themes/halo/filter-dialog.less +9 -0
  284. package/lib/filter-dialog/themes/halo/index.less +6 -0
  285. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
  286. package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
  287. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
  288. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
  289. package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
  290. package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
  291. package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
  292. package/lib/filter-dialog/themes/halo/light.js +11 -0
  293. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
  294. package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  295. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
  296. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
  297. package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
  298. package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
  299. package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  300. package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
  301. package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
  302. package/lib/filter-dialog/themes/solar/defaults.less +3 -0
  303. package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
  304. package/lib/filter-dialog/themes/solar/index.less +6 -0
  305. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
  306. package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  307. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
  308. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
  309. package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
  310. package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
  311. package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  312. package/lib/filter-dialog/themes/solar/pearl.js +11 -0
  313. package/lib/formatters/es6/CoralButtonFormatter.d.ts +22 -0
  314. package/lib/formatters/es6/CoralButtonFormatter.js +40 -0
  315. package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
  316. package/lib/formatters/es6/CoralCheckboxFormatter.js +45 -0
  317. package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
  318. package/lib/formatters/es6/CoralComboBoxFormatter.js +102 -0
  319. package/lib/formatters/es6/CoralIconFormatter.d.ts +23 -0
  320. package/lib/formatters/es6/CoralIconFormatter.js +45 -0
  321. package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
  322. package/lib/formatters/es6/CoralInputFormatter.js +40 -0
  323. package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +22 -0
  324. package/lib/formatters/es6/CoralRadioButtonFormatter.js +80 -0
  325. package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
  326. package/lib/formatters/es6/CoralSelectFormatter.js +66 -0
  327. package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
  328. package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
  329. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
  330. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
  331. package/lib/formatters/es6/EFButtonFormatter.d.ts +22 -0
  332. package/lib/formatters/es6/EFButtonFormatter.js +40 -0
  333. package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
  334. package/lib/formatters/es6/EFCheckboxFormatter.js +45 -0
  335. package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
  336. package/lib/formatters/es6/EFComboBoxFormatter.js +68 -0
  337. package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
  338. package/lib/formatters/es6/EFDateTimePickerFormatter.js +55 -0
  339. package/lib/formatters/es6/EFIconFormatter.d.ts +23 -0
  340. package/lib/formatters/es6/EFIconFormatter.js +45 -0
  341. package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
  342. package/lib/formatters/es6/EFNumberFieldFormatter.js +40 -0
  343. package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +22 -0
  344. package/lib/formatters/es6/EFRadioButtonFormatter.js +80 -0
  345. package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
  346. package/lib/formatters/es6/EFSelectFormatter.js +66 -0
  347. package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
  348. package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
  349. package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
  350. package/lib/formatters/es6/EFToggleFormatter.js +47 -0
  351. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
  352. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
  353. package/lib/formatters/es6/FormatterBuilder.d.ts +22 -0
  354. package/lib/formatters/es6/FormatterBuilder.js +334 -0
  355. package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
  356. package/lib/formatters/es6/NumericInputFormatter.js +64 -0
  357. package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
  358. package/lib/formatters/es6/PercentBarFormatter.js +62 -0
  359. package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
  360. package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
  361. package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
  362. package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
  363. package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
  364. package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
  365. package/lib/formatters/es6/SimpleTickerFormatter.d.ts +25 -0
  366. package/lib/formatters/es6/SimpleTickerFormatter.js +65 -0
  367. package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
  368. package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
  369. package/lib/formatters/es6/TextFormatter.d.ts +12 -0
  370. package/lib/formatters/es6/TextFormatter.js +30 -0
  371. package/lib/formatters/es6/index.d.ts +43 -0
  372. package/lib/formatters/es6/index.js +67 -0
  373. package/lib/grid/index.d.ts +1 -0
  374. package/lib/grid/index.js +2 -0
  375. package/lib/grid/lib/efx-grid.d.ts +32 -0
  376. package/lib/grid/lib/efx-grid.js +469 -0
  377. package/lib/grid/themes/base.less +134 -0
  378. package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
  379. package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
  380. package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
  381. package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
  382. package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
  383. package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
  384. package/lib/grid/themes/halo/dark.js +3 -0
  385. package/lib/grid/themes/halo/efx-grid.less +92 -0
  386. package/lib/grid/themes/halo/index.less +3 -0
  387. package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
  388. package/lib/grid/themes/halo/light/efx-grid.js +4 -0
  389. package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
  390. package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
  391. package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
  392. package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
  393. package/lib/grid/themes/halo/light.js +3 -0
  394. package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
  395. package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
  396. package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
  397. package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
  398. package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
  399. package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
  400. package/lib/grid/themes/solar/charcoal.js +3 -0
  401. package/lib/grid/themes/solar/efx-grid.less +27 -0
  402. package/lib/grid/themes/solar/index.less +3 -0
  403. package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
  404. package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
  405. package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
  406. package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
  407. package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
  408. package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
  409. package/lib/grid/themes/solar/pearl.js +3 -0
  410. package/lib/index.d.ts +102 -0
  411. package/lib/index.js +102 -0
  412. package/lib/row-segmenting/es6/RowSegmenting.d.ts +83 -0
  413. package/lib/row-segmenting/es6/RowSegmenting.js +592 -0
  414. package/lib/row-segmenting/es6/index.d.ts +1 -0
  415. package/lib/row-segmenting/es6/index.js +1 -0
  416. package/lib/rt-grid/dist/rt-grid.js +44672 -0
  417. package/lib/rt-grid/dist/rt-grid.min.js +1 -0
  418. package/lib/rt-grid/es6/ColumnDefinition.d.ts +141 -0
  419. package/lib/rt-grid/es6/ColumnDefinition.js +1074 -0
  420. package/lib/rt-grid/es6/DataConnector.d.ts +37 -0
  421. package/lib/rt-grid/es6/DataConnector.js +266 -0
  422. package/lib/rt-grid/es6/FieldDefinition.d.ts +20 -0
  423. package/lib/rt-grid/es6/FieldDefinition.js +418 -0
  424. package/lib/rt-grid/es6/Grid.d.ts +261 -0
  425. package/lib/rt-grid/es6/Grid.js +2893 -0
  426. package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
  427. package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
  428. package/lib/rt-grid/es6/ReferenceCounter.d.ts +38 -0
  429. package/lib/rt-grid/es6/ReferenceCounter.js +230 -0
  430. package/lib/rt-grid/es6/RowDefinition.d.ts +120 -0
  431. package/lib/rt-grid/es6/RowDefinition.js +873 -0
  432. package/lib/rt-grid/es6/SnapshotFiller.d.ts +21 -0
  433. package/lib/rt-grid/es6/SnapshotFiller.js +252 -0
  434. package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
  435. package/lib/rt-grid/es6/StyleLoader.js +47 -0
  436. package/lib/rt-grid/es6/index.d.ts +8 -0
  437. package/lib/rt-grid/es6/index.js +43 -0
  438. package/lib/statistics-row/es6/StatisticsRow.d.ts +67 -0
  439. package/lib/statistics-row/es6/StatisticsRow.js +786 -0
  440. package/lib/statistics-row/es6/index.d.ts +1 -0
  441. package/lib/statistics-row/es6/index.js +1 -0
  442. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +45 -0
  443. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +431 -0
  444. package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
  445. package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
  446. package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +67 -0
  447. package/lib/tr-grid-cell-selection/es6/CellSelection.js +1777 -0
  448. package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
  449. package/lib/tr-grid-cell-selection/es6/index.js +1 -0
  450. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +69 -0
  451. package/lib/tr-grid-checkbox/es6/Checkbox.js +1476 -0
  452. package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
  453. package/lib/tr-grid-checkbox/es6/index.js +1 -0
  454. package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
  455. package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +1000 -0
  456. package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
  457. package/lib/tr-grid-column-fitter/es6/index.js +1 -0
  458. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +89 -0
  459. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +615 -0
  460. package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
  461. package/lib/tr-grid-column-formatting/es6/index.js +1 -0
  462. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +60 -0
  463. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +913 -0
  464. package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
  465. package/lib/tr-grid-column-grouping/es6/index.js +1 -0
  466. package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
  467. package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1013 -0
  468. package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
  469. package/lib/tr-grid-column-resizing/es6/index.js +1 -0
  470. package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +70 -0
  471. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +928 -0
  472. package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
  473. package/lib/tr-grid-column-selection/es6/index.js +1 -0
  474. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +76 -0
  475. package/lib/tr-grid-column-stack/es6/ColumnStack.js +1227 -0
  476. package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
  477. package/lib/tr-grid-column-stack/es6/index.js +1 -0
  478. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +70 -0
  479. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +947 -0
  480. package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
  481. package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
  482. package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
  483. package/lib/tr-grid-content-wrap/es6/ContentWrap.js +478 -0
  484. package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
  485. package/lib/tr-grid-content-wrap/es6/index.js +1 -0
  486. package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
  487. package/lib/tr-grid-contextmenu/es6/ContextMenu.js +471 -0
  488. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
  489. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +133 -0
  490. package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +39 -0
  491. package/lib/tr-grid-contextmenu/es6/MenuItem.js +245 -0
  492. package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +29 -0
  493. package/lib/tr-grid-contextmenu/es6/PopupMenu.js +292 -0
  494. package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
  495. package/lib/tr-grid-contextmenu/es6/index.js +1 -0
  496. package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +57 -0
  497. package/lib/tr-grid-filter-input/es6/FilterInput.js +928 -0
  498. package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
  499. package/lib/tr-grid-filter-input/es6/index.js +1 -0
  500. package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +44 -0
  501. package/lib/tr-grid-heat-map/es6/HeatMap.js +394 -0
  502. package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
  503. package/lib/tr-grid-heat-map/es6/index.js +1 -0
  504. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +129 -0
  505. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +1977 -0
  506. package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
  507. package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
  508. package/lib/tr-grid-pagination/es6/Pagination.d.ts +57 -0
  509. package/lib/tr-grid-pagination/es6/Pagination.js +427 -0
  510. package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
  511. package/lib/tr-grid-pagination/es6/index.js +1 -0
  512. package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
  513. package/lib/tr-grid-percent-bar/es6/PercentBar.js +801 -0
  514. package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
  515. package/lib/tr-grid-percent-bar/es6/index.js +1 -0
  516. package/lib/tr-grid-printer/es6/CellWriter.d.ts +49 -0
  517. package/lib/tr-grid-printer/es6/CellWriter.js +226 -0
  518. package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +12 -0
  519. package/lib/tr-grid-printer/es6/ColumnWriter.js +21 -0
  520. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +32 -0
  521. package/lib/tr-grid-printer/es6/GridPrinter.js +761 -0
  522. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +38 -0
  523. package/lib/tr-grid-printer/es6/PrintTrait.js +481 -0
  524. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +54 -0
  525. package/lib/tr-grid-printer/es6/SectionWriter.js +205 -0
  526. package/lib/tr-grid-printer/es6/index.d.ts +1 -0
  527. package/lib/tr-grid-printer/es6/index.js +1 -0
  528. package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +39 -0
  529. package/lib/tr-grid-range-bar/es6/RangeBar.js +353 -0
  530. package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
  531. package/lib/tr-grid-range-bar/es6/index.js +1 -0
  532. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +53 -0
  533. package/lib/tr-grid-row-dragging/es6/RowDragging.js +794 -0
  534. package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
  535. package/lib/tr-grid-row-dragging/es6/index.js +1 -0
  536. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +118 -0
  537. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +1884 -0
  538. package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
  539. package/lib/tr-grid-row-filtering/es6/index.js +1 -0
  540. package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +109 -0
  541. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1541 -0
  542. package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
  543. package/lib/tr-grid-row-grouping/es6/index.js +1 -0
  544. package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +74 -0
  545. package/lib/tr-grid-row-selection/es6/RowSelection.js +1202 -0
  546. package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
  547. package/lib/tr-grid-row-selection/es6/index.js +1 -0
  548. package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +60 -0
  549. package/lib/tr-grid-rowcoloring/es6/RowColoring.js +611 -0
  550. package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
  551. package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
  552. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +77 -0
  553. package/lib/tr-grid-textformatting/es6/TextFormatting.js +574 -0
  554. package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
  555. package/lib/tr-grid-textformatting/es6/index.js +1 -0
  556. package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +29 -0
  557. package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
  558. package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
  559. package/lib/tr-grid-titlewrap/es6/index.js +1 -0
  560. package/lib/tr-grid-util/es6/CellPainter.d.ts +136 -0
  561. package/lib/tr-grid-util/es6/CellPainter.js +1128 -0
  562. package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
  563. package/lib/tr-grid-util/es6/Conflator.js +193 -0
  564. package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
  565. package/lib/tr-grid-util/es6/CoralItems.js +42 -0
  566. package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
  567. package/lib/tr-grid-util/es6/DateTime.js +508 -0
  568. package/lib/tr-grid-util/es6/Deferred.d.ts +14 -0
  569. package/lib/tr-grid-util/es6/Deferred.js +98 -0
  570. package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
  571. package/lib/tr-grid-util/es6/Delay.js +85 -0
  572. package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
  573. package/lib/tr-grid-util/es6/Dom.js +346 -0
  574. package/lib/tr-grid-util/es6/ElementObserver.d.ts +10 -0
  575. package/lib/tr-grid-util/es6/ElementObserver.js +101 -0
  576. package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
  577. package/lib/tr-grid-util/es6/ElementWrapper.js +83 -0
  578. package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
  579. package/lib/tr-grid-util/es6/ElfDate.js +163 -0
  580. package/lib/tr-grid-util/es6/ElfUtil.d.ts +33 -0
  581. package/lib/tr-grid-util/es6/ElfUtil.js +458 -0
  582. package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
  583. package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
  584. package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +27 -0
  585. package/lib/tr-grid-util/es6/ExpanderIcon.js +169 -0
  586. package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
  587. package/lib/tr-grid-util/es6/Ext.js +52 -0
  588. package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
  589. package/lib/tr-grid-util/es6/FieldFormatter.js +432 -0
  590. package/lib/tr-grid-util/es6/FilterBuilder.d.ts +48 -0
  591. package/lib/tr-grid-util/es6/FilterBuilder.js +521 -0
  592. package/lib/tr-grid-util/es6/FilterOperators.d.ts +41 -0
  593. package/lib/tr-grid-util/es6/FilterOperators.js +181 -0
  594. package/lib/tr-grid-util/es6/GridPlugin.d.ts +72 -0
  595. package/lib/tr-grid-util/es6/GridPlugin.js +747 -0
  596. package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
  597. package/lib/tr-grid-util/es6/Icon.js +61 -0
  598. package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
  599. package/lib/tr-grid-util/es6/MouseDownTrait.js +237 -0
  600. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +32 -0
  601. package/lib/tr-grid-util/es6/MultiTableManager.js +506 -0
  602. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +83 -0
  603. package/lib/tr-grid-util/es6/NumberFormatter.js +471 -0
  604. package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
  605. package/lib/tr-grid-util/es6/PercentBar.js +600 -0
  606. package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
  607. package/lib/tr-grid-util/es6/Perf.js +162 -0
  608. package/lib/tr-grid-util/es6/Popup.d.ts +84 -0
  609. package/lib/tr-grid-util/es6/Popup.js +818 -0
  610. package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
  611. package/lib/tr-grid-util/es6/RangeBar.js +259 -0
  612. package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
  613. package/lib/tr-grid-util/es6/RequestQueue.js +239 -0
  614. package/lib/tr-grid-util/es6/RowPainter.d.ts +23 -0
  615. package/lib/tr-grid-util/es6/RowPainter.js +188 -0
  616. package/lib/tr-grid-util/es6/SubTable.d.ts +74 -0
  617. package/lib/tr-grid-util/es6/SubTable.js +558 -0
  618. package/lib/tr-grid-util/es6/Table.d.ts +125 -0
  619. package/lib/tr-grid-util/es6/Table.js +790 -0
  620. package/lib/tr-grid-util/es6/TextHighlighter.d.ts +18 -0
  621. package/lib/tr-grid-util/es6/TextHighlighter.js +273 -0
  622. package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
  623. package/lib/tr-grid-util/es6/TickCodes.js +33 -0
  624. package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
  625. package/lib/tr-grid-util/es6/Timer.js +49 -0
  626. package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
  627. package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
  628. package/lib/tr-grid-util/es6/Util.d.ts +65 -0
  629. package/lib/tr-grid-util/es6/Util.js +528 -0
  630. package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
  631. package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
  632. package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
  633. package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
  634. package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
  635. package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
  636. package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
  637. package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
  638. package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
  639. package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
  640. package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
  641. package/lib/tr-grid-util/es6/formula/Formula.js +882 -0
  642. package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
  643. package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
  644. package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
  645. package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
  646. package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
  647. package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
  648. package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
  649. package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
  650. package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
  651. package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
  652. package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
  653. package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
  654. package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
  655. package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
  656. package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
  657. package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
  658. package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
  659. package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
  660. package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
  661. package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
  662. package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
  663. package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
  664. package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
  665. package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
  666. package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
  667. package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
  668. package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
  669. package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
  670. package/lib/tr-grid-util/es6/index.d.ts +63 -0
  671. package/lib/tr-grid-util/es6/index.js +99 -0
  672. package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
  673. package/lib/tr-grid-util/es6/jet/CollectionDict.js +141 -0
  674. package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +114 -0
  675. package/lib/tr-grid-util/es6/jet/DataGenerator.js +827 -0
  676. package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
  677. package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
  678. package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
  679. package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
  680. package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
  681. package/lib/tr-grid-util/es6/jet/MockJET.js +63 -0
  682. package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
  683. package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
  684. package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +72 -0
  685. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +564 -0
  686. package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +8 -0
  687. package/lib/tr-grid-util/es6/jet/MockRTK.js +43 -0
  688. package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
  689. package/lib/tr-grid-util/es6/jet/index.js +18 -0
  690. package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
  691. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +131 -0
  692. package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
  693. package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
  694. package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
  695. package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
  696. package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
  697. package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
  698. package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
  699. package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
  700. package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
  701. package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
  702. package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
  703. package/lib/tr-grid-util/es6/locale/translation.js +18 -0
  704. package/lib/types/es6/AutoTooltip.d.ts +45 -0
  705. package/lib/types/es6/CellSelection.d.ts +67 -0
  706. package/lib/types/es6/Checkbox.d.ts +69 -0
  707. package/lib/types/es6/ColumnFitter.d.ts +56 -0
  708. package/lib/types/es6/ColumnFormatting.d.ts +90 -0
  709. package/lib/types/es6/ColumnGrouping.d.ts +60 -0
  710. package/lib/types/es6/ColumnResizing.d.ts +68 -0
  711. package/lib/types/es6/ColumnSelection.d.ts +70 -0
  712. package/lib/types/es6/ColumnStack.d.ts +76 -0
  713. package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
  714. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +38 -0
  715. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
  716. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +287 -0
  717. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +22 -0
  718. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +44 -0
  719. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +30 -0
  720. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +42 -0
  721. package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
  722. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
  723. package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
  724. package/lib/types/es6/ConditionalColoring.d.ts +70 -0
  725. package/lib/types/es6/ContentWrap.d.ts +43 -0
  726. package/lib/types/es6/ContextMenu.d.ts +83 -0
  727. package/lib/types/es6/CoralButtonFormatter.d.ts +22 -0
  728. package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
  729. package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
  730. package/lib/types/es6/CoralIconFormatter.d.ts +23 -0
  731. package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
  732. package/lib/types/es6/CoralRadioButtonFormatter.d.ts +22 -0
  733. package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
  734. package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
  735. package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
  736. package/lib/types/es6/Core/data/DataCache.d.ts +81 -0
  737. package/lib/types/es6/Core/data/DataTable.d.ts +125 -0
  738. package/lib/types/es6/Core/data/DataView.d.ts +280 -0
  739. package/lib/types/es6/Core/data/Segment.d.ts +38 -0
  740. package/lib/types/es6/Core/data/SegmentCollection.d.ts +58 -0
  741. package/lib/types/es6/Core/grid/Core.d.ts +387 -0
  742. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +204 -0
  743. package/lib/types/es6/Core/grid/LayoutGrid.d.ts +23 -0
  744. package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +18 -0
  745. package/lib/types/es6/Core/grid/components/Cell.d.ts +50 -0
  746. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +19 -0
  747. package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
  748. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +38 -0
  749. package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
  750. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +125 -0
  751. package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +24 -0
  752. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +61 -0
  753. package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
  754. package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
  755. package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
  756. package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
  757. package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
  758. package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
  759. package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +28 -0
  760. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +127 -0
  761. package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
  762. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +18 -0
  763. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +53 -0
  764. package/lib/types/es6/Core/grid/util/PercentBar.d.ts +43 -0
  765. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +41 -0
  766. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +25 -0
  767. package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
  768. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
  769. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +50 -0
  770. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +84 -0
  771. package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
  772. package/lib/types/es6/Core/grid/util/util.d.ts +18 -0
  773. package/lib/types/es6/Core/index.d.ts +84 -0
  774. package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
  775. package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
  776. package/lib/types/es6/EFButtonFormatter.d.ts +22 -0
  777. package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
  778. package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
  779. package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
  780. package/lib/types/es6/EFIconFormatter.d.ts +23 -0
  781. package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
  782. package/lib/types/es6/EFRadioButtonFormatter.d.ts +22 -0
  783. package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
  784. package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
  785. package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
  786. package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
  787. package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
  788. package/lib/types/es6/ExtensionOptions.d.ts +52 -0
  789. package/lib/types/es6/Extensions.d.ts +61 -0
  790. package/lib/types/es6/FilterInput.d.ts +57 -0
  791. package/lib/types/es6/FormatterBuilder.d.ts +22 -0
  792. package/lib/types/es6/GridFormatter.d.ts +63 -0
  793. package/lib/types/es6/HeatMap.d.ts +44 -0
  794. package/lib/types/es6/InCellEditing.d.ts +129 -0
  795. package/lib/types/es6/MenuEventAPI.d.ts +22 -0
  796. package/lib/types/es6/MenuItem.d.ts +39 -0
  797. package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
  798. package/lib/types/es6/Pagination.d.ts +57 -0
  799. package/lib/types/es6/PercentBar.d.ts +60 -0
  800. package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
  801. package/lib/types/es6/PopupMenu.d.ts +29 -0
  802. package/lib/types/es6/RangeBar.d.ts +39 -0
  803. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +143 -0
  804. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +37 -0
  805. package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +20 -0
  806. package/lib/types/es6/RealtimeGrid/Grid.d.ts +263 -0
  807. package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
  808. package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +38 -0
  809. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +120 -0
  810. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +21 -0
  811. package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
  812. package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
  813. package/lib/types/es6/RowColoring.d.ts +60 -0
  814. package/lib/types/es6/RowDragging.d.ts +53 -0
  815. package/lib/types/es6/RowFiltering.d.ts +118 -0
  816. package/lib/types/es6/RowGrouping.d.ts +109 -0
  817. package/lib/types/es6/RowSegmenting.d.ts +83 -0
  818. package/lib/types/es6/RowSelection.d.ts +74 -0
  819. package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
  820. package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
  821. package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
  822. package/lib/types/es6/SimpleTickerFormatter.d.ts +25 -0
  823. package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
  824. package/lib/types/es6/StatisticsRow.d.ts +67 -0
  825. package/lib/types/es6/TextFormatter.d.ts +12 -0
  826. package/lib/types/es6/TextFormatting.d.ts +77 -0
  827. package/lib/types/es6/TitleWrap.d.ts +29 -0
  828. package/lib/types/es6/Zoom.d.ts +51 -0
  829. package/lib/types/es6/index.d.ts +76 -0
  830. package/lib/types/index.d.ts +1 -0
  831. package/lib/versions.json +36 -0
  832. package/lib/window-exporter.js +13 -0
  833. package/lib/zoom/es6/Zoom.d.ts +51 -0
  834. package/lib/zoom/es6/Zoom.js +419 -0
  835. package/lib/zoom/es6/index.d.ts +1 -0
  836. package/lib/zoom/es6/index.js +1 -0
  837. package/package.json +42 -0
@@ -0,0 +1,1202 @@
1
+ import { Ext } from '../../tr-grid-util/es6/Ext.js';
2
+ import { EventDispatcher } from '../../tr-grid-util/es6/EventDispatcher.js';
3
+ import { GridPlugin } from '../../tr-grid-util/es6/GridPlugin.js';
4
+ import { isMac as isMacFn } from '../../tr-grid-util/es6/Util.js';
5
+ import { isIE, prepareTSVContent } from "../../tr-grid-util/es6/Util.js";
6
+ var isMac = isMacFn();
7
+ /** Fired when selection is changed by mouse down or key press. A change by JavaScript APIs will not trigger this event.
8
+ * @event RowSelectionPlugin#selectionChanged
9
+ */
10
+
11
+ /** Fired before selectionChanged. We can cancel the select operation by setting `cancel` property on the event arugment to true<br>
12
+ * Note that selection by JavaScript APIs cannot be prevented using this event.
13
+ * @event RowSelectionPlugin#beforeSelection
14
+ * @example
15
+ * var ext = new RowSelectionPlugin();
16
+ * ext.listen("beforeSelection" function(e) {
17
+ * e.cancel = true; // Cancel user selection
18
+ * });
19
+ */
20
+
21
+ /** @typedef {(Object|string)} RowSelectionPlugin~Options
22
+ * @description Extension options available in main grid configuration under `rowSelection` property
23
+ * @property {boolean=} singleSelection=false If enabled, user can have one selection at any moment
24
+ * @property {Function=} selectionChanged=null Handler executed after selection is made
25
+ * @property {Function=} beforeSelection=null Handler executed before selection is made
26
+ * @property {boolean=} basedOnContent=false Normally row selection will not move when data sorted, with this option turn on then selection will relocate strictly with row data.
27
+ * @property {string=} selectionField=SELECTED_ROW Normally basedOnContent will set selection state in row data with field name "SELECTED_ROW" but you can change field name here.
28
+ */
29
+
30
+ /** @constructor
31
+ * @extends {GridPlugin}
32
+ * @param {RowSelectionPlugin~Options=} options
33
+ */
34
+ var RowSelectionPlugin = function (options) {
35
+ var t = this;
36
+ t._onMouseDown = t._onMouseDown.bind(t);
37
+ t._onMouseMove = t._onMouseMove.bind(t);
38
+ t._onCopy = t._onCopy.bind(t);
39
+ t._onClick = t._onClick.bind(t);
40
+ t._onKeyDown = t._onKeyDown.bind(t);
41
+ t._onBeforeRowRemoved = t._onBeforeRowRemoved.bind(t);
42
+ t._onReselection = t._onReselection.bind(t);
43
+ t._onPostSectionDataBinding = t._onPostSectionDataBinding.bind(t);
44
+
45
+ t._hosts = [];
46
+ t._anchorRowDict = {};
47
+ t._isIE = isIE();
48
+ t._textRange = document.createRange();
49
+
50
+ if (options) {
51
+ t.config({ "rowSelection": options });
52
+ }
53
+ };
54
+ Ext.inherits(RowSelectionPlugin, GridPlugin);
55
+
56
+ /** @type {Object}
57
+ * @private
58
+ * @description Core grid instance
59
+ */
60
+ RowSelectionPlugin.prototype._activeGrid = null;
61
+ /** @type {Object}
62
+ * @private
63
+ * @description Grid section object
64
+ */
65
+ RowSelectionPlugin.prototype._anchorSection = null;
66
+ /** @type {boolean}
67
+ * @private
68
+ */
69
+ RowSelectionPlugin.prototype._disabled = false;
70
+ /** @type {boolean}
71
+ * @private
72
+ */
73
+ RowSelectionPlugin.prototype._singleSelMode = false;
74
+ /** @type {boolean}
75
+ * @private
76
+ */
77
+ RowSelectionPlugin.prototype._clickToggleMode = false;
78
+ /** @type {number}
79
+ * @private
80
+ */
81
+ RowSelectionPlugin.prototype._pendingClickIndex = -1;
82
+ /** @type {Array<string>}
83
+ * @private
84
+ */
85
+ RowSelectionPlugin.prototype._basedOnContent = false;
86
+ /** @type {string}
87
+ * @private
88
+ */
89
+ RowSelectionPlugin.prototype._selectionField = "SELECTED_ROW";
90
+ /** @type {Object}
91
+ * @private
92
+ * @description use with _basedOnContent mode for tracking current anchor row
93
+ */
94
+ RowSelectionPlugin.prototype._anchorRowDict = null;
95
+ /** @type {boolean}
96
+ * @private
97
+ */
98
+ RowSelectionPlugin.prototype._isIE = false;
99
+ /** @type {Range}
100
+ * @private
101
+ */
102
+ RowSelectionPlugin.prototype._textRange = null;
103
+ /** @type {number}
104
+ * @private
105
+ */
106
+ RowSelectionPlugin.prototype._timerId = 0;
107
+ /** @type {(number|null)}
108
+ * @private
109
+ */
110
+ RowSelectionPlugin.prototype._pendingSelection = null;
111
+
112
+ /** @public
113
+ * @return {string}
114
+ */
115
+ RowSelectionPlugin.prototype.getName = function () {
116
+ return "RowSelectionPlugin"; // Read Only
117
+ };
118
+
119
+ /** Plugin that has multi-table support means that it can have multiple hosts/tables and share its states across those hosts/tables.
120
+ * @public
121
+ * @return {boolean}
122
+ */
123
+ RowSelectionPlugin.prototype.hasMultiTableSupport = function () {
124
+ return true;
125
+ };
126
+
127
+ /** @public
128
+ * @param {Object} host Core grid instance
129
+ * @param {Object=} options Grid configuration object
130
+ */
131
+ RowSelectionPlugin.prototype.initialize = function (host, options) {
132
+ if (this._hosts.indexOf(host) >= 0) { return; }
133
+ this._hosts.push(host);
134
+
135
+ host.listen("mousedown", this._onMouseDown);
136
+ host.listen("click", this._onClick);
137
+ host.listen("keydown", this._onKeyDown);
138
+ host.listen("postSectionDataBinding", this._onPostSectionDataBinding);
139
+
140
+ var wrapper = this.getGridApi(host);
141
+ if(wrapper) {
142
+ wrapper.listen("beforeRowRemoved", this._onBeforeRowRemoved);
143
+ }
144
+
145
+ // TODO:: listen to copy and cut event when implement autoCopy config
146
+ // host.listen("copy", this._onCopy,);
147
+ // host.listen("cut", this._onCopy);
148
+
149
+ this.config(options);
150
+ };
151
+ /** @public
152
+ * @param {Object=} host core grid instance
153
+ */
154
+ RowSelectionPlugin.prototype.unload = function (host) {
155
+ var at = this._hosts.indexOf(host);
156
+ if (at < 0) { return; }
157
+
158
+ host.unlisten("mousedown", this._onMouseDown);
159
+ host.unlisten("copy", this._onCopy);
160
+ host.unlisten("cut", this._onCopy);
161
+ host.unlisten("click", this._onClick);
162
+ host.unlisten("keydown", this._onKeyDown);
163
+ host.unlisten("postSectionDataBinding", this._onPostSectionDataBinding);
164
+ this._hosts.splice(at, 1);
165
+
166
+ if (!this._hosts.length) {
167
+ if(this._timerId) {
168
+ clearTimeout(this._timerId);
169
+ this._timerId = 0;
170
+ this._pendingSelection = null;
171
+ }
172
+ }
173
+
174
+ this._dispose();
175
+ };
176
+ /** @public
177
+ * @param {Object=} options Grid configuration object
178
+ */
179
+ RowSelectionPlugin.prototype.config = function (options) {
180
+ if (!options) {
181
+ return;
182
+ }
183
+
184
+ var pluginOptions = options["rowSelection"];
185
+
186
+ if (pluginOptions) {
187
+ if (typeof pluginOptions === "object") {
188
+ if (pluginOptions["singleSelection"]) {
189
+ this._singleSelMode = true;
190
+ }
191
+ if (pluginOptions["clickToggle"]) {
192
+ this._clickToggleMode = true;
193
+ }
194
+ if (pluginOptions["basedOnContent"]) {
195
+ this._basedOnContent = true;
196
+ }
197
+ if (pluginOptions["selectionField"]) {
198
+ this._selectionField = pluginOptions["selectionField"];
199
+ }
200
+ } else if (pluginOptions === "single") {
201
+ this._singleSelMode = true;
202
+ }
203
+
204
+ this.addListener(pluginOptions, "selectionChanged");
205
+ this.addListener(pluginOptions, "beforeSelection");
206
+ } else if (pluginOptions != null) {
207
+ this.disable();
208
+ }
209
+ };
210
+
211
+ /** @public
212
+ * @param {Object=} gridOptions
213
+ * @return {!Object}
214
+ */
215
+ RowSelectionPlugin.prototype.getConfigObject = function (gridOptions) {
216
+ var obj = gridOptions || {};
217
+
218
+ var extOptions = obj.rowSelection;
219
+ if(!extOptions) {
220
+ extOptions = obj.rowSelection = {};
221
+ }
222
+ if(this._singleSelMode) {
223
+ extOptions.singleSelection = this._singleSelMode;
224
+ }
225
+ if(this._clickToggleMode) {
226
+ extOptions.clickToggle = this._clickToggleMode;
227
+ }
228
+ if(this._basedOnContent) {
229
+ extOptions.basedOnContent = this._basedOnContent;
230
+ }
231
+ if(this._selectionField !== "SELECTED_ROW") {
232
+ extOptions.selectionField = this._selectionField;
233
+ }
234
+
235
+ return obj;
236
+ };
237
+
238
+ /** Clear all row selection on the active grid
239
+ * @public
240
+ * @param {boolean=} preserveAnchor=true If false, User cannot call Row Selection's apis if not specify an activeGrid. In most case, this argument should be true.
241
+ * @param {Object=} activeGrid Grid for taking user key inputs after clearing
242
+ */
243
+ RowSelectionPlugin.prototype.clearAllSelections = function (preserveAnchor, activeGrid) {
244
+ if (preserveAnchor == null) {
245
+ preserveAnchor = true;
246
+ }
247
+ this._clearSelectedRows(preserveAnchor);
248
+
249
+ if (activeGrid) {
250
+ this._activeGrid = activeGrid;
251
+ }
252
+ };
253
+ /** Alias to clearAllSelections() method
254
+ * @public
255
+ * @function
256
+ * @param {boolean=} preserveAnchor
257
+ * @param {Object=} activeGrid core grid instance
258
+ * @see {@link RowSelectionPlugin#clearAllSelections}
259
+ */
260
+ RowSelectionPlugin.prototype.clearSelectedRows = RowSelectionPlugin.prototype.clearAllSelections;
261
+ /** Alias to clearAllSelections() method
262
+ * @public
263
+ * @function
264
+ * @param {boolean=} preserveAnchor
265
+ * @param {Object=} activeGrid core grid instance
266
+ * @see {@link RowSelectionPlugin#clearAllSelections}
267
+ */
268
+ RowSelectionPlugin.prototype.clearSelection = RowSelectionPlugin.prototype.clearAllSelections;
269
+
270
+
271
+ /** @public
272
+ * @return {Object} core grid instance
273
+ */
274
+ RowSelectionPlugin.prototype.getActiveGrid = function () {
275
+ return this._activeGrid;
276
+ };
277
+ /** @public
278
+ * @param {Object=} sectRef Grid SectionReference
279
+ * @return {number} rowIndex of anchor
280
+ */
281
+ RowSelectionPlugin.prototype.getRowAnchor = function (sectRef) {
282
+ var section = this._getSection(sectRef);
283
+ if (!section || !section.getRowAnchor) return -1;
284
+ if (this._basedOnContent) {
285
+ return this._anchorRowDict[section] || -1;
286
+ } else {
287
+ return section.getRowAnchor();
288
+ }
289
+ };
290
+
291
+ /** @public
292
+ * @param {Object=} sectRef Grid SectionReference
293
+ * @return {number|null}
294
+ */
295
+ RowSelectionPlugin.prototype.getFirstSelectedIndex = function (sectRef) {
296
+ var section = this._getSection(sectRef);
297
+ if (!section) {
298
+ return null;
299
+ } else if (this._basedOnContent) {
300
+ var dv = this._activeGrid ? this._activeGrid.getDataSource() : null;
301
+ if (!dv) return null;
302
+
303
+ var rids = dv.getAllRowIds(true, true);
304
+ var rows = dv.getMultipleRowData(rids);
305
+ var count = rows.length;
306
+ var dataRow;
307
+ for (var rowIndex = 0; rowIndex < count; rowIndex++) {
308
+ dataRow = this._getRowData(rows[rowIndex]);
309
+ if (dataRow && dataRow[this._selectionField]) {
310
+ return rowIndex;
311
+ }
312
+ }
313
+ return null;
314
+ } else {
315
+ return section.getFirstSelectedRow();
316
+ }
317
+ };
318
+
319
+ /** @public
320
+ * @param {Object=} sectRef Grid SectionReference
321
+ * @return {number|null}
322
+ */
323
+ RowSelectionPlugin.prototype.getLastSelectedIndex = function (sectRef) {
324
+ var section = this._getSection(sectRef);
325
+ if (!section) {
326
+ return null;
327
+ } else if (this._basedOnContent) {
328
+ var dv = this._activeGrid ? this._activeGrid.getDataSource() : null;
329
+ if (!dv) return null;
330
+
331
+ var rids = dv.getAllRowIds(true, true);
332
+ var rows = dv.getMultipleRowData(rids);
333
+ var count = rows.length;
334
+ var dataRow;
335
+ for (var rowIndex = count - 1; rowIndex >= 0; rowIndex--) {
336
+ dataRow = this._getRowData(rows[rowIndex]);
337
+ if (dataRow && dataRow[this._selectionField]) {
338
+ return rowIndex;
339
+ }
340
+ }
341
+ return null;
342
+ } else {
343
+ return section.getLastSelectedRow();
344
+ }
345
+ };
346
+
347
+ /** Returns null if there is no selection
348
+ * @public
349
+ * @param {Object=} sectRef Grid SectionReference
350
+ * @return {Array.<number>}
351
+ */
352
+ RowSelectionPlugin.prototype.getSelectedRows = function (sectRef) {
353
+ var section = this._getSection(sectRef);
354
+ if (!section) {
355
+ return null;
356
+ } else if (this._basedOnContent) {
357
+ var dv = this._activeGrid ? this._activeGrid.getDataSource() : null;
358
+ if (!dv) return null;
359
+
360
+ var rids = dv.getAllRowIds(true, true);
361
+ var rows = dv.getMultipleRowData(rids);
362
+ var count = rows.length;
363
+ var selectedRows = [];
364
+ var dataRow;
365
+ for (var rowIndex = 0; rowIndex < count; rowIndex++) {
366
+ dataRow = this._getRowData(rows[rowIndex]);
367
+ if (dataRow && dataRow[this._selectionField]) {
368
+ selectedRows.push(rowIndex);
369
+ }
370
+ }
371
+ return selectedRows.length ? selectedRows : null;
372
+ } else {
373
+ return section.getSelectedRows();
374
+ }
375
+ };
376
+ /** Returns null if there is no selection
377
+ * @public
378
+ * @param {Object=} sectRef Grid SectionReference
379
+ * @return {Array.<string>}
380
+ */
381
+ RowSelectionPlugin.prototype.getSelectedRowIds = function (sectRef) {
382
+ var rids = null;
383
+ var len, i;
384
+
385
+ var selRows = this.getSelectedRows(sectRef);
386
+ if (selRows) {
387
+ var dv = this._activeGrid.getDataSource();
388
+ var rowIds = dv.getAllRowIds(true, true);
389
+ len = selRows.length;
390
+ rids = new Array(len);
391
+ for (i = 0; i < len; ++i) {
392
+ rids[i] = rowIds[selRows[i]] || "";
393
+ }
394
+ }
395
+
396
+ return rids;
397
+ };
398
+ /** @public
399
+ * @param {Object=} sectRef Grid SectionReference
400
+ * @return {number}
401
+ */
402
+ RowSelectionPlugin.prototype.getSelectedRowCount = function (sectRef) {
403
+ var section = this._getSection(sectRef);
404
+ if (!section) return 0;
405
+ if (this._basedOnContent) {
406
+ var selectedRows = this.getSelectedRows();
407
+ return selectedRows ? selectedRows.length : 0;
408
+ } else {
409
+ return section.getSelectedRowCount();
410
+ }
411
+ };
412
+ /** @public
413
+ * @param {number} rowIndex
414
+ * @param {boolean=} opt_select
415
+ * @param {Object=} sectRef Grid SectionReference
416
+ */
417
+ RowSelectionPlugin.prototype.setSelectedRow = function (rowIndex, opt_select, sectRef) {
418
+ var section = this._getSection(sectRef);
419
+ if (!section) { return; }
420
+ this._sectionSetSelectedRow(section, rowIndex, opt_select);
421
+ };
422
+ /**
423
+ * @public
424
+ * @param {number} rowIndex
425
+ * @param {Object=} sectRef Grid SectionReference
426
+ * @param {Object=} activeGrid core grid instance
427
+ * @return {boolean}
428
+ */
429
+ RowSelectionPlugin.prototype.selectSingleRow = function (rowIndex, sectRef, activeGrid) {
430
+ if (!(rowIndex >= 0)) { return false; }
431
+
432
+ // 1. first of all let's clear selectedRows of prevGrid
433
+ var prevGrid = activeGrid ? this._activeGrid : null;
434
+ if (prevGrid) {
435
+ this._clearSelectedRows();
436
+
437
+ // 2. after clear selection let switch active grid
438
+ this._activeGrid = activeGrid; // HACK
439
+ }
440
+
441
+ // 3. now active grid is switch let's normally select row
442
+ var section = this._getSection(sectRef); // TODO: Check if the given section is in the active grid
443
+ if (this._selectSingleRow(section, rowIndex)) {
444
+ this._scrollToRow(rowIndex);
445
+ return true;
446
+ }
447
+ // 4. in case fail to perform _selectSingleRow
448
+ // we will turn back _activeGrid to prevGrid
449
+ else if (prevGrid) {
450
+ this._activeGrid = prevGrid;
451
+ }
452
+
453
+ return false;
454
+ };
455
+ /** @public
456
+ * @param {Object=} activeGrid core grid instance
457
+ */
458
+ RowSelectionPlugin.prototype.selectAllRows = function (activeGrid) {
459
+ if (activeGrid) {
460
+ this._activeGrid = activeGrid;
461
+ } else if (!this._activeGrid) {
462
+ this._activeGrid = this._hosts[0];
463
+ }
464
+
465
+ if (this._activeGrid) {
466
+ var sections = this._activeGrid.getAllSections("content");
467
+ for (var i = sections.length; --i >= 0;) {
468
+ this._selectRowRange(0, sections[i].getRowCount(), sections[i]);
469
+ if (i == 0) {
470
+ this._anchorSection = sections[i];
471
+ }
472
+ }
473
+ }
474
+ };
475
+
476
+ /** @public
477
+ * @param {number} rowIndex
478
+ * @param {number} length
479
+ * @param {Object=} sectRef Grid SectionReference
480
+ * @param {boolean=} opt_scrollToRow
481
+ */
482
+ RowSelectionPlugin.prototype.selectRowRange = function (rowIndex, length, sectRef, opt_scrollToRow) {
483
+ this._selectRowRange(rowIndex, length, sectRef);
484
+
485
+ if (opt_scrollToRow) {
486
+ this._scrollToRow(rowIndex);
487
+ }
488
+ };
489
+
490
+ /** @public
491
+ * @param {boolean=} disabled
492
+ */
493
+ RowSelectionPlugin.prototype.disable = function (disabled) {
494
+ this._disabled = disabled !== false;
495
+ };
496
+ /** @public
497
+ * @return {boolean} enabled
498
+ */
499
+ RowSelectionPlugin.prototype.isEnabled = function () {
500
+ return !this._disabled;
501
+ };
502
+
503
+ /** @public
504
+ * @param {boolean=} disabled
505
+ */
506
+ RowSelectionPlugin.prototype.disableMultiSelection = function (disabled) {
507
+ this._singleSelMode = disabled !== false;
508
+ };
509
+
510
+ /** @private
511
+ * @param {Event} e
512
+ */
513
+ RowSelectionPlugin.prototype._onClick = function (e) {
514
+ if (this._pendingClickIndex >= 0 && this._anchorSection) {
515
+ this._selectSingleRow(this._anchorSection, this._pendingClickIndex);
516
+ var host = this.getRelativeGrid(e);
517
+ this._clearPendingClickIndex(host);
518
+
519
+ this._dispatchSelectionChanged(e);
520
+ }
521
+ };
522
+ /** @private
523
+ * @description Left click will cause single row selection <br>
524
+ * Shift + left click will cause range selection <br>
525
+ * Ctrl + left click will cause inclusion selection <br>
526
+ * Shift/Ctrl + right click will cause single row selection <br>
527
+ * Middle click has no effect
528
+ * @suppress {checkTypes}
529
+ * @param {Event} e
530
+ */
531
+ RowSelectionPlugin.prototype._onMouseDown = function (e) {
532
+ if (this._disabled) {
533
+ return;
534
+ }
535
+ if (e.button === 2) { // Right click
536
+ if (e.shiftKey || e.ctrlKey) {
537
+ return;
538
+ }
539
+ }
540
+
541
+ var host = this.getRelativeGrid(e);
542
+
543
+ this._clearPendingClickIndex(host);
544
+
545
+ if (!host) {
546
+ return;
547
+ }
548
+
549
+ var ctx = host.getRelativePosition(e);
550
+ if (!ctx["hit"] || ctx["sectionType"] !== "content") { return; }
551
+ if (e.button === 2) { // Right click at the selected column should override clicking row to select;
552
+ var csp = this._getPlugin("ColumnSelectionPlugin");
553
+ if (csp && csp['isEnabled']()) {
554
+ if (csp['isSelectedColumn'](ctx["colIndex"])) {
555
+ return;
556
+ }
557
+ }
558
+ }
559
+ var dv = ctx["dataSource"];
560
+ var rowIndex = ctx["rowIndex"];
561
+ if (this._basedOnContent) {
562
+ // ignore group header row
563
+ var dataRow = this._getRow(dv, rowIndex);
564
+ if (!dataRow) {
565
+ return;
566
+ }
567
+ }
568
+
569
+ if (this._dispatchBeforeSelection(e, ctx)) {
570
+ return;
571
+ }
572
+
573
+ var singleSelection = this._singleSelMode || !this._activeGrid || (this._activeGrid !== host); // New grid is clicked
574
+ var section = ctx["section"];
575
+
576
+ if (!singleSelection) {
577
+ if (e.shiftKey) { // Shift + Click: selects every rows start from anchor to clicked point. Anchor point doesn't change.
578
+ this._selectFromAnchorToTarget(section, rowIndex);
579
+ } else if ((e.ctrlKey && !isMac) || (isMac && !e.ctrlKey && e.metaKey)) { // Ctrl(windows)/Command(macOS) + Click: additionally selects a row without deselect all others.
580
+ this._sectionSetSelectedRow(section, rowIndex, !section.isSelectedRow(rowIndex));
581
+ } else {
582
+ singleSelection = true;
583
+ }
584
+ }
585
+
586
+ if (singleSelection) { // Click: selects a single row
587
+ this._anchorSection = section;
588
+ if (section.isSelectedRow(rowIndex)) { // Click on the selected row
589
+ this._setPendingClickIndex(rowIndex, host); // Delay the operation to allow drag and drop operation
590
+ return;
591
+ } else { // Perform single click immediately
592
+ var prevGrid = this._activeGrid;
593
+
594
+ // clear selection row in prevGrid first if prev and current host not the same
595
+ if (prevGrid !== host) {
596
+ this._clearSelectedRows(true);
597
+ this._activeGrid = host;
598
+ }
599
+
600
+ this._selectSingleRow(this._anchorSection, rowIndex);
601
+ }
602
+ }
603
+
604
+ // Native copy event will not be triggered, if there's no text selection.
605
+ // So we will select text in hiddenInput
606
+ // we can only use selection.addRange because it not hijack focus of other element
607
+ // EXCEPT IE11 there is no way to select text without changing focus element
608
+ var hiddenInput = host.getHiddenInput();
609
+ if (hiddenInput) {
610
+ // we cannot set start with hidden input
611
+ // it will cause error in IE11
612
+ // So we use hiddenInput parent instead
613
+ this._textRange.setStart(hiddenInput.parentNode, 0);
614
+ this._textRange.setEnd(hiddenInput, 0);
615
+ var selection = window.getSelection();
616
+ selection.removeAllRanges();
617
+
618
+ // THIS WILL CAUSE IE11 FIRE BLUR EVENT AND CHANG FOCUS
619
+ selection.addRange(this._textRange);
620
+
621
+ // Cause in IE11, active element will change when perform text select
622
+ // so we will make current grid focus again
623
+ if (this._isIE) {
624
+ host.getParent().focus();
625
+ }
626
+ }
627
+
628
+ this._dispatchSelectionChanged(e, rowIndex, section);
629
+ };
630
+
631
+ /** To clear _pendingClickIndex when mouse move
632
+ * @private
633
+ * @param {Event} e
634
+ */
635
+ RowSelectionPlugin.prototype._onMouseMove = function (e) {
636
+ var host = this.getRelativeGrid(e);
637
+ this._clearPendingClickIndex(host);
638
+ };
639
+
640
+ /** To set _pendingClickIndex
641
+ * @private
642
+ * @param {number} rowIndex
643
+ * @param {Object=} host core grid instance
644
+ */
645
+ RowSelectionPlugin.prototype._setPendingClickIndex = function (rowIndex, host) {
646
+ this._pendingClickIndex = rowIndex;
647
+ host && host.listen('mousemove', this._onMouseMove);
648
+ };
649
+
650
+ /** To clear _pendingClickIndex
651
+ * @private
652
+ * @param {Object=} host core grid instance
653
+ */
654
+ RowSelectionPlugin.prototype._clearPendingClickIndex = function (host) {
655
+ this._pendingClickIndex = -1;
656
+ host && host.unlisten('mousemove', this._onMouseMove);
657
+ };
658
+
659
+
660
+ /** @private
661
+ * @param {KeyboardEvent} e
662
+ */
663
+ RowSelectionPlugin.prototype._onKeyDown = function (e) {
664
+ if (!this._activeGrid) { return; }
665
+
666
+ //Arrow Up/Down move a row selection up/down by one.
667
+ //Arrow Up/Down and shift additionally select a row that is the one before first or after last selected row.
668
+ //Page Up/Down move a row selection up/down by page scroll.
669
+ //Page Up/Down and shift select every rows from anchor point to the next page scroll, compared to the current position.
670
+ switch (e.keyCode) {
671
+ case 33: //Page up
672
+ this._selectByKey(-1, e, true);
673
+ break;
674
+ case 34: //Page down
675
+ this._selectByKey(1, e, true);
676
+ break;
677
+ case 35: //End
678
+ this._selectByKey(1, e, true);
679
+ break;
680
+ case 36: //Home
681
+ this._selectByKey(-1, e, true);
682
+ break;
683
+ case 37: //Left arrow
684
+ if (this._dispatchBeforeSelection(e)) {
685
+ return;
686
+ }
687
+ if (this._gotoPrevGrid()) {
688
+ EventDispatcher.preventDefault(e);
689
+ }
690
+ break;
691
+ case 38: //Up arrow
692
+ this._selectByKey(-1, e);
693
+ break;
694
+ case 39: //Right arrow
695
+ if (this._dispatchBeforeSelection(e)) {
696
+ return;
697
+ }
698
+ if (this._gotoNextGrid()) {
699
+ EventDispatcher.preventDefault(e);
700
+ }
701
+ break;
702
+ case 40: //Down arrow
703
+ this._selectByKey(1, e);
704
+ break;
705
+ }
706
+ };
707
+
708
+ /** @private
709
+ * @param {Object} e
710
+ */
711
+ RowSelectionPlugin.prototype._onBeforeRowRemoved = function (e) {
712
+ if(this._timerId) {
713
+ return;
714
+ }
715
+
716
+ this._pendingSelection = this.getFirstSelectedIndex();
717
+ this._timerId = setTimeout(this._onReselection, 10);
718
+ };
719
+ /** @private
720
+ * @param {Object} e
721
+ */
722
+ RowSelectionPlugin.prototype._onReselection = function (e) {
723
+ this._timerId = 0;
724
+
725
+ if(this._pendingSelection != null) {
726
+ var firstSel = this.getFirstSelectedIndex();
727
+ if(firstSel == null) { // Only perform reselection if the last selection has been removed
728
+ this.setSelectedRow(this._pendingSelection, true);
729
+ }
730
+ }
731
+
732
+ this._pendingSelection = null;
733
+ };
734
+
735
+ /** @private
736
+ * @param {Event} e
737
+ */
738
+ RowSelectionPlugin.prototype._onCopy = function (e) {
739
+ var clipboardData, format;
740
+ if (e.clipboardData) {
741
+ clipboardData = e.clipboardData;
742
+ format = "text/plain";
743
+ } else {
744
+ clipboardData = window.clipboardData;
745
+ format = "Text";
746
+ }
747
+ // Set clipboards data to copy api.
748
+ var txt = this.getSelectedText();
749
+ if (txt) {
750
+ clipboardData.setData(format, txt);
751
+ }
752
+ e.preventDefault();
753
+ };
754
+
755
+ /** @private
756
+ * @param {Object} e postSectionDataBinding event context
757
+ */
758
+ RowSelectionPlugin.prototype._onPostSectionDataBinding = function (e) {
759
+ if (!this._basedOnContent
760
+ || 'content' !== e.sectionType
761
+ || !this._activeGrid) {
762
+ return;
763
+ }
764
+ var dataRow, isSelect;
765
+ for (var rowIndex = e.fromRowIndex; rowIndex < e.toRowIndex; rowIndex++) {
766
+ dataRow = this._getRowData(e.dataRows[rowIndex]);
767
+ isSelect = dataRow ? dataRow[this._selectionField] : false;
768
+ e.section.setSelectedRow(rowIndex, isSelect === true);
769
+ }
770
+ };
771
+
772
+ /** Get text from selected cells. If no selection, return empty string. <br>
773
+ * Text will be converted to Tab-separated values format, representing tabular structure. <br>
774
+ * Newlines (\n, \r), Tab (\t) and <br> will be converted to single space. Connecting spaces will remain intact.
775
+ * @public
776
+ * @return {string}
777
+ */
778
+ RowSelectionPlugin.prototype.getSelectedText = function () {
779
+ // work only with composit and realtime
780
+ if (!this._compositeGrid && !this._realTimeGrid) return "";
781
+
782
+ var selectedRows = this.getSelectedRows();
783
+ var rowCount = selectedRows.length;
784
+ var columnCount = this.getColumnCount();
785
+ var text = "";
786
+ var dv = this._activeGrid.getDataSource();
787
+ for (var i = 0; i < rowCount; i++) {
788
+ var rowIndex = selectedRows[i];
789
+ var rowData = this._getRow(dv, rowIndex);
790
+
791
+ if (rowData) {
792
+ if (text.length) text += "\n"; // break line before write in case text has content
793
+
794
+ // data row
795
+ for (var colIndex = 0; colIndex < columnCount; colIndex++) {
796
+ if (colIndex > 0) text += "\t"; // separate each cell content with tab
797
+ // column fields are available on compositeGrid and realTimeGrid level
798
+ var cField = this._getField(colIndex);
799
+ text += prepareTSVContent(rowData[cField]);
800
+ }
801
+ }
802
+ }
803
+ return text;
804
+ };
805
+
806
+ /** @private
807
+ * @param {Object=} sectRef Grid SectionReference
808
+ * @return {Object} ILayoutGrid
809
+ */
810
+ RowSelectionPlugin.prototype._getSection = function (sectRef) {
811
+ if (!this._activeGrid) {
812
+ this._activeGrid = this._hosts[0];
813
+ if (this._activeGrid) {
814
+ this._anchorSection = this._activeGrid.getSection("content");
815
+ if (!this._anchorSection) {
816
+ this._activeGrid = null;
817
+ }
818
+ }
819
+ }
820
+ if (sectRef) {
821
+ return this._activeGrid.getSection(sectRef);
822
+ }
823
+
824
+ if (this._anchorSection) {
825
+ if (!this._anchorSection.getElement()) { // The section may has been disposed.
826
+ this._anchorSection = null;
827
+ }
828
+ }
829
+
830
+ return this._anchorSection;
831
+ };
832
+
833
+ /** @private
834
+ * @param {boolean=} preserveAnchor
835
+ */
836
+ RowSelectionPlugin.prototype._clearSelectedRows = function (preserveAnchor) { // Slow
837
+ var i;
838
+ if (this._activeGrid) {
839
+ if (this._basedOnContent) {
840
+ var dv = this._activeGrid.getDataSource();
841
+ if (dv) {
842
+ var rids = dv.getAllRowIds(true, true);
843
+ var rows = dv.getMultipleRowData(rids);
844
+ var valueList = [];
845
+ var ridList = [];
846
+ var dataRow, firstIndex;
847
+ var len = rows.length;
848
+ for (i = 0; i < len; i++) {
849
+ dataRow = this._getRowData(rows[i]);
850
+ if (dataRow && dataRow[this._selectionField]) {
851
+ valueList.push(false);
852
+ ridList.push(rids[i]);
853
+ if (firstIndex == null) {
854
+ firstIndex = i;
855
+ }
856
+ }
857
+ }
858
+
859
+ len = valueList.length;
860
+ if (len === 1) {
861
+ // use setData for better optimization in case update only one row
862
+ this._setData(dv, firstIndex, this._selectionField, valueList[0]);
863
+ } else if (len > 1) {
864
+ this._setColumnData(dv, this._selectionField, valueList, ridList);
865
+ }
866
+ }
867
+ } else {
868
+ var sections = this._activeGrid.getAllSections("content");
869
+ for (i = sections.length; --i >= 0;) {
870
+ this._sectionClearSelectedRows(sections[i], preserveAnchor);
871
+ }
872
+ }
873
+
874
+ if (!preserveAnchor) {
875
+ this._anchorSection = null;
876
+ }
877
+ this._clearPendingClickIndex(this._activeGrid);
878
+ }
879
+ };
880
+ /** @private
881
+ * @suppress {missingProperties}
882
+ * @param {number} direction
883
+ * @param {KeyboardEvent} e
884
+ * @param {boolean=} pageKey
885
+ */
886
+ RowSelectionPlugin.prototype._selectByKey = function (direction, e, pageKey) {
887
+ e.preventDefault();
888
+
889
+ if (!this._anchorSection) { return; }
890
+
891
+ var shiftKey = e.shiftKey;
892
+ var next = 0;
893
+ var rowLimit = this._anchorSection.getRowCount() - 1;
894
+ if (pageKey) {
895
+ var info = this._activeGrid.getVScrollView();
896
+ if (direction === -1) { // Up
897
+ if (info) {
898
+ next = this.getFirstSelectedIndex(this._anchorSection) <= info["firstFullRow"] ? info["prevPageRowIndex"] : info["firstFullRow"];
899
+ }
900
+ } else {
901
+ if (info) {
902
+ next = this.getLastSelectedIndex(this._anchorSection) >= info["lastFullRow"] ? info["nextPageRowIndex"] : info["lastFullRow"];
903
+ } else {
904
+ next = rowLimit;
905
+ }
906
+ }
907
+ } else {
908
+ if (direction === -1) {
909
+ next = this.getFirstSelectedIndex(this._anchorSection) + direction;
910
+ } else {
911
+ next = this.getLastSelectedIndex(this._anchorSection) + direction;
912
+ }
913
+ }
914
+ if (next < 0) {
915
+ var csp = this._getPlugin("ColumnSelectionPlugin");
916
+ if (!shiftKey && csp && csp['isEnabled']()) {
917
+ csp['selectSingleColumn'](null, this._activeGrid);
918
+
919
+ this.clearAllSelections();
920
+ return;
921
+ }
922
+ this._scrollToRow(0);
923
+ return;
924
+ } else if (next > rowLimit) {
925
+ this._scrollToRow(rowLimit);
926
+ return;
927
+ }
928
+
929
+ if (this._dispatchBeforeSelection(e)) {
930
+ return;
931
+ }
932
+
933
+ if (shiftKey && !this._singleSelMode) {
934
+ this._selectFromAnchorToTarget(this._anchorSection, next);
935
+ } else {
936
+ this._selectSingleRow(this._anchorSection, next);
937
+ }
938
+
939
+ this._scrollToRow(next);
940
+
941
+ this._dispatchSelectionChanged(e, next);
942
+ };
943
+ /** @private
944
+ * @param {Object} section ILayoutGrid
945
+ * @param {number} rowIndex
946
+ * @param {boolean} isSelect
947
+ */
948
+ RowSelectionPlugin.prototype._sectionSetSelectedRow = function (section, rowIndex, isSelect) {
949
+ // set selection state to rowData when _basedOnContent === true
950
+ if (this._basedOnContent) {
951
+ var dv = (this._activeGrid) ? this._activeGrid.getDataSource() : null;
952
+
953
+ if (dv) {
954
+ var dataRow = this._getRow(dv, rowIndex);
955
+ if (dataRow) {
956
+ this._setData(dv, rowIndex, this._selectionField, isSelect);
957
+ if (isSelect) this._anchorRowDict[section] = rowIndex;
958
+ }
959
+ }
960
+ } else {
961
+ section.setSelectedRow(rowIndex, isSelect);
962
+ }
963
+ this._pendingSelection = null; // New selection happens before resolving the pending selection
964
+ };
965
+
966
+ /** @private
967
+ * @param {Object} section ILayoutGrid
968
+ * @param {number} rowIndex
969
+ * @param {number} length
970
+ */
971
+ RowSelectionPlugin.prototype._sectionSelectRowRange = function (section, rowIndex, length) {
972
+ // set selection state to rowData when _basedOnContent === true
973
+ if (this._basedOnContent) {
974
+ var dv = (this._activeGrid) ? this._activeGrid.getDataSource() : null;
975
+
976
+ if (dv) {
977
+ var toRowIndex = rowIndex + length - 1;
978
+ var rids = dv.getAllRowIds(true, true);
979
+ var ridList = [];
980
+ var valueList = [];
981
+ for (var r = rowIndex; r <= toRowIndex; r++) {
982
+ var dataRow = this._getRow(dv, r);
983
+ if (dataRow) {
984
+ ridList.push(rids[r]);
985
+ valueList.push(true);
986
+ }
987
+ }
988
+
989
+ this._setColumnData(dv, this._selectionField, valueList, ridList);
990
+ }
991
+ } else {
992
+ section.selectRowRange(rowIndex, length);
993
+ }
994
+ };
995
+
996
+ /** @private
997
+ * @param {Object} section ILayoutGrid
998
+ * @param {boolean=} preserveAnchor
999
+ */
1000
+ RowSelectionPlugin.prototype._sectionClearSelectedRows = function (section, preserveAnchor) {
1001
+ if (this._basedOnContent) {
1002
+ var selectedRowIds = this.getSelectedRowIds();
1003
+ if (selectedRowIds) {
1004
+ var dv = (this._activeGrid) ? this._activeGrid.getDataSource() : null;
1005
+ if (dv) {
1006
+ var len = selectedRowIds.length;
1007
+ var valueList = new Array(len);
1008
+ for (var i = 0; i < len; i++) {
1009
+ valueList[i] = false;
1010
+ }
1011
+ this._setColumnData(dv, this._selectionField, valueList, selectedRowIds);
1012
+ }
1013
+ }
1014
+ if (!preserveAnchor) {
1015
+ this._anchorRowDict[section] = -1;
1016
+ }
1017
+ } else {
1018
+ section.clearSelectedRows();
1019
+ }
1020
+ };
1021
+
1022
+
1023
+ /** @private
1024
+ * @param {Object} section ILayoutGrid
1025
+ * @param {number} rowIndex
1026
+ * @return {boolean}
1027
+ */
1028
+ RowSelectionPlugin.prototype._selectSingleRow = function (section, rowIndex) {
1029
+ if (!section) { return false; }
1030
+
1031
+ this._clearSelectedRows(); // Deselect all rows
1032
+ this._sectionSetSelectedRow(section, rowIndex, true); // The anchor row is set
1033
+ this._anchorSection = section;
1034
+ return true;
1035
+ };
1036
+
1037
+ /** @private
1038
+ * @param {number} rowIndex
1039
+ * @param {number} length
1040
+ * @param {Object=} sectRef Grid SectionReference
1041
+ */
1042
+ RowSelectionPlugin.prototype._selectRowRange = function (rowIndex, length, sectRef) {
1043
+ var section = this._getSection(sectRef);
1044
+ if (!section) { return; }
1045
+ this._sectionSelectRowRange(section, rowIndex, length);
1046
+ };
1047
+
1048
+ /** @private
1049
+ * @param {Object} section ILayoutGrid
1050
+ * @param {number} rowIndex
1051
+ */
1052
+ RowSelectionPlugin.prototype._selectFromAnchorToTarget = function (section, rowIndex) {
1053
+ if (this._anchorSection === section) {
1054
+ var anchorRow = this.getRowAnchor(this._anchorSection);
1055
+ if (anchorRow !== rowIndex) {
1056
+ this._clearSelectedRows(true); // Keep anchor section
1057
+
1058
+ // WORKAROUND: To support negative count
1059
+ var direction = 1; // down
1060
+ var startingRow = anchorRow;
1061
+ var selectionCount = rowIndex - anchorRow;
1062
+ if (selectionCount < 0) {
1063
+ direction = -1; // up
1064
+ startingRow = rowIndex;
1065
+ }
1066
+
1067
+ this._sectionSelectRowRange(section, startingRow, (selectionCount * direction) + 1);
1068
+
1069
+ if (!this._basedOnContent && this._anchorSection.setRowAnchor) {
1070
+ //Make sure that the anchor stays at the same position
1071
+ this._anchorSection.setRowAnchor(anchorRow);
1072
+ }
1073
+ }
1074
+ }
1075
+ };
1076
+ /** @private
1077
+ * @param {number} fromIndex
1078
+ * @param {number} toIndex
1079
+ */
1080
+ RowSelectionPlugin.prototype._selectSectionRange = function (fromIndex, toIndex) {
1081
+ if (!this._activeGrid) { return; }
1082
+ for (var i = fromIndex; i <= toIndex; i++) {
1083
+ var settings = this._activeGrid.getSectionSettings(i);
1084
+ if (settings.getType() === "content") {
1085
+ var section = settings.getSection();
1086
+ this._sectionSelectRowRange(section, 0, section.getRowCount());
1087
+ }
1088
+ }
1089
+ };
1090
+
1091
+ /** @private
1092
+ * @return {boolean}
1093
+ */
1094
+ RowSelectionPlugin.prototype._gotoPrevGrid = function () {
1095
+ if (!this._activeGrid) { return false; }
1096
+
1097
+ if (this._activeGrid === this._hosts[0]) { // This is the first grid
1098
+ return false;
1099
+ } else {
1100
+ var curIndex = this._hosts.indexOf(this._activeGrid);
1101
+ if (curIndex > 0) {
1102
+ this._gotoGrid(curIndex - 1);
1103
+ return true;
1104
+ }
1105
+ }
1106
+ return false;
1107
+ };
1108
+ /** @private
1109
+ * @return {boolean}
1110
+ */
1111
+ RowSelectionPlugin.prototype._gotoNextGrid = function () {
1112
+ if (!this._activeGrid) { return false; }
1113
+
1114
+ var lastIndex = this._hosts.length - 1;
1115
+ if (this._activeGrid === this._hosts[lastIndex]) { // This is the last grid
1116
+ return false;
1117
+ } else {
1118
+ var curIndex = this._hosts.indexOf(this._activeGrid);
1119
+ if (curIndex >= 0) {
1120
+ this._gotoGrid(curIndex + 1);
1121
+ return true;
1122
+ }
1123
+ }
1124
+ return false;
1125
+ };
1126
+ /** @private
1127
+ * @param {number} gridIndex
1128
+ */
1129
+ RowSelectionPlugin.prototype._gotoGrid = function (gridIndex) {
1130
+ var anchorRow = this.getRowAnchor(this._anchorSection);
1131
+ var sectionIndex = this._anchorSection.getIndex();
1132
+ this.clearSelectedRows(); // Clear all current grid's selections
1133
+ this.selectSingleRow(anchorRow, sectionIndex, this._hosts[gridIndex]); // go to the next grid at the first column
1134
+ };
1135
+
1136
+ /** @private
1137
+ * @param {number} rowIndex
1138
+ */
1139
+ RowSelectionPlugin.prototype._scrollToRow = function (rowIndex) {
1140
+ var host = this._hosts[0];
1141
+ if (host) {
1142
+ host.scrollToRow(null, rowIndex);
1143
+ }
1144
+ };
1145
+
1146
+ /** Dispatch beforeSelection event and return rather clients prefer cancel selection or not
1147
+ * @private
1148
+ * @param {Event} e
1149
+ * @param {Object=} ctx
1150
+ * @return {boolean} return rather clients prefer cancel selection or not
1151
+ */
1152
+ RowSelectionPlugin.prototype._dispatchBeforeSelection = function (e, ctx) {
1153
+ if (this.hasListener("beforeSelection")) {
1154
+ if (!ctx) {
1155
+ var grid = this._activeGrid || this._hosts[0];
1156
+ ctx = grid ? grid.getRelativePosition(e) : {};
1157
+ }
1158
+ ctx["event"] = e;
1159
+ this._dispatch("beforeSelection", ctx); // Ask clients if they want to cancel this event
1160
+ if (ctx["cancel"]) {
1161
+ return true; // return true if clients want to cancel this event
1162
+ }
1163
+ }
1164
+
1165
+ return false;
1166
+ };
1167
+ /** @private
1168
+ * @param {Event} e
1169
+ * @param {number=} rowIndex
1170
+ * @param {Object=} section ILayoutGrid
1171
+ */
1172
+ RowSelectionPlugin.prototype._dispatchSelectionChanged = function (e, rowIndex, section) {
1173
+ if (this._activeGrid) {
1174
+ var csp = this._getPlugin("ColumnSelectionPlugin");
1175
+ if (csp && csp['isEnabled']()) {
1176
+ csp['clearSelection']();
1177
+ }
1178
+ var cep = this._getPlugin("CellEditingPlugin");
1179
+ if (cep) {
1180
+ cep.closeCellEditor();
1181
+ }
1182
+ cep = this._getPlugin("InCellEditingPlugin");
1183
+ if (cep) {
1184
+ cep.closeCellEditor();
1185
+ }
1186
+ }
1187
+
1188
+ if (this.hasListener("selectionChanged")) {
1189
+ var obj = {};
1190
+ obj["selectedRows"] = this.getSelectedRows();
1191
+ obj["rowIndex"] = (rowIndex != null) ? rowIndex : this.getRowAnchor(this._anchorSection);
1192
+ obj["section"] = (section != null) ? section : this._anchorSection;
1193
+ obj["event"] = e;
1194
+ obj["grid"] = this._activeGrid;
1195
+ this._dispatch("selectionChanged", obj);
1196
+ }
1197
+ };
1198
+
1199
+
1200
+
1201
+ export default RowSelectionPlugin;
1202
+ export { RowSelectionPlugin, RowSelectionPlugin as RowSelection, RowSelectionPlugin as RowSelectionExtension };