@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,1695 @@
1
+ import { Ext } from "../../tr-grid-util/es6/Ext.js";
2
+ import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
3
+ import { MouseDownTrait } from "../../tr-grid-util/es6/MouseDownTrait.js";
4
+ import { EventDispatcher } from "../../tr-grid-util/es6/EventDispatcher.js";
5
+ import { cloneObject, prepareTSVContent } from "../../tr-grid-util/es6/Util.js";
6
+ import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
7
+ import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
8
+
9
+ /** @typedef {Object} CellSelectionPlugin~Options
10
+ * @description The options can be specified by `cellSelection` property of the main grid's options
11
+ * @property {string=} mode="cell" Available options are cell, row, and column
12
+ * @property {boolean=} multipleSelection=true If disabled, only single cell can be selected at time
13
+ * @property {boolean=} autoDeselecting=true If disabled, the cell selection will be kept after the focus on the grid element is lost
14
+ * @property {boolean=} tabToSelect=false If enabled, the selection can be moved when user press tab key during the time grid is in focus
15
+ * @property {Function=} selectionChanged=null Event handler
16
+ * @property {Function=} copy=null Event handler
17
+ * @property {Function=} beforeMouseDown=null Event handler
18
+ * @property {Array=} selectableSections=["content"] Use to set which section can be selected, if not specific then only content section can select
19
+ * @property {boolean=} copyDisabled=false If enabled, there will be no dafault content copying by the extension
20
+ */
21
+
22
+ /** @event CellSelectionPlugin#selectionChanged
23
+ * @description Happens after mouse up event.
24
+ */
25
+
26
+ /** @event CellSelectionPlugin#copy
27
+ * @description Happens when Copy is triggered (e.g. Ctrl + C, or selecting copy from context menu).
28
+ * @property {Object} grid Core grid instance
29
+ * @property {boolean=} cancel This property can be set to true to cancel the operation
30
+ * @property {string=} data The data to be copied to system clipboard
31
+ * @property {string=} format="text/plain" The format of the data
32
+ * @example
33
+ * copy: function(e) {
34
+ * e.cancel = true; // To cancel the operation
35
+ * }
36
+ */
37
+
38
+ /** @event CellSelectionPlugin#beforeMouseDown
39
+ * @description Happens when mouse is down.
40
+ * @type {Object}
41
+ * @property {boolean=} cancel This property can be set to true to cancel the operation
42
+ */
43
+
44
+ /** @constructor
45
+ * @param {Object=} options
46
+ * @extends {GridPlugin}
47
+ */
48
+ let CellSelectionPlugin = function (options) {
49
+ this._unselectables = {
50
+ title: true,
51
+ header: true,
52
+ content: false
53
+ };
54
+
55
+ this._hosts = [];
56
+ this._map = [];
57
+ this._curRect = {};
58
+ this._curRect.left = 0;
59
+ this._curRect.right = 0;
60
+ this._curRect.top = 0;
61
+ this._curRect.bottom = 0;
62
+
63
+ this._onMouseMove = this._onMouseMove.bind(this);
64
+ this._onMouseUp = this._onMouseUp.bind(this);
65
+ this._onMouseDown = this._onMouseDown.bind(this);
66
+ this._onBlur = this._onBlur.bind(this);
67
+ this._onCopy = this._onCopy.bind(this);
68
+ this._onKeyDown = this._onKeyDown.bind(this);
69
+ this._onPostSectionDataBinding = this._onPostSectionDataBinding.bind(this);
70
+ this._onColumnMoved = this._onColumnMoved.bind(this);
71
+
72
+ if(options) {
73
+ this.config({ "cellSelection": options });
74
+ }
75
+ };
76
+
77
+ Ext.inherits(CellSelectionPlugin, GridPlugin);
78
+
79
+ /** @type {string}
80
+ * @private
81
+ */
82
+ CellSelectionPlugin._styles = prettifyCss([
83
+ ":host .tr-grid .cell.selection", [
84
+ "background-image: none;",
85
+ "background-color: var(--grid-selection-bgcolor);"
86
+ ]
87
+ ]);
88
+
89
+ /** @private
90
+ * @param {Object} grid core grid instance
91
+ */
92
+ CellSelectionPlugin._applyStyles = function(grid) {
93
+ if(!grid || grid._cellSelectionStyles || !ElfUtil.isHaloTheme()) {
94
+ return;
95
+ }
96
+ grid._cellSelectionStyles = true; // Prevent loading the same style twice
97
+ injectCss(CellSelectionPlugin._styles, grid.getElement());
98
+ };
99
+
100
+ /** Current anchor position that mouse down.
101
+ * @type {Object}
102
+ * @private
103
+ */
104
+ CellSelectionPlugin.prototype._anchor = null;
105
+
106
+ /** Current mouse position.
107
+ * @type {Object}
108
+ * @private
109
+ */
110
+ CellSelectionPlugin.prototype._curMouse = null;
111
+
112
+ /** Current rectangle of cell selected.
113
+ * @type {!Object}
114
+ * @private
115
+ */
116
+ CellSelectionPlugin.prototype._curRect;
117
+
118
+ /** @type {!Array.<Object>}
119
+ * @private
120
+ */
121
+ CellSelectionPlugin.prototype._map;
122
+
123
+ /** @type {boolean}
124
+ * @private
125
+ */
126
+ CellSelectionPlugin.prototype._hasCellSpan = false;
127
+
128
+ /** mode of selection, column, cell, row.
129
+ * @type {string}
130
+ * @private
131
+ */
132
+ CellSelectionPlugin.prototype._mode = "cell";
133
+
134
+ /** Define which section can't select.
135
+ * @type {!Object}
136
+ * @private
137
+ */
138
+ CellSelectionPlugin.prototype._unselectables;
139
+
140
+ /** @type {Object}
141
+ * @private
142
+ */
143
+ CellSelectionPlugin.prototype._lastSelection = null;
144
+
145
+ /** If disabled, the cell selection will be kept after the focus on the grid element is lost
146
+ * @type {boolean}
147
+ * @private
148
+ */
149
+ CellSelectionPlugin.prototype._autoDeselecting = true;
150
+ /** Turn on/off cell selection.
151
+ * @type {boolean}
152
+ * @private
153
+ */
154
+ CellSelectionPlugin.prototype._disabled = false;
155
+ /** @type {boolean}
156
+ * @private
157
+ */
158
+ CellSelectionPlugin.prototype._copyDisabled = false;
159
+
160
+ /** Trait Mouse Down
161
+ * @type {MouseDownTrait}
162
+ * @private
163
+ */
164
+ CellSelectionPlugin.prototype._mouseTrait = null;
165
+ /** Allow user to select multiple cell.
166
+ * @type {boolean}
167
+ * @private
168
+ */
169
+ CellSelectionPlugin.prototype._allowMultipleSelection = true;
170
+ /** Allow user tab to select next/previous cell
171
+ * @type {boolean}
172
+ * @private
173
+ */
174
+ CellSelectionPlugin.prototype._tabToSelect = false;
175
+ /** Mapping of unclickable element tag
176
+ * @type {Object}
177
+ * @private
178
+ */
179
+ CellSelectionPlugin.prototype._unclickableMapping = {
180
+ "A": 1,
181
+ "INPUT": 1,
182
+ "BUTTON": 1,
183
+ "SELECT": 1,
184
+ "CHECKBOX": 1,
185
+ "EF-DATETIME-PICKER": 1,
186
+ "EF-MULTI-SELECT": 1
187
+ };
188
+
189
+ /** Indicates direction vectors of mouse
190
+ * @type {Object}
191
+ * @private
192
+ */
193
+ CellSelectionPlugin.prototype._dirVectors = null;
194
+
195
+ /** Flag to tell if mouse out of Grid
196
+ * @type {Object}
197
+ * @private
198
+ */
199
+ CellSelectionPlugin.prototype._mouseOutOfGrid = false;
200
+
201
+ /** Hold timeout ID of scroll update interval function
202
+ * @type {number}
203
+ * @private
204
+ */
205
+ CellSelectionPlugin.prototype._scrollingTimer = null;
206
+
207
+ /** Default scroll speed
208
+ * @type {number}
209
+ * @private
210
+ */
211
+ CellSelectionPlugin.prototype._scrollSpeed = 500;
212
+
213
+ /** Previous rectangle of cell selected.
214
+ * @type {!Object}
215
+ * @private
216
+ */
217
+ CellSelectionPlugin.prototype._prevRect = {};
218
+ /** can mouse draggable
219
+ * @type {boolean}
220
+ * @private
221
+ */
222
+ CellSelectionPlugin.prototype._dragging = false;
223
+ /** @override
224
+ * @return {string}
225
+ */
226
+ CellSelectionPlugin.prototype.getName = function () {
227
+ return "CellSelectionPlugin";
228
+ };
229
+
230
+ /** Plugin that has multi-table support means that it can have multiple hosts/tables and share its states across those hosts/tables.
231
+ * @override
232
+ * @public
233
+ * @return {boolean}
234
+ */
235
+ CellSelectionPlugin.prototype.hasMultiTableSupport = function() {
236
+ return true;
237
+ };
238
+
239
+ /** Called by Grid plugin's initialization
240
+ * @override
241
+ */
242
+ CellSelectionPlugin.prototype.initialize = function (host, options) {
243
+ if(this._hosts.indexOf(host) >= 0) { return; }
244
+ this._hosts.push(host);
245
+
246
+ // Set dragable event
247
+ this._mouseTrait = new MouseDownTrait(host.getElement());
248
+ this._mouseTrait.addEventListener("mouseDown", this._onMouseDown);
249
+ this._mouseTrait.addEventListener("mouseUp", this._onMouseUp);
250
+ this._mouseTrait.addEventListener("mouseMove", this._onMouseMove);
251
+
252
+ host.listen("focusout", this._onBlur);
253
+ host.listen("copy", this._onCopy);
254
+ host.listen("keydown", this._onKeyDown); // WARNING: all hosts have keydown listener
255
+
256
+ host.listen("postSectionDataBinding", this._onPostSectionDataBinding);
257
+ host.listen("columnMoved", this._onColumnMoved);
258
+
259
+ host.enableClass("no-text-select", true);
260
+
261
+ if(this._hosts.length === 1) {
262
+ this.config(options);
263
+ }
264
+
265
+ CellSelectionPlugin._applyStyles(host);
266
+ };
267
+
268
+ /** Prevent memory leak, when we leave witout unlisten.
269
+ * @override
270
+ */
271
+ CellSelectionPlugin.prototype.unload = function (host) {
272
+ let at = this._hosts.indexOf(host);
273
+ if(at < 0) {
274
+ return;
275
+ }
276
+
277
+ this._mouseTrait.removeEventListener("mouseDown", this._onMouseDown);
278
+ this._mouseTrait.removeEventListener("mouseMove", this._onMouseMove);
279
+ this._mouseTrait.removeEventListener("mouseUp", this._onMouseUp);
280
+
281
+ host.unlisten("copy", this._onCopy);
282
+ host.unlisten("focusout", this._onBlur);
283
+ host.unlisten("keydown", this._onKeyDown);
284
+
285
+ host.unlisten("postSectionDataBinding", this._onPostSectionDataBinding);
286
+ host.unlisten("columnMoved", this._onColumnMoved);
287
+
288
+ // Reset cell-selection behavior.
289
+ this.deselectAll();
290
+ host.enableClass("no-text-select", false);
291
+
292
+ // remove host from host list
293
+ this._hosts.splice(at, 1);
294
+
295
+ this._dispose();
296
+ };
297
+
298
+ /** Involk when config object is set.
299
+ * @public
300
+ * @param {Object=} options
301
+ */
302
+ CellSelectionPlugin.prototype.config = function(options) {
303
+ if(!options) {
304
+ return;
305
+ }
306
+
307
+ let pluginOption = options["cellSelection"];
308
+
309
+ if(!pluginOption) {
310
+ return;
311
+ }
312
+
313
+ let val = pluginOption["mode"];
314
+ if(val) {
315
+ this._mode = val; // TODO: Check for valid mode
316
+ }
317
+
318
+ val = pluginOption["multipleSelection"];
319
+ if(val != null) {
320
+ this._allowMultipleSelection = val ? true : false;
321
+ }
322
+
323
+ if(!this._allowMultipleSelection) {
324
+ this._mouseTrait.removeEventListener("mouseMove", this._onMouseMove);
325
+ }
326
+
327
+ val = pluginOption["autoDeselecting"];
328
+ if(val != null) {
329
+ this._autoDeselecting = val ? true : false;
330
+ }
331
+ val = pluginOption["copyDisabled"];
332
+ if(val != null) {
333
+ this._copyDisabled = val ? true : false;
334
+ }
335
+
336
+ val = pluginOption["selectableSections"];
337
+ if(val) {
338
+ this.setSelectableSections(val);
339
+ }
340
+
341
+ // Listen keydown from the first host
342
+ val = pluginOption["tabToSelect"];
343
+ if(val) {
344
+ this._tabToSelect = true;
345
+ }
346
+
347
+ // event callback
348
+ this.addListener(pluginOption, "selectionChanged");
349
+ this.addListener(pluginOption, "copy");
350
+ this.addListener(pluginOption, "beforeMouseDown");
351
+ };
352
+
353
+ /** @public
354
+ * @param {Object=} gridOptions
355
+ * @return {!Object}
356
+ */
357
+ CellSelectionPlugin.prototype.getConfigObject = function (gridOptions) {
358
+ let obj = gridOptions || {};
359
+
360
+ let extOptions = obj.cellSelection;
361
+ if(!extOptions) {
362
+ extOptions = obj.cellSelection = {};
363
+ }
364
+
365
+ extOptions.mode = this._mode;
366
+
367
+ if(!this._allowMultipleSelection) {
368
+ extOptions.multipleSelection = false;
369
+ }
370
+
371
+ if(!this._autoDeselecting) {
372
+ extOptions.autoDeselecting = false;
373
+ }
374
+ if(this._copyDisabled) {
375
+ extOptions.copyDisabled = true;
376
+ }
377
+
378
+ if(this._tabToSelect) {
379
+ extOptions.tabToSelect = true;
380
+ }
381
+
382
+ let unSelectables = this._unselectables;
383
+ let sections = [];
384
+ for(let sectionName in unSelectables) {
385
+ if(!unSelectables[sectionName]) {
386
+ sections.push(sectionName);
387
+ }
388
+ }
389
+ if(sections.length > 0 && sections.length < 3) {
390
+ extOptions.selectableSections = sections;
391
+ }
392
+
393
+ return obj;
394
+ };
395
+ /** @public
396
+ * @ignore
397
+ * @return {!Object}
398
+ */
399
+ CellSelectionPlugin.prototype._getEventHandlers = function() {
400
+ return {
401
+ "mousedown": this._onMouseDown,
402
+ "mousemove": this._onMouseMove,
403
+ "mouseup": this._onMouseUp,
404
+ "copy": this._onCopy,
405
+ "blur": this._onBlur,
406
+ "keydown": this._onKeyDown
407
+ };
408
+ };
409
+ /** Fire when mouse down.
410
+ * @private
411
+ * @param {MouseEvent} e
412
+ */
413
+ CellSelectionPlugin.prototype._onMouseDown = function (e) {
414
+ this._dragging = false;
415
+ if(this._disabled || !this._isClickable(e.target)) {
416
+ return;
417
+ }
418
+
419
+ let activeGrid = this.getRelativeGrid(e);
420
+ let newAnchor = activeGrid.getRelativePosition(e);
421
+
422
+ if(this._unselectables[newAnchor.sectionType]) {
423
+ return;
424
+ }
425
+
426
+ this._dispatch("beforeMouseDown", newAnchor);
427
+
428
+ if(newAnchor.cancel) {
429
+ return;
430
+ }
431
+
432
+ this._dragging = true;
433
+ this.selectSingleCell(newAnchor);
434
+ };
435
+
436
+ /** Fire when mouse is draging.
437
+ * @private
438
+ * @param {Event} e
439
+ */
440
+ CellSelectionPlugin.prototype._onMouseMove = function (e) {
441
+ if(this._disabled || !this._anchor || !this._dragging) {
442
+ return;
443
+ }
444
+ let activeGrid = this._getActiveGrid();
445
+ let newMouse = activeGrid.getRelativePosition(e);
446
+
447
+ // Avoid cross section selection but scrolling is still working
448
+ if(this._anchor["sectionType"] === "title" && newMouse["sectionType"] !== "title") {
449
+ return;
450
+ } else if (this._anchor["sectionType"] === "content" && newMouse["sectionType"] === "title") {
451
+ return;
452
+ }
453
+
454
+ if(!newMouse["hit"]) {
455
+ let gridHeight = activeGrid.getHeight();
456
+ let gridWidth = activeGrid.getWidth();
457
+
458
+ if(activeGrid.getScrollWidth() === 0 && activeGrid.getScrollHeight() === 0) {
459
+ // prevent Auto Scrolling, if Grid does not have scroll
460
+ return;
461
+ }
462
+
463
+ if((gridHeight >= newMouse.y && !(newMouse.y < 0)) && (gridWidth >= newMouse.x && !(newMouse.x < 0))) {
464
+ // return Auto Scrolling, if mouse out of Grid
465
+ return;
466
+ }
467
+
468
+ let x = 0;
469
+ let y = 0;
470
+ if(newMouse.x > gridWidth) {
471
+ x = newMouse.x - gridWidth;
472
+ } else if(newMouse.x < 0) {
473
+ x = newMouse.x;
474
+ }
475
+ if(newMouse.y > gridHeight) {
476
+ y = newMouse.y - gridHeight;
477
+ } else if(newMouse.y < 0) {
478
+ y = newMouse.y;
479
+ }
480
+
481
+ let dirVectors = {
482
+ "x": x,
483
+ "y": y
484
+ };
485
+
486
+ // set up scrollSpeed
487
+ this._setScrollSpeed(dirVectors);
488
+
489
+ let isSameProps = this._checkIsSameProps(dirVectors);
490
+
491
+ if(this._mouseOutOfGrid && isSameProps) {
492
+ return;
493
+ }
494
+
495
+ this._dirVectors = dirVectors;
496
+ this._setScrollInterval(dirVectors);
497
+ return;
498
+ }
499
+
500
+ this._clearScrollingTimer();
501
+
502
+ if(this._isTheSamePosition(this._curMouse, newMouse)) {
503
+ // No selection has been changed
504
+ return;
505
+ }
506
+
507
+ this._curMouse = newMouse;
508
+ let tgtRect = this._newSelectionRect();
509
+
510
+ this._updateSelection(tgtRect);
511
+ };
512
+
513
+ /** Get active grid
514
+ * @private
515
+ * @return {Object} core grid
516
+ */
517
+ CellSelectionPlugin.prototype._getActiveGrid = function() {
518
+ let anchor = this._anchor;
519
+ if(anchor && anchor["grid"]) {
520
+ return anchor["grid"];
521
+ } else {
522
+ return this._hosts[0];
523
+ }
524
+ };
525
+
526
+ /** Set scroll speed
527
+ * @private
528
+ * @param {Object} dirVectors Indicates direction vectors of mouse
529
+ */
530
+ CellSelectionPlugin.prototype._setScrollSpeed = function (dirVectors) {
531
+ let basedSped = 300;
532
+ let scrollSpeed = Math.floor(basedSped - Math.abs((dirVectors.x + dirVectors.y) / 2));
533
+
534
+ if(scrollSpeed % 10 === 0) {
535
+ this._scrollSpeed = scrollSpeed > 0 || scrollSpeed <= 500 ? scrollSpeed : 50;
536
+ }
537
+ };
538
+
539
+ /** Detect direction vector
540
+ * @private
541
+ * @param {number} vector
542
+ * @return {string|null}
543
+ */
544
+ CellSelectionPlugin.prototype._detectDir = function(vector) {
545
+ let part = null;
546
+ if(vector < 0) {
547
+ part = "minus"; // minus vector
548
+ } else if(vector === 0) {
549
+ part = "zero"; // zero vector
550
+ } else if(vector > 0) {
551
+ part = "positive"; // positive vector
552
+ }
553
+
554
+ return part;
555
+ };
556
+
557
+ /** Check Is Same Props
558
+ * @private
559
+ * @param {Object} newDirVectors - indicates direction vectors of mouse
560
+ * @return {boolean}
561
+ */
562
+ CellSelectionPlugin.prototype._checkIsSameProps = function(newDirVectors) {
563
+
564
+ if(!this._dirVectors || !newDirVectors) {
565
+ return false;
566
+ }
567
+
568
+ let isX = this._detectDir(this._dirVectors.x) === this._detectDir(newDirVectors.x);
569
+ let isY = this._detectDir(this._dirVectors.y) === this._detectDir(newDirVectors.y);
570
+
571
+ return (
572
+ isX && isY
573
+ );
574
+ };
575
+
576
+ /** @private
577
+ */
578
+ CellSelectionPlugin.prototype._clearScrollingTimer = function () {
579
+ if(this._scrollingTimer) {
580
+ clearInterval(this._scrollingTimer);
581
+ this._scrollingTimer = 0;
582
+ this._mouseOutOfGrid = false;
583
+ }
584
+ };
585
+ /** @private
586
+ * @param {Object} dirVectors
587
+ */
588
+ CellSelectionPlugin.prototype._setScrollInterval = function (dirVectors) {
589
+ this._clearScrollingTimer();
590
+ this._mouseOutOfGrid = true;
591
+
592
+ let tgtRect = this._newSelectionRect();
593
+ let initialScrollSpeed = this._scrollSpeed || 500;
594
+
595
+ this._scrollingTimer = setInterval(function () {
596
+ if(initialScrollSpeed !== this._scrollSpeed) {
597
+ this._setScrollInterval(dirVectors);
598
+ return;
599
+ }
600
+ let currentScrollTop = this._hosts[0].getScrollTop();
601
+ let currentScrollLeft = this._hosts[0].getScrollLeft();
602
+
603
+ let isYPositive = dirVectors.y > 0;
604
+ let isXPositive = dirVectors.x > 0;
605
+
606
+ let cellWidth = this._map[0].section.getCellWidth();
607
+ let cellHeight = this._map[0].section.getCellHeight();
608
+
609
+ let scrollToTop = isYPositive ? currentScrollTop + cellWidth : currentScrollTop - cellWidth;
610
+ let scrollToLeft = isXPositive ? currentScrollLeft + cellHeight : currentScrollLeft - cellHeight;
611
+
612
+ if(dirVectors.y !== 0) {
613
+ // updates scroll position
614
+ this._hosts[0].setScrollTop(scrollToTop);
615
+
616
+ let vScrollbar = this._hosts[0].getVScrollbar();
617
+ let rowVirtualizer = this._hosts[0].getRowVirtualizer();
618
+ let isEndOfVerticalScroll = this._isEndOfVerticalScroll();
619
+ let vTrackHeight = vScrollbar.getHeight();
620
+ let scrollViewOffset = rowVirtualizer.getViewOffset();
621
+
622
+ // scrolling down
623
+ if(isYPositive) {
624
+ let nextBottomRowEndPos = rowVirtualizer.getContentStart(tgtRect.bottom + 1) - scrollViewOffset; //end position of next bottom row
625
+
626
+ if(nextBottomRowEndPos <= vTrackHeight){
627
+ // while next row is in scroll view, extend to next bottom row
628
+ while(nextBottomRowEndPos <= vTrackHeight){
629
+ tgtRect.bottom += 1;
630
+ nextBottomRowEndPos = rowVirtualizer.getContentStart(tgtRect.bottom + 1) - scrollViewOffset;
631
+ }
632
+ } else if(isEndOfVerticalScroll){
633
+ tgtRect.bottom = this._hosts[0].getRowCount();
634
+ }
635
+ }
636
+ // scrolling up
637
+ else {
638
+ let nextTopRowStartPos = rowVirtualizer.getContentStart(tgtRect.top - 1) - scrollViewOffset; //start position of next top row
639
+
640
+ if(nextTopRowStartPos >= 0){
641
+ // while next row is in scroll view, extend to next top row
642
+ while(nextTopRowStartPos >= 0){
643
+ tgtRect.top -= 1;
644
+ nextTopRowStartPos = rowVirtualizer.getContentStart(tgtRect.top - 1) - scrollViewOffset;
645
+ }
646
+ } else if(isEndOfVerticalScroll){
647
+ tgtRect.top = 1;
648
+ }
649
+ }
650
+ }
651
+
652
+ if(dirVectors.x !== 0) {
653
+ // updates scroll position
654
+ this._hosts[0].setScrollLeft(Math.floor(scrollToLeft));
655
+
656
+ let isEndOfHorizontalScroll = this._isEndOfHorizontalScroll();
657
+ let hScrollbar = this._hosts[0].getHScrollbar();
658
+ let hTrackWidth = hScrollbar.getTrackSize();
659
+
660
+ // scrolling right
661
+ if(isXPositive){
662
+ let leftPinnedWidth = 0;
663
+ let leftPinnedCount = this._hosts[0].getPinnedLeftColumnCount();
664
+
665
+ // getting width of left pinned columns
666
+ if(leftPinnedCount){
667
+ leftPinnedWidth = this._hosts[0].getContentWidth() - hScrollbar.getContentWidth();
668
+ }
669
+
670
+ let nextRightColEndPos = this._hosts[0].getColumnRight(tgtRect.right) - leftPinnedWidth; //end position of next right column
671
+ // if next column is in scroll view, extend to next right column
672
+ if(nextRightColEndPos <= hTrackWidth){
673
+ tgtRect.right += 1;
674
+ } else if(isEndOfHorizontalScroll){
675
+ tgtRect.right = this._hosts[0].getColumnCount();
676
+ }
677
+ }
678
+ // scrolling left
679
+ else {
680
+ let nextLeftColStartPos = this._hosts[0].getColumnLeft(tgtRect.left - 1); //start position of next left column
681
+ // if next column is in scroll view, extend to next left column
682
+ if(nextLeftColStartPos >= 0){
683
+ tgtRect.left -= 1;
684
+ } else if(isEndOfHorizontalScroll){
685
+ tgtRect.left = 0;
686
+ }
687
+ }
688
+ }
689
+
690
+ this._updateSelection(tgtRect);
691
+ this._prevRect = cloneObject(tgtRect);
692
+ }.bind(this), initialScrollSpeed);
693
+ };
694
+
695
+ /** @private
696
+ * @return {boolean}
697
+ */
698
+ CellSelectionPlugin.prototype._isEndOfVerticalScroll = function () {
699
+ let scrollTop = this._hosts[0].getScrollTop();
700
+ if(!scrollTop) {
701
+ return true;
702
+ }
703
+ return (scrollTop + this._hosts[0].getHeight()) > this._hosts[0].getScrollHeight();
704
+ };
705
+
706
+ /** @private
707
+ * @return {boolean}
708
+ */
709
+ CellSelectionPlugin.prototype._isEndOfHorizontalScroll = function () {
710
+ let hScrollbar = this._hosts[0].getHScrollbar();
711
+ return hScrollbar.isEndOfHorizontalScroll() || this._hosts[0].getScrollLeft() == 0;
712
+ };
713
+
714
+ /** Fire when draging was end.
715
+ * @private
716
+ * @param {Object} e
717
+ */
718
+ CellSelectionPlugin.prototype._onMouseUp = function (e) {
719
+ this._clearScrollingTimer();
720
+
721
+ if(this._disabled || !this._dragging) {
722
+ return;
723
+ }
724
+
725
+ if(!CellSelectionPlugin._hasTextSelection()) {
726
+ let activeGrid = this._getActiveGrid();
727
+ if(activeGrid) {
728
+ activeGrid.focus(); // Trigger blur and focusout events
729
+ }
730
+ }
731
+ this._dragging = false;
732
+ this._dispatch("selectionChanged", {});
733
+ };
734
+
735
+ /** @private
736
+ * @param {Object} e
737
+ */
738
+ CellSelectionPlugin.prototype._onBlur = function (e) { // WARNING: This happens immediately after the first mousedown on the grid
739
+ if(this._dragging || !this._autoDeselecting) { // Ignore any blur and focusout during the dragging operation
740
+ return;
741
+ }
742
+ if(this._realTimeGrid && this._realTimeGrid.contains) {
743
+ if(this._realTimeGrid.contains(e.relatedTarget)) { // For blur event, relatedTarget is the EventTarget receiving focus (if any)
744
+ return; // Grid does not really lose focus to the outside element
745
+ }
746
+ }
747
+
748
+ if(this.deselectAll()) {
749
+ this._dispatch("selectionChanged", {});
750
+ }
751
+ };
752
+
753
+ /** to remove selection UI when column moved, then postSectionData will rerender selection UI again
754
+ * @private
755
+ * @param {Object} e
756
+ */
757
+ CellSelectionPlugin.prototype._onColumnMoved = function (e) {
758
+ let rect = this._curRect;
759
+ let from = e.fromColIndex;
760
+ let to = e.toColIndex;
761
+ // ignore column that moved outside selection range
762
+ if(from < rect.left && to < rect.left) {
763
+ return;
764
+ } else if(from >= rect.right && to >= rect.right) {
765
+ return;
766
+ }
767
+
768
+ let clearColIndex;
769
+ // move from outside left to right
770
+ // the selection column will shift to left
771
+ if(from < rect.left) {
772
+ clearColIndex = rect.left - 1;
773
+ }
774
+ // move from outside right to left
775
+ // the selection column will shift to right
776
+ else if(from >= rect.right) {
777
+ clearColIndex = rect.right;
778
+ }
779
+ // move from inside to outside
780
+ // the selection column will move to specific column
781
+ else if(to < rect.left || to >= rect.right) {
782
+ clearColIndex = to;
783
+ }
784
+ // move from inside to inside
785
+ else {
786
+ return; // just do nothing
787
+ }
788
+
789
+ for(let rowIndex = rect.top; rowIndex < rect.bottom; rowIndex++) {
790
+ let rowObj = this._map[rowIndex];
791
+ rowObj.section.selectCell(clearColIndex, rowObj.rowIndex, false);
792
+ }
793
+ };
794
+
795
+ /** Check if the element clickable.
796
+ * @private
797
+ * @param {Element} elem
798
+ * @param {Object} activeGrid
799
+ * @return {boolean}
800
+ */
801
+ CellSelectionPlugin.prototype._isClickable = function (elem, activeGrid) {
802
+ if(!this._hosts[0] || !elem
803
+ // case tagName = EF-<whatever> but except EF-ICON and EF-HEADER
804
+ || ("EF-ICON" !== elem.tagName
805
+ && "EF-HEADER" !== elem.tagName
806
+ && 0 === elem.tagName.indexOf("EF-"))
807
+ ) {
808
+ return false;
809
+ }
810
+ // case elem.tagName is in inclickable list
811
+ if(this._unclickableMapping[elem.tagName] && !elem.classList.contains("valigner")) { // button.valigner is clickable
812
+ return false;
813
+ }
814
+
815
+ return true;
816
+ };
817
+
818
+ /** Check if there is any text selection in the document. This method adds more testability.
819
+ * @private
820
+ * @returns {boolean}
821
+ */
822
+ CellSelectionPlugin._hasTextSelection = function() {
823
+ return window.getSelection().toString() ? true : false;
824
+ };
825
+
826
+ /** Copy text in selected cell to clipboard. If no selection, clipboard will NOT be replaced by empty string
827
+ * @private
828
+ * @param {MouseEvent} e
829
+ */
830
+ CellSelectionPlugin.prototype._onCopy = function (e) {
831
+ if(this._copyDisabled) {
832
+ return;
833
+ }
834
+
835
+ if(CellSelectionPlugin._hasTextSelection()) {
836
+ return; // If there is already native text selection, custom copying is not allowed
837
+ }
838
+
839
+ let obj = {
840
+ grid: this._hosts[0],
841
+ sender: this,
842
+ data: "",
843
+ format: "",
844
+ clipboards: []
845
+ };
846
+
847
+ this._dispatch("copy", obj);
848
+
849
+ if(obj.cancel) {
850
+ return;
851
+ }
852
+
853
+ let clipboardData = (e.clipboardData || window.clipboardData);
854
+ let format = "text/plain";
855
+ let dirty = false;
856
+ // Single format support
857
+ if(obj.data) {
858
+ clipboardData.setData(obj.format || format, obj.data);
859
+ dirty = true;
860
+ } else {
861
+ let txt = this.getSelectedText();
862
+ if(txt) {
863
+ clipboardData.setData(format, txt);
864
+ dirty = true;
865
+ }
866
+ }
867
+
868
+ // Multiple formats support
869
+ let len = obj.clipboards ? obj.clipboards.length : 0;
870
+ for(let i = 0; i < len; ++i) {
871
+ let clipboard = obj.clipboards[i];
872
+ if(clipboard.format){
873
+ clipboardData.setData(clipboard.format, clipboard.data || "");
874
+ dirty = true;
875
+ }
876
+ }
877
+
878
+ if(dirty) {
879
+ EventDispatcher.preventDefault(e);
880
+ }
881
+ };
882
+ /** @private
883
+ * @constant
884
+ * @type {Object}
885
+ */
886
+ const _arrowKeys = {
887
+ "ArrowLeft": true,
888
+ "ArrowRight": true,
889
+ "ArrowUp": true,
890
+ "ArrowDown": true
891
+ };
892
+ /** @private
893
+ * @param {KeyboardEvent} e
894
+ */
895
+ CellSelectionPlugin.prototype._onKeyDown = function (e) {
896
+ if(e.altKey || e.ctrlKey || e.metaKey || e.defaultPrevented || !this._anchor) {
897
+ return;
898
+ }
899
+
900
+ let handled = false;
901
+ let code = e.code;
902
+ if(code === "Tab") {
903
+ if(this._tabToSelect) {
904
+ handled = (e.shiftKey) ? this.selectPrevCell() : this.selectNextCell();
905
+ }
906
+ } else if(_arrowKeys[code]) {
907
+ let colIndex = this._anchor["colIndex"];
908
+ let rowIndex = this._anchor["rowIndex"];
909
+ if(e.shiftKey) {
910
+ if(this._curMouse) {
911
+ colIndex = this._curMouse["colIndex"];
912
+ rowIndex = this._curMouse["rowIndex"];
913
+ }
914
+ if(code === "ArrowLeft") {
915
+ colIndex--;
916
+ } else if(code === "ArrowRight") {
917
+ colIndex++;
918
+ } else if(code === "ArrowUp") {
919
+ rowIndex--;
920
+ } else if(code === "ArrowDown") {
921
+ rowIndex++;
922
+ }
923
+ let cellInfo = this._getCellInfo(colIndex, rowIndex);
924
+ if(cellInfo) {
925
+ handled = true;
926
+ let activeGrid = this._getActiveGrid();
927
+ if(activeGrid) {
928
+ activeGrid.scrollToRow(null, rowIndex);
929
+ }
930
+ this._curMouse = cellInfo;
931
+ this._updateSelection(this._newSelectionRect());
932
+ }
933
+ } else if(code === "ArrowLeft") {
934
+ handled = this.selectPrevCell();
935
+ } else if(code === "ArrowRight") {
936
+ handled = this.selectNextCell();
937
+ } else {
938
+ rowIndex = (code === "ArrowUp") ? rowIndex - 1 : rowIndex + 1;
939
+ let cellInfo = this._getCellInfo(colIndex, rowIndex);
940
+ if(cellInfo) {
941
+ this.selectSingleCell(cellInfo);
942
+ handled = true;
943
+ }
944
+ }
945
+ }
946
+
947
+ if(handled) {
948
+ EventDispatcher.preventDefault(e);
949
+ }
950
+ };
951
+
952
+ /** @private
953
+ * @param {Object} e for cell style binding
954
+ */
955
+ CellSelectionPlugin.prototype._onPostSectionDataBinding = function (e) {
956
+ let activeGrid = this._getActiveGrid();
957
+ if(this.getSelectionCount() > 0 && activeGrid === e.sender) {
958
+ // let colCount = this._hosts[0].getColumnCount();
959
+ let rowOffset = e.section.getRowOffset();
960
+ let selectionRowStart = this._curRect.top - rowOffset;
961
+ let selectionRowEnd = this._curRect.bottom - rowOffset;
962
+ let selectionColStart = this._curRect.left;
963
+ let selectionColEnd = this._curRect.right;
964
+ let rowIndex, colIndex;
965
+ for(rowIndex = e.fromRowIndex; rowIndex < e.toRowIndex; rowIndex++) {
966
+ if(rowIndex >= selectionRowStart && rowIndex < selectionRowEnd) {
967
+ // if row inside selection range
968
+ for(colIndex = selectionColStart; colIndex < selectionColEnd; colIndex++) {
969
+ e.section.selectCell(colIndex, rowIndex, true);
970
+ }
971
+ } else {
972
+ for(colIndex = selectionColStart; colIndex < selectionColEnd; colIndex++) {
973
+ e.section.selectCell(colIndex, rowIndex, false);
974
+ }
975
+ }
976
+ }
977
+ }
978
+ };
979
+
980
+ /** @private */
981
+ CellSelectionPlugin.prototype._cacheSectionMap = function () {
982
+ let sectionCount = this._hosts[0].getSectionCount();
983
+ let totalRow = 0;
984
+ let rowOffset = 0;
985
+
986
+ this._hasCellSpan = false;
987
+ let activeGrid = this._getActiveGrid();
988
+ for(let i = 0; i < sectionCount; ++i) {
989
+ let sectionSettings = activeGrid.getSectionSettings(i);
990
+ let section = sectionSettings.getSection();
991
+ let hasCellSpan = section.hasCellSpan();
992
+ let rowCount = section.getRowCount();
993
+ for(let j = 0; j < rowCount; ++j) {
994
+ let obj = {};
995
+ obj.section = section;
996
+ obj.hasCellSpan = hasCellSpan;
997
+ obj.sectionIndex = i;
998
+ obj.rowIndex = j;
999
+ obj.rowOffset = rowOffset;
1000
+ obj.type = sectionSettings.getType();
1001
+ this._map[totalRow] = obj;
1002
+ totalRow++;
1003
+ }
1004
+ rowOffset += rowCount;
1005
+ this._hasCellSpan |= hasCellSpan;
1006
+ }
1007
+ this._map.length = totalRow;
1008
+ };
1009
+
1010
+ /** @private
1011
+ * @param {Object} obj
1012
+ * @return {number}
1013
+ */
1014
+ CellSelectionPlugin.prototype._getCumulativeIndex = function (obj) {
1015
+ let section = obj["section"];
1016
+ if(!section) {
1017
+ section = this._hosts[0].getSection("content");
1018
+ } else if(typeof section === "string" || typeof section === "number") {
1019
+ section = this._hosts[0].getSection(section);
1020
+ }
1021
+ return section.getRowOffset() + obj["rowIndex"];
1022
+ };
1023
+
1024
+ /** Add new selection rectangle area.
1025
+ * @private
1026
+ * @param {Object=} targetPos
1027
+ * @return {!Object} Rectangle
1028
+ */
1029
+ CellSelectionPlugin.prototype._newSelectionRect = function (targetPos) {
1030
+ if(!targetPos) {
1031
+ targetPos = this._curMouse;
1032
+ }
1033
+ if(!this._anchor || !targetPos) {
1034
+ return this._curRect;
1035
+ }
1036
+
1037
+ let rect = {};
1038
+ if(this._mode !== "row") {
1039
+ if(this._anchor["colIndex"] <= targetPos["colIndex"]) {
1040
+ rect.left = this._anchor["colIndex"];
1041
+ rect.right = targetPos["colIndex"] + 1;
1042
+ } else {
1043
+ rect.left = targetPos["colIndex"];
1044
+ rect.right = this._anchor["colIndex"] + 1;
1045
+ }
1046
+ } else {
1047
+ rect.left = 0;
1048
+ rect.right = this._hosts[0].getColumnCount();
1049
+ }
1050
+
1051
+ // Required
1052
+ let cIndex = this._getCumulativeIndex(targetPos);
1053
+ let aIndex = this._getCumulativeIndex(this._anchor);
1054
+
1055
+ if(this._mode !== "column") {
1056
+ if(aIndex <= cIndex) {
1057
+ rect.top = aIndex;
1058
+ rect.bottom = cIndex + 1;
1059
+ } else {
1060
+ rect.top = cIndex;
1061
+ rect.bottom = aIndex + 1;
1062
+ }
1063
+ } else {
1064
+ rect.top = 0;
1065
+ rect.bottom = this._hosts[0].getRowCount();
1066
+ }
1067
+
1068
+ this._scanCellSpans(rect);
1069
+ return rect;
1070
+ };
1071
+
1072
+ /** we will expand rect by cell span (cell merged)
1073
+ * @private
1074
+ * @param {Object} rect
1075
+ */
1076
+ CellSelectionPlugin.prototype._scanCellSpans = function (rect) {
1077
+ if(!this._hasCellSpan) { return; }
1078
+ let c = 0, r = 0;
1079
+ let tgtChanged = false;
1080
+
1081
+ do {
1082
+ tgtChanged = false;
1083
+ for(c = rect.left; c < rect.right; ++c) {
1084
+ // Left to right
1085
+ tgtChanged |= this._expandRect(c, rect.top, rect);
1086
+ }
1087
+ c = rect.right - 1;
1088
+ for(r = rect.top + 1; r < rect.bottom; ++r) {
1089
+ // Top to bottom
1090
+ tgtChanged |= this._expandRect(c, r, rect);
1091
+ }
1092
+ r = rect.bottom - 1;
1093
+ for(c = rect.right - 1; --c >= rect.left; ) {
1094
+ // Bottom right to bottom left
1095
+ tgtChanged |= this._expandRect(c, r, rect);
1096
+ }
1097
+ for(r = rect.bottom - 1; --r >= rect.top; ) {
1098
+ // Bottom left to top
1099
+ tgtChanged |= this._expandRect(rect.left, r, rect);
1100
+ }
1101
+ } while (tgtChanged);
1102
+ };
1103
+
1104
+ /** @private
1105
+ * @param {number} colIndex
1106
+ * @param {number} rowIndex
1107
+ * @param {Object} rect
1108
+ * @return {boolean}
1109
+ */
1110
+ CellSelectionPlugin.prototype._expandRect = function (colIndex, rowIndex, rect) {
1111
+ let obj = this._map[rowIndex];
1112
+ if(!obj.hasCellSpan) { return false; }
1113
+ if(this._unselectables[obj.type] === true) { return false; }
1114
+
1115
+ let changed = false;
1116
+ let newIndex = 0;
1117
+ let colSpan = obj.section.getCellColSpan(colIndex, obj.rowIndex);
1118
+ if(colSpan > 1) {
1119
+ newIndex = colIndex + colSpan;
1120
+ if(newIndex > rect.right) {
1121
+ rect.right = newIndex; // Exclusive
1122
+ changed = true;
1123
+ }
1124
+ } else if(colSpan < 0) {
1125
+ newIndex = colIndex + colSpan;
1126
+ if(newIndex < rect.left) {
1127
+ rect.left = newIndex;
1128
+ changed = true;
1129
+ }
1130
+ colSpan = obj.section.getCellColSpan(newIndex, obj.rowIndex);
1131
+ newIndex = newIndex + colSpan;
1132
+ if(newIndex > rect.right) {
1133
+ rect.right = newIndex; // Exclusive
1134
+ changed = true;
1135
+ }
1136
+ }
1137
+
1138
+ let rowSpan = obj.section.getCellRowSpan(colIndex, obj.rowIndex);
1139
+ if(rowSpan > 1) {
1140
+ newIndex = obj.section.getRowOffset() + obj.rowIndex + rowSpan;
1141
+ if(newIndex > rect.bottom) {
1142
+ rect.bottom = newIndex; // Exclusive
1143
+ changed = true;
1144
+ }
1145
+ } else if(rowSpan < 0) {
1146
+ newIndex = obj.section.getRowOffset() + obj.rowIndex + rowSpan;
1147
+ if(newIndex < rect.top) {
1148
+ rect.top = newIndex;
1149
+ changed = true;
1150
+ }
1151
+ rowSpan = obj.section.getCellRowSpan(colIndex, newIndex);
1152
+ newIndex = newIndex + rowSpan;
1153
+ if(newIndex > rect.bottom) {
1154
+ rect.bottom = newIndex; // Exclusive
1155
+ changed = true;
1156
+ }
1157
+ }
1158
+
1159
+ return changed;
1160
+ };
1161
+
1162
+ /** Update all row & column that mouse draged over.
1163
+ * @private
1164
+ * @param {Object} tgtRect
1165
+ */
1166
+ CellSelectionPlugin.prototype._updateSelection = function (tgtRect) {
1167
+ // Expand/Shrink Left
1168
+ this._updateColumnSelection(tgtRect.left, this._curRect.left);
1169
+ this._curRect.left = tgtRect.left;
1170
+
1171
+ // Expand/Shrink Right
1172
+ this._updateColumnSelection(this._curRect.right, tgtRect.right);
1173
+ this._curRect.right = tgtRect.right;
1174
+
1175
+ // Expand/Shrink Top
1176
+ this._updateRowSelection(tgtRect.top, this._curRect.top);
1177
+ this._curRect.top = tgtRect.top;
1178
+
1179
+ // Expand/Shrink Bottom
1180
+ this._updateRowSelection(this._curRect.bottom, tgtRect.bottom);
1181
+ this._curRect.bottom = tgtRect.bottom;
1182
+
1183
+ let activeGrid = this._getActiveGrid();
1184
+ if(activeGrid) {
1185
+ let x = this._curRect.left;
1186
+ let y = this._curRect.top;
1187
+
1188
+ let mapInfo = this._map[y];
1189
+
1190
+ let w = 0;
1191
+ let h = 0;
1192
+ if(mapInfo) {
1193
+ w = this._curRect.right - x;
1194
+ h = this._curRect.bottom - y;
1195
+ y -= mapInfo.rowOffset;
1196
+ let contentType = mapInfo.type;
1197
+ if(contentType === "content") {
1198
+ let contentSect = activeGrid.getSection("content");
1199
+ if(contentSect) {
1200
+ contentSect.setCellBounds(x, y, w, h);
1201
+ }
1202
+ } else {
1203
+ let titleSect = activeGrid.getSection("title");
1204
+ if(titleSect) {
1205
+ titleSect.setCellBounds(x, y, w, h);
1206
+ }
1207
+ }
1208
+ }
1209
+ }
1210
+ };
1211
+
1212
+ /** Update all column that mouse draged over.
1213
+ * @private
1214
+ * @param {number} from Inclustive starting index
1215
+ * @param {number} to Exclusive destination index
1216
+ */
1217
+ CellSelectionPlugin.prototype._updateColumnSelection = function (from, to) {
1218
+ if(from === to) { return; }
1219
+
1220
+ let c, r;
1221
+
1222
+ if(from < to) {
1223
+ for(r = this._curRect.top; r < this._curRect.bottom; ++r) {
1224
+ for(c = from; c < to; ++c) {
1225
+ this._selectAsPosition(r, c, true);
1226
+ }
1227
+ }
1228
+ } else { // from > to
1229
+ for(r = this._curRect.top; r < this._curRect.bottom; ++r) {
1230
+ for(c = from; --c >= to;) {
1231
+ this._selectAsPosition(r, c, false);
1232
+ }
1233
+ }
1234
+ }
1235
+ };
1236
+
1237
+ /** Update all row that mouse draged over.
1238
+ * @private
1239
+ * @param {number} from Inclustive starting index
1240
+ * @param {number} to Exclusive destination index
1241
+ */
1242
+ CellSelectionPlugin.prototype._updateRowSelection = function (from, to) {
1243
+ if(from === to) { return; }
1244
+
1245
+ let c, r;
1246
+
1247
+ if(from < to) {
1248
+ for(r = from; r < to; ++r) {
1249
+ for(c = this._curRect.left; c < this._curRect.right; ++c) {
1250
+ this._selectAsPosition(r, c, true);
1251
+ }
1252
+ }
1253
+ } else { // from > to
1254
+ for(r = from; --r >= to; ) {
1255
+ for(c = this._curRect.left; c < this._curRect.right; ++c) {
1256
+ this._selectAsPosition(r, c, false);
1257
+ }
1258
+ }
1259
+ }
1260
+ };
1261
+
1262
+ /** @private
1263
+ * @param {number} rowIndex
1264
+ * @param {number} colIndex
1265
+ * @param {boolean} isSelect
1266
+ */
1267
+ CellSelectionPlugin.prototype._selectAsPosition = function (rowIndex, colIndex, isSelect) {
1268
+ let mapInfo = this._map[rowIndex];
1269
+ if(mapInfo && !this._unselectables[mapInfo.type]) {
1270
+ mapInfo.section.selectCell(colIndex, mapInfo.rowIndex, isSelect);
1271
+ }
1272
+ };
1273
+
1274
+ /** Check mouse is draging over cell that already selected.
1275
+ * @private
1276
+ * @param {Object} cellA
1277
+ * @param {Object} cellB
1278
+ * @return {boolean}
1279
+ */
1280
+ CellSelectionPlugin.prototype._isTheSamePosition = function (cellA, cellB) {
1281
+ if(cellA === null && cellB === null) { return true; }
1282
+
1283
+ if(cellA !== null && cellB !== null) {
1284
+ return (cellA["rowIndex"] === cellB["rowIndex"] &&
1285
+ cellA["colIndex"] === cellB["colIndex"] &&
1286
+ cellA["sectionIndex"] === cellB["sectionIndex"]);
1287
+ }
1288
+ return false;
1289
+ };
1290
+
1291
+ /** Grid has hidden input it's a dummy element <br>
1292
+ * We can use this input to perform copy or etc.
1293
+ * @private
1294
+ * @return {Element}
1295
+ */
1296
+ CellSelectionPlugin.prototype._getGridHiddenInput = function () {
1297
+ if(this._hosts[0]) {
1298
+ return this._hosts[0].getHiddenInput();
1299
+ }
1300
+
1301
+ return null;
1302
+ };
1303
+
1304
+ /** Get text from selected cells. If no selection, return empty string. <br>
1305
+ * Text will be converted to Tab-separated values format, representing tabular structure. <br>
1306
+ * Newlines (\n, \r), Tab (\t) and &lt;br> <br>
1307
+ * will be converted to single space. Connecting spaces will remain intact.
1308
+ * @public
1309
+ * @return {string}
1310
+ */
1311
+ CellSelectionPlugin.prototype.getSelectedText = function () {
1312
+ let activeGrid = this._getActiveGrid();
1313
+ if(!activeGrid || !this.getGridApi() || this.getSelectionCount() <= 0) return "";
1314
+
1315
+ let ret_txt = "";
1316
+ let dv = activeGrid.getDataSource();
1317
+ for(let r = this._curRect.top; r < this._curRect.bottom; ++r) {
1318
+ let rowMapping = this._map[r];
1319
+
1320
+ if(r !== this._curRect.top) {
1321
+ ret_txt += "\n";
1322
+ }
1323
+
1324
+ let rowData = null;
1325
+ if(this._unselectables[rowMapping.type] === true) { continue; }
1326
+ else if(rowMapping.type === "content") {
1327
+ rowData = this._getRow(dv, rowMapping.rowIndex);
1328
+ }
1329
+ for(let c = this._curRect.left; c < this._curRect.right; ++c) {
1330
+ if(c !== this._curRect.left) {
1331
+ ret_txt += "\t";
1332
+ }
1333
+
1334
+ if(rowMapping.type === "content") {
1335
+ // for content section we will get text from dataSource to support row virtualization
1336
+ if(rowData) {
1337
+ let cField = this._getField(c);
1338
+ ret_txt += prepareTSVContent(rowData[cField]);
1339
+ }
1340
+ } else {
1341
+ // other section not has row virtualization
1342
+ // so we can get text from cell directly
1343
+ let txt = rowMapping.section.getCell(c, rowMapping.rowIndex).getTextContent();
1344
+ ret_txt += prepareTSVContent(txt);
1345
+ }
1346
+ }
1347
+ }
1348
+ return ret_txt;
1349
+ };
1350
+
1351
+ /** Select all cell.
1352
+ * @public
1353
+ */
1354
+ CellSelectionPlugin.prototype.selectAll = function () {
1355
+ let activeGrid = this._getActiveGrid();
1356
+ let selectAllRectangle = {
1357
+ left: 0,
1358
+ right: activeGrid.getColumnCount(),
1359
+ top: 0,
1360
+ bottom: activeGrid.getRowCount()
1361
+ };
1362
+
1363
+ // Un-select all selected
1364
+ this.deselectAll();
1365
+
1366
+ // Need to keep the active-grid
1367
+ this._anchor = {
1368
+ grid: activeGrid
1369
+ };
1370
+
1371
+ // Need to be done first for getting cumulative row index
1372
+ this._cacheSectionMap();
1373
+
1374
+ // Make new rectangle selection & fire event
1375
+ this._scanCellSpans(selectAllRectangle);
1376
+ this._updateSelection(selectAllRectangle);
1377
+ this._dispatch("selectionChanged", {});
1378
+ };
1379
+
1380
+ /** Deselect all selected cell.
1381
+ * @public
1382
+ * @return {boolean} true if there is any change
1383
+ */
1384
+ CellSelectionPlugin.prototype.deselectAll = function () {
1385
+ if(this.getSelectionCount() <= 0) { return false; }
1386
+
1387
+ // clear selection from ui
1388
+ let activeGrid = this._getActiveGrid();
1389
+ if(activeGrid) {
1390
+ let selectedCells = activeGrid.getElement().querySelectorAll("div.cell.selection"); // TODO: Move this logic to core grid
1391
+ let c = selectedCells.length;
1392
+ for(let i = 0; i < c; i++) {
1393
+ selectedCells[i].classList.remove("selection");
1394
+ }
1395
+ let contentSect = activeGrid.getSection("content");
1396
+ if(contentSect) {
1397
+ contentSect.setCellBounds(0, 0, 0, 0);
1398
+ }
1399
+ let titleSect = activeGrid.getSection("title");
1400
+ if(titleSect) {
1401
+ titleSect.setCellBounds(0, 0, 0, 0);
1402
+ }
1403
+ }
1404
+
1405
+ this._lastSelection = this.getSelectionBounds();
1406
+ this._anchor = null;
1407
+ this._curRect.right = this._curRect.left;
1408
+ this._curRect.bottom = this._curRect.top;
1409
+ return true;
1410
+ };
1411
+
1412
+ /** Return total number of selected cells
1413
+ * @public
1414
+ * @return {number}
1415
+ */
1416
+ CellSelectionPlugin.prototype.getSelectionCount = function () {
1417
+ let width = this._curRect.right - this._curRect.left;
1418
+ let height = this._curRect.bottom - this._curRect.top;
1419
+ return width * height;
1420
+ };
1421
+
1422
+ /** Add left, top, right, bottom properties to the given object
1423
+ * @public
1424
+ * @param {Object=} opt_ret
1425
+ * @return {Object}
1426
+ */
1427
+ CellSelectionPlugin.prototype.getSelectionBounds = function (opt_ret) {
1428
+ if(this.getSelectionCount() <= 0) { return null; }
1429
+
1430
+ let obj = (opt_ret != null) ? opt_ret : {};
1431
+ obj["left"] = this._curRect.left;
1432
+ obj["right"] = this._curRect.right - 1; // Inclusive
1433
+ obj["top"] = this._curRect.top;
1434
+ obj["bottom"] = this._curRect.bottom - 1; // Inclusive
1435
+
1436
+ if(this._map.length > 0 && obj["bottom"] < this._map.length) {
1437
+ let mapper = this._map[obj["top"]];
1438
+ obj["startSection"] = mapper.sectionIndex;
1439
+ obj["startSectionRow"] = mapper.rowIndex;
1440
+
1441
+ mapper = this._map[obj["bottom"]];
1442
+ obj["endSection"] = mapper.sectionIndex; // Inclusive
1443
+ obj["endSectionRow"] = mapper.rowIndex; // Inclusive
1444
+ }
1445
+ return obj;
1446
+ };
1447
+
1448
+ /** Add left, top, right, bottom properties to the given object
1449
+ * @public
1450
+ * @param {Object=} opt_ret
1451
+ * @return {Object}
1452
+ */
1453
+ CellSelectionPlugin.prototype.getLastSelectionBounds = function (opt_ret) {
1454
+ if(this._lastSelection === null) { return null; }
1455
+
1456
+ let obj = (opt_ret != null) ? opt_ret : {};
1457
+ for(let key in this._lastSelection) {
1458
+ obj[key] = this._lastSelection[key];
1459
+ }
1460
+ return obj;
1461
+ };
1462
+
1463
+ /** Use to set which section can be selected,[ header, title, content ]
1464
+ * @public
1465
+ * @param {(string|Array.<string>|null)=} types Use null to allow all sections to be select
1466
+ */
1467
+ CellSelectionPlugin.prototype.setSelectableSections = function (types) {
1468
+ this._unselectables["content"] = true;
1469
+ this._unselectables["header"] = true;
1470
+ this._unselectables["title"] = true;
1471
+
1472
+ // Set null or empty to allow all sections
1473
+ if(!types) {
1474
+ this._unselectables["content"] = false;
1475
+ this._unselectables["header"] = false;
1476
+ this._unselectables["title"] = false;
1477
+ return;
1478
+ }
1479
+
1480
+ let list = (typeof types === "string") ? [types] : types;
1481
+ for(let i = list.length; --i >= 0; ) {
1482
+ this._unselectables[list[i]] = false;
1483
+ }
1484
+ };
1485
+
1486
+ /** Use to select single cell and deselect previous selected cells.
1487
+ * @public
1488
+ * @param {Object} anchor
1489
+ * @example
1490
+ * extension.selectSingleCell({colIndex: 1, rowIndex: 0});
1491
+ */
1492
+ CellSelectionPlugin.prototype.selectSingleCell = function (anchor) {
1493
+ let prevRowIndex = -1;
1494
+ if(this._anchor) {
1495
+ prevRowIndex = this._anchor["rowIndex"];
1496
+ }
1497
+
1498
+ this.deselectAll();
1499
+
1500
+ if(!anchor) { return; }
1501
+
1502
+ if(prevRowIndex >= 0) {
1503
+ let activeGrid = this._getActiveGrid();
1504
+ if(activeGrid) {
1505
+ let newRowIndex = anchor["rowIndex"];
1506
+ if(Math.abs(prevRowIndex - newRowIndex) === 1) {
1507
+ activeGrid.scrollToRow(null, newRowIndex);
1508
+ }
1509
+ }
1510
+ }
1511
+
1512
+ this._anchor = anchor;
1513
+ this._curMouse = anchor;
1514
+
1515
+ // Need to be done first for getting cumulative row index
1516
+ this._cacheSectionMap();
1517
+
1518
+ this._curRect.left = this._anchor["colIndex"];
1519
+ this._curRect.top = this._getCumulativeIndex(this._anchor);
1520
+ this._curRect.right = this._curRect.left;
1521
+ this._curRect.bottom = this._curRect.top;
1522
+
1523
+ let tgtRect = this._newSelectionRect();
1524
+ this._updateSelection(tgtRect);
1525
+ };
1526
+
1527
+ /** Use to select multiple cells, can be selected by rectangle area.
1528
+ * @public
1529
+ * @param {Object} rect Object with rowIndex, colIndex, width, and height properties
1530
+ * @example
1531
+ * ext.selectCells({
1532
+ * colIndex: 1, rowIndex: 1, width: 2, height: 2
1533
+ * });
1534
+ */
1535
+ CellSelectionPlugin.prototype.selectCells = function (rect) {
1536
+ this.deselectAll();
1537
+
1538
+ if(!rect) { return; }
1539
+
1540
+ this._anchor = rect;
1541
+ this._curMouse = {
1542
+ "rowIndex": rect["rowIndex"] + (rect["height"] - 1),
1543
+ "colIndex": rect["colIndex"] + (rect["width"] - 1)
1544
+ };
1545
+
1546
+ // Need to be done first for getting cumulative row index
1547
+ this._cacheSectionMap();
1548
+
1549
+ this._curRect.left = this._anchor["colIndex"];
1550
+ this._curRect.top = this._getCumulativeIndex(this._anchor);
1551
+ this._curRect.right = this._curRect.left;
1552
+ this._curRect.bottom = this._curRect.top;
1553
+
1554
+ let tgtRect = this._newSelectionRect();
1555
+ this._updateSelection(tgtRect);
1556
+ };
1557
+
1558
+
1559
+ /** Get cell info object from the specified coordinate
1560
+ * @private
1561
+ * @param {number} colIndex
1562
+ * @param {number} rowIndex
1563
+ * @return {Object} Cell info object
1564
+ */
1565
+ CellSelectionPlugin.prototype._getCellInfo = function (colIndex, rowIndex) {
1566
+ let activeGrid = this._getActiveGrid();
1567
+ if(activeGrid) {
1568
+ let cellInfo = activeGrid.getCellInfo({
1569
+ "colIndex": colIndex,
1570
+ "rowIndex": rowIndex
1571
+ });
1572
+ if(cellInfo) {
1573
+ cellInfo["grid"] = activeGrid; // Check if we need to do this
1574
+ return cellInfo;
1575
+ }
1576
+ }
1577
+ return null;
1578
+ };
1579
+ /** Select next cell from the current selection anchor.
1580
+ * @public
1581
+ * @return {boolean} Return true if the next cell is selected, otherwise false
1582
+ */
1583
+ CellSelectionPlugin.prototype.selectNextCell = function () {
1584
+ let newAnchor;
1585
+ if(this._anchor) { // TODO: Handle looping
1586
+ let activeGrid = this._getActiveGrid();
1587
+ if(this._mode == "row") {
1588
+ newAnchor = this._getCellInfo(0, this._anchor["rowIndex"] + 1);
1589
+ } else if(this._mode == "column") {
1590
+ newAnchor = this._getCellInfo(this._anchor["colIndex"] + 1, 0);
1591
+ } else {
1592
+ newAnchor = activeGrid.getNextCell(this._anchor);
1593
+ if(newAnchor) {
1594
+ if(newAnchor.cell) {
1595
+ newAnchor["grid"] = activeGrid; // Check if we need to do this
1596
+ } else {
1597
+ newAnchor = null; // Last cell in the last row has been reached
1598
+ }
1599
+ }
1600
+ }
1601
+
1602
+ if(newAnchor) {
1603
+ this.selectSingleCell(newAnchor);
1604
+ }
1605
+ }
1606
+ return newAnchor ? true : false;
1607
+ };
1608
+ /** Select previous cell from the current selection anchor.
1609
+ * @public
1610
+ * @return {boolean} Return true if the next cell is selected, otherwise false
1611
+ */
1612
+ CellSelectionPlugin.prototype.selectPrevCell = function () {
1613
+ let newAnchor;
1614
+ if(this._anchor) { // TODO: Handle looping
1615
+ let activeGrid = this._getActiveGrid();
1616
+ if(this._mode == "row") {
1617
+ newAnchor = this._getCellInfo(0, this._anchor["rowIndex"] - 1);
1618
+ } else if(this._mode == "column") {
1619
+ newAnchor = this._getCellInfo(this._anchor["colIndex"] - 1, 0);
1620
+ } else {
1621
+ newAnchor = activeGrid.getPrevCell(this._anchor);
1622
+ if(newAnchor) {
1623
+ if(newAnchor.cell) {
1624
+ newAnchor["grid"] = activeGrid; // Check if we need to do this
1625
+ } else {
1626
+ newAnchor = null; // Last cell in the last row has been reached
1627
+ }
1628
+ }
1629
+ }
1630
+
1631
+ if(newAnchor) {
1632
+ this.selectSingleCell(newAnchor);
1633
+ }
1634
+ }
1635
+ return newAnchor ? true : false;
1636
+ };
1637
+ /** Get information about current selection anchor
1638
+ * @public
1639
+ * @return {Object} MouseInfo
1640
+ */
1641
+ CellSelectionPlugin.prototype.getAnchorInfo = function () {
1642
+ let activeGrid = this._getActiveGrid();
1643
+ return activeGrid.getCellInfo(this._anchor);
1644
+ };
1645
+
1646
+ /** Use to get selected cells.
1647
+ * @public
1648
+ * @return {Array.<Array>} 2D array of cells
1649
+ */
1650
+ CellSelectionPlugin.prototype.getSelectedCells = function () {
1651
+ let selectedCells = [];
1652
+
1653
+ for(let r = this._curRect.top; r < this._curRect.bottom; ++r) {
1654
+ let obj = this._map[r];
1655
+ let cells = [];
1656
+
1657
+ for(let c = this._curRect.left; c < this._curRect.right; ++c) {
1658
+ let cell = obj.section.getCell(c, obj.rowIndex);
1659
+ cells.push(cell);
1660
+ }
1661
+
1662
+ selectedCells.push(cells);
1663
+ }
1664
+
1665
+ return selectedCells;
1666
+ };
1667
+
1668
+ /** Disable selection
1669
+ * @public
1670
+ * @param {boolean=} opt_disable
1671
+ */
1672
+ CellSelectionPlugin.prototype.disableSelection = function (opt_disable) {
1673
+ this._disabled = (opt_disable !== false);
1674
+ };
1675
+
1676
+ /** Use to set Auto Deselecting when blur.
1677
+ * @public
1678
+ * @param {boolean} bool
1679
+ */
1680
+ CellSelectionPlugin.prototype.setAutoDeselectingOnBlur = function (bool) {
1681
+ this._autoDeselecting = bool;
1682
+ };
1683
+
1684
+ /** Use to get state Auto Deselecting.
1685
+ * @public
1686
+ * @return {boolean}
1687
+ */
1688
+ CellSelectionPlugin.prototype.getAutoDeselectingOnBlur = function () {
1689
+ return this._autoDeselecting;
1690
+ };
1691
+
1692
+
1693
+
1694
+ export default CellSelectionPlugin;
1695
+ export { CellSelectionPlugin, CellSelectionPlugin as CellSelection, CellSelectionPlugin as CellSelectionExtension };