@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,2688 @@
1
+ import { customElement } from "@refinitiv-ui/core/decorators/custom-element.js";
2
+ import {
3
+ BasicElement,
4
+ html
5
+ } from "@refinitiv-ui/core";
6
+ // import "@elf/atlas-autosuggest/lib/atlas-autosuggest.js"; //TODO: Not been use at the moment, But possible to use in the future
7
+ import "@refinitiv-ui/elements/button";
8
+ import "@refinitiv-ui/elements/checkbox";
9
+ import "@refinitiv-ui/elements/collapse";
10
+ import "@refinitiv-ui/elements/dialog";
11
+ import "@refinitiv-ui/elements/icon";
12
+ import "@refinitiv-ui/elements/text-field";
13
+ import "@refinitiv-ui/elements/number-field";
14
+ import "@refinitiv-ui/elements/list";
15
+ import "@refinitiv-ui/elements/radio-button";
16
+ import "@refinitiv-ui/elements/select";
17
+ import "@refinitiv-ui/elements/button-bar";
18
+ import "@refinitiv-ui/elements/tooltip";
19
+ import "@refinitiv-ui/elements/item";
20
+ import "@refinitiv-ui/elements/color-dialog";
21
+ import ElfUtil from "../../tr-grid-util/es6/ElfUtil.js";
22
+ import { DATE_TIME, toDateTimeType } from "../../tr-grid-util/es6/FieldFormatter.js";
23
+ import ExpressionParser from "../../tr-grid-util/es6/ExpressionParser.js";
24
+ import translation from "./locale/translation.js";
25
+ import { PercentBar } from "../../tr-grid-util/es6/PercentBar.js";
26
+ import ElementObserver from "../../tr-grid-util/es6/ElementObserver.js";
27
+ import { PreviewTable } from "./preview-table.js";
28
+
29
+ /**
30
+ * @typedef {Object} ColumnFormatDialog~SupportDisplayStyleOptions
31
+ * @property {boolean} bar support "bar"
32
+ */
33
+
34
+ /**
35
+ * @typedef {Object} ColumnFormatDialog~SupportValueFormatOptions
36
+ * @property {boolean} fx support "fx"
37
+ */
38
+
39
+ /**
40
+ * @typedef {Object} ColumnFormatDialog~Config
41
+ * @property {Object} data Context object indicating current states of the column
42
+ * @property {boolean=} supportHighlightApplyToSwitch support HighlightApplyToSwitch
43
+ * @property {ColumnFormatDialog~SupportValueFormatOptions=} supportValueFormatOptions Support FxFormat
44
+ * @property {ColumnFormatDialog~SupportDisplayStyleOptions=} supportDisplayStyleOptions Support items in "Display Style" dropdown
45
+ * @property {Array.<string>=} fields List of available fields to be shown in the dialog
46
+ * @property {Function=} confirm Confirm event callback
47
+ * @property {Function=} cancel Cancel event callback
48
+ */
49
+
50
+ const conditionDict = {
51
+ "GREATER_THAN": {
52
+ text: "Greater than",
53
+ expression: "[{0}] > {1}",
54
+ valueType: "number",
55
+ displayFormat: "Value > {0}",
56
+ regExp: /^\[[^[\]]+]\s*>\s*([+\-eE\d.]+)$/ // for auto-detect type of expression
57
+ },
58
+ "GREATER_THAN_OR_EQUAL_TO": {
59
+ text: "Greater than or equal to",
60
+ expression: "[{0}] >= {1}",
61
+ valueType: "number",
62
+ displayFormat: "Value >= {0}",
63
+ regExp: /^\[[^[\]]+]\s*>=\s*([+\-eE\d.]+)$/ // for auto-detect type of expression
64
+ },
65
+ "EQUAL_TO": {
66
+ text: "Equal to",
67
+ expression: "[{0}] === {1}",
68
+ valueType: "number",
69
+ displayFormat: "Value = {0}",
70
+ regExp: /^\[[^[\]]+]\s*===\s*([+\-eE\d.]+)$/ // for auto-detect type of expression
71
+ },
72
+ "LESS_THAN": {
73
+ text: "Less than",
74
+ expression: "[{0}] < {1}",
75
+ valueType: "number",
76
+ displayFormat: "Value < {0}",
77
+ regExp: /^\[[^[\]]+]\s*<\s*([+\-eE\d.]+)$/ // for auto-detect type of expression
78
+ },
79
+ "LESS_THAN_OR_EQUAL_TO": {
80
+ text: "Less than or equal to",
81
+ expression: "[{0}] <= {1}",
82
+ valueType: "number",
83
+ displayFormat: "Value <= {0}",
84
+ regExp: /^\[[^[\]]+]\s*<=\s*([+\-eE\d.]+)$/ // for auto-detect type of expression
85
+ },
86
+ "BETWEEN": {
87
+ text: "Between",
88
+ expression: "[{0}] > {1} && [{0}] < {2}",
89
+ valueType: "twoNumbers",
90
+ displayFormat: "Value Between {0} And {1}",
91
+ regExp: new RegExp(/^\[[^[\]]+]\s*>\s*([+\-eE\d.]+)\s*&&\s*\[[^[\]]+]\s*<\s*([+\-eE\d.]+)$/) // for auto-detect type of expression
92
+ },
93
+ "TEXT_THAT_CONTAINS": {
94
+ text: "Text that contains",
95
+ expression: 'String([{0}]).indexOf("{1}") > -1',
96
+ valueType: "text",
97
+ displayFormat: 'Text that contains \'{0}\'',
98
+ regExp: new RegExp(/^String\(\[[^[\]]+]\)\.indexOf\("([^()]+)"\)\s*>\s*-1$/) // for auto-detect type of expression
99
+ },
100
+ "TEXT_THAT_NOT_CONTAINS": {
101
+ text: "Text that not contains",
102
+ expression: 'String([{0}]).indexOf("{1}") < 0',
103
+ valueType: "text",
104
+ displayFormat: 'Text that not contains \'{0}\'',
105
+ regExp: new RegExp(/^String\(\[[^[\]]+]\)\.indexOf\("([^()]+)"\)\s*<\s*0$/) // for auto-detect type of expression
106
+ },
107
+ "TEXT_IS": {
108
+ text: "Text is",
109
+ expression: 'String([{0}]) === "{1}"',
110
+ valueType: "text",
111
+ displayFormat: 'Value = \'{0}\'',
112
+ regExp: new RegExp(/String\(\[[^[\]]+]\)\s*===\s*"(.+)"/) // for auto-detect type of expression
113
+ },
114
+ "BLANK": { // undefined, null, '', NaN
115
+ text: "Value is blank",
116
+ expression: "![{0}] && [{0}] !== 0",
117
+ valueType: "none",
118
+ displayFormat: "Value is blank",
119
+ regExp: new RegExp(/!\[[^[\]]+]\s*&&\s*\[[^[\]]+]\s*!==\s*0/) // for auto-detect type of expression
120
+ },
121
+ "NOT_BLANK": { // Has a value
122
+ text: "Value is not blank",
123
+ expression: "[{0}] || [{0}] === 0",
124
+ valueType: "none",
125
+ displayFormat: "Value is not blank",
126
+ regExp: new RegExp(/\[[^[\]]+]\s*\|\|\s*\[[^[\]]+]\s*===\s*0/) // for auto-detect type of expression
127
+ }
128
+ };
129
+
130
+ /**
131
+ * @class
132
+ * @public
133
+ */
134
+ class ColumnFormatDialog extends BasicElement {
135
+
136
+ static get properties() {
137
+ return {
138
+ config: { type: Object },
139
+ data: { type: Object },
140
+ isShown: { type: Boolean },
141
+ lang: { type: String, reflect: true }
142
+ };
143
+ }
144
+
145
+ constructor() {
146
+ super();
147
+ this.$ = {}; // WORKAROUND
148
+ this.isShown = false;
149
+ this._colors = null;
150
+
151
+ this.lang = "en";
152
+ this._lang = "en";
153
+ this._translation = translation;
154
+
155
+ this._onThemeLoaded = this._onThemeLoaded.bind(this);
156
+
157
+ this._constSelfColumn = "THIS_COLUMN";
158
+ this._colorConditionEditState = {
159
+ expression: {
160
+ name: "GREATER_THAN",
161
+ values: []
162
+ },
163
+ color: "",
164
+ backgroundColor: ""
165
+ };
166
+ this._atLeastOneBidOffer = false;
167
+
168
+ ElfUtil.getThemeColors().then(this._onThemeLoaded).catch(this._onThemeLoaded);
169
+ ElementObserver.addLanguageListener(this);
170
+ }
171
+
172
+ /**
173
+ * @private
174
+ * @param {Object} changedProperties
175
+ */
176
+ update(changedProperties) {
177
+ if(changedProperties.has("lang")) {
178
+ this._lang = ElfUtil.toLangString(this.lang);
179
+ }
180
+ if (changedProperties.has("config")) {
181
+ this._config = Object.assign({
182
+ supportValueFormatOptions: {},
183
+ supportDisplayStyleOptions: {}
184
+ }, this.config);
185
+ if (!changedProperties.has("data")) {
186
+ if (this._config.data != null) {
187
+ this.data = this._config.data; // Assign data from user config
188
+ }
189
+ }
190
+
191
+ // allow config.lang overrides default lang
192
+ if (this._config.lang) {
193
+ this._lang = ElfUtil.toLangString(this._config.lang);
194
+ }
195
+ }
196
+
197
+ super.update(changedProperties);
198
+ }
199
+
200
+ /** A `TemplateResult` that will be used to render the updated internal template
201
+ * @private
202
+ * @return {*}
203
+ */
204
+ render() {
205
+ var lang = this._translation[this._lang] ? this._lang : "en";
206
+ var t = this._translation[lang];
207
+ return html`
208
+ <ef-dialog style="width: inherit; " header="${t["Format"]}" id="formatDialog" lang="${lang}">
209
+ <div class="format-dialog dialog-theme-wrapper">
210
+ <div class="preview section-panel">
211
+ <div class="left-panel">
212
+ <div>${t["Preview"]}</div>
213
+ </div>
214
+ <div class="right-panel" >
215
+ <div id="preview_table" ></div>
216
+ </div>
217
+ </div>
218
+ <div class="options">
219
+ <!-- Value Format Section -->
220
+ <ef-collapse class="value-format" header="${t["Value Format"]}" expanded="true">
221
+ <div class="section-panel">
222
+ <div class="left-panel">
223
+ <div class="value-format__inner">
224
+ <ef-select class="ef-select-wrapper" id="valueFormatMenu"></ef-select>
225
+ <div class="value-menu-description" title="{{valueMenuDescription}}" id="valueMenuDesc">
226
+ <ef-icon icon="info"></ef-icon>
227
+ </div>
228
+ <ef-tooltip selector=".value-menu-description"></ef-tooltip>
229
+ </div>
230
+ </div>
231
+ <div class="right-panel">
232
+ <div style="display:none" id="valueFormatOther">
233
+ <div id="valueFormatNumberOrPercentage" style="padding-bottom: 3px; padding-top: 1px; display:none">
234
+ ${t["Decimal Places"]}:
235
+ <ef-number-field id="colFormatValueDecimalPlaces" min="0" max="9" style="width: 75px;" value="2"/>
236
+ </div>
237
+ <div style="margin-top: 3px;">
238
+ <ef-checkbox id="colFormatValueUseSeparator"/>
239
+ <label for="col-format-value-use-separator">${t["Use 1000 Separator (,)"]}</label>
240
+ </div>
241
+ <div style="padding-top: 8px;">
242
+ <ef-checkbox id="colFormatPlusSign"/>
243
+ <label for="col-format-plus-sign">${t["Show + Sign"]}</label>
244
+ </div>
245
+ <div style="padding-top: 18px;" id="valueFormatScaledValues">
246
+ ${t["Scale to"]}:
247
+ <ef-radio-button name="group1" id="colFormatValueScaledMillions" value="million" checked>${t["Millions"]}</ef-radio-button>
248
+ <ef-radio-button name="group1" id="colFormatValueScaledBillions" value="billion">${t["Billions"]}</ef-radio-button>
249
+ </div>
250
+ <div style="padding-top: 8px;" id="valueFormatPercentage">
251
+ <ef-checkbox id="colFormatPercentageMultiply"/>
252
+ <label for="col-format-percentage-multiply-by-100">${t["Multiply the cell value by 100"]}</label>
253
+ </div>
254
+ </div>
255
+
256
+ <div style="display:none" id="valueFormatDateTime">
257
+ <div style="margin-top: 1px; margin-bottom: 5px;">
258
+ <ef-list id="dateTimeList" items="dateFormatMenu" selected-item="dateFormatSelected" style="width: 100%; height: 115px"/>
259
+ </div>
260
+ <div style="width:100%; display:none" id="customDateFormatWrapper">
261
+ <ef-text-field id="customDateFormatInput" type="text" placeholder="${t["Custom"]}" style="width: 100%;"/>
262
+ </div>
263
+ <div style="margin-top: 8px;">
264
+ <ef-checkbox id="colFormatDateUseUtcTime"/>
265
+ <label for="colFormatDateUseUtcTime">${t["Convert to GMT Time"]}</label>
266
+ </div>
267
+ </div>
268
+
269
+ <div style="display: flex; flex-direction: column;" id="valueFormatFx">
270
+ <div style="margin-bottom: 20px;">
271
+ <div style="margin-bottom: 10px;">
272
+ <ef-checkbox id="colFormatFxEmphasize" checked/>
273
+ <label for="colFormatFxEmphasize">${t["Emphasize"]}</label>
274
+ </div>
275
+ <div>
276
+ <span>${t["Number of Pips digits (maximum 5)"]}:</span>
277
+ </div>
278
+ <div style="margin-bottom: 10px;">
279
+ <ef-number-field placeholder="${t["Number"]}" min="0" max="5" id="colFormatFxPipLength"/>
280
+ </div>
281
+ <div>
282
+ <span>${t["Pips Offset"]}:</span>
283
+ </div>
284
+ <div style="margin-bottom: 10px;">
285
+ <ef-number-field placeholder="${t["Number"]}" min="-10" max="10" id="colFormatFxPipOffset"/>
286
+ </div>
287
+ <div>
288
+ <span>${t["Number of half pips digits"]}:</span>
289
+ </div>
290
+ <div>
291
+ <ef-number-field placeholder="${t["Number"]}" min="0" max="10" id="colFormatFxSubPipLength"/>
292
+ </div>
293
+ </div>
294
+ <div>
295
+ <ef-button id="fxReset">${t["Reset to default"]}</ef-button>
296
+ </div>
297
+ </div>
298
+
299
+ <div style="display:none" id="valueFormatMessage">
300
+ "${t["Multiple columns are selected. Select a format or/and style to be applied to all of them."]}"
301
+ </div>
302
+
303
+ </div>
304
+ </div>
305
+ </ef-collapse>
306
+
307
+ <!-- Display Style Section -->
308
+ <ef-collapse class="display-style" header="${t["Display Style"]}" expanded="true">
309
+ <div class="section-panel display-style-panel">
310
+ <div class="display-style-panel__header">
311
+ <div class="left-panel">
312
+ <ef-select class="ef-select-wrapper display-style-panel__menu" id="displayFormatMenu"></ef-select>
313
+ </div>
314
+ <div class="right-panel">
315
+ <section class="align-section">
316
+ <label class="left-panel">${t["Alignment"]}:</label>
317
+ <div class="right-panel">
318
+ <tab-buttons mode="icon" tab-list="alignmentButtons" selected-id="generalAlignment"></tab-buttons>
319
+ <ef-button-bar
320
+ managed id="alignmentButtonsWrapper"
321
+ class="button-split"
322
+ mode="icon"
323
+ tab-list="alignmentButtons"
324
+ selected-id="generalAlignment"
325
+ >
326
+ <ef-button toggles id="tab-left" class="split-action icon"
327
+ icon="text-left" tabindex="0" textpos="after"
328
+ aria-disabled="false" aria-pressed="false" empty=""
329
+ highlight="false"
330
+ ></ef-button>
331
+ <ef-button
332
+ toggles id="tab-center" class="split-action icon"
333
+ icon="text-center" tabindex="0" textpos="after"
334
+ aria-disabled="false" aria-pressed="false" empty=""
335
+ highlight="false"
336
+ ></ef-button>
337
+ <ef-button
338
+ toggles id="tab-right" class="split-action icon"
339
+ icon="text-right" tabindex="0" textpos="after"
340
+ aria-disabled="false" aria-pressed="true" empty=""
341
+ highlight="true"
342
+ ></ef-button>
343
+ </ef-button-bar>
344
+ </div>
345
+ </section>
346
+ </div>
347
+ </div>
348
+
349
+ <div class="display-style-panel__content">
350
+ <div class="left-panel"></div>
351
+ <div class="right-panel">
352
+ <div style="display:block" id="displayFormatGeneral"></div>
353
+
354
+ <div style="display:none" id="displayFormatBar">
355
+ <div style="padding-bottom: 10px;">
356
+ <ef-checkbox id="colFormatBarShowValues" checked/>
357
+ <label for="colFormatBarShowValues">${t["Show Values"]}</label>
358
+ </div>
359
+ <div style="padding-bottom: 10px;">
360
+ <ef-checkbox id="colFormatBarUseMovementColor" checked/>
361
+ <label for="colFormatBarUseMovementColor">${t["Use Movement Colors"]}</label>
362
+ </div>
363
+ </div>
364
+
365
+ <div class="display-format-heatmap" style="display:none" id="displayFormatHeatmap">
366
+ <div class="display-format-heatmap__apply">
367
+ <label class="left-panel">${t["Apply to"]}:</label>
368
+ <div class="right-panel" id="heatmapApplyContainer">
369
+ <ef-radio-button name="heatmapRadio" id="colFormatHeatmapApplyCell"
370
+ value="cell"
371
+ checked>${t["Cell"]}</ef-radio-button>
372
+ <ef-radio-button name="heatmapRadio" id="colFormatHeatmapApplyText"
373
+ value="text">${t["Text"]}</ef-radio-button>
374
+ </div>
375
+ </div>
376
+ <div class="display-format-heatmap__midpoint">
377
+ <label class="left-panel">${t["Midpoint"]}:</label>
378
+ <div class="right-panel">
379
+ <ef-number-field id="colFormatHeatmapMidpoint" style="width: 75px;" value="0" />
380
+ </div>
381
+ </div>
382
+ </div>
383
+
384
+ <div style="display:none" id="displayFormatConditionalColor"></div>
385
+
386
+ <div style="display:none" id="displayFormatMessage">
387
+ ${t["Multiple columns are selected. Select a format or/and style to be applied to all of them."]}
388
+ </div>
389
+ </div>
390
+ </div>
391
+
392
+ <div class="conditions-panel" style="display:none" id="displayFormatConditionsPanel">
393
+ <div class="conditions-panel__inner">
394
+ <div class="conditions-panel__header">
395
+ <div class="left-panel">
396
+ <label>${t["Based On"]}:</label>
397
+ <ef-select class="ef-select-wrapper" id="conditionalColorBasedonDropdown"></ef-select>
398
+ </div>
399
+ <div class="right-panel">
400
+ <ef-text-field class="ef-another-field" id="conditionalColorBasedonAutosuggestInput" style="display:none;"></ef-text-field>
401
+ <!--<atlas-autosuggest id="conditionalColorBasedonAutosuggest"></atlas-autosuggest>-->
402
+ </div>
403
+ </div>
404
+ </div>
405
+
406
+ <div class="conditions-container">
407
+ <div class="left-panel">${t["Conditions"]}: (${t["Stop If True"]})</div>
408
+ <div class="conditions-container__order right-panel">
409
+ <label>${t["Order"]}:</label>
410
+ <ef-button title="${t["Increase condition precedence"]}" id="moveUpConditionButton" icon="up"></ef-button>
411
+ <ef-button title="${t["Decrease condition precedence"]}" id="moveDownConditionButton" icon="down"></ef-button>
412
+ <ef-button class="conditions-container__add" title="${t["Add a condition"]}" id="addConditionButton">
413
+ ${t["Add"]}...
414
+ </ef-button>
415
+ </div>
416
+ </div>
417
+ <div>
418
+ <ef-list id="conditionList"></ef-list>
419
+ </div>
420
+ </div>
421
+ </div>
422
+ </ef-collapse>
423
+
424
+ <!-- Updates Section -->
425
+ <ef-collapse class="updates" header="${t["Updates"]}" expanded="true">
426
+ <div class="section-panel">
427
+ <div class="colors-panel">
428
+ <div class="left-panel">
429
+ <ef-checkbox id="colFormatUpdatesUseColor"/>
430
+ <label for="colFormatUpdatesUseColor">${t["Color Based On"]}</label>
431
+ </div>
432
+
433
+ <div class="right-panel">
434
+ <div class="colortext-basedon">
435
+ <ef-select class="ef-select-wrapper left-panel" id="colorTextBasedonDropdown" disabled></ef-select>
436
+ <div class="right-panel" id="colorTextBasedonAutosuggestWrapper" style="display: none;">
437
+ <ef-text-field class="ef-another-field" id="colorTextBasedonAutosuggestInput" style="width: 100%">
438
+ </ef-text-field>
439
+ <!--<atlas-autosuggest id="colorTextBasedonAutosuggest"></atlas-autosuggest>-->
440
+ </div>
441
+ </div>
442
+ </div>
443
+ </div>
444
+
445
+ <div class="highlight-panel">
446
+ <div class="left-panel">
447
+ <ef-checkbox id="colFormatUpdatesUseHighlight"/>
448
+ <label for="colFormatUpdatesUseHighlight">${t["Background Based On"]}</label>
449
+ </div>
450
+
451
+ <div class="right-panel">
452
+ <div class="highlight-basedon">
453
+ <ef-select class="ef-select-wrapper left-panel" id="highlightBasedonDropdown" disabled></ef-select>
454
+ <div class="right-panel" id="highlightBasedonAutosuggestWrapper" style="display: none;">
455
+ <ef-text-field class="ef-another-field" id="highlightBasedonAutosuggestInput"></ef-text-field>
456
+ <!--<atlas-autosuggest id="highlightBasedonAutosuggest"></atlas-autosuggest>-->
457
+ </div>
458
+ </div>
459
+
460
+ <div class="highlight-apply-block" id="highlightApplyToBlock">
461
+ <div class="highlight-apply-block__inner">
462
+ <label class="left-panel">${t["Apply to"]}:</label>
463
+ <div class="right-panel">
464
+ <ef-radio-button name="highlightRadio" id="colFormatUpdatesApplyCell"
465
+ value="cell" checked disabled>${t["Cell"]}</ef-radio-button>
466
+ <ef-radio-button name="highlightRadio" id="colFormatUpdatesApplyBorder"
467
+ value="border" disabled>${t["Border"]}</ef-radio-button>
468
+ </div>
469
+ </div>
470
+ </div>
471
+ </div>
472
+ </div>
473
+ </div>
474
+ </ef-collapse>
475
+ </div>
476
+ </div>
477
+ </ef-dialog>
478
+
479
+ <ef-dialog id="colorConditionDialog" header="${t["Edit Condition"]}" lang="${lang}">
480
+ <ef-color-dialog id="colorDialog" no-color allow-nocolor></ef-color-dialog>
481
+ <ef-color-dialog id="backgroundColorDialog" no-color allow-nocolor></ef-color-dialog>
482
+ <div class="container">
483
+ <!-- Preview -->
484
+ <div class="section">
485
+ <div class="input-group">
486
+ <div class="input-side">
487
+ <label>${t["Preview"]}:</label>
488
+ </div><!-- prevent space
489
+ --><div class="input-side">
490
+ <div id="colorDialogSample">${t["Sample Format"]}</div>
491
+ </div>
492
+ </div>
493
+ </div>
494
+ <!-- Condition Type -->
495
+ <div class="section">
496
+ <div class="input-group">
497
+ <div class="input-side">
498
+ <label for="conditionSelect">${t["Condition"]}:</label>
499
+ </div><!-- prevent space
500
+ --><div class="input-side">
501
+ <ef-select class="ef-select-wrapper" id="conditionSelect"></ef-select>
502
+ </div>
503
+ </div>
504
+ </div>
505
+ <!-- Number Value -->
506
+ <div class="section" id="conditionNumber">
507
+ <div class="input-group">
508
+ <div class="input-side">
509
+ <label for="conditionNumberValue" id="numberValueLabel">${t["Greater than"]}:</label>
510
+ </div><!-- prevent space
511
+ --><div class="input-side">
512
+ <ef-number-field id="conditionNumberValue" value="0"></ef-number-field>
513
+ </div>
514
+ </div>
515
+ </div>
516
+ <!-- TwoNumber Value -->
517
+ <div class="section" id="conditionTwoNumbers" style="display:none">
518
+ <div class="input-group">
519
+ <div class="input-side">
520
+ <label for="conditionFirstValue">${t["Low Value"]}:</label>
521
+ </div><!-- prevent space
522
+ --><div class="input-side">
523
+ <ef-number-field id="conditionFirstValue" value="0"></ef-number-field>
524
+ </div>
525
+ </div>
526
+ <div class="input-group">
527
+ <div class="input-side">
528
+ <label for="conditionSecondValue">${t["High Value"]}:</label>
529
+ </div><!-- prevent space
530
+ --><div class="input-side">
531
+ <ef-number-field id="conditionSecondValue" value="0"></ef-number-field>
532
+ </div>
533
+ </div>
534
+ </div>
535
+ <!-- Test Value -->
536
+ <div class="section" id="conditionText" style="display:none">
537
+ <div class="input-group">
538
+ <div class="input-side">
539
+ <label for="conditionTextValue">${t["Text"]}:</label>
540
+ </div><!-- prevent space
541
+ --><div class="input-side">
542
+ <ef-text-field id="conditionTextValue">
543
+ </div>
544
+ </div>
545
+ </div>
546
+ <!-- None Value -->
547
+ <div class="section" id="conditionNone" style="display:none">
548
+ <div style="height: 39px;"></div>
549
+ </div>
550
+ <!-- Color selection -->
551
+ <div class="section">
552
+ <div class="input-group">
553
+ <div class="input-side">
554
+ <label>${t["Text Color"]}:</label>
555
+ </div><!-- prevent space
556
+ --><div class="input-side">
557
+ <div class="color-example" id="textColorExample"></div>
558
+ </div>
559
+ </div>
560
+ <div class="input-group">
561
+ <div class="input-side">
562
+ <label>${t["Cell Color"]}:</label>
563
+ </div><!-- prevent space
564
+ --><div class="input-side">
565
+ <div class="color-example input-side" id="backgroundColorExample"></div>
566
+ </div>
567
+ </div>
568
+ </div>
569
+ </div>
570
+ </ef-dialog>
571
+ `;
572
+ }
573
+
574
+ /**
575
+ * @private
576
+ * @override
577
+ */
578
+ firstUpdated(changedProperties) {
579
+ this._initElements();
580
+ this._initHandlers();
581
+ this._initAutosuggests();
582
+ }
583
+
584
+ /**
585
+ * @private
586
+ * @override
587
+ */
588
+ updated(changedProperties) {
589
+ var dirty = false;
590
+ if (changedProperties.has("config") || changedProperties.has("data")) {
591
+ var fields = null;
592
+ if (this._config) {
593
+ fields = this._config.fields;
594
+
595
+ var onConfirmHandler = this._config.confirm;
596
+ if (typeof onConfirmHandler === "function") {
597
+ this.addEventListener("confirm", onConfirmHandler);
598
+ }
599
+
600
+ var onCancelHandler = this._config.cancel;
601
+ if (typeof onCancelHandler === "function") {
602
+ this.addEventListener("cancel", onCancelHandler);
603
+ }
604
+ }
605
+ if (changedProperties.has("config")) {
606
+ this._fillBaseFieldSelectors(fields); // populate dropdown items
607
+ }
608
+
609
+ this._initData(); // TODO: Data and states modification should be done in the "update" phase to prevent infinite loop
610
+ if (this._config) { // TODO: Make it so that we can bind data without a config object
611
+ dirty = true;
612
+ }
613
+ }
614
+ if (changedProperties.has("isShown")) {
615
+ this.$.formatDialog.opened = this.isShown;
616
+ if (!this.isShown) {
617
+ this.remove();
618
+ }
619
+ }
620
+ if (changedProperties.has("lang")) {
621
+ dirty = true;
622
+ }
623
+ if (dirty) {
624
+ this._bindData(this._data);
625
+ }
626
+ }
627
+
628
+ /**
629
+ * @public
630
+ * @param {ColumnFormatDialog~Config=} userConfig Configuration object used to initialize dialog and populate data
631
+ */
632
+ init(userConfig) {
633
+ this.config = userConfig;
634
+ }
635
+
636
+ /** Show the dialog
637
+ * @public
638
+ */
639
+ show() {
640
+ if (!this.parentNode) {
641
+ document.body.appendChild(this); // custom element only work when it is in the document
642
+ }
643
+ this.isShown = true;
644
+ }
645
+
646
+ /** Hide the dialog
647
+ * @public
648
+ */
649
+ hide() {
650
+ this.isShown = false;
651
+ }
652
+
653
+ /**
654
+ * @private
655
+ * @return {Object}
656
+ */
657
+ _getTranslation() {
658
+ var lang = this._translation[this._lang] ? this._lang : "en";
659
+ return this._translation[lang];
660
+ }
661
+
662
+ /**
663
+ * @private
664
+ */
665
+ _onThemeLoaded() {
666
+ this._colors = ElfUtil.getColors();
667
+ }
668
+
669
+ /**
670
+ * @private
671
+ */
672
+ _initData() {
673
+ const t = this;
674
+ var data = t._data = {
675
+ valueFormatTab: {
676
+ formatType: "general"
677
+ },
678
+ displayStyleTab: {
679
+ mode: "general",
680
+ alignment: "left",
681
+ general: {}
682
+ },
683
+ colorTextTab: {}
684
+ };
685
+
686
+ // prevent from changing user"s object
687
+ if (t.data.valueFormatTab) {
688
+ Object.assign(data.valueFormatTab, t.data.valueFormatTab);
689
+ }
690
+
691
+ if (t.data.displayStyleTab) {
692
+ Object.assign(data.displayStyleTab, t.data.displayStyleTab);
693
+ }
694
+
695
+ if (t.data.colorTextTab) {
696
+ Object.assign(data.colorTextTab, t.data.colorTextTab);
697
+ }
698
+
699
+ var formatType = data.valueFormatTab.formatType;
700
+ if (!formatType) {
701
+ data.valueFormatTab.formatType = "general";
702
+ } else {
703
+ var dateType = toDateTimeType(formatType);
704
+ if (dateType) {
705
+ data.valueFormatTab.formatType = DATE_TIME;
706
+ }
707
+ }
708
+ if (!data.displayStyleTab.mode) {
709
+ data.displayStyleTab.mode = "general";
710
+ }
711
+ if (!data.displayStyleTab.alignment) {
712
+ data.displayStyleTab.alignment = "left";
713
+ }
714
+
715
+ // TODO: t.conditions should not be public property. It should be prefixed with underscore
716
+ t.conditions = t._getDeepValue(t._data.displayStyleTab, "conditionalColor.conditions", []);
717
+ t.conditions.forEach((condition) => {
718
+ if (typeof condition.expression === "string") {
719
+ condition.expression = t._expresionStringToObject(condition.expression);
720
+ }
721
+ });
722
+ }
723
+
724
+ /** Convert expression string to object
725
+ * @private
726
+ * @param {string} expresionString String describing condition for coloring
727
+ * @returns {{name: string, text: string, values: Array}} An object used by ELF components
728
+ */
729
+ _expresionStringToObject(expresionString) {
730
+ for(let key in conditionDict) {
731
+ const matches = conditionDict[key].regExp.exec(expresionString);
732
+ if (Array.isArray(matches)) {
733
+ return {
734
+ name: key,
735
+ text: expresionString,
736
+ values: [matches[1], matches[2]]
737
+ };
738
+ }
739
+ }
740
+ return {};
741
+ }
742
+
743
+ /**
744
+ * @private
745
+ */
746
+ _initElements() {
747
+ const _s = this.shadowRoot;
748
+ var preivewTableElement = _s.getElementById("preview_table");
749
+ this._previewTable = new PreviewTable(preivewTableElement);
750
+ /**
751
+ * Initialize
752
+ */
753
+ this.$.alignmentButtonsWrapper = _s.getElementById("alignmentButtonsWrapper");
754
+ this.$.dateTimeList = _s.getElementById("dateTimeList");
755
+ this.$.colFormatValueDecimalPlaces = _s.getElementById("colFormatValueDecimalPlaces");
756
+ this.$.colFormatValueUseSeparator = _s.getElementById("colFormatValueUseSeparator");
757
+ this.$.colFormatPlusSign = _s.getElementById("colFormatPlusSign");
758
+ this.$.colFormatValueScaledBillions = _s.getElementById("colFormatValueScaledBillions");
759
+ this.$.colFormatValueScaledMillions = _s.getElementById("colFormatValueScaledMillions");
760
+ this.$.colFormatPercentageMultiply = _s.getElementById("colFormatPercentageMultiply");
761
+ this.$.colFormatDateUseUtcTime = _s.getElementById("colFormatDateUseUtcTime");
762
+ this.$.displayFormatGeneral = _s.getElementById("displayFormatGeneral");
763
+ this.$.displayFormatBar = _s.getElementById("displayFormatBar");
764
+ this.$.displayFormatHeatmap = _s.getElementById("displayFormatHeatmap");
765
+ this.$.displayFormatConditionalColor = _s.getElementById("displayFormatConditionalColor");
766
+ this.$.displayFormatConditionsPanel = _s.getElementById("displayFormatConditionsPanel");
767
+ this.$.displayFormatMessage = _s.getElementById("displayFormatMessage");
768
+ this.$.conditionalColorBasedonAutosuggestInput = _s.getElementById("conditionalColorBasedonAutosuggestInput");
769
+ this.$.conditionalColorBasedonDropdown = _s.getElementById("conditionalColorBasedonDropdown");
770
+ this.$.colorConditionDialog = _s.getElementById("colorConditionDialog");
771
+ this.$.colorTextBasedonAutosuggestInput = _s.getElementById("colorTextBasedonAutosuggestInput");
772
+ this.$.colorTextBasedonAutosuggestWrapper = _s.getElementById("colorTextBasedonAutosuggestWrapper");
773
+ this.$.colorTextBasedonDropdown = _s.getElementById("colorTextBasedonDropdown");
774
+ this.$.highlightBasedonAutosuggestInput = _s.getElementById("highlightBasedonAutosuggestInput");
775
+ this.$.highlightBasedonAutosuggestWrapper = _s.getElementById("highlightBasedonAutosuggestWrapper");
776
+ this.$.highlightBasedonDropdown = _s.getElementById("highlightBasedonDropdown");
777
+ this.$.colFormatFxEmphasize = _s.getElementById("colFormatFxEmphasize");
778
+ this.$.colFormatFxPipLength = _s.getElementById("colFormatFxPipLength");
779
+ this.$.colFormatFxPipOffset = _s.getElementById("colFormatFxPipOffset");
780
+ this.$.colFormatFxSubPipLength = _s.getElementById("colFormatFxSubPipLength");
781
+ this.$.colFormatBarShowValues = _s.getElementById("colFormatBarShowValues");
782
+ this.$.colFormatBarUseMovementColor = _s.getElementById("colFormatBarUseMovementColor");
783
+ this.$.colFormatHeatmapMidpoint = _s.getElementById("colFormatHeatmapMidpoint");
784
+ this.$.colFormatHeatmapApplyText = _s.getElementById("colFormatHeatmapApplyText");
785
+ this.$.colFormatHeatmapApplyCell = _s.getElementById("colFormatHeatmapApplyCell");
786
+ this.$.colFormatUpdatesUseColor = _s.getElementById("colFormatUpdatesUseColor");
787
+ this.$.colorTextBasedonDropdown = _s.getElementById("colorTextBasedonDropdown");
788
+ this.$.colorTextBasedonAutosuggestInput = _s.getElementById("colorTextBasedonAutosuggestInput");
789
+ this.$.colFormatUpdatesUseHighlight = _s.getElementById("colFormatUpdatesUseHighlight");
790
+ this.$.colFormatUpdatesApplyCell = _s.getElementById("colFormatUpdatesApplyCell");
791
+ this.$.colFormatUpdatesApplyBorder = _s.getElementById("colFormatUpdatesApplyBorder");
792
+ this.$.highlightApplyToBlock = _s.getElementById("highlightApplyToBlock");
793
+ this.$.conditionSelect = _s.getElementById("conditionSelect");
794
+ this.$.conditionList = _s.getElementById("conditionList");
795
+ this.$.valueFormatMenu = _s.getElementById("valueFormatMenu");
796
+ this.$.displayFormatMenu = _s.getElementById("displayFormatMenu");
797
+ this.$.valueFormatOther = _s.getElementById("valueFormatOther");
798
+ this.$.valueFormatNumberOrPercentage = _s.getElementById("valueFormatNumberOrPercentage");
799
+ this.$.valueFormatScaledValues = _s.getElementById("valueFormatScaledValues");
800
+ this.$.valueFormatPercentage = _s.getElementById("valueFormatPercentage");
801
+ this.$.valueFormatDateTime = _s.getElementById("valueFormatDateTime");
802
+ this.$.valueFormatFx = _s.getElementById("valueFormatFx");
803
+ this.$.valueFormatMessage = _s.getElementById("valueFormatMessage");
804
+ this.$.formatDialog = _s.getElementById("formatDialog");
805
+ this.$.addConditionButton = _s.getElementById("addConditionButton");
806
+ this.$.backgroundColorDialog = _s.getElementById("backgroundColorDialog");
807
+ this.$.backgroundColorExample = _s.getElementById("backgroundColorExample");
808
+ this.$.colorDialog = _s.getElementById("colorDialog");
809
+ this.$.colorDialogSample = _s.getElementById("colorDialogSample");
810
+ this.$.textColorExample = _s.getElementById("textColorExample");
811
+ this.$.moveUpConditionButton = _s.getElementById("moveUpConditionButton");
812
+ this.$.moveDownConditionButton = _s.getElementById("moveDownConditionButton");
813
+ this.$.customDateFormatInput = _s.getElementById("customDateFormatInput");
814
+ this.$.customDateFormatWrapper = _s.getElementById("customDateFormatWrapper");
815
+ this.$.fxReset = _s.getElementById("fxReset");
816
+ this.$.valueMenuDesc = _s.getElementById("valueMenuDesc");
817
+ this.$.conditionNumber = _s.getElementById("conditionNumber");
818
+ this.$.conditionTwoNumbers = _s.getElementById("conditionTwoNumbers");
819
+ this.$.conditionText = _s.getElementById("conditionText");
820
+ this.$.conditionNone = _s.getElementById("conditionNone");
821
+ this.$.numberValueLabel = _s.getElementById("numberValueLabel");
822
+ this.$.conditionNumberValue = _s.getElementById("conditionNumberValue");
823
+ this.$.conditionFirstValue = _s.getElementById("conditionFirstValue");
824
+ this.$.conditionSecondValue = _s.getElementById("conditionSecondValue");
825
+ this.$.conditionTextValue = _s.getElementById("conditionTextValue");
826
+
827
+ // TODO: Redundant variables remove these
828
+ this._conditionSelect = this.$.conditionSelect;
829
+ this._conditionList = this.$.conditionList;
830
+ this._valueFormatSelect = this.$.valueFormatMenu;
831
+ this._displayFormatSelect = this.$.displayFormatMenu;
832
+ this._colorConditionDialog = this.$.colorConditionDialog;
833
+ this._conditionalFieldInput = this.$.conditionalColorBasedonAutosuggestInput;
834
+ this._colorTextFieldInput = this.$.colorTextBasedonAutosuggestInput;
835
+
836
+ // inject percent bar style to elem
837
+ PercentBar.injectCss(this);
838
+ }
839
+
840
+ /**
841
+ * @private
842
+ * @param {Object=} opt_data - initial data
843
+ */
844
+ _bindData(opt_data) { // TODO: opt_data and this._data are actually the same thing
845
+ var trans = this._getTranslation();
846
+
847
+ this._conditionalColorField = this.$.conditionalColorBasedonDropdown.value;
848
+ this.$.dateTimeList.data = this._getDateTimeListData();
849
+ this._setVisibleDisplayFormatOptions(this._data.displayStyleTab.mode);
850
+ this.$.colFormatValueDecimalPlaces.value = this._data.valueFormatTab.decimalPlaces || 2;
851
+ this.$.colFormatValueUseSeparator.checked = this._data.valueFormatTab.separator;
852
+ this.$.colFormatPlusSign.checked = this._data.valueFormatTab.plusSign;
853
+
854
+ if (this._data.valueFormatTab.scalingUnit === "billion") {
855
+ this.$.colFormatValueScaledBillions.checked = true;
856
+ this.$.colFormatValueScaledMillions.checked = false;
857
+ }
858
+ else {
859
+ this.$.colFormatValueScaledMillions.checked = true;
860
+ this.$.colFormatValueScaledBillions.checked = false;
861
+ }
862
+
863
+ this.$.colFormatPercentageMultiply.checked = this._data.valueFormatTab.multiplyBy100;
864
+
865
+ // Date Time Check when data loaded
866
+ if (this._data.valueFormatTab.formatType === DATE_TIME) {
867
+ this.$.colFormatDateUseUtcTime.checked = this._data.valueFormatTab.useUTCTime;
868
+ this.$.dateTimeList.value = this._data.valueFormatTab.dateTimeFormat;
869
+
870
+ if (this._data.valueFormatTab.isCustomDateFormat) { // Check use custom format
871
+ this.$.customDateFormatWrapper.style.display = "inline-flex";
872
+ this.$.customDateFormatInput.value = this._data.valueFormatTab.dateTimeFormat;
873
+ this._data.isCustomDateFormat = true;
874
+ this.$.dateTimeList.value = "customDateFormat";
875
+ } else {
876
+ this._data.isCustomDateFormat = false;
877
+ this.$.customDateFormatWrapper.style.display = "none";
878
+ this.$.dateTimeList.value = this._data.valueFormatTab.dateTimeFormat;
879
+ }
880
+ this._previewTable.setDateFormatString(this._data.valueFormatTab.dateTimeFormat);
881
+ this._previewTable.setDateFormatUseGMT(this._data.valueFormatTab.useUTCTime);
882
+ }
883
+
884
+ // Check fx section
885
+ if (this._atLeastOneBidOffer && this._config.supportValueFormatOptions.fx) {
886
+ this.$.colFormatFxEmphasize.checked = this._data.valueFormatTab.fxOptions.isEmphasize;
887
+ this.$.colFormatFxPipLength.value = this._data.valueFormatTab.fxOptions.pipLength;
888
+ this.$.colFormatFxPipOffset.value = this._data.valueFormatTab.fxOptions.pipStart;
889
+ this.$.colFormatFxSubPipLength.value = this._data.valueFormatTab.fxOptions.subPipLength;
890
+ }
891
+
892
+ this.$.colFormatBarShowValues.checked = this._data.displayStyleTab.bar ? this._data.displayStyleTab.bar.showValues : false;
893
+ this.$.colFormatBarUseMovementColor.checked = this._data.displayStyleTab.bar ? this._data.displayStyleTab.bar.useMovementColor : false;
894
+ {
895
+ // Init heatmap section
896
+
897
+ const heatmap = this._data.displayStyleTab.heatmap || {};
898
+ this.$.colFormatHeatmapMidpoint.value = heatmap.midPoint || 0;
899
+
900
+ if (heatmap.mode === "text") { // heatmap should choose one
901
+ this.$.colFormatHeatmapApplyText.checked = true;
902
+ this.$.colFormatHeatmapApplyCell.checked = false;
903
+ }
904
+ else {
905
+ this.$.colFormatHeatmapApplyCell.checked = true;
906
+ this.$.colFormatHeatmapApplyText.checked = false;
907
+ }
908
+
909
+ }
910
+
911
+ {
912
+
913
+ // Hide colorText update becuase displayStyle invisible
914
+ if (this._data.displayStyleTab.mode === "heatmap" || this._data.displayStyleTab.mode === "conditionalColor") {
915
+ this.$.colFormatUpdatesUseColor.disabled = true;
916
+ }
917
+
918
+ // Set accessibility for "Color Based On" block
919
+ const isColorText = !!this._data.colorTextTab.colorText;
920
+
921
+ this.$.colFormatUpdatesUseColor.checked = isColorText;
922
+ this.$.colorTextBasedonDropdown.disabled = !isColorText;
923
+ this.$.colorTextBasedonAutosuggestInput.disabled = !isColorText;
924
+
925
+ // When user send a blink another field
926
+ if (isColorText && isColorText.field !== this._constSelfColumn) {
927
+ this.$.colorTextBasedonAutosuggestWrapper.style.display = "inline-flex";
928
+ this.$.colorTextBasedonDropdown.value = "ANOTHER";
929
+ this.$.colorTextBasedonAutosuggestInput.value = this._data.colorTextTab.colorText.field;
930
+ }
931
+
932
+ this._previewTable.setUpdateStyleValueText(isColorText);
933
+ // ------------------------------------------------------
934
+
935
+ // Set accessibility for "Background Based On" block
936
+ const highlight = this._data.colorTextTab.highlight;
937
+ const isHighlight = !!highlight;
938
+
939
+ if (isHighlight) {
940
+ this._previewTable.setUpdateStyleValueCell(isHighlight);
941
+ }
942
+
943
+ this.$.colFormatUpdatesUseHighlight.checked = isHighlight;
944
+ this.$.highlightBasedonDropdown.disabled = !isHighlight;
945
+ this.$.highlightBasedonAutosuggestInput.disabled = !isHighlight;
946
+ this.$.colFormatUpdatesApplyCell.disabled = !isHighlight;
947
+ this.$.colFormatUpdatesApplyBorder.disabled = !isHighlight;
948
+
949
+
950
+ if (highlight && highlight.mode === "border") {
951
+ this.$.colFormatUpdatesApplyBorder.checked = true;
952
+ this.$.colFormatUpdatesApplyCell.checked = false;
953
+ } else {
954
+ this.$.colFormatUpdatesApplyCell.checked = true;
955
+ this.$.colFormatUpdatesApplyBorder.checked = false;
956
+ }
957
+
958
+ // When user send a blink another feild
959
+ if (highlight && highlight.field === "ANOTHER") {
960
+ this.$.highlightBasedonAutosuggestWrapper.style.display = "inline-flex";
961
+ this.$.highlightBasedonDropdown.value = "ANOTHER";
962
+ this.$.highlightBasedonAutosuggestInput.value = this._data.colorTextTab.highlight.field;
963
+ }
964
+
965
+ // Check support highlighting border and background
966
+ this.$.highlightApplyToBlock.style.display = this._config.supportHighlightApplyToSwitch !== false ? "block" : "none";
967
+ // -------------------------------------------------------
968
+ }
969
+
970
+ this._conditionDict = conditionDict;
971
+ var dropdownItems = [];
972
+
973
+ for (var key in conditionDict) {
974
+ if (conditionDict[key] != null) {
975
+ dropdownItems.push({ id: key, "value": key, "label": trans[conditionDict[key].text] });
976
+ }
977
+ }
978
+
979
+ this._conditionSelect.data = dropdownItems;
980
+ var conditionList = this.$.conditionList;
981
+ conditionList.renderer = this._conditionRenderer.bind(this);
982
+ this._initDefaultCondition();
983
+ this._createConditionListItems();
984
+
985
+
986
+ this._valueFormatSelect.data = this._getValueFormatMenu(opt_data);
987
+ this._setVisibleValueFormatOptions(this._data.valueFormatTab.formatType);
988
+ this._valueFormatSelected(this._data.valueFormatTab.formatType);
989
+ this._displayFormatSelect.data = this._getDisplayStyleMenu();
990
+
991
+
992
+ {
993
+ // Set align for all group of buttons
994
+ // Use ef-button-bar standard api `manageCoralButtons()` not working currently
995
+ // Because elem.managedCoralButtons will be undefined during this point
996
+ let textAlignment = this._data.displayStyleTab[this._data.displayStyleTab.mode].alignment;
997
+ const positions = ["left", "center", "right"];
998
+ if (positions.indexOf(textAlignment) < 0) {
999
+ textAlignment = "left";
1000
+ }
1001
+ for (let i = 0; i < positions.length; i++) {
1002
+ const button = this.$.alignmentButtonsWrapper.children[i];
1003
+ /**
1004
+ * WORKAROUND: Set active attrivute directly instead of standard method alignmentButtonsWrapper.manageCoralButtons(button)
1005
+ * {@link https://git.sami.int.thomsonreuters.com/elf/ef-button-bar/blob/v4/src/ef-button-bar.ts#L194}
1006
+ */
1007
+ button.active = textAlignment === positions[i];
1008
+ }
1009
+ this._setAlignment(textAlignment);
1010
+ }
1011
+ this._checkDataForLoadStructurePreview();
1012
+ }
1013
+
1014
+ /**
1015
+ * @private
1016
+ */
1017
+ _initHandlers() {
1018
+ this.$.formatDialog.addEventListener("confirm", this._onConfirm.bind(this));
1019
+ this.$.formatDialog.addEventListener("cancel", this._onCancel.bind(this));
1020
+ this.$.addConditionButton.onclick = this._addConditionButtonClick.bind(this);
1021
+ this._valueFormatSelect.addEventListener("value-changed", function (e) {
1022
+ var val;
1023
+ if (e && e.detail) {
1024
+ val = e.detail.value;
1025
+ }
1026
+ if (val) {
1027
+ this._valueFormatSelected(val);
1028
+ }
1029
+ }.bind(this));
1030
+ this.$.colFormatValueDecimalPlaces.addEventListener("value-changed", function (e) {
1031
+ // manupulate input value and set to our cache value this._data.valueFormatTab.decimalPlaces
1032
+
1033
+ var value = Number(e.target.value);
1034
+ var max = Number(e.target.getAttribute("max"));
1035
+ var min = Number(e.target.getAttribute("min"));
1036
+ if (value > max) {
1037
+ value = max;
1038
+ } else if (value < min) {
1039
+ value = min;
1040
+ }
1041
+ this._previewTable.setValueFormatDecimalPlaces(value);
1042
+ }.bind(this));
1043
+
1044
+ this.$.colFormatValueUseSeparator.addEventListener("checked-changed", function (e) {
1045
+ this._previewTable.setValueFormatShowSeparatorSign(e.target.checked);
1046
+ }.bind(this));
1047
+
1048
+ this.$.colFormatPlusSign.addEventListener("checked-changed", function (e) {
1049
+ this._previewTable.setValueFormatShowPlusSign(e.target.checked);
1050
+ }.bind(this));
1051
+
1052
+ this.$.colFormatPercentageMultiply.addEventListener("checked-changed", function (e) {
1053
+ this._previewTable.setValueFormatShowPercentSignWithMultiply100(e.target.checked);
1054
+ }.bind(this));
1055
+
1056
+ this.$.colFormatBarShowValues.addEventListener("checked-changed", function (e) {
1057
+ this._previewTable.setDisplayStylePercentBarShowValue(e.target.checked);
1058
+ }.bind(this));
1059
+
1060
+ this.$.colFormatBarUseMovementColor.addEventListener("checked-changed", function (e) {
1061
+ this._previewTable.setDisplayStylePercentBarIsUsedMovement(e.target.checked);
1062
+
1063
+ }.bind(this));
1064
+
1065
+ this.$.colFormatValueScaledMillions.addEventListener("click", function (e) {
1066
+ if (e.target.checked) {
1067
+ this._previewTable.setValueFormatScaled("m");
1068
+ }
1069
+
1070
+ }.bind(this));
1071
+
1072
+ this.$.colFormatValueScaledBillions.addEventListener("click", function (e) {
1073
+ if (e.target.checked) {
1074
+ this._previewTable.setValueFormatScaled("b");
1075
+ }
1076
+ }.bind(this));
1077
+
1078
+ this._displayFormatSelect.addEventListener("value-changed", function (e) {
1079
+ var val;
1080
+ if (e && e.detail) {
1081
+ val = e.detail.value;
1082
+ }
1083
+ this._displayFormatSelected(val);
1084
+ }.bind(this));
1085
+ this._conditionSelect.addEventListener("value-changed", function (e) {
1086
+ var val;
1087
+ if (e && e.detail) {
1088
+ val = e.detail.value;
1089
+ }
1090
+ if (val) {
1091
+ this._setColorCondition(val);
1092
+ }
1093
+ }.bind(this));
1094
+
1095
+ this.$.textColorExample.onclick = function () {
1096
+ this.$.colorDialog.opened = true;
1097
+ }.bind(this);
1098
+
1099
+ this.$.backgroundColorExample.onclick = function () {
1100
+ this.$.backgroundColorDialog.opened = true;
1101
+ }.bind(this);
1102
+
1103
+ this.$.colorDialog.addEventListener("value-changed", function (e) {
1104
+ if (e && e.detail) {
1105
+ this._colorConditionColor = e.detail.value;
1106
+ this.$.textColorExample.style.backgroundColor = e.detail.value;
1107
+ this.$.colorDialogSample.style.color = e.detail.value;
1108
+ this.$.textColorExample.classList.toggle("no-color", !e.detail.value);
1109
+ }
1110
+ }.bind(this));
1111
+
1112
+ this.$.backgroundColorDialog.addEventListener("value-changed", function (e) {
1113
+ if (e && e.detail) {
1114
+ this._colorConditionBackgroundColor = e.detail.value;
1115
+ this.$.backgroundColorExample.style.backgroundColor = e.detail.value;
1116
+ this.$.backgroundColorExample.classList.toggle("no-color", !e.detail.value);
1117
+ this.$.colorDialogSample.style.backgroundColor = e.detail.value;
1118
+ }
1119
+ }.bind(this));
1120
+
1121
+ this.$.colFormatHeatmapMidpoint.addEventListener("value-changed", function (e) {
1122
+ if (this.$.colFormatHeatmapApplyCell.checked) {
1123
+ this._previewTable.setDisplayStyleHeatmap("cell", this.$.colFormatHeatmapMidpoint.value);
1124
+ } else {
1125
+ this._previewTable.setDisplayStyleHeatmap("text", this.$.colFormatHeatmapMidpoint.value);
1126
+ }
1127
+
1128
+ }.bind(this));
1129
+
1130
+ this.$.colFormatHeatmapApplyCell.addEventListener("click", function (e) {
1131
+ if (e.target.checked) {
1132
+ this._previewTable.setDisplayStyleHeatmap("cell", this.$.colFormatHeatmapMidpoint.value);
1133
+ }
1134
+ }.bind(this));
1135
+
1136
+ this.$.colFormatHeatmapApplyText.addEventListener("click", function (e) {
1137
+ if (e.target.checked) {
1138
+ this._previewTable.setDisplayStyleHeatmap("text", this.$.colFormatHeatmapMidpoint.value);
1139
+ }
1140
+ }.bind(this));
1141
+
1142
+ this.$.colorConditionDialog.addEventListener("confirm", this._onColorConditionDialogConfirm.bind(this));
1143
+ this.$.colorConditionDialog.addEventListener("cancel", this._onColorConditionDialogCancel.bind(this));
1144
+
1145
+ this._conditionList.addEventListener("value-changed", function (e) {
1146
+ this._selectedConditionIdx = e.detail.value.id;
1147
+ }.bind(this));
1148
+
1149
+ this.$.moveUpConditionButton.onclick = this._onMoveUpConditionClick.bind(this);
1150
+ this.$.moveDownConditionButton.onclick = this._onMoveDownConditionClick.bind(this);
1151
+
1152
+ this.$.conditionalColorBasedonDropdown.addEventListener("value-changed", function (e) {
1153
+ var val;
1154
+ if (e && e.detail) {
1155
+ val = e.detail.value;
1156
+ }
1157
+ this._setColorBaseOn(val);
1158
+ }.bind(this));
1159
+
1160
+ this.$.colorTextBasedonDropdown.addEventListener("value-changed", this._colorTextBasedOnDropdownValueChanged.bind(this));
1161
+ this.$.highlightBasedonDropdown.addEventListener("value-changed", this._highlightBasedOnDropdownValueChanged.bind(this));
1162
+ this.$.colorTextBasedonAutosuggestInput.addEventListener("value-changed", (e) => {
1163
+ if (this._data.colorTextTab.colorText) { // TODO: Handle the case where value-changed is triggered when tab is not opened
1164
+ this._data.colorTextTab.colorText.field = e.detail.value;
1165
+ }
1166
+ });
1167
+ this.$.highlightBasedonAutosuggestInput.addEventListener("value-changed", (e) => {
1168
+ if (this._data.colorTextTab.highlight) { // TODO: Handle the case where value-changed is triggered when tab is not opened
1169
+ this._data.colorTextTab.highlight.field = e.detail.value;
1170
+ }
1171
+ });
1172
+ this.$.dateTimeList.addEventListener("value-changed", function (e) {
1173
+ if (e && e.detail && e.detail.value) {
1174
+ if (e.detail.value === "customDateFormat") {
1175
+ this.$.customDateFormatWrapper.style.display = "inline-flex";
1176
+ this._data.isCustomDateFormat = true;
1177
+ } else {
1178
+ this._data.isCustomDateFormat = false;
1179
+ this.$.customDateFormatWrapper.style.display = "none";
1180
+ this._previewTable.setDateFormatString(e.detail.value);
1181
+ }
1182
+
1183
+ }
1184
+ }.bind(this));
1185
+
1186
+ this.$.colFormatDateUseUtcTime.addEventListener("checked-changed", function (e) {
1187
+ this._previewTable.setDateFormatUseGMT(e.target.checked);
1188
+ }.bind(this));
1189
+
1190
+ this.$.customDateFormatInput.addEventListener("value-changed", function (e) {
1191
+ this._previewTable.setDateFormatString(e.detail.value);
1192
+ }.bind(this));
1193
+
1194
+ this.$.alignmentButtonsWrapper.addEventListener("click", function (e) {
1195
+ if (!e || !e.target || e.target.id === "alignmentButtonsWrapper") {
1196
+ return;
1197
+ }
1198
+ this._setAlignment(e.target.id);
1199
+ }.bind(this));
1200
+
1201
+ this.$.colFormatFxEmphasize.addEventListener("checked-changed", function (e) {
1202
+ this._data.valueFormatTab.fxOptions.isEmphasize = e.target.checked;
1203
+
1204
+ }.bind(this));
1205
+
1206
+ this.$.colFormatFxPipLength.addEventListener("value-changed", function (e) {
1207
+ this._data.valueFormatTab.fxOptions.pipLength = e.detail.value;
1208
+
1209
+ }.bind(this));
1210
+ /* colFormatFxSubPipLength.addEventListener check migrate */
1211
+ this.$.colFormatFxPipOffset.addEventListener("value-changed", function (e) {
1212
+ this._data.valueFormatTab.fxOptions.pipStart = e.detail.value;
1213
+
1214
+ }.bind(this));
1215
+
1216
+ this.$.colFormatFxSubPipLength.addEventListener("value-changed", function (e) {
1217
+ this._data.valueFormatTab.fxOptions.subPipLength = e.detail.value;
1218
+
1219
+ }.bind(this));
1220
+
1221
+ this.$.fxReset.onclick = function (e) {
1222
+ this.$.colFormatFxEmphasize.checked = true;
1223
+ this.$.colFormatFxPipLength.value = null;
1224
+ this.$.colFormatFxPipOffset.value = null;
1225
+ this.$.colFormatFxSubPipLength.value = null;
1226
+ }.bind(this);
1227
+
1228
+ this.$.colFormatUpdatesUseColor.addEventListener("checked-changed", function (e) {
1229
+ const isChecked = e.target.checked;
1230
+ this._previewTable.setUpdateStyleValueText(isChecked);
1231
+ this.$.colorTextBasedonDropdown.disabled = !isChecked;
1232
+ this.$.colorTextBasedonAutosuggestInput.disabled = !isChecked;
1233
+ if (isChecked) {
1234
+ this._data.colorTextTab.colorText = {
1235
+ field: this.$.colorTextBasedonDropdown.value
1236
+ };
1237
+ } else if (this._data.colorTextTab) {
1238
+ this._data.colorTextTab.colorText = null;
1239
+ }
1240
+
1241
+ }.bind(this));
1242
+
1243
+ this.$.colFormatUpdatesUseHighlight.addEventListener("checked-changed", function (e) {
1244
+ const isChecked = e.target.checked;
1245
+ this._previewTable.setUpdateStyleValueCell(isChecked);
1246
+ this.$.highlightBasedonDropdown.disabled = !isChecked;
1247
+ this.$.highlightBasedonAutosuggestInput.disabled = !isChecked;
1248
+ this.$.colFormatUpdatesApplyCell.disabled = !isChecked;
1249
+ this.$.colFormatUpdatesApplyBorder.disabled = !isChecked;
1250
+ // Set initial border or cell when user check base on background
1251
+ if (isChecked) {
1252
+ this._data.colorTextTab.highlight = {
1253
+ mode: this.$.colFormatUpdatesApplyBorder.checked ? "border" : "cell",
1254
+ field: this.$.highlightBasedonDropdown.value
1255
+ };
1256
+ this._previewTable.setUpdateStyleValueCellBlinking(this.$.colFormatUpdatesApplyCell.checked); // set cell or border blinking defualt is cell blinking
1257
+ } else if (this._data.colorTextTab) {
1258
+ this._data.colorTextTab.highlight = null;
1259
+ }
1260
+
1261
+
1262
+ }.bind(this));
1263
+
1264
+ this.$.colFormatUpdatesApplyCell.addEventListener("click", function (e) {
1265
+ if (e.target.checked) {
1266
+ if (this._data.colorTextTab.highlight) {
1267
+ this._data.colorTextTab.highlight.mode = "cell";
1268
+ }
1269
+ else {
1270
+ this._data.colorTextTab.highlight = {
1271
+ field: this.$.highlightBasedonDropdown.value,
1272
+ mode: "cell"
1273
+ };
1274
+ }
1275
+ this._previewTable.setUpdateStyleValueCellBlinking(e.target.checked); // set cell blinking
1276
+ }
1277
+
1278
+ }.bind(this));
1279
+
1280
+ this.$.colFormatUpdatesApplyBorder.addEventListener("click", function (e) {
1281
+ if (e.target.checked) {
1282
+ if (this._data.colorTextTab.highlight) {
1283
+ this._data.colorTextTab.highlight.mode = "border";
1284
+ }
1285
+ else {
1286
+ this._data.colorTextTab.highlight = {
1287
+ field: this.$.highlightBasedonDropdown.value,
1288
+ mode: "border"
1289
+ };
1290
+ }
1291
+ this._previewTable.setUpdateStyleValueCellBlinking(false); // set border blinking
1292
+ }
1293
+ }.bind(this));
1294
+
1295
+ }
1296
+
1297
+ /**
1298
+ * @private
1299
+ */
1300
+ _initDefaultCondition() {
1301
+ if (this.conditions.length) {
1302
+ this._generateConditions();
1303
+ return;
1304
+ }
1305
+
1306
+ // var movementColor = userSettings["movementColor"];
1307
+ var bgColor = ""; // WORKAROUNND: Check again when color dialog has "no color"
1308
+
1309
+ this.conditions = [
1310
+ {
1311
+ "expression": {
1312
+ "name": "GREATER_THAN",
1313
+ "values": [0]
1314
+ },
1315
+ "color": "green",
1316
+ "backgroundColor": bgColor
1317
+ },
1318
+ {
1319
+ "expression": {
1320
+ "name": "EQUAL_TO",
1321
+ "values": [0]
1322
+ },
1323
+ "color": "",
1324
+ "backgroundColor": bgColor
1325
+ },
1326
+ {
1327
+ "expression": {
1328
+ "name": "LESS_THAN",
1329
+ "values": [0]
1330
+ },
1331
+ "color": "red",
1332
+ "backgroundColor": bgColor
1333
+ }
1334
+ ];
1335
+
1336
+ this._generateConditions();
1337
+ }
1338
+
1339
+ /**
1340
+ * @private
1341
+ * @param {Object} e - event obj
1342
+ */
1343
+ _colorTextBasedOnDropdownValueChanged(e) {
1344
+ var val;
1345
+
1346
+ if (!this.$.colFormatUpdatesUseColor.checked) {
1347
+ return;
1348
+ }
1349
+
1350
+ if (e && e.detail) {
1351
+ val = e.detail.value;
1352
+ }
1353
+
1354
+ if (val === "ANOTHER") {
1355
+ this.$.colorTextBasedonAutosuggestWrapper.style.display = "inline-flex";
1356
+ } else {
1357
+ if (!this._data.colorTextTab) {
1358
+ this._data.colorTextTab = {};
1359
+ }
1360
+ this._data.colorTextTab.colorText = {
1361
+ field: val
1362
+ };
1363
+ this.$.colorTextBasedonAutosuggestWrapper.style.display = "none";
1364
+ }
1365
+ }
1366
+
1367
+ /**
1368
+ * @private
1369
+ * @param {Object} e - event object
1370
+ */
1371
+ _highlightBasedOnDropdownValueChanged(e) {
1372
+ var val;
1373
+
1374
+ if (!this.$.colFormatUpdatesUseHighlight.checked) {
1375
+ return;
1376
+ }
1377
+
1378
+ if (e && e.detail) {
1379
+ val = e.detail.value;
1380
+ }
1381
+
1382
+ if (val === "ANOTHER") {
1383
+ this.$.highlightBasedonAutosuggestWrapper.style.display = "inline-flex";
1384
+ } else if (this._data.colorTextTab && this._data.colorTextTab.highlight) {
1385
+ this._data.colorTextTab.highlight.field = val;
1386
+ this.$.highlightBasedonAutosuggestWrapper.style.display = "none";
1387
+ } else {
1388
+ if (!this._data.colorTextTab) {
1389
+ this._data.colorTextTab = {};
1390
+ }
1391
+ this._data.colorTextTab.highlight = {
1392
+ field: val
1393
+ };
1394
+ this.$.highlightBasedonAutosuggestWrapper.style.display = "none";
1395
+ }
1396
+ }
1397
+
1398
+ /**
1399
+ * @private
1400
+ * @param {*} val - Value
1401
+ */
1402
+ _displayFormatSelected(val) {
1403
+ this._previewTable.setDisplayStyleMode(val);
1404
+ this._setVisibleDisplayFormatOptions(val);
1405
+ this._setDisplayFormat(val);
1406
+ }
1407
+
1408
+ /**
1409
+ * @private
1410
+ * @param {*} val - Value
1411
+ */
1412
+ _valueFormatSelected(val) {
1413
+ this._previewTable.setFormatType(val);
1414
+ this._setVisibleValueFormatOptions(val);
1415
+ this._setValueFormat(val);
1416
+ this._setValueMenuDescription(val);
1417
+ }
1418
+
1419
+ /**
1420
+ * @private
1421
+ */
1422
+ _addConditionButtonClick() {
1423
+ this._conditionSelect.value = "GREATER_THAN";
1424
+ this._colorConditionColor = "green";
1425
+ this._colorConditionBackgroundColor = "";
1426
+ this.$.textColorExample.style.backgroundColor = "green";
1427
+ this.$.textColorExample.classList.remove("no-color");
1428
+ this.$.backgroundColorExample.style.backgroundColor = "";
1429
+ this.$.backgroundColorExample.classList.add("no-color");
1430
+ this.$.colorDialogSample.style.color = "green";
1431
+ this.$.colorDialogSample.style.backgroundColor = "";
1432
+ this._colorConditionDialog.opened = true;
1433
+ }
1434
+
1435
+ /**
1436
+ * @private
1437
+ * @param {Object} optData - initial data
1438
+ * @return {Array} - menu items
1439
+ */
1440
+ _getValueFormatMenu(optData) {
1441
+ var trans = this._getTranslation();
1442
+ const menu = [
1443
+ { value: "general", label: trans["General"], "disabled": false },
1444
+ { value: "number", label: trans["Number"], "disabled": false },
1445
+ { value: "scaled", label: trans["Scaled Values"], "disabled": false },
1446
+ { value: "percent", label: trans["Percentage"], "disabled": false },
1447
+ { value: DATE_TIME, label: trans["Date & Time"], "disabled": false }
1448
+ ];
1449
+ const fxItem = { value: "fx", label: trans["FX"], "disabled": false };
1450
+
1451
+ if (this._config.supportValueFormatOptions.fx) {
1452
+ menu.push(fxItem);
1453
+ }
1454
+
1455
+ menu.forEach(item => {
1456
+ item.selected = item.value === this._data.valueFormatTab.formatType;
1457
+ });
1458
+
1459
+ if (this._config.supportValueFormatOptions.fx) {
1460
+ // need requirements for implementation
1461
+ if (optData.fieldDataType === "fx") {
1462
+ fxItem.disabled = true;
1463
+ }
1464
+ else {
1465
+ menu.forEach(item => {
1466
+ if (item !== fxItem) {
1467
+ item.disabled = true;
1468
+ }
1469
+ });
1470
+ }
1471
+ }
1472
+ return menu;
1473
+ }
1474
+
1475
+ /** Generate DisplayStyle items
1476
+ * @private
1477
+ * @returns {Array.<{label: string, value: string}>} Object used by ELF"s coral list
1478
+ */
1479
+ _getDisplayStyleMenu() {
1480
+ var trans = this._getTranslation();
1481
+ const menu = [
1482
+ { value: "general", label: trans["General"] }
1483
+ ];
1484
+ if (this._config.supportDisplayStyleOptions.bar) {
1485
+ menu.push({ value: "bar", label: trans["Bar"] });
1486
+ }
1487
+
1488
+ if (this._config.supportDisplayStyleOptions.heatmap) {
1489
+ menu.push({ value: "heatmap", label: trans["Heatmap"]}); // Check hidden
1490
+ }
1491
+
1492
+ if (this._config.supportDisplayStyleOptions.conditionalColor) {
1493
+ menu.push( { value: "conditionalColor", label: trans["Conditional Color"] });
1494
+ }
1495
+
1496
+ menu.forEach(item => {
1497
+ item.selected = item.value === this._data.displayStyleTab.mode;
1498
+ });
1499
+
1500
+ return menu;
1501
+ }
1502
+
1503
+ /**
1504
+ * @private
1505
+ */
1506
+ _initAutosuggests() {
1507
+ let conditionalFieldAutoSuggest = this.$.conditionalColorBasedonAutosuggest;
1508
+
1509
+ if (conditionalFieldAutoSuggest) {
1510
+ conditionalFieldAutoSuggest.setAttribute("api-key", "czZTQ5MjY4");
1511
+ conditionalFieldAutoSuggest.profile = "Field Selector";
1512
+ conditionalFieldAutoSuggest.url = "http://localhost:3133/synapse/service/suggestions/suggest";
1513
+ this._conditionalFieldAutoSuggest = conditionalFieldAutoSuggest;
1514
+ }
1515
+
1516
+ this._initAutosuggest(this._conditionalFieldInput, this._conditionalFieldAutoSuggest);
1517
+ let colorTextFieldAutoSuggest = this.$.colorTextBasedonAutosuggest;
1518
+
1519
+ if (colorTextFieldAutoSuggest) {
1520
+ colorTextFieldAutoSuggest.setAttribute("api-key", "czZTQ5MjY4");
1521
+ colorTextFieldAutoSuggest.profile = "Field Selector";
1522
+ colorTextFieldAutoSuggest.url = "http://localhost:3133/synapse/service/suggestions/suggest";
1523
+ this._colorTextFieldAutoSuggest = colorTextFieldAutoSuggest;
1524
+ // this._colorText.append(colorTextFieldAutoSuggest);
1525
+ }
1526
+
1527
+ this._initAutosuggest(this._colorTextFieldInput, this._colorTextFieldAutoSuggest);
1528
+ this._highlightFieldInput = this.$.highlightBasedonAutosuggestInput;
1529
+ let highlightFieldAutoSuggest = this.$.highlightBasedonAutosuggest;
1530
+
1531
+ if (highlightFieldAutoSuggest) {
1532
+ highlightFieldAutoSuggest.setAttribute("api-key", "czZTQ5MjY4");
1533
+ highlightFieldAutoSuggest.profile = "Field Selector";
1534
+ highlightFieldAutoSuggest.url = "http://localhost:3133/synapse/service/suggestions/suggest";
1535
+ this._highlightFieldAutoSuggest = highlightFieldAutoSuggest;
1536
+ }
1537
+
1538
+ this._initAutosuggest(this._highlightFieldInput, this._highlightFieldAutoSuggest);
1539
+ }
1540
+
1541
+ /**
1542
+ * @private
1543
+ * @param {Object} input - input element
1544
+ * @param {Object} autoSuggest - atlas-autosuggest element
1545
+ */
1546
+ _initAutosuggest(input, autoSuggest) {
1547
+ if (input && autoSuggest) {
1548
+ autoSuggest.renderer = function (suggestion) {
1549
+ if (suggestion.renderer) {
1550
+ return suggestion.renderer(suggestion);
1551
+ }
1552
+ var el = document.createElement("atlas-suggest-item");
1553
+ el.value = suggestion.value.subtitle;
1554
+ el.asset = suggestion.value.vc;
1555
+ el.label = suggestion.label;
1556
+ el.description = suggestion.value.title;
1557
+ el.symbol = (suggestion.value["p"]) ? /* Field */ suggestion.value["p"]["fn"] : /* Formula*/ suggestion.value["cmd"];
1558
+ el.highlighted = suggestion.highlighted;
1559
+ if (suggestion.hidden) {
1560
+ el.style.display = "none";
1561
+ }
1562
+ return el;
1563
+ };
1564
+
1565
+ autoSuggest.attach = input;
1566
+
1567
+ autoSuggest.addEventListener("item-select", function (e) {
1568
+ if (!e || !e.detail) {
1569
+ return;
1570
+ }
1571
+
1572
+ if ((e.detail.method !== "click") && (e.detail.method !== "enter")) {
1573
+ return;
1574
+ }
1575
+
1576
+ if (!e.detail.suggestion) {
1577
+ return;
1578
+ }
1579
+ var selectedItem = {
1580
+ "label": e.detail.suggestion.label,
1581
+ "field": e.detail.suggestion.value.p.fn,
1582
+ "src": e.detail.suggestion.value.p.fsrc
1583
+ };
1584
+ this.updateDataWithAutosuggest(selectedItem, e.target);
1585
+
1586
+ }.bind(this));
1587
+
1588
+ autoSuggest.addEventListener("icon-click", function (e) {
1589
+ // TODO: opening Udip dialog
1590
+ });
1591
+
1592
+ autoSuggest.addEventListener("input", function (e) {
1593
+ var value = e.srcElement.value;
1594
+ if (value !== scope.selectedItem.label && value !== scope.selectedItem.field) {
1595
+ var selectedItem = {
1596
+ "label": value,
1597
+ "field": value,
1598
+ "src": ""
1599
+ };
1600
+ this.updateDataWithAutosuggest(selectedItem, e.target);
1601
+ }
1602
+ }.bind(this));
1603
+ }
1604
+ }
1605
+
1606
+ /**
1607
+ * @public
1608
+ * @param {Object} selectedItem - autosuggest selection
1609
+ * @param {Object} autoSuggest - source autosuggest element
1610
+ */
1611
+ updateDataWithAutosuggest(selectedItem, autoSuggest) {
1612
+ switch (autoSuggest.id) {
1613
+ case "conditionalColorBasedonAutosuggest":
1614
+ this._data.displayStyleTab.conditionalColor.field = selectedItem.field;
1615
+ break;
1616
+ case "colorTextBasedonAutosuggest":
1617
+ this._data.colorTextTab.colorText.field = selectedItem.field;
1618
+ break;
1619
+ case "highlightBasedonAutosuggest":
1620
+ this._data.colorTextTab.highlight.field = selectedItem.field;
1621
+ break;
1622
+ default:
1623
+ break;
1624
+ }
1625
+ }
1626
+
1627
+ /**
1628
+ * @private
1629
+ * @description for load data from preview table
1630
+ */
1631
+ _checkDataForLoadStructurePreview() {
1632
+ if (this._data) {
1633
+
1634
+ // Parse condition color before send to preview table
1635
+ if (this._config.data.displayStyleTab && this._config.data.displayStyleTab.conditionalColor) {
1636
+ this._config.data.displayStyleTab.conditionalColor.conditions = this._config.data.displayStyleTab.conditionalColor.conditions.map(e => {
1637
+ e.colors = {
1638
+ color: e.color,
1639
+ backgroundColor: e.backgroundColor
1640
+ };
1641
+ e.conditionSequence = ExpressionParser.parse(e.expression.text);
1642
+ e.expressionObject = e.expression;
1643
+ return e;
1644
+ });
1645
+ }
1646
+
1647
+ // load data from preview table by config from user
1648
+ this._previewTable.loadDisplayData(this._data);
1649
+ }
1650
+ }
1651
+
1652
+ /**
1653
+ * @private
1654
+ * @param {Object} item - condition item
1655
+ * @param {*} composer
1656
+ * @param {Element} element
1657
+ * @return {Object} - condition DOM element
1658
+ */
1659
+ _conditionRenderer(item, composer, element) {
1660
+ var trans = this._getTranslation();
1661
+ var deleteButton, modifyButton, sampleDiv, conditionTitle, sampleLabel;
1662
+ if (!element) {
1663
+ element = document.createElement("ef-item");
1664
+
1665
+ var container = document.createElement("div");
1666
+ container.className = "condition-item";
1667
+
1668
+ conditionTitle = document.createElement("div");
1669
+ conditionTitle.className = "condition-item-title left-panel";
1670
+
1671
+ var right = document.createElement("div");
1672
+ right.className = "right-panel";
1673
+
1674
+ var sampleDivOuter = document.createElement("div");
1675
+ sampleDivOuter.className = "condition-sample-outer";
1676
+ sampleDiv = document.createElement("div");
1677
+ sampleDiv.className = "condition-sample";
1678
+ sampleDivOuter.appendChild(sampleDiv);
1679
+
1680
+ sampleLabel = document.createElement("label");
1681
+ sampleDiv.appendChild(sampleLabel);
1682
+
1683
+ var buttonDiv = document.createElement("div");
1684
+ buttonDiv.className = "condition-button";
1685
+
1686
+ modifyButton = document.createElement("ef-button");
1687
+ modifyButton.className = "modify-button";
1688
+ modifyButton.icon = "edit";
1689
+ buttonDiv.appendChild(modifyButton);
1690
+
1691
+ deleteButton = document.createElement("ef-button");
1692
+ deleteButton.className = "delete-button";
1693
+ deleteButton.icon = "cross-circle";
1694
+ buttonDiv.appendChild(deleteButton);
1695
+
1696
+ right.appendChild(sampleDivOuter);
1697
+ right.appendChild(buttonDiv);
1698
+
1699
+ container.appendChild(conditionTitle);
1700
+ container.appendChild(right);
1701
+
1702
+ element.appendChild(container);
1703
+ } else {
1704
+ deleteButton = element.querySelector(".delete-button");
1705
+ modifyButton = element.querySelector(".modify-button");
1706
+ sampleDiv = element.querySelector(".condition-sample");
1707
+ sampleLabel = sampleDiv.getElementsByTagName("label")[0];
1708
+ conditionTitle = element.querySelector("div.condition-item-title");
1709
+ }
1710
+
1711
+ element.selected = this._selectedConditionIdx === item.value.id;
1712
+
1713
+ // Recommended to use tap event instead of click by elf team
1714
+ if (deleteButton._onDeleteConditionClick) {
1715
+ deleteButton.removeEventListener("tap", deleteButton._onDeleteConditionClick);
1716
+ }
1717
+ deleteButton._onDeleteConditionClick = this._onDeleteConditionClick.bind(this, item.value.id);
1718
+ deleteButton.addEventListener("tap", deleteButton._onDeleteConditionClick);
1719
+ deleteButton.title = trans["Remove"];
1720
+
1721
+ // Recommended to use tap event instead of click by elf team
1722
+ if (modifyButton._onEditConditionClick) {
1723
+ modifyButton.removeEventListener("tap", modifyButton._onEditConditionClick);
1724
+ }
1725
+ modifyButton._onEditConditionClick = this._onEditConditionClick.bind(this, item.value.id);
1726
+ modifyButton.addEventListener("tap", modifyButton._onEditConditionClick);
1727
+ modifyButton.title = trans["Edit"];
1728
+
1729
+ sampleLabel.innerText = trans["Sample Format"];
1730
+
1731
+ this._applyStyleObject(sampleDiv, {
1732
+ "background-color": item.value.backgroundColor
1733
+ });
1734
+
1735
+ this._applyStyleObject(sampleLabel, {
1736
+ "color": item.value.color,
1737
+ "text-align": this.conditionAlignment
1738
+ });
1739
+
1740
+ conditionTitle.title = item.label;
1741
+ conditionTitle.innerText = item.label;
1742
+
1743
+ return element;
1744
+ }
1745
+
1746
+ /**
1747
+ * @private
1748
+ * @param {string} id - condition id
1749
+ */
1750
+ _onDeleteConditionClick(id) {
1751
+ var selectedConditionIdx = this._isEmpty(id) ? this._selectedConditionIdx : id;
1752
+
1753
+ if (this._isEmpty(selectedConditionIdx) || selectedConditionIdx < 0 || selectedConditionIdx >= this.conditions.length) {
1754
+ return;
1755
+ }
1756
+
1757
+ this.conditions.splice(selectedConditionIdx, 1);
1758
+ this._createConditionListItems();
1759
+ this._setConditionalColor();
1760
+
1761
+ }
1762
+
1763
+ /**
1764
+ * @private
1765
+ * @param {string} id - condition id
1766
+ */
1767
+ _onEditConditionClick(id) {
1768
+ var selectedConditionIdx = this._isEmpty(id) ? this._selectedConditionIdx : id;
1769
+ this._selectedConditionIdx = selectedConditionIdx;
1770
+
1771
+ if (this._isEmpty(selectedConditionIdx) || selectedConditionIdx < 0 || selectedConditionIdx >= this.conditions.length) {
1772
+ return;
1773
+ }
1774
+
1775
+ var data = this.conditions[selectedConditionIdx];
1776
+
1777
+ if (data && data.expression) {
1778
+ this._conditionSelect.value = data.expression.name;
1779
+ this._colorConditionColor = data.color;
1780
+ this.$.conditionTextValue.value = data.expression.values[0];
1781
+ this.$.conditionNumberValue.value = data.expression.values[0];
1782
+ this.$.conditionFirstValue.value = data.expression.values[0];
1783
+ this.$.conditionSecondValue.value = data.expression.values[1];
1784
+ this.$.textColorExample.style.backgroundColor = data.color;
1785
+ this.$.textColorExample.classList.toggle("no-color", !data.color);
1786
+ this._colorConditionBackgroundColor = data.backgroundColor;
1787
+ this.$.backgroundColorExample.style.backgroundColor = data.backgroundColor;
1788
+ this.$.backgroundColorExample.classList.toggle("no-color", !data.backgroundColor);
1789
+ this.$.colorDialogSample.style.color = data.color;
1790
+ this.$.colorDialogSample.style.backgroundColor = data.backgroundColor;
1791
+ }
1792
+
1793
+ this._isConditionEditing = true;
1794
+ this._colorConditionDialog.opened = true;
1795
+ }
1796
+
1797
+ /**
1798
+ * @private
1799
+ * @param {number} selectedIndex -selected condition index
1800
+ * @param {number} moveCount - number of moves to do
1801
+ */
1802
+ _swapCondition(selectedIndex, moveCount) {
1803
+ var temp = this.conditions[selectedIndex];
1804
+ var move = selectedIndex + moveCount;
1805
+
1806
+ this.conditions[selectedIndex] = this.conditions[move];
1807
+ this.conditions[move] = temp;
1808
+ this._createConditionListItems(move);
1809
+ this._setConditionalColor();
1810
+ }
1811
+
1812
+ /**
1813
+ * @private
1814
+ */
1815
+ _onMoveUpConditionClick() {
1816
+ var selectedConditionIdx = this._selectedConditionIdx;
1817
+
1818
+ if (this._isEmpty(selectedConditionIdx) || selectedConditionIdx <= 0 || selectedConditionIdx >= this.conditions.length) {
1819
+ return;
1820
+ }
1821
+
1822
+ this._swapCondition(selectedConditionIdx, -1);
1823
+ this._setConditionalColor();
1824
+
1825
+ }
1826
+
1827
+ /**
1828
+ * @private
1829
+ */
1830
+ _onMoveDownConditionClick() {
1831
+ var selectedConditionIdx = this._selectedConditionIdx;
1832
+
1833
+ if (this._isEmpty(selectedConditionIdx) || selectedConditionIdx < 0 || selectedConditionIdx >= (this.conditions.length - 1)) {
1834
+ return;
1835
+ }
1836
+
1837
+ this._swapCondition(selectedConditionIdx, 1);
1838
+ this._setConditionalColor();
1839
+ }
1840
+
1841
+ /**
1842
+ * @private
1843
+ * @param {Array=} opt_fields - fields for dropdowns
1844
+ */
1845
+ _fillBaseFieldSelectors(opt_fields) {
1846
+ var trans = this._getTranslation();
1847
+ var i;
1848
+ let data = [
1849
+ { "id": "this-column", "label": trans["This Column"], "value": this._constSelfColumn },
1850
+ { "id": "another-field", "label": trans["Another Field"], "value": "ANOTHER" },
1851
+ { "type": "divider" }
1852
+ ];
1853
+
1854
+ if (opt_fields && opt_fields.length > 0) {
1855
+ for (i = 0; i < opt_fields.length; i++) {
1856
+ data.push({ "id": opt_fields[i], "label": opt_fields[i], "value": opt_fields[i] });
1857
+ }
1858
+ }
1859
+ var condFieldData = JSON.parse(JSON.stringify(data));
1860
+ var condFieldIndex = this._config.defaultToSelf ? 0 : 1;
1861
+
1862
+ var displayStyleTab = this._data ? this._data.displayStyleTab : null;
1863
+ var conditionalColor = displayStyleTab ? displayStyleTab.conditionalColor : null;
1864
+ var condColorField = conditionalColor ? conditionalColor.field : "";
1865
+ if (!condColorField) {
1866
+ condColorField = this._constSelfColumn;
1867
+ }
1868
+
1869
+ if (condColorField) {
1870
+ for (i = 0; i < condFieldData.length; i++) {
1871
+ if (condFieldData[i].value === condColorField) {
1872
+ condFieldIndex = i;
1873
+ condFieldData[i].selected = true;
1874
+ }
1875
+ }
1876
+ }
1877
+
1878
+ if (condColorField !== "MULTIPLE" && condColorField !== "default") {
1879
+ condFieldData[condFieldIndex].selected = true;
1880
+ }
1881
+
1882
+ if (condFieldIndex === 1) {
1883
+ this.$.conditionalColorBasedonAutosuggestInput.value = condColorField;
1884
+ this.$.conditionalColorBasedonAutosuggestInput.style.display = "inline-flex";
1885
+ }
1886
+
1887
+ this.$.conditionalColorBasedonDropdown.data = condFieldData;
1888
+ var colorFieldData = JSON.parse(JSON.stringify(data));
1889
+ var colorFieldIndex = this._config.defaultToSelf ? 0 : 1;
1890
+ var colorField;
1891
+
1892
+ var colorTextTab = this._data ? this._data.colorTextTab : null;
1893
+ if (colorTextTab && colorTextTab.colorText && colorTextTab.colorText.field) {
1894
+ colorField = colorTextTab.colorText.field;
1895
+ }
1896
+ else {
1897
+ colorField = this._config.defaultToSelf ? "SELF" : "CF_NETCHNG";
1898
+ }
1899
+
1900
+ if (colorField) {
1901
+ for (i = 0; i < colorFieldData.length; i++) {
1902
+ if (colorFieldData[i].value === colorField) {
1903
+ colorFieldIndex = i;
1904
+ }
1905
+ }
1906
+ }
1907
+
1908
+ if (colorField !== "MULTIPLE" && colorField.toLowerCase() !== "default") {
1909
+ colorFieldData[colorFieldIndex].selected = true;
1910
+ }
1911
+
1912
+ if (colorFieldIndex === 1) {
1913
+ this.$.colorTextBasedonAutosuggestInput.value = colorField;
1914
+ this.$.colorTextBasedonAutosuggestWrapper.style.display = "inline-flex";
1915
+ }
1916
+
1917
+ this.$.colorTextBasedonDropdown.data = colorFieldData;
1918
+ var highlightFieldData = JSON.parse(JSON.stringify(data));
1919
+ var highlightFieldIndex = this._config.defaultToSelf ? 0 : 1;
1920
+ var highlightField;
1921
+
1922
+ if (colorTextTab && colorTextTab.highlight && colorTextTab.highlight.field) {
1923
+ highlightField = colorTextTab.highlight.field;
1924
+ }
1925
+ else {
1926
+ highlightField = this._config.defaultToSelf ? "SELF" : "CF_TICK";
1927
+ }
1928
+
1929
+ if (colorField) {
1930
+ for (i = 0; i < highlightFieldData.length; i++) {
1931
+ if (highlightFieldData[i].value === highlightField) {
1932
+ highlightFieldIndex = i;
1933
+ }
1934
+ }
1935
+ }
1936
+
1937
+ if (highlightField !== "MULTIPLE" && highlightField.toLowerCase() !== "default") {
1938
+ highlightFieldData[highlightFieldIndex].selected = true;
1939
+ }
1940
+
1941
+ if (highlightFieldIndex === 1) {
1942
+ this.$.highlightBasedonAutosuggestInput.value = colorField;
1943
+ this.$.highlightBasedonAutosuggestWrapper.style.display = "inline-flex";
1944
+ }
1945
+
1946
+ this.$.highlightBasedonDropdown.data = highlightFieldData;
1947
+ }
1948
+
1949
+ /**
1950
+ * @private
1951
+ * @param {*} value - Value
1952
+ */
1953
+ _setAlignment(value) {
1954
+ if (!value) return;
1955
+
1956
+ if (value.includes("left")) {
1957
+ this._previewTable.setDisplayStyleAlignment("left");
1958
+ }
1959
+
1960
+ else if (value.includes("center")) {
1961
+ this._previewTable.setDisplayStyleAlignment("center");
1962
+ }
1963
+
1964
+ else if (value.includes("right")) {
1965
+ this._previewTable.setDisplayStyleAlignment("right");
1966
+
1967
+ }
1968
+
1969
+ }
1970
+
1971
+ /**
1972
+ * @private
1973
+ * @param {string} value - selected value
1974
+ */
1975
+ _setVisibleValueFormatOptions(value) {
1976
+ if (value !== "general" && value !== DATE_TIME && value !== "fx") {
1977
+ this.$.valueFormatOther.style.display = "block";
1978
+ if (value === "percent" || value === "number" || value === "scaled") {
1979
+ this.$.valueFormatNumberOrPercentage.style.display = "block";
1980
+ }
1981
+ else {
1982
+ this.$.valueFormatNumberOrPercentage.style.display = "none";
1983
+ }
1984
+ if (value === "scaled") {
1985
+ this.$.valueFormatScaledValues.style.display = "block";
1986
+ }
1987
+ else {
1988
+ this.$.valueFormatScaledValues.style.display = "none";
1989
+ }
1990
+ if (value === "percent") {
1991
+ this.$.valueFormatPercentage.style.display = "block";
1992
+ }
1993
+ else {
1994
+ this.$.valueFormatPercentage.style.display = "none";
1995
+ }
1996
+ }
1997
+ else {
1998
+ this.$.valueFormatOther.style.display = "none";
1999
+ }
2000
+
2001
+ if (value === DATE_TIME) {
2002
+ this.$.valueFormatDateTime.style.display = "block";
2003
+ }
2004
+ else {
2005
+ this.$.valueFormatDateTime.style.display = "none";
2006
+ }
2007
+
2008
+ if (value === "fx") {
2009
+ this.$.valueFormatFx.style.display = "block";
2010
+ }
2011
+ else {
2012
+ this.$.valueFormatFx.style.display = "none";
2013
+ }
2014
+
2015
+ if (!value) {
2016
+ this.$.valueFormatMessage.style.display = "block";
2017
+ }
2018
+ else {
2019
+ this.$.valueFormatMessage.style.display = "none";
2020
+ }
2021
+
2022
+ }
2023
+
2024
+ /**
2025
+ * @private
2026
+ * @param {string} value - selected value
2027
+ */
2028
+ _setValueFormat(value) {
2029
+ if (value) {
2030
+ this._data.valueFormatTab.formatType = value;
2031
+ }
2032
+
2033
+ var decimalPlacesValue = Number(this.$.colFormatValueDecimalPlaces.value);
2034
+
2035
+
2036
+ switch (value) {
2037
+ case "general":
2038
+ this._previewTable.setValueFormatGeneral();
2039
+ break;
2040
+ case "number":
2041
+ this._previewTable.setValueFormatDecimalPlaces(decimalPlacesValue);
2042
+ this._previewTable.setValueFormatShowSeparatorSign(this.$.colFormatValueUseSeparator.checked);
2043
+ this._previewTable.setValueFormatShowPlusSign(this.$.colFormatPlusSign.checked);
2044
+ break;
2045
+ case "scaled":
2046
+ var scaleUnit = this.$.colFormatValueScaledMillions.checked ? "m" : "b";
2047
+ this._previewTable.setValueFormatScaled(scaleUnit);
2048
+ this._previewTable.setValueFormatShowSeparatorSign(this.$.colFormatValueUseSeparator.checked);
2049
+ this._previewTable.setValueFormatShowPlusSign(this.$.colFormatPlusSign.checked);
2050
+ break;
2051
+ case "percent":
2052
+ this._previewTable.setValueFormatShowPercentSignWithMultiply100(this.$.colFormatPercentageMultiply.checked);
2053
+ this._previewTable.setValueFormatShowSeparatorSign(this.$.colFormatValueUseSeparator.checked);
2054
+ this._previewTable.setValueFormatShowPlusSign(this.$.colFormatPlusSign.checked);
2055
+ break;
2056
+ case DATE_TIME:
2057
+ this._previewTable.setDateFormatString(this.$.dateTimeList.value || "M/D/YY");
2058
+ this._previewTable.setDateFormatUseGMT(this.$.colFormatDateUseUtcTime.checked);
2059
+ this._previewTable.setDateFormatLanguage(this._lang);
2060
+ break;
2061
+ case "fx":
2062
+ this._data.valueFormatTab.fxOptions = {
2063
+ isEmphasize: this.$.colFormatFxEmphasize.checked,
2064
+ pipLength: this.$.colFormatFxPipLength.value,
2065
+ pipStart: this.$.colFormatFxPipOffset.value,
2066
+ subPipLength: this.$.colFormatFxSubPipLength.value
2067
+ };
2068
+ break;
2069
+ default:
2070
+ break;
2071
+ }
2072
+
2073
+
2074
+ }
2075
+
2076
+ /**
2077
+ * @private
2078
+ * @param {string} value - selected value
2079
+ */
2080
+ _setVisibleDisplayFormatOptions(value) {
2081
+ if (value === "general") {
2082
+ this.$.displayFormatGeneral.style.display = "block";
2083
+ }
2084
+ else {
2085
+ this.$.displayFormatGeneral.style.display = "none";
2086
+ }
2087
+
2088
+ if (value === "bar") {
2089
+ this.$.displayFormatBar.style.display = "block";
2090
+ }
2091
+ else {
2092
+ this.$.displayFormatBar.style.display = "none";
2093
+ }
2094
+
2095
+ if (value === "heatmap") {
2096
+ this.$.displayFormatHeatmap.style.display = "block";
2097
+ }
2098
+ else {
2099
+ this.$.displayFormatHeatmap.style.display = "none";
2100
+ }
2101
+
2102
+ if (value === "conditionalColor") {
2103
+ this.$.displayFormatConditionalColor.style.display = "block";
2104
+ this.$.displayFormatConditionsPanel.style.display = "block";
2105
+ }
2106
+ else {
2107
+ this.$.displayFormatConditionalColor.style.display = "none";
2108
+ this.$.displayFormatConditionsPanel.style.display = "none";
2109
+ }
2110
+
2111
+ if (!value) {
2112
+ this.$.displayFormatMessage.style.display = "block";
2113
+ }
2114
+ else {
2115
+ this.$.displayFormatMessage.style.display = "none";
2116
+ }
2117
+ }
2118
+
2119
+ /**
2120
+ * @private
2121
+ * @param {string} value - selected value
2122
+ */
2123
+ _setDisplayFormat(value) {
2124
+ this._data.displayStyleTab.mode = value;
2125
+ if (value === "general") {
2126
+ this._previewTable.setDisplayStyleMode("general");
2127
+ this.$.colFormatUpdatesUseColor.disabled = false;
2128
+
2129
+ } else if (value === "bar") {
2130
+ this._previewTable.setDisplayStylePercentBarShowValue(this.$.colFormatBarShowValues.checked);
2131
+ this._previewTable.setDisplayStylePercentBarIsUsedMovement(this.$.colFormatBarUseMovementColor.checked);
2132
+ this.$.colFormatUpdatesUseColor.disabled = false;
2133
+
2134
+ } else if (value === "heatmap") {
2135
+ var midPoint = this.$.colFormatHeatmapMidpoint.value ? this.$.colFormatHeatmapMidpoint.value : 0;
2136
+ var mode = this.$.colFormatHeatmapApplyText.checked ? "text" : "cell";
2137
+ this.$.colFormatUpdatesUseColor.checked = false;
2138
+ this.$.colFormatUpdatesUseColor.disabled = true;
2139
+ this._previewTable.setUpdateStyleValueText(false);
2140
+ this._previewTable.setDisplayStyleHeatmap(mode, midPoint);
2141
+ this._previewTable.setUpdateStyleValueText(false);
2142
+ } else if (value === "conditionalColor") {
2143
+ this.$.colFormatUpdatesUseColor.checked = false;
2144
+ this.$.colFormatUpdatesUseColor.disabled = true;
2145
+ this._previewTable.setUpdateStyleValueText(false);
2146
+ this._data.displayStyleTab.conditionalColor = {};
2147
+ this._data.displayStyleTab.conditionalColor.conditions = this.conditions;
2148
+ this._setConditionalColor();
2149
+ }
2150
+ }
2151
+
2152
+ /**
2153
+ * @private
2154
+ */
2155
+ _setConditionalColor() {
2156
+ var conditionFunctions = this.conditions.map(e => {
2157
+ return {
2158
+ conditionSequence: ExpressionParser.parse(e.expression.text),
2159
+ colors: {
2160
+ color: e.color,
2161
+ backgroundColor: e.backgroundColor
2162
+ },
2163
+ expressionObject: e.expression,
2164
+ expression: e.expression.text,
2165
+ fields: e.fields
2166
+ };
2167
+ });
2168
+
2169
+ this._previewTable.setDisplayStyleConditional(conditionFunctions);
2170
+ }
2171
+
2172
+ /**
2173
+ * @private
2174
+ * @param {string} value
2175
+ */
2176
+ _setColorBaseOn(value) {
2177
+ if (value && !this._data.displayStyleTab.conditionalColor) {
2178
+ this._data.displayStyleTab.conditionalColor = {};
2179
+ }
2180
+ if (value === "ANOTHER") {
2181
+ this.$.conditionalColorBasedonAutosuggestInput.style.display = "block";
2182
+ }
2183
+ else {
2184
+ this.$.conditionalColorBasedonAutosuggestInput.style.display = "none";
2185
+ this._data.displayStyleTab.conditionalColor.field = value;
2186
+ }
2187
+ this._generateConditions();
2188
+ }
2189
+ /**
2190
+ * @private
2191
+ * @param {string} value - selected value
2192
+ */
2193
+ _setColorCondition(value) {
2194
+ let condition = this._conditionDict[value];
2195
+
2196
+ if (condition) {
2197
+ if (condition.valueType === "number") {
2198
+ this.$.conditionNumber.style.display = "block";
2199
+ this.$.numberValueLabel.innerText = condition.text + ":";
2200
+ }
2201
+ else {
2202
+ this.$.conditionNumber.style.display = "none";
2203
+ }
2204
+
2205
+ if (condition.valueType === "twoNumbers") {
2206
+ this.$.conditionTwoNumbers.style.display = "block";
2207
+ }
2208
+ else {
2209
+ this.$.conditionTwoNumbers.style.display = "none";
2210
+ }
2211
+
2212
+ if (condition.valueType === "text") {
2213
+ this.$.conditionText.style.display = "block";
2214
+ }
2215
+ else {
2216
+ this.$.conditionText.style.display = "none";
2217
+ }
2218
+
2219
+ if (!condition.valueType && condition.valueType === "none") {
2220
+ this.$.conditionNone.style.display = "block";
2221
+ }
2222
+ else {
2223
+ this.$.conditionNone.style.display = "none";
2224
+ }
2225
+ }
2226
+ }
2227
+
2228
+ /**
2229
+ * @private
2230
+ * @param {string} value - selected value;
2231
+ */
2232
+ _setValueMenuDescription(value) {
2233
+ var trans = this._getTranslation();
2234
+ switch (value) {
2235
+ case "general":
2236
+ this.$.valueMenuDesc.title = trans["General format items have no specific number format."];
2237
+ break;
2238
+ case "number":
2239
+ this.$.valueMenuDesc.title = trans["Number format is used for general display of numbers."];
2240
+ break;
2241
+ case "scaled":
2242
+ this.$.valueMenuDesc.title = trans["Scaled values format is used for displaying large numbers."];
2243
+ break;
2244
+ case "percent":
2245
+ this.$.valueMenuDesc.title = trans["Percentage format is used to display the result with a percent sign."];
2246
+ break;
2247
+ case DATE_TIME:
2248
+ this.$.valueMenuDesc.title = trans["Date & time format displays date and time serial numbers as date values"];
2249
+ break;
2250
+ case "fx":
2251
+ this.$.valueMenuDesc.title = trans["FX format is used for Bid/Offer columns."];
2252
+ break;
2253
+ default:
2254
+ this.$.valueMenuDesc.title = trans["General format items have no specific number format."];
2255
+ break;
2256
+ }
2257
+ }
2258
+
2259
+ /**
2260
+ * @private
2261
+ * @param {Object} e - event object
2262
+ */
2263
+ _onColorConditionDialogConfirm(e) {
2264
+ if (e.cancelled) {
2265
+ return;
2266
+ }
2267
+
2268
+ let condition = this._conditionDict[this._conditionSelect.value];
2269
+ this._colorConditionEditState.expression.name = this._conditionSelect.value;
2270
+
2271
+ if (condition) {
2272
+ if (condition.valueType === "number") {
2273
+ this._colorConditionEditState.expression.values = [this.$.conditionNumberValue.value];
2274
+ }
2275
+ if (condition.valueType === "twoNumbers") {
2276
+ this._colorConditionEditState.expression.values = [this.$.conditionFirstValue.value, this.$.conditionSecondValue.value];
2277
+ }
2278
+ if (condition.valueType === "text") {
2279
+ this._colorConditionEditState.expression.values = [this.$.conditionTextValue.value];
2280
+ }
2281
+ }
2282
+
2283
+ this._colorConditionEditState.color = this._colorConditionColor;
2284
+ this._colorConditionEditState.backgroundColor = this._colorConditionBackgroundColor;
2285
+ var newCondition = JSON.parse(JSON.stringify(this._colorConditionEditState));
2286
+
2287
+ if (this._isConditionEditing) {
2288
+ this.conditions[this._selectedConditionIdx] = newCondition;
2289
+ this._isConditionEditing = false;
2290
+ }
2291
+ else {
2292
+ this.conditions.push(newCondition);
2293
+ }
2294
+
2295
+ this._generateConditions();
2296
+ this._createConditionListItems();
2297
+ this._setConditionalColor();
2298
+ }
2299
+
2300
+ /**
2301
+ * @private
2302
+ */
2303
+ _onColorConditionDialogCancel() {
2304
+ this._isConditionEditing = false;
2305
+ }
2306
+
2307
+ /**
2308
+ * @private
2309
+ */
2310
+ _generateConditions() {
2311
+ if (!this.conditions) {
2312
+ return;
2313
+ }
2314
+
2315
+ var len = this.conditions.length;
2316
+
2317
+ for (var i = 0; i < len; i++) {
2318
+ this._createCondition(this.conditions[i]);
2319
+ }
2320
+ }
2321
+
2322
+ /**
2323
+ * @private
2324
+ * @param {Object} newCondition - new condition object
2325
+ */
2326
+ _createCondition(newCondition) {
2327
+ let conditionalColorField;
2328
+
2329
+ if (this._data.displayStyleTab && this._data.displayStyleTab.conditionalColor) {
2330
+ conditionalColorField = this._data.displayStyleTab.conditionalColor.field;
2331
+ }
2332
+
2333
+ if (!conditionalColorField) {
2334
+ conditionalColorField = this._constSelfColumn;
2335
+ }
2336
+
2337
+ newCondition["fields"] = [{
2338
+ "field": conditionalColorField,
2339
+ "displayName": "",
2340
+ "src": ""
2341
+ }];
2342
+
2343
+ if (Array.isArray(newCondition.expression.values)) {
2344
+ newCondition.expression.text = this._getExpression(conditionalColorField, newCondition["expression"]);
2345
+ }
2346
+ }
2347
+
2348
+ /**
2349
+ * @private
2350
+ * @param {string} field - base field
2351
+ * @param {Object} expression - condition expression
2352
+ * @return {string} - formatted expression string
2353
+ */
2354
+ _getExpression(field, expression) {
2355
+ const val0 = expression.values[0];
2356
+ const val1 = expression.values[1];
2357
+
2358
+ return this._formatCondition(this._conditionDict[expression.name].expression, field, val0, val1);
2359
+ }
2360
+
2361
+ /**
2362
+ * @private
2363
+ * @param {string} format - formatting template
2364
+ * @return {string} - formatted condition
2365
+ */
2366
+ _formatCondition(format) {
2367
+ var args = Array.prototype.slice.call(arguments, 1);
2368
+ return format.replace(/{(\d+)}/g, (function (match, number) {
2369
+ return void 0 !== args[number] ? args[number] : match;
2370
+ }));
2371
+ }
2372
+
2373
+ /**
2374
+ * @private
2375
+ * @param {Object} data - condition data object
2376
+ * @return {string} - condition string
2377
+ */
2378
+ _conditionToString(data) {
2379
+ var trans = this._getTranslation();
2380
+
2381
+ // eslint-disable-next-line no-undefined
2382
+ if (data === undefined || !conditionDict[data.name]) { // TODO: Fix this
2383
+ return "";
2384
+ }
2385
+
2386
+ var def = conditionDict[data.name];
2387
+ var text;
2388
+
2389
+ switch (def.valueType) {
2390
+ case "number":
2391
+ text = this._formatCondition(trans[def.displayFormat], data.values[0]);
2392
+ break;
2393
+ case "twoNumbers":
2394
+ text = this._formatCondition(trans[def.displayFormat], data.values[0], data.values[1]);
2395
+ break;
2396
+ case "none":
2397
+ text = trans[def.displayFormat];
2398
+ break;
2399
+ default:
2400
+ text = this._formatCondition(trans[def.displayFormat], data.values[0]);
2401
+ }
2402
+ return text;
2403
+ }
2404
+
2405
+ /**
2406
+ * @private
2407
+ * @param {number} optSelectedIndex - selected condition index
2408
+ */
2409
+ _createConditionListItems(optSelectedIndex) {
2410
+ var conditions = this.conditions;
2411
+ var conditionList = this._conditionList;
2412
+
2413
+ if (!conditions || !conditionList) {
2414
+ return;
2415
+ }
2416
+
2417
+ // Create list
2418
+ var data = [];
2419
+
2420
+ for (var i = conditions.length; --i >= 0;) {
2421
+ var condition = conditions[i];
2422
+ data.unshift({
2423
+ label: this._conditionToString(condition.expression), // Need to convert
2424
+ value: Object.assign({
2425
+ id: i
2426
+ }, condition)
2427
+ });
2428
+ }
2429
+ conditionList.data = data;
2430
+
2431
+ if (this._isEmpty(optSelectedIndex) || optSelectedIndex < 0 || optSelectedIndex >= data.length) {
2432
+ // eslint-disable-next-line no-undefined
2433
+ this._selectedConditionIdx = undefined;
2434
+ }
2435
+ else {
2436
+ this._selectedConditionIdx = optSelectedIndex;
2437
+
2438
+ // Set selection
2439
+ conditionList.selectItem(conditionList.data[optSelectedIndex]);
2440
+ }
2441
+ if (this._data && this._data.displayStyleTab && this._data.displayStyleTab.conditionalColor) {
2442
+ this._data.displayStyleTab.conditionalColor.conditions = this.conditions;
2443
+ }
2444
+
2445
+
2446
+ }
2447
+
2448
+
2449
+ /**
2450
+ * @private
2451
+ * @return {Object} - dialog output object
2452
+ */
2453
+ _createOutput() {
2454
+ // TODO: Handle the case where there is no data
2455
+
2456
+ var formatType = this._data.valueFormatTab.formatType;
2457
+
2458
+ let output = this._previewTable.getStructureFormat();
2459
+
2460
+ // restore user"s formatType for datetime type
2461
+ var userFormatType = this.data.valueFormatTab.formatType;
2462
+ if (formatType === DATE_TIME ) {
2463
+ output.valueFormatTab.isCustomDateFormat = this._data.isCustomDateFormat ? this._data.isCustomDateFormat : false;
2464
+ if(toDateTimeType(userFormatType)) {
2465
+ output.valueFormatTab.formatType = userFormatType;
2466
+ }
2467
+ }
2468
+
2469
+
2470
+ // Check fx section
2471
+ if (formatType === "fx") {
2472
+ const fxOptions = Object.assign({}, this._data.valueFormatTab.fxOptions);
2473
+ output.valueFormatTab = this._data.valueFormatTab;
2474
+ output.valueFormatTab.fxOptions = {
2475
+ isEmphasize: fxOptions.isEmphasize,
2476
+ pipLength: fxOptions.pipLength,
2477
+ pipStart: fxOptions.pipStart,
2478
+ subPipLength: fxOptions.subPipLength
2479
+ };
2480
+ }
2481
+
2482
+ // Conditional section
2483
+ if (output.displayStyleTab && output.displayStyleTab.mode === "conditionalColor") {
2484
+ // output.displayStyleTab = output.displayStyleTab;
2485
+
2486
+ const field = output.displayStyleTab.conditionalColor.field || this._constSelfColumn;
2487
+ // compatibility with general and monitor
2488
+ output.displayStyleTab.conditionalColor.conditions.forEach(condition => {
2489
+ if (typeof condition.expression !== "string") {
2490
+ condition.expressionObject = condition.expression;
2491
+ condition.expression = condition.expression.text.replace(this._constSelfColumn, field);
2492
+ }
2493
+ });
2494
+ }
2495
+
2496
+ // ColorTextTab section when data updated
2497
+ if (output.colorTextTab && (output.colorTextTab.isTextChangedStyle || output.colorTextTab.isCellChangeStyle)) {
2498
+ output.colorTextTab = {};
2499
+ if (this.$.colFormatUpdatesUseColor.checked) {
2500
+ output.colorTextTab.colorText = this._data.colorTextTab.colorText; // Field of base on color text changed defualt is "THIS_COLUMN"
2501
+ }
2502
+ if (this.$.colFormatUpdatesUseHighlight.checked) {
2503
+ output.colorTextTab.highlight = this._data.colorTextTab.highlight; // Field of base on color background or border changed defualt is "THIS_COLUMN"
2504
+ // compatibility with def-Grid
2505
+ output.colorTextTab.blinking = {
2506
+ field: this._data.colorTextTab.highlight.field,
2507
+ border: this._data.colorTextTab.highlight.mode === "border"
2508
+ };
2509
+
2510
+ }
2511
+ }
2512
+
2513
+ return output;
2514
+ }
2515
+
2516
+ /**
2517
+ * @private
2518
+ */
2519
+ _onConfirm() {
2520
+ var output = this._createOutput();
2521
+ var event = new CustomEvent("confirm", {
2522
+ cancelable: true,
2523
+ detail: {
2524
+ data: output,
2525
+ value: output
2526
+ }
2527
+ });
2528
+ this.dispatchEvent(event);
2529
+ this.hide();
2530
+ }
2531
+
2532
+ /**
2533
+ * @private
2534
+ */
2535
+ _onCancel() {
2536
+ var event = new CustomEvent("cancel");
2537
+ this.dispatchEvent(event);
2538
+ this.hide();
2539
+ }
2540
+
2541
+ /**
2542
+ * @private
2543
+ * @param {Object} el - dom element to apply styles
2544
+ * @param {Object} styleObject - styles to apply
2545
+ * @param {boolean} append - true if append styles, false if replace
2546
+ */
2547
+ _applyStyleObject(el, styleObject, append) {
2548
+ var styleString = "";
2549
+
2550
+ if (!el) {
2551
+ return;
2552
+ }
2553
+
2554
+ for (var property in styleObject) {
2555
+ if (styleObject[property] == null) {
2556
+ continue;
2557
+ }
2558
+
2559
+ styleString += property + ":" + styleObject[property] + "; ";
2560
+ }
2561
+
2562
+ var elStyle = el.style;
2563
+
2564
+ if (typeof elStyle.cssText === "undefined") {
2565
+ el.setAttribute("style", styleString);
2566
+
2567
+ return;
2568
+ }
2569
+
2570
+ if (append) {
2571
+ // TODO: Add regexp for checking the character `;` at the end of line.
2572
+ elStyle.cssText += styleString;
2573
+ }
2574
+ else {
2575
+ elStyle.cssText = styleString;
2576
+ }
2577
+ }
2578
+
2579
+ /**
2580
+ * @private
2581
+ * @param {Object} value - value to check
2582
+ * @param {boolean} allowEmptyString - allow empty strings
2583
+ * @return {boolean} - boolean check result
2584
+ */
2585
+ _isEmpty(value, allowEmptyString) {
2586
+ return (value === null || typeof value === "undefined") || (!allowEmptyString ? value === "" : false) || (this._isArray(value) && value.length === 0);
2587
+ }
2588
+
2589
+ /**
2590
+ * @private
2591
+ * @param {Object} value - value to check
2592
+ * @return {boolean} - boolean check result
2593
+ */
2594
+ _isArray(value) {
2595
+ return Object.prototype.toString.call(value) === "[object Array]";
2596
+ }
2597
+
2598
+
2599
+ /**
2600
+ * @private
2601
+ * @return {Array}
2602
+ */
2603
+ _getDateTimeListData() {
2604
+ var lang = this._translation[this._lang] ? this._lang : "en";
2605
+ var trans = this._getTranslation();
2606
+ return [
2607
+ { type: "header", label: trans["Date"] },
2608
+ { value: "M/D/YY", label: "M/D/YY" },
2609
+ { value: "MM/DD/YY", label: "MM/DD/YY" },
2610
+ { value: "M/D/YYYY", label: "M/D/YYYY" },
2611
+ { value: "MM/DD/YYYY", label: "MM/DD/YYYY" },
2612
+ { value: "D-MMM-YY", label: "D-MMM-YY" },
2613
+ { value: "DD-MMM-YY", label: "DD-MMM-YY" },
2614
+ { value: "D-MMM-YYYY", label: "D-MMM-YYYY" },
2615
+ { value: "DD-MMM-YYYY", label: "DD-MMM-YYYY" },
2616
+ { value: "MMMM D, YYYY", label: "MMMM D, YYYY" },
2617
+ { value: "YYYY-MM-DD", label: "YYYY-MM-DD" },
2618
+ { value: "YYYYMMDD", label: "YYYYMMDD" },
2619
+ { value: "YYYY/M/D", label: "YYYY/M/D" },
2620
+ { value: "YYYY/MM/DD", label: "YYYY/MM/DD" },
2621
+ { value: "YYYY年M月D日", label: "YYYY年M月D日", hidden: (lang !== "ja" && lang !== "zh") }, // Show when set to Japanese or Chinese
2622
+
2623
+ { type: "header", label: trans["Time"] },
2624
+ { value: "h:mm A", label: "h:mm A" },
2625
+ { value: "hh:mm A", label: "hh:mm A" },
2626
+ { value: "h:mm:ss A", label: "h:mm:ss A" },
2627
+ { value: "hh:mm:ss A", label: "hh:mm:ss A" },
2628
+ { value: "H:mm", label: "H:mm" },
2629
+ { value: "HH:mm", label: "HH:mm" },
2630
+ { value: "H:mm:ss", label: "H:mm:ss" },
2631
+ { value: "HH:mm:ss", label: "HH:mm:ss" },
2632
+
2633
+ { type: "header", label: trans["Date & Time"] },
2634
+ { value: "M/D/YY h:mm A", label: "M/D/YY h:mm A" },
2635
+ { value: "M/D/YY h:mm:ss A", label: "M/D/YY h:mm:ss A" },
2636
+ { value: "M/D/YY H:mm", label: "M/D/YY H:mm" },
2637
+ { value: "M/D/YY H:mm:ss", label: "M/D/YY H:mm:ss" },
2638
+ { value: "MM/DD/YY h:mm A", label: "MM/DD/YY h:mm A" },
2639
+ { value: "MM/DD/YY h:mm:ss A", label: "MM/DD/YY h:mm:ss A" },
2640
+ { value: "MM/DD/YY H:mm", label: "MM/DD/YY H:mm" },
2641
+ { value: "MM/DD/YY H:mm:ss", label: "MM/DD/YY H:mm:ss" },
2642
+ { value: "M/D/YYYY h:mm A", label: "M/D/YYYY h:mm A" },
2643
+ { value: "M/D/YYYY h:mm:ss A", label: "M/D/YYYY h:mm:ss A" },
2644
+ { value: "M/D/YYYY H:mm", label: "M/D/YYYY H:mm" },
2645
+ { value: "M/D/YYYY H:mm:ss", label: "M/D/YYYY H:mm:ss" },
2646
+ { value: "MM/DD/YYYY h:mm A", label: "MM/DD/YYYY h:mm A" },
2647
+ { value: "MM/DD/YYYY h:mm:ss A", label: "MM/DD/YYYY h:mm:ss A" },
2648
+ { value: "MM/DD/YYYY H:mm", label: "MM/DD/YYYY H:mm" },
2649
+ { value: "MM/DD/YYYY H:mm:ss", label: "MM/DD/YYYY H:mm:ss" },
2650
+ { value: "YYYY年M月D日 H:mm", label: "YYYY年M月D日 H:mm", hidden: (lang !== "ja" && lang !== "zh") }, // Show when set to Japanese or Chinese
2651
+
2652
+ { type: "header", label: trans["Custom"] },
2653
+ { value: "customDateFormat", label: trans["User Defined"] }
2654
+ ];
2655
+ }
2656
+
2657
+ /** Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.
2658
+ * @private
2659
+ * @param {Object} obj The object to query
2660
+ * @param {string} path The path of the property to get.
2661
+ * @param {*} defaultValue The value returned for undefined resolved values.
2662
+ * @returns {*} Returns the resolved value
2663
+ */
2664
+ _getDeepValue(obj, path, defaultValue) {
2665
+ const paths = path.split(".");
2666
+ const length = paths.length;
2667
+ let current = obj;
2668
+
2669
+ for (let i = 0; i < length; i++) {
2670
+ const key = paths[i];
2671
+ // eslint-disable-next-line no-undefined
2672
+ if (current[key] === undefined) { // TODO: Fix this
2673
+ return defaultValue;
2674
+ }
2675
+ else {
2676
+ current = current[key];
2677
+ }
2678
+ }
2679
+
2680
+ return current;
2681
+ }
2682
+
2683
+ }
2684
+
2685
+ customElement("column-format-dialog")(ColumnFormatDialog);
2686
+
2687
+ export { ColumnFormatDialog };
2688
+ export default ColumnFormatDialog;