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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (864) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +61 -0
  3. package/lib/column-dragging/es6/ColumnDragging.d.ts +51 -0
  4. package/lib/column-dragging/es6/ColumnDragging.js +968 -0
  5. package/lib/column-dragging/es6/index.d.ts +1 -0
  6. package/lib/column-dragging/es6/index.js +1 -0
  7. package/lib/column-format-dialog/index.d.ts +2 -0
  8. package/lib/column-format-dialog/index.js +2 -0
  9. package/lib/column-format-dialog/lib/column-format-dialog.d.ts +77 -0
  10. package/lib/column-format-dialog/lib/column-format-dialog.js +2688 -0
  11. package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
  12. package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
  13. package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
  14. package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
  15. package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
  16. package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
  17. package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  18. package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
  19. package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
  20. package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
  21. package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
  22. package/lib/column-format-dialog/lib/locale/translation.js +18 -0
  23. package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
  24. package/lib/column-format-dialog/lib/preview-table.js +982 -0
  25. package/lib/column-format-dialog/themes/base.less +429 -0
  26. package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
  27. package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
  28. package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  29. package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
  30. package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
  31. package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
  32. package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  33. package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
  34. package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
  35. package/lib/column-format-dialog/themes/elemental/index.less +5 -0
  36. package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
  37. package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
  38. package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
  39. package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
  40. package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
  41. package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  42. package/lib/column-format-dialog/themes/elemental/light.js +16 -0
  43. package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
  44. package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
  45. package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
  46. package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
  47. package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
  48. package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
  49. package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  50. package/lib/column-format-dialog/themes/halo/dark.js +16 -0
  51. package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
  52. package/lib/column-format-dialog/themes/halo/index.less +5 -0
  53. package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
  54. package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
  55. package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
  56. package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
  57. package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
  58. package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
  59. package/lib/column-format-dialog/themes/halo/light.js +16 -0
  60. package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
  61. package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
  62. package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
  63. package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
  64. package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
  65. package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
  66. package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
  67. package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
  68. package/lib/column-format-dialog/themes/luna/index.less +5 -0
  69. package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
  70. package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  71. package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
  72. package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
  73. package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
  74. package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  75. package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
  76. package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
  77. package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
  78. package/lib/column-format-dialog/themes/solar/index.less +5 -0
  79. package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
  80. package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  81. package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
  82. package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
  83. package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
  84. package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  85. package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
  86. package/lib/column-selection-dialog/index.d.ts +2 -0
  87. package/lib/column-selection-dialog/index.js +2 -0
  88. package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +66 -0
  89. package/lib/column-selection-dialog/lib/column-selection-dialog.js +2034 -0
  90. package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
  91. package/lib/column-selection-dialog/lib/locale/translation-de.js +20 -0
  92. package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
  93. package/lib/column-selection-dialog/lib/locale/translation-en.js +20 -0
  94. package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
  95. package/lib/column-selection-dialog/lib/locale/translation-ja.js +20 -0
  96. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  97. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +20 -0
  98. package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
  99. package/lib/column-selection-dialog/lib/locale/translation-zh.js +20 -0
  100. package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
  101. package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
  102. package/lib/column-selection-dialog/themes/base.less +258 -0
  103. package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
  104. package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
  105. package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  106. package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
  107. package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
  108. package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
  109. package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  110. package/lib/column-selection-dialog/themes/elemental/dark.js +8 -0
  111. package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
  112. package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
  113. package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
  114. package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
  115. package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
  116. package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
  117. package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
  118. package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  119. package/lib/column-selection-dialog/themes/elemental/light.js +8 -0
  120. package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +25 -0
  121. package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
  122. package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
  123. package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
  124. package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
  125. package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
  126. package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  127. package/lib/column-selection-dialog/themes/halo/dark.js +8 -0
  128. package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
  129. package/lib/column-selection-dialog/themes/halo/index.less +6 -0
  130. package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
  131. package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
  132. package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
  133. package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
  134. package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
  135. package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
  136. package/lib/column-selection-dialog/themes/halo/light.js +8 -0
  137. package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
  138. package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  139. package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
  140. package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
  141. package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
  142. package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  143. package/lib/column-selection-dialog/themes/solar/charcoal.js +8 -0
  144. package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +5 -0
  145. package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
  146. package/lib/column-selection-dialog/themes/solar/index.less +6 -0
  147. package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
  148. package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  149. package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
  150. package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
  151. package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
  152. package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  153. package/lib/column-selection-dialog/themes/solar/pearl.js +8 -0
  154. package/lib/core/dist/core.css +1 -0
  155. package/lib/core/dist/core.js +33910 -0
  156. package/lib/core/dist/core.min.js +1 -0
  157. package/lib/core/es6/data/ColumnStats.d.ts +42 -0
  158. package/lib/core/es6/data/ColumnStats.js +428 -0
  159. package/lib/core/es6/data/DataCache.d.ts +43 -0
  160. package/lib/core/es6/data/DataCache.js +597 -0
  161. package/lib/core/es6/data/DataTable.d.ts +156 -0
  162. package/lib/core/es6/data/DataTable.js +2206 -0
  163. package/lib/core/es6/data/DataView.d.ts +332 -0
  164. package/lib/core/es6/data/DataView.js +4144 -0
  165. package/lib/core/es6/data/Segment.d.ts +91 -0
  166. package/lib/core/es6/data/Segment.js +1001 -0
  167. package/lib/core/es6/data/SegmentCollection.d.ts +84 -0
  168. package/lib/core/es6/data/SegmentCollection.js +713 -0
  169. package/lib/core/es6/data/WrappedView.d.ts +290 -0
  170. package/lib/core/es6/data/WrappedView.js +1320 -0
  171. package/lib/core/es6/grid/Core.d.ts +455 -0
  172. package/lib/core/es6/grid/Core.js +6196 -0
  173. package/lib/core/es6/grid/ILayoutGrid.d.ts +212 -0
  174. package/lib/core/es6/grid/ILayoutGrid.js +706 -0
  175. package/lib/core/es6/grid/LayoutGrid.d.ts +37 -0
  176. package/lib/core/es6/grid/LayoutGrid.js +2975 -0
  177. package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +28 -0
  178. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +1241 -0
  179. package/lib/core/es6/grid/components/Cell.d.ts +52 -0
  180. package/lib/core/es6/grid/components/Cell.js +826 -0
  181. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +21 -0
  182. package/lib/core/es6/grid/components/CellFloatingPanel.js +130 -0
  183. package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
  184. package/lib/core/es6/grid/components/CellSpan.js +99 -0
  185. package/lib/core/es6/grid/components/CellSpans.d.ts +40 -0
  186. package/lib/core/es6/grid/components/CellSpans.js +368 -0
  187. package/lib/core/es6/grid/components/Column.d.ts +22 -0
  188. package/lib/core/es6/grid/components/Column.js +618 -0
  189. package/lib/core/es6/grid/components/ElementWrapper.d.ts +127 -0
  190. package/lib/core/es6/grid/components/ElementWrapper.js +718 -0
  191. package/lib/core/es6/grid/components/HScrollbar.d.ts +28 -0
  192. package/lib/core/es6/grid/components/HScrollbar.js +241 -0
  193. package/lib/core/es6/grid/components/Scrollbar.d.ts +63 -0
  194. package/lib/core/es6/grid/components/Scrollbar.js +1413 -0
  195. package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
  196. package/lib/core/es6/grid/components/StretchedCells.js +342 -0
  197. package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
  198. package/lib/core/es6/grid/components/VScrollbar.js +139 -0
  199. package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
  200. package/lib/core/es6/grid/components/VirtualItems.js +51 -0
  201. package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
  202. package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
  203. package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
  204. package/lib/core/es6/grid/event/EventListeners.js +166 -0
  205. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +155 -0
  206. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1977 -0
  207. package/lib/core/es6/grid/util/CellBoundPainter.d.ts +16 -0
  208. package/lib/core/es6/grid/util/CellBoundPainter.js +171 -0
  209. package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
  210. package/lib/core/es6/grid/util/Conflator.js +191 -0
  211. package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
  212. package/lib/core/es6/grid/util/Reverter.js +79 -0
  213. package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
  214. package/lib/core/es6/grid/util/SectionSettings.js +679 -0
  215. package/lib/core/es6/grid/util/SelectionList.d.ts +54 -0
  216. package/lib/core/es6/grid/util/SelectionList.js +491 -0
  217. package/lib/core/es6/grid/util/TrackLayout.d.ts +92 -0
  218. package/lib/core/es6/grid/util/TrackLayout.js +902 -0
  219. package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
  220. package/lib/core/es6/grid/util/Virtualizer.js +340 -0
  221. package/lib/core/es6/grid/util/util.d.ts +20 -0
  222. package/lib/core/es6/grid/util/util.js +391 -0
  223. package/lib/core/es6/index.d.ts +79 -0
  224. package/lib/core/es6/index.js +125 -0
  225. package/lib/core/es6/tr-grid-theme.d.ts +5 -0
  226. package/lib/core/es6/tr-grid-theme.js +5 -0
  227. package/lib/filter-dialog/index.d.ts +2 -0
  228. package/lib/filter-dialog/index.js +2 -0
  229. package/lib/filter-dialog/lib/checkbox-list.d.ts +52 -0
  230. package/lib/filter-dialog/lib/checkbox-list.js +444 -0
  231. package/lib/filter-dialog/lib/filter-dialog.d.ts +75 -0
  232. package/lib/filter-dialog/lib/filter-dialog.js +1160 -0
  233. package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
  234. package/lib/filter-dialog/lib/locale/translation-de.js +40 -0
  235. package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
  236. package/lib/filter-dialog/lib/locale/translation-en.js +40 -0
  237. package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
  238. package/lib/filter-dialog/lib/locale/translation-ja.js +40 -0
  239. package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  240. package/lib/filter-dialog/lib/locale/translation-zh-hant.js +40 -0
  241. package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
  242. package/lib/filter-dialog/lib/locale/translation-zh.js +40 -0
  243. package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
  244. package/lib/filter-dialog/lib/locale/translation.js +18 -0
  245. package/lib/filter-dialog/themes/base-checkbox.less +42 -0
  246. package/lib/filter-dialog/themes/base.less +191 -0
  247. package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
  248. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
  249. package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  250. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
  251. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
  252. package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
  253. package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
  254. package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  255. package/lib/filter-dialog/themes/elemental/dark.js +11 -0
  256. package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
  257. package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
  258. package/lib/filter-dialog/themes/elemental/index.less +6 -0
  259. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
  260. package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
  261. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
  262. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
  263. package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
  264. package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
  265. package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  266. package/lib/filter-dialog/themes/elemental/light.js +11 -0
  267. package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
  268. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
  269. package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
  270. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
  271. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
  272. package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
  273. package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
  274. package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  275. package/lib/filter-dialog/themes/halo/dark.js +11 -0
  276. package/lib/filter-dialog/themes/halo/defaults.less +3 -0
  277. package/lib/filter-dialog/themes/halo/filter-dialog.less +15 -0
  278. package/lib/filter-dialog/themes/halo/index.less +6 -0
  279. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
  280. package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
  281. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
  282. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
  283. package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
  284. package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
  285. package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
  286. package/lib/filter-dialog/themes/halo/light.js +11 -0
  287. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
  288. package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  289. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
  290. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
  291. package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
  292. package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
  293. package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  294. package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
  295. package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
  296. package/lib/filter-dialog/themes/solar/defaults.less +3 -0
  297. package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
  298. package/lib/filter-dialog/themes/solar/index.less +6 -0
  299. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
  300. package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  301. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
  302. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
  303. package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
  304. package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
  305. package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  306. package/lib/filter-dialog/themes/solar/pearl.js +11 -0
  307. package/lib/formatters/es6/CoralButtonFormatter.d.ts +20 -0
  308. package/lib/formatters/es6/CoralButtonFormatter.js +45 -0
  309. package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
  310. package/lib/formatters/es6/CoralCheckboxFormatter.js +50 -0
  311. package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
  312. package/lib/formatters/es6/CoralComboBoxFormatter.js +103 -0
  313. package/lib/formatters/es6/CoralIconFormatter.d.ts +21 -0
  314. package/lib/formatters/es6/CoralIconFormatter.js +50 -0
  315. package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
  316. package/lib/formatters/es6/CoralInputFormatter.js +45 -0
  317. package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +20 -0
  318. package/lib/formatters/es6/CoralRadioButtonFormatter.js +85 -0
  319. package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
  320. package/lib/formatters/es6/CoralSelectFormatter.js +71 -0
  321. package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
  322. package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
  323. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
  324. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
  325. package/lib/formatters/es6/EFButtonFormatter.d.ts +20 -0
  326. package/lib/formatters/es6/EFButtonFormatter.js +45 -0
  327. package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
  328. package/lib/formatters/es6/EFCheckboxFormatter.js +50 -0
  329. package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
  330. package/lib/formatters/es6/EFComboBoxFormatter.js +78 -0
  331. package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
  332. package/lib/formatters/es6/EFDateTimePickerFormatter.js +60 -0
  333. package/lib/formatters/es6/EFIconFormatter.d.ts +21 -0
  334. package/lib/formatters/es6/EFIconFormatter.js +50 -0
  335. package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
  336. package/lib/formatters/es6/EFNumberFieldFormatter.js +45 -0
  337. package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +20 -0
  338. package/lib/formatters/es6/EFRadioButtonFormatter.js +132 -0
  339. package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
  340. package/lib/formatters/es6/EFSelectFormatter.js +76 -0
  341. package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
  342. package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
  343. package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
  344. package/lib/formatters/es6/EFToggleFormatter.js +47 -0
  345. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
  346. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
  347. package/lib/formatters/es6/FormatterBuilder.d.ts +26 -0
  348. package/lib/formatters/es6/FormatterBuilder.js +493 -0
  349. package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
  350. package/lib/formatters/es6/NumericInputFormatter.js +64 -0
  351. package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
  352. package/lib/formatters/es6/PercentBarFormatter.js +62 -0
  353. package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
  354. package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
  355. package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
  356. package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
  357. package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
  358. package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
  359. package/lib/formatters/es6/SimpleTickerFormatter.d.ts +23 -0
  360. package/lib/formatters/es6/SimpleTickerFormatter.js +66 -0
  361. package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
  362. package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
  363. package/lib/formatters/es6/TextFormatter.d.ts +12 -0
  364. package/lib/formatters/es6/TextFormatter.js +35 -0
  365. package/lib/formatters/es6/index.d.ts +64 -0
  366. package/lib/formatters/es6/index.js +88 -0
  367. package/lib/grid/index.d.ts +2 -0
  368. package/lib/grid/index.js +3 -0
  369. package/lib/grid/lib/efx-grid.d.ts +53 -0
  370. package/lib/grid/lib/efx-grid.js +444 -0
  371. package/lib/grid/themes/base.less +137 -0
  372. package/lib/grid/themes/ds/dark/css/native-elements.css +0 -0
  373. package/lib/grid/themes/ds/dark/efx-grid.js +4 -0
  374. package/lib/grid/themes/ds/dark/es5/all-elements.js +2 -0
  375. package/lib/grid/themes/ds/dark/imports/all-elements.js +1 -0
  376. package/lib/grid/themes/ds/dark/imports/custom-elements.js +1 -0
  377. package/lib/grid/themes/ds/dark/imports/native-elements.js +0 -0
  378. package/lib/grid/themes/ds/dark.js +3 -0
  379. package/lib/grid/themes/ds/efx-grid.less +207 -0
  380. package/lib/grid/themes/ds/index.less +3 -0
  381. package/lib/grid/themes/ds/light/css/native-elements.css +0 -0
  382. package/lib/grid/themes/ds/light/efx-grid.js +4 -0
  383. package/lib/grid/themes/ds/light/es5/all-elements.js +2 -0
  384. package/lib/grid/themes/ds/light/imports/all-elements.js +1 -0
  385. package/lib/grid/themes/ds/light/imports/custom-elements.js +1 -0
  386. package/lib/grid/themes/ds/light/imports/native-elements.js +0 -0
  387. package/lib/grid/themes/ds/light.js +3 -0
  388. package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
  389. package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
  390. package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
  391. package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
  392. package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
  393. package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
  394. package/lib/grid/themes/halo/dark.js +3 -0
  395. package/lib/grid/themes/halo/efx-grid.less +127 -0
  396. package/lib/grid/themes/halo/index.less +3 -0
  397. package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
  398. package/lib/grid/themes/halo/light/efx-grid.js +4 -0
  399. package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
  400. package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
  401. package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
  402. package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
  403. package/lib/grid/themes/halo/light.js +3 -0
  404. package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
  405. package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
  406. package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
  407. package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
  408. package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
  409. package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
  410. package/lib/grid/themes/solar/charcoal.js +3 -0
  411. package/lib/grid/themes/solar/efx-grid.less +27 -0
  412. package/lib/grid/themes/solar/index.less +3 -0
  413. package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
  414. package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
  415. package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
  416. package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
  417. package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
  418. package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
  419. package/lib/grid/themes/solar/pearl.js +3 -0
  420. package/lib/index.d.ts +100 -0
  421. package/lib/index.js +100 -0
  422. package/lib/row-segmenting/es6/RowSegmenting.d.ts +115 -0
  423. package/lib/row-segmenting/es6/RowSegmenting.js +1182 -0
  424. package/lib/row-segmenting/es6/index.d.ts +1 -0
  425. package/lib/row-segmenting/es6/index.js +1 -0
  426. package/lib/rt-grid/dist/rt-grid.js +54547 -0
  427. package/lib/rt-grid/dist/rt-grid.min.js +1 -0
  428. package/lib/rt-grid/es6/ColumnDefinition.d.ts +174 -0
  429. package/lib/rt-grid/es6/ColumnDefinition.js +1203 -0
  430. package/lib/rt-grid/es6/DataConnector.d.ts +43 -0
  431. package/lib/rt-grid/es6/DataConnector.js +290 -0
  432. package/lib/rt-grid/es6/FieldDefinition.d.ts +40 -0
  433. package/lib/rt-grid/es6/FieldDefinition.js +560 -0
  434. package/lib/rt-grid/es6/Grid.d.ts +376 -0
  435. package/lib/rt-grid/es6/Grid.js +4653 -0
  436. package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
  437. package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
  438. package/lib/rt-grid/es6/ReferenceCounter.d.ts +40 -0
  439. package/lib/rt-grid/es6/ReferenceCounter.js +251 -0
  440. package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
  441. package/lib/rt-grid/es6/RowDefSorter.js +231 -0
  442. package/lib/rt-grid/es6/RowDefinition.d.ts +156 -0
  443. package/lib/rt-grid/es6/RowDefinition.js +1478 -0
  444. package/lib/rt-grid/es6/SnapshotFiller.d.ts +36 -0
  445. package/lib/rt-grid/es6/SnapshotFiller.js +537 -0
  446. package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
  447. package/lib/rt-grid/es6/StyleLoader.js +47 -0
  448. package/lib/rt-grid/es6/index.d.ts +8 -0
  449. package/lib/rt-grid/es6/index.js +43 -0
  450. package/lib/statistics-row/es6/StatisticsRow.d.ts +68 -0
  451. package/lib/statistics-row/es6/StatisticsRow.js +807 -0
  452. package/lib/statistics-row/es6/index.d.ts +1 -0
  453. package/lib/statistics-row/es6/index.js +1 -0
  454. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +46 -0
  455. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +617 -0
  456. package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
  457. package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
  458. package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +70 -0
  459. package/lib/tr-grid-cell-selection/es6/CellSelection.js +1695 -0
  460. package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
  461. package/lib/tr-grid-cell-selection/es6/index.js +1 -0
  462. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +82 -0
  463. package/lib/tr-grid-checkbox/es6/Checkbox.js +1704 -0
  464. package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
  465. package/lib/tr-grid-checkbox/es6/index.js +1 -0
  466. package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
  467. package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +817 -0
  468. package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
  469. package/lib/tr-grid-column-fitter/es6/index.js +1 -0
  470. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +91 -0
  471. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +617 -0
  472. package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
  473. package/lib/tr-grid-column-formatting/es6/index.js +1 -0
  474. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +110 -0
  475. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +2028 -0
  476. package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
  477. package/lib/tr-grid-column-grouping/es6/index.js +1 -0
  478. package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
  479. package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1010 -0
  480. package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
  481. package/lib/tr-grid-column-resizing/es6/index.js +1 -0
  482. package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +77 -0
  483. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +1405 -0
  484. package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
  485. package/lib/tr-grid-column-selection/es6/index.js +1 -0
  486. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +160 -0
  487. package/lib/tr-grid-column-stack/es6/ColumnStack.js +2155 -0
  488. package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
  489. package/lib/tr-grid-column-stack/es6/index.js +1 -0
  490. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +100 -0
  491. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +1513 -0
  492. package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
  493. package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
  494. package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
  495. package/lib/tr-grid-content-wrap/es6/ContentWrap.js +519 -0
  496. package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
  497. package/lib/tr-grid-content-wrap/es6/index.js +1 -0
  498. package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
  499. package/lib/tr-grid-contextmenu/es6/ContextMenu.js +453 -0
  500. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
  501. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +138 -0
  502. package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +41 -0
  503. package/lib/tr-grid-contextmenu/es6/MenuItem.js +285 -0
  504. package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +33 -0
  505. package/lib/tr-grid-contextmenu/es6/PopupMenu.js +303 -0
  506. package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
  507. package/lib/tr-grid-contextmenu/es6/index.js +1 -0
  508. package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +64 -0
  509. package/lib/tr-grid-filter-input/es6/FilterInput.js +1027 -0
  510. package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
  511. package/lib/tr-grid-filter-input/es6/index.js +1 -0
  512. package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +45 -0
  513. package/lib/tr-grid-heat-map/es6/HeatMap.js +401 -0
  514. package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
  515. package/lib/tr-grid-heat-map/es6/index.js +1 -0
  516. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +148 -0
  517. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +2671 -0
  518. package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
  519. package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
  520. package/lib/tr-grid-pagination/es6/Pagination.d.ts +58 -0
  521. package/lib/tr-grid-pagination/es6/Pagination.js +433 -0
  522. package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
  523. package/lib/tr-grid-pagination/es6/index.js +1 -0
  524. package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
  525. package/lib/tr-grid-percent-bar/es6/PercentBar.js +804 -0
  526. package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
  527. package/lib/tr-grid-percent-bar/es6/index.js +1 -0
  528. package/lib/tr-grid-printer/es6/CellWriter.d.ts +50 -0
  529. package/lib/tr-grid-printer/es6/CellWriter.js +234 -0
  530. package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +13 -0
  531. package/lib/tr-grid-printer/es6/ColumnWriter.js +23 -0
  532. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +33 -0
  533. package/lib/tr-grid-printer/es6/GridPrinter.js +794 -0
  534. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +39 -0
  535. package/lib/tr-grid-printer/es6/PrintTrait.js +494 -0
  536. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +57 -0
  537. package/lib/tr-grid-printer/es6/SectionWriter.js +238 -0
  538. package/lib/tr-grid-printer/es6/index.d.ts +1 -0
  539. package/lib/tr-grid-printer/es6/index.js +1 -0
  540. package/lib/tr-grid-range-bar/es6/LEDGuage.d.ts +39 -0
  541. package/lib/tr-grid-range-bar/es6/LEDGuage.js +261 -0
  542. package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +56 -0
  543. package/lib/tr-grid-range-bar/es6/RangeBar.js +514 -0
  544. package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
  545. package/lib/tr-grid-range-bar/es6/index.js +1 -0
  546. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +81 -0
  547. package/lib/tr-grid-row-dragging/es6/RowDragging.js +1479 -0
  548. package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
  549. package/lib/tr-grid-row-dragging/es6/index.js +1 -0
  550. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +159 -0
  551. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +2568 -0
  552. package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
  553. package/lib/tr-grid-row-filtering/es6/index.js +1 -0
  554. package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +123 -0
  555. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1728 -0
  556. package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
  557. package/lib/tr-grid-row-grouping/es6/index.js +1 -0
  558. package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +75 -0
  559. package/lib/tr-grid-row-selection/es6/RowSelection.js +1447 -0
  560. package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
  561. package/lib/tr-grid-row-selection/es6/index.js +1 -0
  562. package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +64 -0
  563. package/lib/tr-grid-rowcoloring/es6/RowColoring.js +615 -0
  564. package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
  565. package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
  566. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +72 -0
  567. package/lib/tr-grid-textformatting/es6/TextFormatting.js +543 -0
  568. package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
  569. package/lib/tr-grid-textformatting/es6/index.js +1 -0
  570. package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +27 -0
  571. package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
  572. package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
  573. package/lib/tr-grid-titlewrap/es6/index.js +1 -0
  574. package/lib/tr-grid-util/es6/CellPainter.d.ts +142 -0
  575. package/lib/tr-grid-util/es6/CellPainter.js +1183 -0
  576. package/lib/tr-grid-util/es6/Color.d.ts +40 -0
  577. package/lib/tr-grid-util/es6/Color.js +210 -0
  578. package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
  579. package/lib/tr-grid-util/es6/Conflator.js +193 -0
  580. package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
  581. package/lib/tr-grid-util/es6/CoralItems.js +42 -0
  582. package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
  583. package/lib/tr-grid-util/es6/DateTime.js +508 -0
  584. package/lib/tr-grid-util/es6/Deferred.d.ts +16 -0
  585. package/lib/tr-grid-util/es6/Deferred.js +108 -0
  586. package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
  587. package/lib/tr-grid-util/es6/Delay.js +96 -0
  588. package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
  589. package/lib/tr-grid-util/es6/Dom.js +350 -0
  590. package/lib/tr-grid-util/es6/DragUI.d.ts +20 -0
  591. package/lib/tr-grid-util/es6/DragUI.js +263 -0
  592. package/lib/tr-grid-util/es6/ElementObserver.d.ts +12 -0
  593. package/lib/tr-grid-util/es6/ElementObserver.js +134 -0
  594. package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
  595. package/lib/tr-grid-util/es6/ElementWrapper.js +84 -0
  596. package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
  597. package/lib/tr-grid-util/es6/ElfDate.js +164 -0
  598. package/lib/tr-grid-util/es6/ElfUtil.d.ts +46 -0
  599. package/lib/tr-grid-util/es6/ElfUtil.js +637 -0
  600. package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
  601. package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
  602. package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +24 -0
  603. package/lib/tr-grid-util/es6/ExpanderIcon.js +120 -0
  604. package/lib/tr-grid-util/es6/ExpressionParser.d.ts +10 -0
  605. package/lib/tr-grid-util/es6/ExpressionParser.js +408 -0
  606. package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
  607. package/lib/tr-grid-util/es6/Ext.js +52 -0
  608. package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
  609. package/lib/tr-grid-util/es6/FieldFormatter.js +440 -0
  610. package/lib/tr-grid-util/es6/FilterBuilder.d.ts +54 -0
  611. package/lib/tr-grid-util/es6/FilterBuilder.js +580 -0
  612. package/lib/tr-grid-util/es6/FilterOperators.d.ts +56 -0
  613. package/lib/tr-grid-util/es6/FilterOperators.js +255 -0
  614. package/lib/tr-grid-util/es6/GridPlugin.d.ts +86 -0
  615. package/lib/tr-grid-util/es6/GridPlugin.js +1055 -0
  616. package/lib/tr-grid-util/es6/GroupDefinitions.d.ts +74 -0
  617. package/lib/tr-grid-util/es6/GroupDefinitions.js +642 -0
  618. package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
  619. package/lib/tr-grid-util/es6/Icon.js +62 -0
  620. package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
  621. package/lib/tr-grid-util/es6/MouseDownTrait.js +250 -0
  622. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +40 -0
  623. package/lib/tr-grid-util/es6/MultiTableManager.js +611 -0
  624. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +85 -0
  625. package/lib/tr-grid-util/es6/NumberFormatter.js +528 -0
  626. package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
  627. package/lib/tr-grid-util/es6/PercentBar.js +600 -0
  628. package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
  629. package/lib/tr-grid-util/es6/Perf.js +163 -0
  630. package/lib/tr-grid-util/es6/Popup.d.ts +98 -0
  631. package/lib/tr-grid-util/es6/Popup.js +991 -0
  632. package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
  633. package/lib/tr-grid-util/es6/RangeBar.js +260 -0
  634. package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
  635. package/lib/tr-grid-util/es6/RequestQueue.js +228 -0
  636. package/lib/tr-grid-util/es6/RowPainter.d.ts +60 -0
  637. package/lib/tr-grid-util/es6/RowPainter.js +448 -0
  638. package/lib/tr-grid-util/es6/SubTable.d.ts +78 -0
  639. package/lib/tr-grid-util/es6/SubTable.js +642 -0
  640. package/lib/tr-grid-util/es6/Table.d.ts +146 -0
  641. package/lib/tr-grid-util/es6/Table.js +832 -0
  642. package/lib/tr-grid-util/es6/TextHighlighter.d.ts +16 -0
  643. package/lib/tr-grid-util/es6/TextHighlighter.js +268 -0
  644. package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
  645. package/lib/tr-grid-util/es6/TickCodes.js +33 -0
  646. package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
  647. package/lib/tr-grid-util/es6/Timer.js +49 -0
  648. package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
  649. package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
  650. package/lib/tr-grid-util/es6/Util.d.ts +66 -0
  651. package/lib/tr-grid-util/es6/Util.js +508 -0
  652. package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
  653. package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
  654. package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
  655. package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
  656. package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
  657. package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
  658. package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
  659. package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
  660. package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
  661. package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
  662. package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
  663. package/lib/tr-grid-util/es6/formula/Formula.js +890 -0
  664. package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
  665. package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
  666. package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
  667. package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
  668. package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
  669. package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
  670. package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
  671. package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
  672. package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
  673. package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
  674. package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
  675. package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
  676. package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
  677. package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
  678. package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
  679. package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
  680. package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
  681. package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
  682. package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
  683. package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
  684. package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
  685. package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
  686. package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
  687. package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
  688. package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
  689. package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
  690. package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
  691. package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
  692. package/lib/tr-grid-util/es6/index.d.ts +65 -0
  693. package/lib/tr-grid-util/es6/index.js +102 -0
  694. package/lib/tr-grid-util/es6/jet/Adc.d.ts +9 -0
  695. package/lib/tr-grid-util/es6/jet/Adc.js +268 -0
  696. package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
  697. package/lib/tr-grid-util/es6/jet/CollectionDict.js +151 -0
  698. package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +136 -0
  699. package/lib/tr-grid-util/es6/jet/DataGenerator.js +860 -0
  700. package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
  701. package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
  702. package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
  703. package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
  704. package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
  705. package/lib/tr-grid-util/es6/jet/MockJET.js +71 -0
  706. package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
  707. package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
  708. package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +82 -0
  709. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +890 -0
  710. package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +48 -0
  711. package/lib/tr-grid-util/es6/jet/MockRTK.js +82 -0
  712. package/lib/tr-grid-util/es6/jet/MockUtil.d.ts +7 -0
  713. package/lib/tr-grid-util/es6/jet/MockUtil.js +25 -0
  714. package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
  715. package/lib/tr-grid-util/es6/jet/index.js +18 -0
  716. package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
  717. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +111 -0
  718. package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
  719. package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
  720. package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
  721. package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
  722. package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
  723. package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
  724. package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
  725. package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
  726. package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
  727. package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
  728. package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
  729. package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
  730. package/lib/tr-grid-util/es6/locale/translation.js +18 -0
  731. package/lib/types/es6/AutoTooltip.d.ts +46 -0
  732. package/lib/types/es6/CellSelection.d.ts +70 -0
  733. package/lib/types/es6/Checkbox.d.ts +82 -0
  734. package/lib/types/es6/ColumnDragging.d.ts +51 -0
  735. package/lib/types/es6/ColumnFitter.d.ts +56 -0
  736. package/lib/types/es6/ColumnFormatting.d.ts +92 -0
  737. package/lib/types/es6/ColumnGrouping.d.ts +107 -0
  738. package/lib/types/es6/ColumnResizing.d.ts +68 -0
  739. package/lib/types/es6/ColumnSelection.d.ts +77 -0
  740. package/lib/types/es6/ColumnStack.d.ts +160 -0
  741. package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
  742. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +41 -0
  743. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
  744. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +289 -0
  745. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +23 -0
  746. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +41 -0
  747. package/lib/types/es6/CompositeGrid/Plugin.d.ts +30 -0
  748. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +32 -0
  749. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +44 -0
  750. package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
  751. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
  752. package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
  753. package/lib/types/es6/ConditionalColoring.d.ts +100 -0
  754. package/lib/types/es6/ContentWrap.d.ts +43 -0
  755. package/lib/types/es6/ContextMenu.d.ts +83 -0
  756. package/lib/types/es6/CoralButtonFormatter.d.ts +20 -0
  757. package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
  758. package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
  759. package/lib/types/es6/CoralIconFormatter.d.ts +21 -0
  760. package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
  761. package/lib/types/es6/CoralRadioButtonFormatter.d.ts +20 -0
  762. package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
  763. package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
  764. package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
  765. package/lib/types/es6/Core/data/DataCache.d.ts +43 -0
  766. package/lib/types/es6/Core/data/DataTable.d.ts +156 -0
  767. package/lib/types/es6/Core/data/DataView.d.ts +332 -0
  768. package/lib/types/es6/Core/data/Segment.d.ts +91 -0
  769. package/lib/types/es6/Core/data/SegmentCollection.d.ts +84 -0
  770. package/lib/types/es6/Core/data/WrappedView.d.ts +290 -0
  771. package/lib/types/es6/Core/grid/Core.d.ts +455 -0
  772. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +212 -0
  773. package/lib/types/es6/Core/grid/LayoutGrid.d.ts +37 -0
  774. package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +28 -0
  775. package/lib/types/es6/Core/grid/components/Cell.d.ts +52 -0
  776. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +21 -0
  777. package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
  778. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +40 -0
  779. package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
  780. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +127 -0
  781. package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +28 -0
  782. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +63 -0
  783. package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
  784. package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
  785. package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
  786. package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
  787. package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
  788. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +155 -0
  789. package/lib/types/es6/Core/grid/util/CellBoundPainter.d.ts +16 -0
  790. package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
  791. package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
  792. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
  793. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +54 -0
  794. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +92 -0
  795. package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
  796. package/lib/types/es6/Core/grid/util/util.d.ts +20 -0
  797. package/lib/types/es6/Core/index.d.ts +79 -0
  798. package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
  799. package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
  800. package/lib/types/es6/EFButtonFormatter.d.ts +20 -0
  801. package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
  802. package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
  803. package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
  804. package/lib/types/es6/EFIconFormatter.d.ts +21 -0
  805. package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
  806. package/lib/types/es6/EFRadioButtonFormatter.d.ts +20 -0
  807. package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
  808. package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
  809. package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
  810. package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
  811. package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
  812. package/lib/types/es6/ExtensionOptions.d.ts +58 -0
  813. package/lib/types/es6/Extensions.d.ts +63 -0
  814. package/lib/types/es6/FilterInput.d.ts +64 -0
  815. package/lib/types/es6/FormatterBuilder.d.ts +26 -0
  816. package/lib/types/es6/GridFormatter.d.ts +63 -0
  817. package/lib/types/es6/HeatMap.d.ts +45 -0
  818. package/lib/types/es6/InCellEditing.d.ts +148 -0
  819. package/lib/types/es6/MenuEventAPI.d.ts +22 -0
  820. package/lib/types/es6/MenuItem.d.ts +41 -0
  821. package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
  822. package/lib/types/es6/Pagination.d.ts +58 -0
  823. package/lib/types/es6/PercentBar.d.ts +60 -0
  824. package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
  825. package/lib/types/es6/PopupMenu.d.ts +33 -0
  826. package/lib/types/es6/RangeBar.d.ts +39 -0
  827. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +176 -0
  828. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +43 -0
  829. package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +40 -0
  830. package/lib/types/es6/RealtimeGrid/Grid.d.ts +413 -0
  831. package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
  832. package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +40 -0
  833. package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
  834. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +156 -0
  835. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +36 -0
  836. package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
  837. package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
  838. package/lib/types/es6/RowColoring.d.ts +64 -0
  839. package/lib/types/es6/RowDragging.d.ts +81 -0
  840. package/lib/types/es6/RowFiltering.d.ts +159 -0
  841. package/lib/types/es6/RowGrouping.d.ts +123 -0
  842. package/lib/types/es6/RowSegmenting.d.ts +109 -0
  843. package/lib/types/es6/RowSelection.d.ts +75 -0
  844. package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
  845. package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
  846. package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
  847. package/lib/types/es6/SimpleTickerFormatter.d.ts +23 -0
  848. package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
  849. package/lib/types/es6/StatisticsRow.d.ts +68 -0
  850. package/lib/types/es6/TextFormatter.d.ts +12 -0
  851. package/lib/types/es6/TextFormatting.d.ts +72 -0
  852. package/lib/types/es6/TitleWrap.d.ts +27 -0
  853. package/lib/types/es6/Zoom.d.ts +52 -0
  854. package/lib/types/es6/index.d.ts +80 -0
  855. package/lib/types/index.d.ts +1 -0
  856. package/lib/utils/index.d.ts +7 -0
  857. package/lib/utils/index.js +7 -0
  858. package/lib/versions.json +37 -0
  859. package/lib/window-exporter.js +18 -0
  860. package/lib/zoom/es6/Zoom.d.ts +52 -0
  861. package/lib/zoom/es6/Zoom.js +438 -0
  862. package/lib/zoom/es6/index.d.ts +1 -0
  863. package/lib/zoom/es6/index.js +1 -0
  864. package/package.json +69 -0
@@ -0,0 +1,1447 @@
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, prepareTSVContent, prettifyCss } from "../../tr-grid-util/es6/Util.js";
5
+
6
+ /** @private
7
+ * @type {boolean}
8
+ * @constant
9
+ */
10
+ const IS_MAC = isMacFn();
11
+
12
+ /** Fired when selection is changed by mouse down or key press. A change by JavaScript APIs will not trigger this event.
13
+ * @event RowSelectionPlugin#selectionChanged
14
+ */
15
+
16
+ /** Fired before selectionChanged. We can cancel the select operation by setting `cancel` property on the event arugment to true<br>
17
+ * Note that selection by JavaScript APIs cannot be prevented using this event.
18
+ * @event RowSelectionPlugin#beforeSelection
19
+ * @example
20
+ * let ext = new RowSelectionPlugin();
21
+ * ext.listen("beforeSelection" function(e) {
22
+ * e.cancel = true; // Cancel user selection
23
+ * });
24
+ */
25
+
26
+ /** @typedef {(Object|string)} RowSelectionPlugin~Options
27
+ * @description Extension options available in main grid configuration under `rowSelection` property
28
+ * @property {boolean=} singleSelection=false If enabled, user can have one selection at any moment
29
+ * @property {Function=} selectionChanged=null Handler executed after selection is made
30
+ * @property {Function=} beforeSelection=null Handler executed before selection is made
31
+ * @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.
32
+ * @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.
33
+ * @property {Function=} menuClicked=null Event Handler when user clicks on menu icon.
34
+ * @property {string=} menuPosition="outside" show icon in column grid that have style outside and non-outside
35
+ */
36
+
37
+ /** @constructor
38
+ * @extends {GridPlugin}
39
+ * @param {RowSelectionPlugin~Options=} options
40
+ */
41
+ let RowSelectionPlugin = function (options) {
42
+ let t = this;
43
+ t._onMouseDown = t._onMouseDown.bind(t);
44
+ t._onClick = t._onClick.bind(t);
45
+ t._onKeyDown = t._onKeyDown.bind(t);
46
+ t._onBeforeRowRemoved = t._onBeforeRowRemoved.bind(t);
47
+ t._onReselection = t._onReselection.bind(t);
48
+ t._onPostSectionDataBinding = t._onPostSectionDataBinding.bind(t);
49
+ t._onRowPositionChanged = t._onRowPositionChanged.bind(t);
50
+ t._updateMenuIcon = t._updateMenuIcon.bind(t);
51
+
52
+ t._hosts = [];
53
+ t._textRange = document.createRange();
54
+ t._headerSelection = {};
55
+
56
+ if(options) {
57
+ t.config({ "rowSelection": options });
58
+ }
59
+ };
60
+ Ext.inherits(RowSelectionPlugin, GridPlugin);
61
+
62
+ /** @type {Object}
63
+ * @private
64
+ * @description Core grid instance
65
+ */
66
+ RowSelectionPlugin.prototype._activeGrid = null;
67
+ /** @type {Object}
68
+ * @private
69
+ * @description Grid section object
70
+ */
71
+ RowSelectionPlugin.prototype._anchorSection = null;
72
+ /** @type {boolean}
73
+ * @private
74
+ */
75
+ RowSelectionPlugin.prototype._disabled = false;
76
+ /** @type {boolean}
77
+ * @private
78
+ */
79
+ RowSelectionPlugin.prototype._singleSelMode = false;
80
+ /** @type {boolean}
81
+ * @private
82
+ */
83
+ RowSelectionPlugin.prototype._clickToggleMode = false;
84
+ /** @type {number}
85
+ * @private
86
+ */
87
+ RowSelectionPlugin.prototype._pendingClickIndex = -1;
88
+ /** @type {Array<string>}
89
+ * @private
90
+ */
91
+ RowSelectionPlugin.prototype._basedOnContent = false;
92
+ /** @type {string}
93
+ * @private
94
+ */
95
+ RowSelectionPlugin.prototype._selectionField = "SELECTED_ROW";
96
+ /** @type {string}
97
+ * @private
98
+ * @description use with _basedOnContent mode for tracking current anchor row
99
+ */
100
+ RowSelectionPlugin.prototype._anchorRowId = "";
101
+ /** @type {Range}
102
+ * @private
103
+ */
104
+ RowSelectionPlugin.prototype._textRange = null;
105
+ /** @type {Function}
106
+ * @private
107
+ */
108
+ RowSelectionPlugin.prototype._onMenuClicked = null;
109
+ /** @type {Element}
110
+ * @private
111
+ */
112
+ RowSelectionPlugin.prototype._menuButton = null;
113
+ /** @type {string}
114
+ * @private
115
+ */
116
+ RowSelectionPlugin.prototype._menuPosition = "outside";
117
+ /** @type {number}
118
+ * @private
119
+ */
120
+ RowSelectionPlugin.prototype._timerId = 0;
121
+ /** @type {number}
122
+ * @private
123
+ */
124
+ RowSelectionPlugin.prototype._timerMenuId = 0;
125
+ /** @type {(number|null)}
126
+ * @private
127
+ */
128
+ RowSelectionPlugin.prototype._pendingSelection = null;
129
+ /** @type {Object}
130
+ * @private
131
+ */
132
+ RowSelectionPlugin.prototype._headerSelection = null;
133
+
134
+ /** @private
135
+ * @return {string}
136
+ */
137
+ RowSelectionPlugin._styleCalculator = function() {
138
+ let styles = [
139
+ ".row-selection-menu", [
140
+ "position: absolute;",
141
+ "background-color: var(--grid-column-menu-icon-bgcolor);",
142
+ "color: var(--grid-column-menu-icon-color);",
143
+ "z-index: 1;",
144
+ "cursor: pointer;",
145
+ "text-align: center;",
146
+ "width: 16px;",
147
+ "height: 16px;",
148
+ "padding: 6px;"
149
+ ],
150
+ ".row-selection-menu:hover", [
151
+ "background-color: var(--grid-column-menu-icon-hover-bgcolor);"
152
+ ],
153
+ ".row-selection-menu-inside", [
154
+ "padding: 4px;"
155
+ ]
156
+ ];
157
+ return prettifyCss(styles);
158
+ };
159
+
160
+ /** @public
161
+ * @return {string}
162
+ */
163
+ RowSelectionPlugin.prototype.getName = function () {
164
+ return "RowSelectionPlugin"; // Read Only
165
+ };
166
+
167
+ /** Plugin that has multi-table support means that it can have multiple hosts/tables and share its states across those hosts/tables.
168
+ * @public
169
+ * @return {boolean}
170
+ */
171
+ RowSelectionPlugin.prototype.hasMultiTableSupport = function () {
172
+ return true;
173
+ };
174
+
175
+ /** @public
176
+ * @param {Object} host Core grid instance
177
+ * @param {Object=} options Grid configuration object
178
+ */
179
+ RowSelectionPlugin.prototype.initialize = function (host, options) {
180
+ if(this._hosts.indexOf(host) >= 0) { return; }
181
+ this._hosts.push(host);
182
+
183
+ host.listen("mousedown", this._onMouseDown);
184
+ host.listen("click", this._onClick);
185
+ host.listen("keydown", this._onKeyDown);
186
+ host.listen("postSectionDataBinding", this._onPostSectionDataBinding);
187
+ host.listen("rowPositionChanged", this._onRowPositionChanged);
188
+
189
+ let wrapper = this.getGridApi(host);
190
+ if(wrapper) {
191
+ wrapper.listen("beforeRowRemoved", this._onBeforeRowRemoved);
192
+ }
193
+
194
+ // TODO:: listen to copy and cut event when implement autoCopy config
195
+
196
+ this.config(options);
197
+
198
+ if(this._onMenuClicked) { // use styles menu icon only when want to use icon menu
199
+ this.applyStaticStyles(RowSelectionPlugin._styleCalculator);
200
+ }
201
+ };
202
+
203
+ /** @public
204
+ * @param {Object=} host core grid instance
205
+ */
206
+ RowSelectionPlugin.prototype.unload = function (host) {
207
+ let at = this._hosts.indexOf(host);
208
+ if(at < 0) { return; }
209
+
210
+ host.unlisten("mousedown", this._onMouseDown);
211
+ host.unlisten("click", this._onClick);
212
+ host.unlisten("keydown", this._onKeyDown);
213
+ host.unlisten("postSectionDataBinding", this._onPostSectionDataBinding);
214
+ host.unlisten("rowPositionChanged", this._onRowPositionChanged);
215
+
216
+ this._hosts.splice(at, 1);
217
+
218
+ if(!this._hosts.length) {
219
+ if(this._timerId) {
220
+ clearTimeout(this._timerId);
221
+ this._timerId = 0;
222
+ this._timerMenuId = 0;
223
+ this._pendingSelection = null;
224
+ }
225
+ }
226
+
227
+ this._dispose();
228
+ };
229
+ /** @public
230
+ * @param {Object=} options Grid configuration object
231
+ */
232
+ RowSelectionPlugin.prototype.config = function (options) {
233
+ if(!options) {
234
+ return;
235
+ }
236
+
237
+ let pluginOptions = options["rowSelection"];
238
+
239
+ if(pluginOptions) {
240
+ if(typeof pluginOptions === "object") {
241
+ if(pluginOptions["singleSelection"]) {
242
+ this._singleSelMode = true;
243
+ }
244
+ if(pluginOptions["clickToggle"]) {
245
+ this._clickToggleMode = true;
246
+ }
247
+ if(pluginOptions["basedOnContent"]) {
248
+ this._basedOnContent = true;
249
+ }
250
+ if(pluginOptions["selectionField"]) {
251
+ this._selectionField = pluginOptions["selectionField"];
252
+ }
253
+ let val = pluginOptions["menuClicked"];
254
+ if(typeof val === "function"){
255
+ this._onMenuClicked = val;
256
+ }
257
+ val = pluginOptions["menuPosition"];
258
+ if(val) {
259
+ this._menuPosition = val;
260
+ }
261
+ } else if(pluginOptions === "single") {
262
+ this._singleSelMode = true;
263
+ }
264
+
265
+ this.addListener(pluginOptions, "selectionChanged");
266
+ this.addListener(pluginOptions, "beforeSelection");
267
+ } else if(pluginOptions != null) {
268
+ this.disable();
269
+ }
270
+ };
271
+
272
+ /** @public
273
+ * @param {Object=} gridOptions
274
+ * @return {!Object}
275
+ */
276
+ RowSelectionPlugin.prototype.getConfigObject = function (gridOptions) {
277
+ let obj = gridOptions || {};
278
+
279
+ let extOptions = obj.rowSelection;
280
+ if(!extOptions) {
281
+ extOptions = obj.rowSelection = {};
282
+ }
283
+ if(this._singleSelMode) {
284
+ extOptions.singleSelection = this._singleSelMode;
285
+ }
286
+ if(this._clickToggleMode) {
287
+ extOptions.clickToggle = this._clickToggleMode;
288
+ }
289
+ if(this._basedOnContent) {
290
+ extOptions.basedOnContent = this._basedOnContent;
291
+ }
292
+ if(this._selectionField !== "SELECTED_ROW") {
293
+ extOptions.selectionField = this._selectionField;
294
+ }
295
+
296
+ return obj;
297
+ };
298
+
299
+ /** Clear all row selection on the active grid
300
+ * @public
301
+ * @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.
302
+ * @param {Object=} activeGrid Grid for taking user key inputs after clearing
303
+ */
304
+ RowSelectionPlugin.prototype.clearAllSelections = function (preserveAnchor, activeGrid) {
305
+ if(preserveAnchor == null) {
306
+ preserveAnchor = true;
307
+ }
308
+ this._clearSelectedRows(preserveAnchor);
309
+
310
+ if(activeGrid) {
311
+ this._activeGrid = activeGrid;
312
+ }
313
+ };
314
+ /** Alias to clearAllSelections() method
315
+ * @public
316
+ * @function
317
+ * @param {boolean=} preserveAnchor
318
+ * @param {Object=} activeGrid core grid instance
319
+ * @see {@link RowSelectionPlugin#clearAllSelections}
320
+ */
321
+ RowSelectionPlugin.prototype.clearSelectedRows = RowSelectionPlugin.prototype.clearAllSelections;
322
+ /** Alias to clearAllSelections() method
323
+ * @public
324
+ * @function
325
+ * @param {boolean=} preserveAnchor
326
+ * @param {Object=} activeGrid core grid instance
327
+ * @see {@link RowSelectionPlugin#clearAllSelections}
328
+ */
329
+ RowSelectionPlugin.prototype.clearSelection = RowSelectionPlugin.prototype.clearAllSelections;
330
+
331
+
332
+ /** @public
333
+ * @return {Object} core grid instance
334
+ */
335
+ RowSelectionPlugin.prototype.getActiveGrid = function () {
336
+ return this._activeGrid;
337
+ };
338
+ /** @public
339
+ * @param {Object=} sectRef Grid SectionReference
340
+ * @return {number} rowIndex of anchor
341
+ */
342
+ RowSelectionPlugin.prototype.getRowAnchor = function (sectRef) {
343
+ if(this._basedOnContent) {
344
+ let dv = this._activeGrid ? this._activeGrid.getDataSource() : null;
345
+ if( dv && this._anchorRowId){
346
+ return dv.getRowIndex(this._anchorRowId);
347
+ }
348
+ } else {
349
+ let section = this._getSection(sectRef);
350
+ if(section && section.getRowAnchor){
351
+ return section.getRowAnchor();
352
+ }
353
+ }
354
+ return -1;
355
+ };
356
+
357
+ /** @public
358
+ * @param {Object=} sectRef Grid SectionReference
359
+ * @return {number|null}
360
+ */
361
+ RowSelectionPlugin.prototype.getFirstSelectedIndex = function (sectRef) {
362
+ let section = this._getSection(sectRef);
363
+ if(!section) {
364
+ return null;
365
+ } else if(this._basedOnContent) {
366
+ let dv = this._activeGrid ? this._activeGrid.getDataSource() : null;
367
+ if(!dv) return null;
368
+
369
+ let rids = dv.getVisibleRowIds(true);
370
+ let rows = dv.getMultipleRowData(rids);
371
+ let count = rows.length;
372
+ for(let rowIndex = 0; rowIndex < count; rowIndex++) {
373
+ if(this._isContentRowSelected(dv, rows[rowIndex], rowIndex)) {
374
+ return rowIndex;
375
+ }
376
+ }
377
+ return null;
378
+ } else {
379
+ return section.getFirstSelectedRow();
380
+ }
381
+ };
382
+
383
+ /** @public
384
+ * @param {Object=} sectRef Grid SectionReference
385
+ * @return {number|null}
386
+ */
387
+ RowSelectionPlugin.prototype.getLastSelectedIndex = function (sectRef) {
388
+ let section = this._getSection(sectRef);
389
+ if(!section) {
390
+ return null;
391
+ } else if(this._basedOnContent) {
392
+ let dv = this._activeGrid ? this._activeGrid.getDataSource() : null;
393
+ if(!dv) return null;
394
+
395
+ let rids = dv.getVisibleRowIds(true);
396
+ let rows = dv.getMultipleRowData(rids);
397
+ let count = rows.length;
398
+ for(let rowIndex = count - 1; rowIndex >= 0; rowIndex--) {
399
+ if(this._isContentRowSelected(dv, rows[rowIndex], rowIndex)) {
400
+ return rowIndex;
401
+ }
402
+ }
403
+ return null;
404
+ } else {
405
+ return section.getLastSelectedRow();
406
+ }
407
+ };
408
+
409
+ /** Returns null if there is no selection
410
+ * @public
411
+ * @param {Object=} sectRef Grid SectionReference
412
+ * @return {Array.<number>}
413
+ */
414
+ RowSelectionPlugin.prototype.getSelectedRows = function (sectRef) {
415
+ let section = this._getSection(sectRef);
416
+ if(!section) {
417
+ return null;
418
+ } else if(this._basedOnContent) {
419
+ let dv = this._activeGrid ? this._activeGrid.getDataSource() : null;
420
+ if(!dv) return null;
421
+
422
+ let rids = dv.getVisibleRowIds(true);
423
+ let rows = dv.getMultipleRowData(rids);
424
+ let count = rows.length;
425
+ let selectedRows = [];
426
+ for(let rowIndex = 0; rowIndex < count; rowIndex++) {
427
+ if(this._isContentRowSelected(dv, rows[rowIndex], rowIndex)) {
428
+ selectedRows.push(rowIndex);
429
+ }
430
+ }
431
+ return selectedRows.length ? selectedRows : null;
432
+ } else {
433
+ return section.getSelectedRows();
434
+ }
435
+ };
436
+ /**
437
+ * @private
438
+ * @param {Object} dv
439
+ * @param {Array<string>} rids
440
+ * @param {boolean=} selected
441
+ */
442
+ RowSelectionPlugin.prototype._setHeaderSelections = function(dv, rids, selected) {
443
+ if(selected == null) {
444
+ selected = true;
445
+ }
446
+ let len = rids.length;
447
+ for (let i = 0; i < len; i++) {
448
+ this._setHeaderSelection(dv, rids[i], selected);
449
+ }
450
+ };
451
+
452
+ /**
453
+ * @private
454
+ * @param {Object} dv
455
+ * @param {sting|number} rowRef
456
+ * @param {boolean=} selected
457
+ */
458
+ RowSelectionPlugin.prototype._setHeaderSelection = function(dv, rowRef, selected) {
459
+ let rowId = this._getRowId(dv, rowRef);
460
+ if(rowId) {
461
+ this._headerSelection[rowId] = (selected == null) ? true : selected;
462
+ }
463
+ };
464
+
465
+ /**
466
+ * @private
467
+ * @param {Object} dv
468
+ * @param {sting|number} rowRef
469
+ * @return {boolean}
470
+ */
471
+ RowSelectionPlugin.prototype._isHeaderSelection = function(dv, rowRef) {
472
+ return this._headerSelection[this._getRowId(dv, rowRef)] ? true : false;
473
+ };
474
+
475
+ /**
476
+ * @private
477
+ */
478
+ RowSelectionPlugin.prototype._clearHeaderSelection = function() {
479
+ this._headerSelection = {};
480
+ };
481
+
482
+ /**
483
+ * @private
484
+ * @param {Object} dv
485
+ * @param {Object} rowData
486
+ * @param {string|number} rowRef
487
+ * @return {boolean}
488
+ */
489
+ RowSelectionPlugin.prototype._isContentRowSelected = function(dv, rowData, rowRef) {
490
+ let dataRow = this._rowGetter(rowData);
491
+ if((dataRow && dataRow[this._selectionField]) || this._isHeaderSelection(dv, rowRef)) {
492
+ return true;
493
+ }
494
+ return false;
495
+ };
496
+
497
+ /**
498
+ * @private
499
+ * @param {number} rowIndex
500
+ * @param {boolean=} select
501
+ * @return {string|null} rowId of rowIndex
502
+ */
503
+ RowSelectionPlugin.prototype._addSelectionField = function(rowIndex, select) {
504
+ if(select == null) {
505
+ select = true;
506
+ }
507
+ let dv = (this._activeGrid) ? this._activeGrid.getDataSource() : null;
508
+ if(!dv) {
509
+ return null;
510
+ }
511
+ let dataRow = this._getRow(dv, rowIndex);
512
+ if(dataRow) {
513
+ this._setData(dv, rowIndex, this._selectionField, select);
514
+ } else {
515
+ this._setHeaderSelection(dv, rowIndex, select);
516
+ }
517
+ let rowId = dv.getRowId(rowIndex) || null;
518
+ return rowId;
519
+ };
520
+
521
+ /**
522
+ * @private
523
+ * @param {Object} dv
524
+ * @param {string|number} rowRef
525
+ * @return {string}
526
+ */
527
+ RowSelectionPlugin.prototype._getRowId = function(dv, rowRef) {
528
+ let rowId = rowRef;
529
+ if(typeof rowRef === "number") {
530
+ rowId = dv.getRowId(rowRef);
531
+ }
532
+ return rowId;
533
+ };
534
+
535
+ /** Returns null if there is no selection
536
+ * @public
537
+ * @param {Object=} sectRef Grid SectionReference
538
+ * @return {Array.<string>}
539
+ */
540
+ RowSelectionPlugin.prototype.getSelectedRowIds = function (sectRef) {
541
+ let rids = null;
542
+ let len, i;
543
+
544
+ let selRows = this.getSelectedRows(sectRef);
545
+ if(selRows) {
546
+ let dv = this._activeGrid.getDataSource();
547
+ let rowIds = dv.getVisibleRowIds(true);
548
+ len = selRows.length;
549
+ rids = new Array(len);
550
+ for(i = 0; i < len; ++i) {
551
+ rids[i] = rowIds[selRows[i]] || "";
552
+ }
553
+ }
554
+
555
+ return rids;
556
+ };
557
+ /** @public
558
+ * @param {Object=} sectRef Grid SectionReference
559
+ * @return {number}
560
+ */
561
+ RowSelectionPlugin.prototype.getSelectedRowCount = function (sectRef) {
562
+ let section = this._getSection(sectRef);
563
+ if(!section) return 0;
564
+ if(this._basedOnContent) {
565
+ let selectedRows = this.getSelectedRows();
566
+ return selectedRows ? selectedRows.length : 0;
567
+ } else {
568
+ return section.getSelectedRowCount();
569
+ }
570
+ };
571
+ /** @public
572
+ * @param {number} rowIndex
573
+ * @param {boolean=} opt_select
574
+ * @param {Object=} sectRef Grid SectionReference
575
+ */
576
+ RowSelectionPlugin.prototype.setSelectedRow = function (rowIndex, opt_select, sectRef) {
577
+ let section = this._getSection(sectRef);
578
+ if(!section) { return; }
579
+ this._sectionSetSelectedRow(section, rowIndex, opt_select);
580
+ this._updateContentRowSelectionUI(section, rowIndex, 1, opt_select); // Force update header without data changed
581
+ };
582
+ /**
583
+ * @public
584
+ * @param {number} rowIndex
585
+ * @param {Object=} sectRef Grid SectionReference
586
+ * @param {Object=} activeGrid core grid instance
587
+ * @return {boolean}
588
+ */
589
+ RowSelectionPlugin.prototype.selectSingleRow = function (rowIndex, sectRef, activeGrid) {
590
+ if(!(rowIndex >= 0)) { return false; }
591
+
592
+ let prevGrid = null;
593
+ if(activeGrid) {
594
+ prevGrid = this._activeGrid;
595
+ if(prevGrid) { // In case of multi-table, clear selection on the previous active grid
596
+ this._clearSelectedRows();
597
+ }
598
+ this._activeGrid = activeGrid;
599
+ }
600
+
601
+ // WANRING: this._getSection will modify activeGrid, if it does not exist
602
+ let section = this._getSection(sectRef);
603
+ if(this._selectSingleRow(section, rowIndex)) { // This will also clear existing selection in the active grid
604
+ this._scrollToRow(rowIndex);
605
+ return true;
606
+ }
607
+
608
+ if(prevGrid) {
609
+ this._activeGrid = prevGrid; // If the selection is unsuccessful, restore previous active grid
610
+ }
611
+ return false;
612
+ };
613
+ /** @public
614
+ * @param {Object=} activeGrid core grid instance
615
+ */
616
+ RowSelectionPlugin.prototype.selectAllRows = function (activeGrid) {
617
+ if(activeGrid) {
618
+ this._activeGrid = activeGrid;
619
+ } else if(!this._activeGrid) {
620
+ this._activeGrid = this._hosts[0];
621
+ }
622
+
623
+ if(this._activeGrid) {
624
+ let sections = this._activeGrid.getAllSections("content");
625
+ for(let i = sections.length; --i >= 0;) {
626
+ this._selectRowRange(null, null, sections[i]);
627
+ if(i == 0) {
628
+ this._anchorSection = sections[i];
629
+ }
630
+ }
631
+ }
632
+ this._updateMenuIcon();
633
+ };
634
+
635
+ /** @public
636
+ * @param {number} rowIndex
637
+ * @param {number} length
638
+ * @param {Object=} sectRef Grid SectionReference
639
+ * @param {boolean=} opt_scrollToRow
640
+ */
641
+ RowSelectionPlugin.prototype.selectRowRange = function (rowIndex, length, sectRef, opt_scrollToRow) {
642
+ this._selectRowRange(rowIndex, length, sectRef);
643
+
644
+ if(opt_scrollToRow) {
645
+ this._scrollToRow(rowIndex);
646
+ }
647
+ this._updateContentRowSelectionUI(sectRef, rowIndex, length, true); // This method can't de-select
648
+ };
649
+
650
+ /** @public
651
+ * @param {boolean=} disabled
652
+ */
653
+ RowSelectionPlugin.prototype.disable = function (disabled) {
654
+ this._disabled = disabled !== false;
655
+ };
656
+ /** @public
657
+ * @return {boolean} enabled
658
+ */
659
+ RowSelectionPlugin.prototype.isEnabled = function () {
660
+ return !this._disabled;
661
+ };
662
+
663
+ /** @public
664
+ * @param {boolean=} disabled
665
+ */
666
+ RowSelectionPlugin.prototype.disableMultiSelection = function (disabled) {
667
+ this._singleSelMode = disabled !== false;
668
+ };
669
+
670
+ /** Focus the active grid only if there is no selected text
671
+ * @private
672
+ * @param {boolean=} force
673
+ * @returns {boolean} Returns true if there is any change
674
+ */
675
+ RowSelectionPlugin.prototype._focusGrid = function (force) {
676
+ if(this._activeGrid) {
677
+ if(force || !window.getSelection().toString()) {
678
+ this._activeGrid.focus();
679
+ return true;
680
+ }
681
+ }
682
+ return false;
683
+ };
684
+ /** @private
685
+ * @param {Event} e
686
+ */
687
+ RowSelectionPlugin.prototype._onClick = function (e) {
688
+ if(this._pendingClickIndex >= 0) {
689
+ let performClick = (this._activeGrid && this._anchorSection) ? true : false;
690
+ if(performClick) {
691
+ let curPos = this._activeGrid.getRelativePosition(e);
692
+ performClick = curPos.rowIndex === this._pendingClickIndex && curPos.section === this._anchorSection;
693
+ }
694
+ if(performClick) {
695
+ this._selectSingleRow(this._anchorSection, this._pendingClickIndex);
696
+ this._focusGrid();
697
+
698
+ if(!this._basedOnContent) { // Protect against rowPositionChanged and postBindingSection event
699
+ this._updateMenuIcon();
700
+ }
701
+ this._dispatchSelectionChanged(e);
702
+ }
703
+ this._pendingClickIndex = -1;
704
+ }
705
+ };
706
+ /** @public
707
+ * @description Select a specified row as if it were clicked by a mouse. This is for testing purpose.
708
+ * @ignore
709
+ * @param {number} rowIndex
710
+ * @param {Object=} mouseEvt
711
+ */
712
+ RowSelectionPlugin.prototype.selectByMouse = function (rowIndex, mouseEvt) {
713
+ let eventObj = this._mockMouseEvent(0, rowIndex, mouseEvt);
714
+ this._onMouseDown(eventObj);
715
+ };
716
+
717
+ /** @public
718
+ * @description Select a specified row as if it were modified by a keyboard input. This is for testing purpose.
719
+ * @ignore
720
+ * @param {number|string} keyCode Use key code number or "up", "down" string
721
+ * @param {Object=} keyboardEvt
722
+ */
723
+ RowSelectionPlugin.prototype.selectByKey = function (keyCode, keyboardEvt) {
724
+ let eventObj = this._mockKeyboardEvent(keyCode, keyboardEvt);
725
+ this._onKeyDown(eventObj);
726
+ };
727
+
728
+ /** @private
729
+ * @description Left click will cause single row selection <br>
730
+ * Shift + left click will cause range selection <br>
731
+ * Ctrl + left click will cause inclusion selection <br>
732
+ * Shift/Ctrl + right click will cause single row selection <br>
733
+ * Middle click has no effect
734
+ * @suppress {checkTypes}
735
+ * @param {Event} e
736
+ */
737
+ RowSelectionPlugin.prototype._onMouseDown = function (e) {
738
+ if(this._disabled) {
739
+ return;
740
+ }
741
+ if(e.button === 2) { // Right click
742
+ if(e.shiftKey || e.ctrlKey) {
743
+ return;
744
+ }
745
+ }
746
+
747
+ this._pendingClickIndex = -1;
748
+ let host = this.getRelativeGrid(e);
749
+
750
+ if(!host) {
751
+ return;
752
+ }
753
+
754
+ let ctx = host.getRelativePosition(e);
755
+ if(!ctx["hit"] || ctx["sectionType"] !== "content") { return; }
756
+ if(e.button === 2) { // Right click at the selected column should override clicking row to select;
757
+ let csp = this._getPlugin("ColumnSelectionPlugin");
758
+ if(csp && csp["isEnabled"]()) {
759
+ if(csp["isSelectedColumn"](ctx["colIndex"])) {
760
+ return;
761
+ }
762
+ }
763
+ }
764
+ let rowIndex = ctx["rowIndex"];
765
+
766
+ if(this._dispatchBeforeSelection(e, ctx)) {
767
+ return;
768
+ }
769
+
770
+ let singleSelection = this._singleSelMode || !this._activeGrid || (this._activeGrid !== host); // New grid is clicked
771
+ let section = ctx["section"];
772
+ let prevSel = section.isSelectedRow(rowIndex);
773
+
774
+ if(!singleSelection) {
775
+ if(e.shiftKey) { // Shift + Click: selects every rows start from anchor to clicked point. Anchor point doesn't change.
776
+ this._selectFromAnchorToTarget(section, rowIndex);
777
+ } else if((e.ctrlKey && !IS_MAC) || (IS_MAC && !e.ctrlKey && e.metaKey)) { // Ctrl(windows)/Command(macOS) + Click: additionally selects a row without deselect all others.
778
+ this._sectionSetSelectedRow(section, rowIndex, !prevSel);
779
+ } else {
780
+ singleSelection = true;
781
+ }
782
+ }
783
+
784
+ if(singleSelection) { // Click: selects a single row
785
+ this._anchorSection = section;
786
+ if(prevSel) { // Click on the selected row
787
+ // Delay the operation to allow drag and drop operation
788
+ this._pendingClickIndex = rowIndex;
789
+ return;
790
+ } else { // Perform single click immediately
791
+ let prevGrid = this._activeGrid;
792
+
793
+ // clear selection row in prevGrid first if prev and current host not the same
794
+ if(prevGrid !== host) {
795
+ this._clearSelectedRows(true);
796
+ this._activeGrid = host;
797
+ }
798
+
799
+ this._selectSingleRow(this._anchorSection, rowIndex);
800
+ }
801
+ }
802
+
803
+ if(this._focusGrid(!prevSel)) {
804
+ e.preventDefault(); // Prevent changing focus due to clicking on unfocusable element
805
+ }
806
+
807
+ if(!this._basedOnContent) { // Protect against rowPositionChanged and postBindingSection event
808
+ this._updateMenuIcon();
809
+ }
810
+
811
+
812
+ this._dispatchSelectionChanged(e, rowIndex, section);
813
+ };
814
+
815
+ /** @private
816
+ * @param {KeyboardEvent} e
817
+ */
818
+ RowSelectionPlugin.prototype._onKeyDown = function (e) {
819
+ if(!this._activeGrid) { return; }
820
+
821
+ //Arrow Up/Down move a row selection up/down by one.
822
+ //Arrow Up/Down and shift additionally select a row that is the one before first or after last selected row.
823
+ //Page Up/Down move a row selection up/down by page scroll.
824
+ //Page Up/Down and shift select every rows from anchor point to the next page scroll, compared to the current position.
825
+ switch (e.keyCode) {
826
+ case 33: //Page up
827
+ this._selectByKey(-1, e, true);
828
+ break;
829
+ case 34: //Page down
830
+ this._selectByKey(1, e, true);
831
+ break;
832
+ case 35: //End
833
+ this._selectByKey(1, e, true);
834
+ break;
835
+ case 36: //Home
836
+ this._selectByKey(-1, e, true);
837
+ break;
838
+ case 37: //Left arrow
839
+ if(this._dispatchBeforeSelection(e)) {
840
+ return;
841
+ }
842
+ if(this._gotoPrevGrid()) {
843
+ EventDispatcher.preventDefault(e);
844
+ }
845
+ break;
846
+ case 38: //Up arrow
847
+ this._selectByKey(-1, e);
848
+ break;
849
+ case 39: //Right arrow
850
+ if(this._dispatchBeforeSelection(e)) {
851
+ return;
852
+ }
853
+ if(this._gotoNextGrid()) {
854
+ EventDispatcher.preventDefault(e);
855
+ }
856
+ break;
857
+ case 40: //Down arrow
858
+ this._selectByKey(1, e);
859
+ break;
860
+ }
861
+ };
862
+
863
+ /** @private
864
+ * @param {Object} e
865
+ */
866
+ RowSelectionPlugin.prototype._onBeforeRowRemoved = function (e) {
867
+ if(this._timerId) {
868
+ return;
869
+ }
870
+
871
+ this._pendingSelection = this.getFirstSelectedIndex();
872
+ this._timerId = setTimeout(this._onReselection, 10);
873
+ };
874
+ /** @private
875
+ * @param {Object} e
876
+ */
877
+ RowSelectionPlugin.prototype._onReselection = function (e) {
878
+ this._timerId = 0;
879
+
880
+ if(this._pendingSelection != null) {
881
+ let firstSel = this.getFirstSelectedIndex();
882
+ if(firstSel == null) { // Only perform reselection if the last selection has been removed
883
+ this.setSelectedRow(this._pendingSelection, true);
884
+ }
885
+ }
886
+
887
+ this._pendingSelection = null;
888
+ };
889
+
890
+ /** @private
891
+ * @param {Object} e postSectionDataBinding event context
892
+ */
893
+ RowSelectionPlugin.prototype._onPostSectionDataBinding = function (e) {
894
+ if(!this._basedOnContent || e.sectionType !== "content") {
895
+ return;
896
+ }
897
+ let section = e.section;
898
+ let dv = e.dataSource;
899
+
900
+ section.clearSelectedRows();
901
+
902
+ let fromR = section.getFirstIndexInView();
903
+ let toR = section.getLastIndexInView();
904
+ for(let r = fromR; r <= toR; ++r) {
905
+ if(this._isContentRowSelected(dv, dv.getRowDataAt(r), r)) {
906
+ section.setSelectedRow(r, true);
907
+ }
908
+ }
909
+ this._updateMenuIcon();
910
+ };
911
+
912
+
913
+ /** @private
914
+ * @param {Object} section ILayoutGrid
915
+ * @param {number} startRowIndex
916
+ * @param {number} length
917
+ * @param {boolean} select
918
+ */
919
+ RowSelectionPlugin.prototype._updateContentRowSelectionUI = function (section, startRowIndex, length, select) {
920
+ if(!this._basedOnContent) {
921
+ return;
922
+ }
923
+ let dv = (this._activeGrid) ? this._activeGrid.getDataSource() : null;
924
+ if(!dv) {
925
+ return;
926
+ }
927
+ if(section == null) {
928
+ section = this._getSection();
929
+ }
930
+
931
+ let len = startRowIndex + length;
932
+ for (let r = startRowIndex; r <= len; r++) {
933
+ if(this._isContentRowSelected(dv, dv.getRowDataAt(r), r)) {
934
+ section.setSelectedRow(r, select);
935
+ }
936
+ }
937
+
938
+ this._updateMenuIcon();
939
+ };
940
+
941
+ /** @private
942
+ * @param {Object} e
943
+ */
944
+ RowSelectionPlugin.prototype._onRowPositionChanged = function (e) {
945
+ if(this._timerMenuId) {
946
+ return;
947
+ }
948
+ if(e.sender && e.sender === this._activeGrid) {
949
+ this._clearMenuIcon(); // Clear icon before re-renderer
950
+ this._timerMenuId = setTimeout(this._updateMenuIcon, 800);
951
+ }
952
+ };
953
+
954
+ /** Get text from selected cells. If no selection, return empty string. <br>
955
+ * Text will be converted to Tab-separated values format, representing tabular structure. <br>
956
+ * Newlines (\n, \r), Tab (\t) and <br> will be converted to single space. Connecting spaces will remain intact.
957
+ * @public
958
+ * @return {string}
959
+ */
960
+ RowSelectionPlugin.prototype.getSelectedText = function () {
961
+ // work only with composit and realtime
962
+ if(!this._compositeGrid && !this._realTimeGrid) return "";
963
+
964
+ let selectedRows = this.getSelectedRows();
965
+ let rowCount = selectedRows ? selectedRows.length : 0;
966
+ let columnCount = this.getColumnCount();
967
+ let text = "";
968
+ let dv = this._activeGrid.getDataSource();
969
+ for(let i = 0; i < rowCount; i++) {
970
+ let rowIndex = selectedRows[i];
971
+ let rowData = this._getRow(dv, rowIndex);
972
+
973
+ if(rowData) {
974
+ if(text.length) text += "\n"; // break line before write in case text has content
975
+
976
+ // data row
977
+ for(let colIndex = 0; colIndex < columnCount; colIndex++) {
978
+ if(colIndex > 0) text += "\t"; // separate each cell content with tab
979
+ // column fields are available on compositeGrid and realTimeGrid level
980
+ let cField = this._getField(colIndex);
981
+ text += prepareTSVContent(rowData[cField]);
982
+ }
983
+ }
984
+ }
985
+ return text;
986
+ };
987
+
988
+ /** @private
989
+ * @param {Object=} sectRef Grid SectionReference
990
+ * @return {Object} ILayoutGrid
991
+ */
992
+ RowSelectionPlugin.prototype._getSection = function (sectRef) {
993
+ if(!this._activeGrid) {
994
+ this._activeGrid = this._hosts[0];
995
+ if(this._activeGrid) {
996
+ this._anchorSection = this._activeGrid.getSection("content");
997
+ if(!this._anchorSection) {
998
+ this._activeGrid = null;
999
+ }
1000
+ }
1001
+ }
1002
+ if(sectRef) {
1003
+ return this._activeGrid.getSection(sectRef);
1004
+ }
1005
+
1006
+ if(this._anchorSection) {
1007
+ if(!this._anchorSection.getElement()) { // The section may has been disposed.
1008
+ this._anchorSection = null;
1009
+ }
1010
+ }
1011
+
1012
+ return this._anchorSection;
1013
+ };
1014
+
1015
+ /** @private
1016
+ * @param {boolean=} preserveAnchor
1017
+ */
1018
+ RowSelectionPlugin.prototype._clearSelectedRows = function (preserveAnchor) { // Slow
1019
+ if(!this._activeGrid) {
1020
+ return;
1021
+ }
1022
+ if(this._basedOnContent) {
1023
+ let dv = this._activeGrid.getDataSource();
1024
+ if(dv) {
1025
+ let dt = dv.getDataSource();
1026
+ this._setColumnData(dt, this._selectionField, false);
1027
+ this._clearHeaderSelection();
1028
+ }
1029
+ } else {
1030
+ let sections = this._activeGrid.getAllSections("content");
1031
+ for(let i = sections.length; --i >= 0;) {
1032
+ this._sectionClearSelectedRows(sections[i], preserveAnchor);
1033
+ }
1034
+ }
1035
+
1036
+ if(!preserveAnchor) {
1037
+ this._anchorSection = null;
1038
+ }
1039
+ this._pendingClickIndex = -1;
1040
+ this._clearMenuIcon();
1041
+ };
1042
+ /** @private
1043
+ * @suppress {missingProperties}
1044
+ * @param {number} direction
1045
+ * @param {KeyboardEvent} e
1046
+ * @param {boolean=} pageKey
1047
+ */
1048
+ RowSelectionPlugin.prototype._selectByKey = function (direction, e, pageKey) {
1049
+ e.preventDefault();
1050
+
1051
+ if(!this._anchorSection) { return; }
1052
+
1053
+ this._focusGrid(true);
1054
+
1055
+ let shiftKey = e.shiftKey;
1056
+ let next = 0;
1057
+ let rowLimit = this._anchorSection.getRowCount() - 1;
1058
+ if(pageKey) {
1059
+ let info = this._activeGrid.getVScrollView();
1060
+ if(direction === -1) { // Up
1061
+ if(info) {
1062
+ next = this.getFirstSelectedIndex(this._anchorSection) <= info["firstFullRow"] ? info["prevPageRowIndex"] : info["firstFullRow"];
1063
+ }
1064
+ } else {
1065
+ if(info) {
1066
+ next = this.getLastSelectedIndex(this._anchorSection) >= info["lastFullRow"] ? info["nextPageRowIndex"] : info["lastFullRow"];
1067
+ } else {
1068
+ next = rowLimit;
1069
+ }
1070
+ }
1071
+ } else {
1072
+ if(direction === -1) {
1073
+ next = this.getFirstSelectedIndex(this._anchorSection) + direction;
1074
+ } else {
1075
+ next = this.getLastSelectedIndex(this._anchorSection) + direction;
1076
+ }
1077
+ }
1078
+ if(next < 0) {
1079
+ let csp = this._getPlugin("ColumnSelectionPlugin");
1080
+ if(!shiftKey && csp && csp["isEnabled"]()) {
1081
+ csp["selectSingleColumn"](null, this._activeGrid);
1082
+
1083
+ this.clearAllSelections();
1084
+ return;
1085
+ }
1086
+ this._scrollToRow(0);
1087
+ return;
1088
+ } else if(next > rowLimit) {
1089
+ this._scrollToRow(rowLimit);
1090
+ return;
1091
+ }
1092
+
1093
+ if(this._dispatchBeforeSelection(e)) {
1094
+ return;
1095
+ }
1096
+
1097
+ if(shiftKey && !this._singleSelMode) {
1098
+ this._selectFromAnchorToTarget(this._anchorSection, next);
1099
+ } else {
1100
+ this._selectSingleRow(this._anchorSection, next);
1101
+ }
1102
+
1103
+ this._scrollToRow(next);
1104
+ if(!this._basedOnContent) { // Protect against rowPositionChanged and postBindingSection event
1105
+ this._updateMenuIcon();
1106
+ }
1107
+ this._dispatchSelectionChanged(e, next);
1108
+ };
1109
+ /** @private
1110
+ * @param {Object} section ILayoutGrid
1111
+ * @param {number} rowIndex
1112
+ * @param {boolean} select
1113
+ */
1114
+ RowSelectionPlugin.prototype._sectionSetSelectedRow = function (section, rowIndex, select) {
1115
+ // set selection state to rowData when _basedOnContent === true
1116
+ if(this._basedOnContent) {
1117
+ let rowId = this._addSelectionField(rowIndex, select);
1118
+ if(select && rowId != null) {
1119
+ this._anchorRowId = rowId;
1120
+ }
1121
+ } else {
1122
+ section.setSelectedRow(rowIndex, select);
1123
+ }
1124
+ this._pendingSelection = null; // New selection happens before resolving the pending selection
1125
+ };
1126
+
1127
+ /** @private
1128
+ * @param {Object} section ILayoutGrid
1129
+ * @param {number|null} rowIndex
1130
+ * @param {number|null} length
1131
+ */
1132
+ RowSelectionPlugin.prototype._selectRangeOnSection = function (section, rowIndex, length) {
1133
+ if(rowIndex == null) {
1134
+ rowIndex = 0;
1135
+ }
1136
+ if(this._basedOnContent) { // TODO: handle the case where section is not content section
1137
+ let dv = (this._activeGrid) ? this._activeGrid.getDataSource() : null;
1138
+
1139
+ if(dv) {
1140
+ let rids = dv.getVisibleRowIds(true);
1141
+ if(length == null) {
1142
+ length = rids.length;
1143
+ }
1144
+ let toRowIndex = rowIndex + length;
1145
+ if(toRowIndex > rids.length) {
1146
+ toRowIndex = rids.length;
1147
+ }
1148
+ let ridList = [];
1149
+ let valueList = [];
1150
+ let ridHeaders = [];
1151
+ for(let r = rowIndex; r < toRowIndex; r++) {
1152
+ let dataRow = this._getRow(dv, r);
1153
+ if(dataRow) {
1154
+ ridList.push(rids[r]);
1155
+ valueList.push(true);
1156
+ } else {
1157
+ ridHeaders.push(r);
1158
+ }
1159
+ }
1160
+
1161
+ this._setColumnData(dv, this._selectionField, valueList, ridList);
1162
+ this._setHeaderSelections(dv, ridHeaders);
1163
+ }
1164
+ } else {
1165
+ if(length == null) {
1166
+ length = section.getRowCount();
1167
+ }
1168
+ section.selectRowRange(rowIndex, length);
1169
+ }
1170
+ };
1171
+
1172
+ /** @private
1173
+ * @param {Object} section ILayoutGrid
1174
+ * @param {boolean=} preserveAnchor
1175
+ */
1176
+ RowSelectionPlugin.prototype._sectionClearSelectedRows = function (section, preserveAnchor) {
1177
+ if(this._basedOnContent) {
1178
+ let selectedRowIds = this.getSelectedRowIds();
1179
+ if(selectedRowIds) {
1180
+ let dv = (this._activeGrid) ? this._activeGrid.getDataSource() : null;
1181
+ if(dv) {
1182
+ let len = selectedRowIds.length;
1183
+ let valueList = new Array(len);
1184
+ for(let i = 0; i < len; i++) {
1185
+ valueList[i] = false;
1186
+ }
1187
+ this._setColumnData(dv, this._selectionField, valueList, selectedRowIds);
1188
+ this._setHeaderSelections(dv, selectedRowIds, false);
1189
+ }
1190
+ }
1191
+ if(!preserveAnchor) {
1192
+ this._anchorRowId = "";
1193
+ }
1194
+ } else {
1195
+ section.clearSelectedRows();
1196
+ }
1197
+ };
1198
+
1199
+
1200
+ /** @private
1201
+ * @param {Object} section ILayoutGrid
1202
+ * @param {number} rowIndex
1203
+ * @return {boolean}
1204
+ */
1205
+ RowSelectionPlugin.prototype._selectSingleRow = function (section, rowIndex) {
1206
+ if(!section) { return false; }
1207
+
1208
+ this._clearSelectedRows(); // Deselect all rows
1209
+ this._sectionSetSelectedRow(section, rowIndex, true); // The anchor row is set
1210
+ this._anchorSection = section;
1211
+ return true;
1212
+ };
1213
+
1214
+ /** @private
1215
+ * @return {boolean} return true if can added icon
1216
+ */
1217
+ RowSelectionPlugin.prototype._updateMenuIcon = function () {
1218
+ this._timerMenuId = 0;
1219
+ if(!this._onMenuClicked) {
1220
+ return false;
1221
+ }
1222
+ let host = this._activeGrid;
1223
+ let startRowIndex = this.getFirstSelectedIndex();
1224
+ if(startRowIndex == null || !host) { // have no selected rows
1225
+ return false;
1226
+ }
1227
+ let endRowIndex = this.getLastSelectedIndex();
1228
+ let parentEl = host.getParent().parentNode;
1229
+
1230
+ if(!this._menuButton) {
1231
+ this._menuButton = document.createElement("div");
1232
+ this._menuButton.classList.add("row-selection-menu");
1233
+ this._menuButton.addEventListener("click", this._onMenuClicked);
1234
+ let coralIcon = document.createElement("ef-icon");
1235
+ coralIcon.icon = "most-detail";
1236
+ this._menuButton.appendChild(coralIcon);
1237
+ }
1238
+
1239
+ parentEl.appendChild(this._menuButton);
1240
+
1241
+ let menuIconSize = 28; // Currently support 28 and 24 pixel only
1242
+ let rowRect = host.getRowRect(startRowIndex, endRowIndex);
1243
+
1244
+ if( rowRect.scrollViewSize <= rowRect.top || rowRect.height + rowRect.top <= 0) { // hide icon when have no selection in view both left and right
1245
+ this._clearMenuIcon();
1246
+ return false;
1247
+ }
1248
+
1249
+ let leftOffset = rowRect.left + rowRect.width;
1250
+ let topOffset = rowRect.top + rowRect.scrollViewTop;
1251
+ if(this._menuPosition !== "outside") {
1252
+ menuIconSize = 24;
1253
+ this._menuButton.classList.add("row-selection-menu-inside");
1254
+ leftOffset = rowRect.left + rowRect.width - menuIconSize;
1255
+ topOffset = rowRect.top + rowRect.scrollViewTop - menuIconSize;
1256
+
1257
+ if(rowRect.top < menuIconSize) {
1258
+ topOffset = rowRect.top + rowRect.scrollViewTop;
1259
+ }
1260
+
1261
+ } else {
1262
+ if(rowRect.top <= 0) {
1263
+ topOffset = rowRect.scrollViewTop;
1264
+ }
1265
+
1266
+ if(rowRect.top + menuIconSize >= rowRect.scrollViewSize) { // when move from top to bottom and try to set new position icon
1267
+ topOffset = rowRect.scrollViewSize;
1268
+ }
1269
+ }
1270
+
1271
+ this._menuButton.style.left = leftOffset + "px";
1272
+ this._menuButton.style.top = topOffset + "px";
1273
+ return true;
1274
+ };
1275
+
1276
+ /** @private */
1277
+ RowSelectionPlugin.prototype._clearMenuIcon = function () {
1278
+ if(this._menuButton && this._menuButton.parentNode) {
1279
+ this._menuButton.parentNode.removeChild(this._menuButton);
1280
+ }
1281
+ };
1282
+ /** @private
1283
+ * @param {number|null} rowIndex
1284
+ * @param {number|null} length
1285
+ * @param {Object=} sectRef Grid SectionReference
1286
+ */
1287
+ RowSelectionPlugin.prototype._selectRowRange = function (rowIndex, length, sectRef) {
1288
+ let section = this._getSection(sectRef);
1289
+ if(section) {
1290
+ this._selectRangeOnSection(section, rowIndex, length);
1291
+ }
1292
+ };
1293
+
1294
+ /** @private
1295
+ * @param {Object} section ILayoutGrid
1296
+ * @param {number} rowIndex
1297
+ */
1298
+ RowSelectionPlugin.prototype._selectFromAnchorToTarget = function (section, rowIndex) {
1299
+ if(this._anchorSection === section) {
1300
+ let anchorRow = this.getRowAnchor(this._anchorSection);
1301
+ if(anchorRow !== rowIndex) {
1302
+ this._clearSelectedRows(true); // Keep anchor section
1303
+
1304
+ // WORKAROUND: To support negative count
1305
+ let direction = 1; // down
1306
+ let startingRow = anchorRow;
1307
+ let selectionCount = rowIndex - anchorRow;
1308
+ if(selectionCount < 0) {
1309
+ direction = -1; // up
1310
+ startingRow = rowIndex;
1311
+ }
1312
+
1313
+ this._selectRangeOnSection(section, startingRow, (selectionCount * direction) + 1);
1314
+
1315
+ if(!this._basedOnContent && this._anchorSection.setRowAnchor) {
1316
+ //Make sure that the anchor stays at the same position
1317
+ this._anchorSection.setRowAnchor(anchorRow);
1318
+ }
1319
+ }
1320
+ }
1321
+ };
1322
+
1323
+ /** @private
1324
+ * @return {boolean}
1325
+ */
1326
+ RowSelectionPlugin.prototype._gotoPrevGrid = function () {
1327
+ if(!this._activeGrid) { return false; }
1328
+
1329
+ if(this._activeGrid === this._hosts[0]) { // This is the first grid
1330
+ return false;
1331
+ } else {
1332
+ let curIndex = this._hosts.indexOf(this._activeGrid);
1333
+ if(curIndex > 0) {
1334
+ this._gotoGrid(curIndex - 1);
1335
+ return true;
1336
+ }
1337
+ }
1338
+ return false;
1339
+ };
1340
+ /** @private
1341
+ * @return {boolean}
1342
+ */
1343
+ RowSelectionPlugin.prototype._gotoNextGrid = function () {
1344
+ if(!this._activeGrid) { return false; }
1345
+
1346
+ let lastIndex = this._hosts.length - 1;
1347
+ if(this._activeGrid === this._hosts[lastIndex]) { // This is the last grid
1348
+ return false;
1349
+ } else {
1350
+ let curIndex = this._hosts.indexOf(this._activeGrid);
1351
+ if(curIndex >= 0) {
1352
+ this._gotoGrid(curIndex + 1);
1353
+ return true;
1354
+ }
1355
+ }
1356
+ return false;
1357
+ };
1358
+ /** @private
1359
+ * @param {number} gridIndex
1360
+ */
1361
+ RowSelectionPlugin.prototype._gotoGrid = function (gridIndex) {
1362
+ let anchorRow = this.getRowAnchor(this._anchorSection);
1363
+ let sectionIndex = this._anchorSection.getIndex();
1364
+ this.clearSelectedRows(); // Clear all current grid's selections
1365
+ this.selectSingleRow(anchorRow, sectionIndex, this._hosts[gridIndex]); // go to the next grid at the first column
1366
+ this._focusGrid(true);
1367
+ };
1368
+
1369
+ /** @private
1370
+ * @param {number} rowIndex
1371
+ */
1372
+ RowSelectionPlugin.prototype._scrollToRow = function (rowIndex) {
1373
+ let host = this._hosts[0];
1374
+ if(host) {
1375
+ host.scrollToRow(null, rowIndex);
1376
+ }
1377
+ };
1378
+
1379
+ /** Dispatch beforeSelection event and return rather clients prefer cancel selection or not
1380
+ * @private
1381
+ * @param {Event} e
1382
+ * @param {Object=} ctx
1383
+ * @return {boolean} return rather clients prefer cancel selection or not
1384
+ */
1385
+ RowSelectionPlugin.prototype._dispatchBeforeSelection = function (e, ctx) {
1386
+ if(this.hasListener("beforeSelection")) {
1387
+ if(!ctx) {
1388
+ let grid = this._activeGrid || this._hosts[0];
1389
+ ctx = grid ? grid.getRelativePosition(e) : {};
1390
+ }
1391
+ ctx["event"] = e;
1392
+ this._dispatch("beforeSelection", ctx); // Ask clients if they want to cancel this event
1393
+ if(ctx["cancel"]) {
1394
+ return true; // return true if clients want to cancel this event
1395
+ }
1396
+ }
1397
+
1398
+ return false;
1399
+ };
1400
+ /** @private
1401
+ * @param {Event} e
1402
+ * @param {number=} rowIndex
1403
+ * @param {Object=} section ILayoutGrid
1404
+ */
1405
+ RowSelectionPlugin.prototype._dispatchSelectionChanged = function (e, rowIndex, section) {
1406
+ if(this._activeGrid) {
1407
+ let csp = this._getPlugin("ColumnSelectionPlugin");
1408
+ if(csp && csp["isEnabled"]()) {
1409
+ csp["clearSelection"]();
1410
+ }
1411
+ let cep = this._getPlugin("CellEditingPlugin");
1412
+ if(cep) {
1413
+ cep.closeCellEditor();
1414
+ }
1415
+ cep = this._getPlugin("InCellEditingPlugin");
1416
+ if(cep) {
1417
+ cep.closeCellEditor();
1418
+ }
1419
+ }
1420
+
1421
+ if(this.hasListener("selectionChanged")) {
1422
+ let obj = {};
1423
+ obj["selectedRows"] = this.getSelectedRows();
1424
+ obj["rowIndex"] = (rowIndex != null) ? rowIndex : this.getRowAnchor(this._anchorSection);
1425
+ obj["section"] = (section != null) ? section : this._anchorSection;
1426
+ obj["event"] = e;
1427
+ obj["grid"] = this._activeGrid;
1428
+ this._dispatch("selectionChanged", obj);
1429
+ }
1430
+ };
1431
+
1432
+ /** @public
1433
+ * @ignore
1434
+ * @return {!Object}
1435
+ */
1436
+ RowSelectionPlugin.prototype._getEventHandlers = function() {
1437
+ return {
1438
+ "mousedown": this._onMouseDown,
1439
+ "click": this._onClick,
1440
+ "keydown": this._onKeyDown
1441
+ };
1442
+ };
1443
+
1444
+
1445
+
1446
+ export default RowSelectionPlugin;
1447
+ export { RowSelectionPlugin, RowSelectionPlugin as RowSelection, RowSelectionPlugin as RowSelectionExtension };