@finos/legend-application-repl 0.0.48 → 0.0.49

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 (335) hide show
  1. package/lib/components/dataCube/DataCube.d.ts.map +1 -1
  2. package/lib/components/dataCube/DataCube.js +14 -11
  3. package/lib/components/dataCube/DataCube.js.map +1 -1
  4. package/lib/components/dataCube/editor/DataCubeEditor.d.ts +4 -1
  5. package/lib/components/dataCube/editor/DataCubeEditor.d.ts.map +1 -1
  6. package/lib/components/dataCube/editor/DataCubeEditor.js +6 -7
  7. package/lib/components/dataCube/editor/DataCubeEditor.js.map +1 -1
  8. package/lib/components/dataCube/editor/DataCubeEditorCodePanel.d.ts +4 -1
  9. package/lib/components/dataCube/editor/DataCubeEditorCodePanel.d.ts.map +1 -1
  10. package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js +2 -12
  11. package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js.map +1 -1
  12. package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.d.ts +4 -1
  13. package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.d.ts.map +1 -1
  14. package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js +57 -51
  15. package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js.map +1 -1
  16. package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.d.ts +4 -1
  17. package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.d.ts.map +1 -1
  18. package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js +3 -4
  19. package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js.map +1 -1
  20. package/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.js +1 -1
  21. package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.d.ts +4 -1
  22. package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.d.ts.map +1 -1
  23. package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js +3 -4
  24. package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js.map +1 -1
  25. package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.d.ts +4 -1
  26. package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.d.ts.map +1 -1
  27. package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js +289 -10
  28. package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js.map +1 -1
  29. package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.d.ts +4 -1
  30. package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.d.ts.map +1 -1
  31. package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js +30 -30
  32. package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js.map +1 -1
  33. package/lib/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.d.ts +4 -1
  34. package/lib/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.d.ts.map +1 -1
  35. package/lib/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.js +3 -4
  36. package/lib/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.js.map +1 -1
  37. package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.d.ts +4 -1
  38. package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.d.ts.map +1 -1
  39. package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js +19 -20
  40. package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js.map +1 -1
  41. package/lib/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.d.ts +4 -1
  42. package/lib/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.d.ts.map +1 -1
  43. package/lib/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.js +3 -4
  44. package/lib/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.js.map +1 -1
  45. package/lib/components/dataCube/grid/DataCubeGrid.d.ts +7 -2
  46. package/lib/components/dataCube/grid/DataCubeGrid.d.ts.map +1 -1
  47. package/lib/components/dataCube/grid/DataCubeGrid.js +53 -54
  48. package/lib/components/dataCube/grid/DataCubeGrid.js.map +1 -1
  49. package/lib/components/repl/Form.d.ts +4 -2
  50. package/lib/components/repl/Form.d.ts.map +1 -1
  51. package/lib/components/repl/Form.js +55 -19
  52. package/lib/components/repl/Form.js.map +1 -1
  53. package/lib/index.css +2 -2
  54. package/lib/index.css.map +1 -1
  55. package/lib/package.json +4 -3
  56. package/lib/stores/dataCube/DataCubeEngine.d.ts +30 -0
  57. package/lib/stores/dataCube/DataCubeEngine.d.ts.map +1 -1
  58. package/lib/stores/dataCube/DataCubeEngine.js +60 -1
  59. package/lib/stores/dataCube/DataCubeEngine.js.map +1 -1
  60. package/lib/stores/dataCube/DataCubeState.d.ts +2 -2
  61. package/lib/stores/dataCube/DataCubeState.d.ts.map +1 -1
  62. package/lib/stores/dataCube/DataCubeState.js +11 -5
  63. package/lib/stores/dataCube/DataCubeState.js.map +1 -1
  64. package/lib/stores/dataCube/core/DataCubeConfiguration.d.ts +0 -1
  65. package/lib/stores/dataCube/core/DataCubeConfiguration.d.ts.map +1 -1
  66. package/lib/stores/dataCube/core/DataCubeConfiguration.js +0 -2
  67. package/lib/stores/dataCube/core/DataCubeConfiguration.js.map +1 -1
  68. package/lib/stores/dataCube/core/DataCubeQueryBuilder.d.ts +8 -17
  69. package/lib/stores/dataCube/core/DataCubeQueryBuilder.d.ts.map +1 -1
  70. package/lib/stores/dataCube/core/DataCubeQueryBuilder.js +16 -230
  71. package/lib/stores/dataCube/core/DataCubeQueryBuilder.js.map +1 -1
  72. package/lib/stores/dataCube/core/DataCubeQueryBuilderUtils.d.ts +44 -0
  73. package/lib/stores/dataCube/core/DataCubeQueryBuilderUtils.d.ts.map +1 -0
  74. package/lib/stores/dataCube/core/DataCubeQueryBuilderUtils.js +220 -0
  75. package/lib/stores/dataCube/core/DataCubeQueryBuilderUtils.js.map +1 -0
  76. package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts +41 -20
  77. package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts.map +1 -1
  78. package/lib/stores/dataCube/core/DataCubeQueryEngine.js +70 -46
  79. package/lib/stores/dataCube/core/DataCubeQueryEngine.js.map +1 -1
  80. package/lib/stores/dataCube/core/DataCubeQuerySnapshot.d.ts +7 -5
  81. package/lib/stores/dataCube/core/DataCubeQuerySnapshot.d.ts.map +1 -1
  82. package/lib/stores/dataCube/core/DataCubeQuerySnapshot.js +1 -1
  83. package/lib/stores/dataCube/core/DataCubeQuerySnapshot.js.map +1 -1
  84. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts +4 -4
  85. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts.map +1 -1
  86. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.js +18 -135
  87. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.js.map +1 -1
  88. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilderUtils.d.ts +31 -0
  89. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilderUtils.d.ts.map +1 -0
  90. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilderUtils.js +142 -0
  91. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilderUtils.js.map +1 -0
  92. package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts +16 -1
  93. package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts.map +1 -1
  94. package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.js +25 -3
  95. package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.js.map +1 -1
  96. package/lib/stores/dataCube/core/{DataCubeCoreState.d.ts → DataCubeStaticContentDisplayState.d.ts} +3 -4
  97. package/lib/stores/dataCube/core/DataCubeStaticContentDisplayState.d.ts.map +1 -0
  98. package/lib/stores/dataCube/core/{DataCubeCoreState.js → DataCubeStaticContentDisplayState.js} +3 -6
  99. package/lib/stores/dataCube/core/DataCubeStaticContentDisplayState.js.map +1 -0
  100. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterEditorState.d.ts +36 -0
  101. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterEditorState.d.ts.map +1 -0
  102. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterEditorState.js +151 -0
  103. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterEditorState.js.map +1 -0
  104. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation.d.ts +32 -0
  105. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation.d.ts.map +1 -0
  106. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation.js +64 -0
  107. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation.js.map +1 -0
  108. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__Contain.d.ts +34 -0
  109. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__Contain.d.ts.map +1 -0
  110. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__Contain.js +59 -0
  111. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__Contain.js.map +1 -0
  112. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.d.ts +34 -0
  113. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.d.ts.map +1 -0
  114. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.js +64 -0
  115. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.js.map +1 -0
  116. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EndWith.d.ts +34 -0
  117. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EndWith.d.ts.map +1 -0
  118. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EndWith.js +59 -0
  119. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EndWith.js.map +1 -0
  120. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.d.ts +34 -0
  121. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.d.ts.map +1 -0
  122. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.js +64 -0
  123. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.js.map +1 -0
  124. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__Equal.d.ts +34 -0
  125. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__Equal.d.ts.map +1 -0
  126. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__Equal.js +126 -0
  127. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__Equal.js.map +1 -0
  128. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.d.ts +34 -0
  129. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.d.ts.map +1 -0
  130. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.js +64 -0
  131. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.js.map +1 -0
  132. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.d.ts +34 -0
  133. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.d.ts.map +1 -0
  134. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.js +64 -0
  135. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.js.map +1 -0
  136. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualColumn.d.ts +34 -0
  137. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualColumn.d.ts.map +1 -0
  138. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualColumn.js +60 -0
  139. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualColumn.js.map +1 -0
  140. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThan.d.ts +34 -0
  141. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThan.d.ts.map +1 -0
  142. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThan.js +59 -0
  143. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThan.js.map +1 -0
  144. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.d.ts +34 -0
  145. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.d.ts.map +1 -0
  146. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.js +60 -0
  147. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.js.map +1 -0
  148. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.d.ts +34 -0
  149. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.d.ts.map +1 -0
  150. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.js +59 -0
  151. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.js.map +1 -0
  152. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.d.ts +34 -0
  153. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.d.ts.map +1 -0
  154. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.js +60 -0
  155. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.js.map +1 -0
  156. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__IsNotNull.d.ts +31 -0
  157. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__IsNotNull.d.ts.map +1 -0
  158. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__IsNotNull.js +54 -0
  159. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__IsNotNull.js.map +1 -0
  160. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__IsNull.d.ts +31 -0
  161. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__IsNull.d.ts.map +1 -0
  162. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__IsNull.js +54 -0
  163. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__IsNull.js.map +1 -0
  164. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThan.d.ts +34 -0
  165. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThan.d.ts.map +1 -0
  166. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThan.js +59 -0
  167. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThan.js.map +1 -0
  168. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanColumn.d.ts +34 -0
  169. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanColumn.d.ts.map +1 -0
  170. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanColumn.js +60 -0
  171. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanColumn.js.map +1 -0
  172. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.d.ts +34 -0
  173. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.d.ts.map +1 -0
  174. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.js +59 -0
  175. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.js.map +1 -0
  176. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.d.ts +34 -0
  177. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.d.ts.map +1 -0
  178. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.js +60 -0
  179. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.js.map +1 -0
  180. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotContain.d.ts +34 -0
  181. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotContain.d.ts.map +1 -0
  182. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotContain.js +59 -0
  183. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotContain.js.map +1 -0
  184. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEndWith.d.ts +34 -0
  185. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEndWith.d.ts.map +1 -0
  186. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEndWith.js +59 -0
  187. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEndWith.js.map +1 -0
  188. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqual.d.ts +34 -0
  189. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqual.d.ts.map +1 -0
  190. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqual.js +59 -0
  191. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqual.js.map +1 -0
  192. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.d.ts +34 -0
  193. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.d.ts.map +1 -0
  194. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.js +64 -0
  195. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.js.map +1 -0
  196. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.d.ts +34 -0
  197. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.d.ts.map +1 -0
  198. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.js +64 -0
  199. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.js.map +1 -0
  200. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.d.ts +34 -0
  201. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.d.ts.map +1 -0
  202. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.js +60 -0
  203. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.js.map +1 -0
  204. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotStartWith.d.ts +34 -0
  205. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotStartWith.d.ts.map +1 -0
  206. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotStartWith.js +59 -0
  207. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotStartWith.js.map +1 -0
  208. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__StartWith.d.ts +34 -0
  209. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__StartWith.d.ts.map +1 -0
  210. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__StartWith.js +59 -0
  211. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__StartWith.js.map +1 -0
  212. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.d.ts +34 -0
  213. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.d.ts.map +1 -0
  214. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.js +64 -0
  215. package/lib/stores/dataCube/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.js.map +1 -0
  216. package/lib/stores/dataCube/editor/DataCubeEditorColumnPropertiesPanelState.js +2 -2
  217. package/lib/stores/dataCube/editor/DataCubeEditorColumnPropertiesPanelState.js.map +1 -1
  218. package/lib/stores/dataCube/editor/DataCubeEditorFilterPanelState.d.ts +58 -0
  219. package/lib/stores/dataCube/editor/DataCubeEditorFilterPanelState.d.ts.map +1 -0
  220. package/lib/stores/dataCube/editor/DataCubeEditorFilterPanelState.js +205 -0
  221. package/lib/stores/dataCube/editor/DataCubeEditorFilterPanelState.js.map +1 -0
  222. package/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.d.ts +4 -4
  223. package/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.d.ts.map +1 -1
  224. package/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.js +2 -2
  225. package/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.js.map +1 -1
  226. package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts +5 -4
  227. package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts.map +1 -1
  228. package/lib/stores/dataCube/editor/DataCubeEditorState.js +9 -7
  229. package/lib/stores/dataCube/editor/DataCubeEditorState.js.map +1 -1
  230. package/lib/stores/dataCube/editor/DataCubeMutableConfiguration.d.ts +5 -4
  231. package/lib/stores/dataCube/editor/DataCubeMutableConfiguration.d.ts.map +1 -1
  232. package/lib/stores/dataCube/editor/DataCubeMutableConfiguration.js +6 -5
  233. package/lib/stores/dataCube/editor/DataCubeMutableConfiguration.js.map +1 -1
  234. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts +2 -8
  235. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts.map +1 -1
  236. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js +3 -10
  237. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js.map +1 -1
  238. package/lib/stores/dataCube/grid/DataCubeGridClientExportEngine.js +1 -1
  239. package/lib/stores/dataCube/grid/DataCubeGridClientExportEngine.js.map +1 -1
  240. package/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.d.ts.map +1 -1
  241. package/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.js +16 -40
  242. package/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.js.map +1 -1
  243. package/lib/stores/dataCube/grid/DataCubeGridControllerState.d.ts +17 -7
  244. package/lib/stores/dataCube/grid/DataCubeGridControllerState.d.ts.map +1 -1
  245. package/lib/stores/dataCube/grid/DataCubeGridControllerState.js +59 -6
  246. package/lib/stores/dataCube/grid/DataCubeGridControllerState.js.map +1 -1
  247. package/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.d.ts.map +1 -1
  248. package/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.js +157 -53
  249. package/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.js.map +1 -1
  250. package/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.d.ts +2 -1
  251. package/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.d.ts.map +1 -1
  252. package/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.js +7 -7
  253. package/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.js.map +1 -1
  254. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js +4 -4
  255. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js.map +1 -1
  256. package/lib/stores/dataCube/grid/DataCubeGridState.d.ts +2 -3
  257. package/lib/stores/dataCube/grid/DataCubeGridState.d.ts.map +1 -1
  258. package/lib/stores/dataCube/grid/DataCubeGridState.js +10 -6
  259. package/lib/stores/dataCube/grid/DataCubeGridState.js.map +1 -1
  260. package/package.json +10 -9
  261. package/src/components/dataCube/DataCube.tsx +20 -13
  262. package/src/components/dataCube/editor/DataCubeEditor.tsx +15 -15
  263. package/src/components/dataCube/editor/DataCubeEditorCodePanel.tsx +72 -80
  264. package/src/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.tsx +1020 -950
  265. package/src/components/dataCube/editor/DataCubeEditorColumnsPanel.tsx +46 -44
  266. package/src/components/dataCube/editor/DataCubeEditorColumnsSelector.tsx +1 -1
  267. package/src/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.tsx +20 -18
  268. package/src/components/dataCube/editor/DataCubeEditorFilterPanel.tsx +862 -19
  269. package/src/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.tsx +687 -667
  270. package/src/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.tsx +20 -18
  271. package/src/components/dataCube/editor/DataCubeEditorSortsPanel.tsx +71 -62
  272. package/src/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.tsx +19 -17
  273. package/src/components/dataCube/grid/DataCubeGrid.tsx +144 -140
  274. package/src/components/repl/Form.tsx +145 -98
  275. package/src/stores/dataCube/DataCubeEngine.ts +69 -1
  276. package/src/stores/dataCube/DataCubeState.ts +13 -9
  277. package/src/stores/dataCube/core/DataCubeConfiguration.ts +1 -3
  278. package/src/stores/dataCube/core/DataCubeQueryBuilder.ts +43 -355
  279. package/src/stores/dataCube/core/DataCubeQueryBuilderUtils.ts +353 -0
  280. package/src/stores/dataCube/core/DataCubeQueryEngine.ts +46 -21
  281. package/src/stores/dataCube/core/DataCubeQuerySnapshot.ts +8 -12
  282. package/src/stores/dataCube/core/DataCubeQuerySnapshotBuilder.ts +25 -194
  283. package/src/stores/dataCube/core/DataCubeQuerySnapshotBuilderUtils.ts +211 -0
  284. package/src/stores/dataCube/core/DataCubeQuerySnapshotManager.ts +50 -1
  285. package/src/stores/dataCube/core/{DataCubeCoreState.ts → DataCubeStaticContentDisplayState.ts} +2 -6
  286. package/src/stores/dataCube/core/filter/DataCubeQueryFilterEditorState.ts +227 -0
  287. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation.ts +105 -0
  288. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__Contain.tsx +87 -0
  289. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.tsx +93 -0
  290. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EndWith.tsx +87 -0
  291. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.tsx +93 -0
  292. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__Equal.tsx +159 -0
  293. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.tsx +93 -0
  294. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.tsx +93 -0
  295. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__EqualColumn.tsx +89 -0
  296. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThan.tsx +87 -0
  297. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.tsx +89 -0
  298. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.tsx +87 -0
  299. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.tsx +89 -0
  300. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__IsNotNull.tsx +83 -0
  301. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__IsNull.tsx +80 -0
  302. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThan.tsx +87 -0
  303. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanColumn.tsx +89 -0
  304. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.tsx +87 -0
  305. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.tsx +89 -0
  306. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotContain.tsx +90 -0
  307. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEndWith.tsx +90 -0
  308. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqual.tsx +90 -0
  309. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.tsx +96 -0
  310. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.tsx +96 -0
  311. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.tsx +92 -0
  312. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__NotStartWith.tsx +90 -0
  313. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__StartWith.tsx +87 -0
  314. package/src/stores/dataCube/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.tsx +93 -0
  315. package/src/stores/dataCube/editor/DataCubeEditorColumnPropertiesPanelState.ts +2 -2
  316. package/src/stores/dataCube/editor/DataCubeEditorFilterPanelState.ts +295 -0
  317. package/src/stores/dataCube/editor/DataCubeEditorSortsPanelState.ts +5 -9
  318. package/src/stores/dataCube/editor/DataCubeEditorState.tsx +9 -8
  319. package/src/stores/dataCube/editor/DataCubeMutableConfiguration.ts +10 -10
  320. package/src/stores/dataCube/grid/DataCubeGridClientEngine.ts +22 -23
  321. package/src/stores/dataCube/grid/DataCubeGridClientExportEngine.ts +1 -1
  322. package/src/stores/dataCube/grid/DataCubeGridConfigurationBuilder.tsx +16 -43
  323. package/src/stores/dataCube/grid/DataCubeGridControllerState.ts +91 -10
  324. package/src/stores/dataCube/grid/DataCubeGridMenuBuilder.tsx +218 -53
  325. package/src/stores/dataCube/grid/DataCubeGridQueryBuilder.ts +66 -61
  326. package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.ts +4 -4
  327. package/src/stores/dataCube/grid/DataCubeGridState.ts +10 -6
  328. package/tsconfig.json +33 -2
  329. package/lib/stores/dataCube/core/DataCubeCoreState.d.ts.map +0 -1
  330. package/lib/stores/dataCube/core/DataCubeCoreState.js.map +0 -1
  331. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts +0 -30
  332. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts.map +0 -1
  333. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js +0 -41
  334. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js.map +0 -1
  335. package/src/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.ts +0 -62
@@ -15,7 +15,6 @@
15
15
  */
16
16
 
17
17
  import { observer } from 'mobx-react-lite';
18
- import { useREPLStore } from '../../REPLStoreProvider.js';
19
18
  import { cn, DataCubeIcon, useDropdownMenu } from '@finos/legend-art';
20
19
  import {
21
20
  DataCubeFont,
@@ -42,727 +41,748 @@ import {
42
41
  FormNumberInput,
43
42
  FormBadge_WIP,
44
43
  } from '../../repl/Form.js';
44
+ import type { DataCubeState } from '../../../stores/dataCube/DataCubeState.js';
45
45
 
46
- export const DataCubeEditorGeneralPropertiesPanel = observer(() => {
47
- const repl = useREPLStore();
48
- const panel = repl.dataCube.editor.generalProperties;
49
- const configuration = panel.configuration;
50
- const [
51
- openInitialExpandLevelDropdown,
52
- closeInitialExpandLevelDropdown,
53
- initialExpandLevelDropdownProps,
54
- ] = useDropdownMenu();
55
- const [
56
- openSelectionStatDropdown,
57
- closeSelectionStatDropdown,
58
- selectionStatDropdownProps,
59
- ] = useDropdownMenu();
60
- const [
61
- openFontFamilyDropdown,
62
- closeFontFamilyDropdown,
63
- fontFamilyDropdownProps,
64
- ] = useDropdownMenu();
65
- const [
66
- openFontSizeDropdown,
67
- closeFontSizeDropdown,
68
- openFontSizeDropdownProps,
69
- ] = useDropdownMenu();
70
- const [
71
- openFontFormatUnderlineVariantDropdown,
72
- closeFontFormatUnderlineVariantDropdown,
73
- fontFormatUnderlineVariantDropdownProps,
74
- ] = useDropdownMenu();
75
- const [openFontCaseDropdown, closeFontCaseDropdown, fontCaseDropdownProps] =
76
- useDropdownMenu();
46
+ export const DataCubeEditorGeneralPropertiesPanel = observer(
47
+ (props: { dataCube: DataCubeState }) => {
48
+ const { dataCube } = props;
49
+ const panel = dataCube.editor.generalProperties;
50
+ const configuration = panel.configuration;
51
+ const [
52
+ openInitialExpandLevelDropdown,
53
+ closeInitialExpandLevelDropdown,
54
+ initialExpandLevelDropdownProps,
55
+ initialExpandLevelDropdownPropsOpen,
56
+ ] = useDropdownMenu();
57
+ // TODO: selection stats should be shown as a list of checkboxes
58
+ // rather than a dropdown!
59
+ const [
60
+ openSelectionStatDropdown,
61
+ closeSelectionStatDropdown,
62
+ selectionStatDropdownProps,
63
+ selectionStatDropdownPropsOpen,
64
+ ] = useDropdownMenu();
65
+ const [
66
+ openFontFamilyDropdown,
67
+ closeFontFamilyDropdown,
68
+ fontFamilyDropdownProps,
69
+ fontFamilyDropdownPropsOpen,
70
+ ] = useDropdownMenu();
71
+ const [
72
+ openFontSizeDropdown,
73
+ closeFontSizeDropdown,
74
+ openFontSizeDropdownProps,
75
+ openFontSizeDropdownPropsOpen,
76
+ ] = useDropdownMenu();
77
+ const [
78
+ openFontFormatUnderlineVariantDropdown,
79
+ closeFontFormatUnderlineVariantDropdown,
80
+ fontFormatUnderlineVariantDropdownProps,
81
+ ] = useDropdownMenu();
82
+ const [openFontCaseDropdown, closeFontCaseDropdown, fontCaseDropdownProps] =
83
+ useDropdownMenu();
77
84
 
78
- return (
79
- <div className="h-full w-full select-none p-2">
80
- <div className="flex h-6">
81
- <div className="flex h-6 items-center text-xl font-medium">
82
- <DataCubeIcon.TableOptions />
83
- </div>
84
- <div className="ml-1 flex h-6 items-center text-xl font-medium">
85
- General Properties
86
- </div>
87
- </div>
88
- <div className="flex h-[calc(100%_-_24px)] w-full">
89
- <div className="h-full w-full py-2">
90
- <div className="flex h-6 w-full items-center">
91
- <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
92
- Report Title:
93
- </div>
94
- <FormTextInput
95
- className="h-6 w-96 text-lg font-semibold"
96
- value={panel.name}
97
- onChange={(event) => {
98
- panel.setName(event.target.value);
99
- }}
100
- />
101
- </div>
102
-
103
- <div className="mt-2 flex h-5 w-full items-center">
104
- <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
105
- Initially Expand to Level:
106
- </div>
107
- <FormDropdownMenuTrigger
108
- className="w-16"
109
- onClick={openInitialExpandLevelDropdown}
110
- disabled={true}
111
- >
112
- {configuration.initialExpandLevel ?? '(None)'}
113
- </FormDropdownMenuTrigger>
114
- <FormDropdownMenu
115
- className="w-16"
116
- {...initialExpandLevelDropdownProps}
117
- >
118
- {[undefined, 1, 2, 3, 4, 5, 6, 7, 8].map((level) => (
119
- <FormDropdownMenuItem
120
- key={level ?? ''}
121
- onClick={() => {
122
- configuration.setInitialExpandLevel(level);
123
- closeInitialExpandLevelDropdown();
124
- }}
125
- >
126
- {level ?? '(None)'}
127
- </FormDropdownMenuItem>
128
- ))}
129
- </FormDropdownMenu>
130
- <FormBadge_WIP />
85
+ return (
86
+ <div className="h-full w-full select-none p-2">
87
+ <div className="flex h-6">
88
+ <div className="flex h-6 items-center text-xl font-medium">
89
+ <DataCubeIcon.TableOptions />
131
90
  </div>
132
-
133
- <div className="mt-2 flex h-5 w-full items-center">
134
- <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
135
- Show Root Aggregation?
136
- </div>
137
- <FormCheckbox
138
- checked={configuration.showRootAggregation}
139
- onChange={() =>
140
- configuration.setShowRootAggregation(
141
- !configuration.showRootAggregation,
142
- )
143
- }
144
- disabled={true}
145
- />
146
- <FormBadge_WIP />
91
+ <div className="ml-1 flex h-6 items-center text-xl font-medium">
92
+ General Properties
147
93
  </div>
148
-
149
- <div className="mt-2 flex h-5 w-full items-center">
150
- <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
151
- Show Leaf Count?
94
+ </div>
95
+ <div className="flex h-[calc(100%_-_24px)] w-full">
96
+ <div className="h-full w-full py-2">
97
+ <div className="flex h-6 w-full items-center">
98
+ <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
99
+ Report Title:
100
+ </div>
101
+ <FormTextInput
102
+ className="h-6 w-96 text-lg font-semibold"
103
+ value={panel.name}
104
+ onChange={(event) => {
105
+ panel.setName(event.target.value);
106
+ }}
107
+ />
152
108
  </div>
153
- <FormCheckbox
154
- checked={configuration.showLeafCount}
155
- onChange={() =>
156
- configuration.setShowLeafCount(!configuration.showLeafCount)
157
- }
158
- disabled={true}
159
- />
160
- <FormBadge_WIP />
161
- </div>
162
109
 
163
- <div className="mt-2 flex h-5 w-full items-center">
164
- <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
165
- Show Lines?
110
+ <div className="mt-2 flex h-5 w-full items-center">
111
+ <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
112
+ Initially Expand to Level:
113
+ </div>
114
+ <FormDropdownMenuTrigger
115
+ className="w-16"
116
+ onClick={openInitialExpandLevelDropdown}
117
+ disabled={true}
118
+ open={initialExpandLevelDropdownPropsOpen}
119
+ >
120
+ {configuration.initialExpandLevel ?? '(None)'}
121
+ </FormDropdownMenuTrigger>
122
+ <FormDropdownMenu
123
+ className="w-16"
124
+ {...initialExpandLevelDropdownProps}
125
+ >
126
+ {[undefined, 1, 2, 3, 4, 5, 6, 7, 8].map((level) => (
127
+ <FormDropdownMenuItem
128
+ key={level ?? ''}
129
+ onClick={() => {
130
+ configuration.setInitialExpandLevel(level);
131
+ closeInitialExpandLevelDropdown();
132
+ }}
133
+ autoFocus={level === configuration.initialExpandLevel}
134
+ >
135
+ {level ?? '(None)'}
136
+ </FormDropdownMenuItem>
137
+ ))}
138
+ </FormDropdownMenu>
139
+ <FormBadge_WIP />
166
140
  </div>
167
- <FormCheckbox
168
- label="Tree"
169
- checked={configuration.showTreeLines}
170
- onChange={() =>
171
- configuration.setShowTreeLines(!configuration.showTreeLines)
172
- }
173
- disabled={true}
174
- />
175
- <FormBadge_WIP />
176
- <FormCheckbox
177
- className="ml-2"
178
- label="Horizontal"
179
- checked={configuration.showHorizontalGridLines}
180
- onChange={() =>
181
- configuration.setShowHorizontalGridLines(
182
- !configuration.showHorizontalGridLines,
183
- )
184
- }
185
- />
186
- <FormCheckbox
187
- className="ml-2"
188
- label="Vertical"
189
- checked={configuration.showVerticalGridLines}
190
- onChange={() =>
191
- configuration.setShowVerticalGridLines(
192
- !configuration.showVerticalGridLines,
193
- )
194
- }
195
- />
196
- <div className="ml-2 h-[1px] w-2 flex-shrink-0 bg-neutral-400" />
197
- <FormColorPickerButton
198
- className="ml-2"
199
- color={configuration.gridLineColor}
200
- defaultColor={DEFAULT_GRID_LINE_COLOR}
201
- onChange={(value) => configuration.setGridLineColor(value)}
202
- />
203
- </div>
204
141
 
205
- <div className="mt-2 flex h-5 w-full items-center">
206
- <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
207
- Show Selection Stats:
142
+ <div className="mt-2 flex h-5 w-full items-center">
143
+ <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
144
+ Show Root Aggregation?
145
+ </div>
146
+ <FormCheckbox
147
+ checked={configuration.showRootAggregation}
148
+ onChange={() =>
149
+ configuration.setShowRootAggregation(
150
+ !configuration.showRootAggregation,
151
+ )
152
+ }
153
+ disabled={true}
154
+ />
155
+ <FormBadge_WIP />
208
156
  </div>
209
- <FormDropdownMenuTrigger
210
- className="w-16"
211
- onClick={openSelectionStatDropdown}
212
- disabled={true}
213
- >
214
- {'(None)'}
215
- </FormDropdownMenuTrigger>
216
- <FormDropdownMenu className="w-16" {...selectionStatDropdownProps}>
217
- {[
218
- DataCubeSelectionStat.SUM,
219
- DataCubeSelectionStat.AVERAGE,
220
- DataCubeSelectionStat.COUNT,
221
- DataCubeSelectionStat.MIN,
222
- DataCubeSelectionStat.MAX,
223
- ].map((operation) => (
224
- <FormDropdownMenuItem
225
- key={operation}
226
- onClick={() => {
227
- // TODO
228
- closeSelectionStatDropdown();
229
- }}
230
- >
231
- {operation}
232
- </FormDropdownMenuItem>
233
- ))}
234
- </FormDropdownMenu>
235
- <FormBadge_WIP />
236
- </div>
237
157
 
238
- <div className="mt-2 flex h-5 w-full items-center">
239
- <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
240
- Row Limit:
241
- </div>
242
- <FormNumberInput
243
- className="w-16 text-sm"
244
- value={panel.limit}
245
- min={-1}
246
- step={1}
247
- defaultValue={-1}
248
- isValid={(value) =>
249
- value !== undefined && (value === -1 || value > 0)
250
- }
251
- setValue={(value) => panel.setLimit(value ?? -1)}
252
- />
253
- <div className="flex-shrink-0 pl-1 text-sm italic text-neutral-500">
254
- Truncate result to this many rows at every level. Use -1 for
255
- unlimited.
158
+ <div className="mt-2 flex h-5 w-full items-center">
159
+ <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
160
+ Show Leaf Count?
161
+ </div>
162
+ <FormCheckbox
163
+ checked={configuration.showLeafCount}
164
+ onChange={() =>
165
+ configuration.setShowLeafCount(!configuration.showLeafCount)
166
+ }
167
+ disabled={true}
168
+ />
169
+ <FormBadge_WIP />
256
170
  </div>
257
- </div>
258
-
259
- <div className="mt-2 flex h-5 w-full items-center">
260
- <div className="flex h-full w-32 flex-shrink-0 items-center text-sm" />
261
- <FormCheckbox
262
- label="Display warning when truncated"
263
- checked={configuration.showWarningForTruncatedResult}
264
- onChange={() =>
265
- configuration.setShowWarningForTruncatedResult(
266
- !configuration.showWarningForTruncatedResult,
267
- )
268
- }
269
- />
270
- </div>
271
171
 
272
- <div className="mt-2 flex h-5 w-full items-center">
273
- <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
274
- Hightlight Rows:
275
- </div>
276
- <FormCheckbox
277
- label="Standard mode"
278
- checked={configuration.alternateRowsStandardMode}
279
- onChange={() => {
280
- if (configuration.alternateRowsStandardMode) {
281
- configuration.setAlternateRowsStandardMode(false);
282
- } else {
283
- configuration.setAlternateRowsStandardMode(true);
284
- configuration.setAlternateRows(false);
172
+ <div className="mt-2 flex h-5 w-full items-center">
173
+ <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
174
+ Show Lines?
175
+ </div>
176
+ <FormCheckbox
177
+ label="Tree"
178
+ checked={configuration.showTreeLines}
179
+ onChange={() =>
180
+ configuration.setShowTreeLines(!configuration.showTreeLines)
285
181
  }
286
- }}
287
- />
288
- <FormCheckbox
289
- className="ml-3"
290
- label="Custom: Alternate color every"
291
- checked={configuration.alternateRows}
292
- onChange={() => {
293
- if (configuration.alternateRows) {
294
- configuration.setAlternateRows(false);
295
- } else {
296
- configuration.setAlternateRows(true);
297
- configuration.setAlternateRowsStandardMode(false);
182
+ disabled={true}
183
+ />
184
+ <FormBadge_WIP />
185
+ <FormCheckbox
186
+ className="ml-2"
187
+ label="Horizontal"
188
+ checked={configuration.showHorizontalGridLines}
189
+ onChange={() =>
190
+ configuration.setShowHorizontalGridLines(
191
+ !configuration.showHorizontalGridLines,
192
+ )
298
193
  }
299
- }}
300
- />
301
- <FormNumberInput
302
- className="ml-1.5 w-16 text-sm"
303
- disabled={!configuration.alternateRows}
304
- min={1}
305
- step={1}
306
- defaultValue={1}
307
- isValid={(value) => value !== undefined && value > 0}
308
- value={configuration.alternateRowsCount}
309
- setValue={(value) =>
310
- configuration.setAlternateRowsCount(value ?? 1)
311
- }
312
- />
313
- <div className="ml-1.5 flex-shrink-0 text-sm">{`row(s)`}</div>
314
- <FormColorPickerButton
315
- className="ml-[5px]"
316
- disabled={!configuration.alternateRows}
317
- color={configuration.alternateRowsColor}
318
- defaultColor={DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR}
319
- onChange={(value) => configuration.setAlternateRowsColor(value)}
320
- />
321
- </div>
322
-
323
- <div className="my-2 h-[1px] w-full bg-neutral-200" />
324
-
325
- <div className="mt-2 flex h-5 w-full items-center">
326
- <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
327
- Default Font:
194
+ />
195
+ <FormCheckbox
196
+ className="ml-2"
197
+ label="Vertical"
198
+ checked={configuration.showVerticalGridLines}
199
+ onChange={() =>
200
+ configuration.setShowVerticalGridLines(
201
+ !configuration.showVerticalGridLines,
202
+ )
203
+ }
204
+ />
205
+ <div className="ml-2 h-[1px] w-2 flex-shrink-0 bg-neutral-400" />
206
+ <FormColorPickerButton
207
+ className="ml-2"
208
+ color={configuration.gridLineColor}
209
+ defaultColor={DEFAULT_GRID_LINE_COLOR}
210
+ onChange={(value) => configuration.setGridLineColor(value)}
211
+ />
328
212
  </div>
329
- <FormDropdownMenuTrigger
330
- className="w-28"
331
- onClick={openFontFamilyDropdown}
332
- >
333
- {configuration.fontFamily}
334
- </FormDropdownMenuTrigger>
335
- <FormDropdownMenu className="w-28" {...fontFamilyDropdownProps}>
336
- {[
337
- DataCubeFont.ARIAL,
338
- DataCubeFont.ROBOTO,
339
- DataCubeFont.ROBOTO_CONDENSED,
340
- ].map((font) => (
341
- <FormDropdownMenuItem
342
- key={font}
343
- onClick={() => {
344
- configuration.setFontFamily(font);
345
- closeFontFamilyDropdown();
346
- }}
347
- >
348
- {font}
349
- </FormDropdownMenuItem>
350
- ))}
351
- <FormDropdownMenuItemSeparator />
352
- {[
353
- DataCubeFont.GEORGIA,
354
- DataCubeFont.ROBOTO_SERIF,
355
- DataCubeFont.TIMES_NEW_ROMAN,
356
- ].map((font) => (
357
- <FormDropdownMenuItem
358
- key={font}
359
- onClick={() => {
360
- configuration.setFontFamily(font);
361
- closeFontFamilyDropdown();
362
- }}
363
- >
364
- {font}
365
- </FormDropdownMenuItem>
366
- ))}
367
- <FormDropdownMenuItemSeparator />
368
- {[
369
- DataCubeFont.JERBRAINS_MONO,
370
- DataCubeFont.ROBOTO_MONO,
371
- DataCubeFont.UBUNTU_MONO,
372
- ].map((font) => (
373
- <FormDropdownMenuItem
374
- key={font}
375
- onClick={() => {
376
- configuration.setFontFamily(font);
377
- closeFontFamilyDropdown();
378
- }}
379
- >
380
- {font}
381
- </FormDropdownMenuItem>
382
- ))}
383
- </FormDropdownMenu>
384
213
 
385
- <FormDropdownMenuTrigger
386
- className="ml-1 w-10"
387
- onClick={openFontSizeDropdown}
388
- >
389
- {configuration.fontSize}
390
- </FormDropdownMenuTrigger>
391
- <FormDropdownMenu className="w-10" {...openFontSizeDropdownProps}>
392
- {[
393
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28,
394
- 32, 36, 48, 72,
395
- ].map((size) => (
396
- <FormDropdownMenuItem
397
- key={size}
398
- onClick={() => {
399
- configuration.setFontSize(size);
400
- closeFontSizeDropdown();
401
- }}
402
- >
403
- {size}
404
- </FormDropdownMenuItem>
405
- ))}
406
- </FormDropdownMenu>
407
-
408
- <div className="relative ml-2 flex h-5">
409
- <button
410
- title="Bold"
411
- className={cn(
412
- 'relative flex h-5 w-5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]',
413
- {
414
- 'bg-neutral-200': configuration.fontBold,
415
- },
416
- )}
417
- onClick={() =>
418
- configuration.setFontBold(!configuration.fontBold)
419
- }
420
- >
421
- <DataCubeIcon.FontBold />
422
- </button>
423
- <button
424
- title="Italic"
425
- className={cn(
426
- 'relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]',
427
- {
428
- 'bg-neutral-200': configuration.fontItalic,
429
- },
430
- )}
431
- onClick={() =>
432
- configuration.setFontItalic(!configuration.fontItalic)
433
- }
434
- >
435
- <DataCubeIcon.FontItalic />
436
- </button>
437
- <button
438
- title={`Underline${configuration.fontUnderline ? ` (${configuration.fontUnderline})` : ''}`}
439
- className={cn(
440
- 'relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-r-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]',
441
- {
442
- 'bg-neutral-200': configuration.fontUnderline !== undefined,
443
- },
444
- )}
445
- onClick={() => {
446
- if (configuration.fontUnderline === undefined) {
447
- configuration.setFontUnderline(
448
- DataCubeFontFormatUnderlineVariant.SOLID,
449
- );
450
- configuration.setFontStrikethrough(false);
451
- } else {
452
- configuration.setFontUnderline(undefined);
453
- }
454
- }}
455
- >
456
- <DataCubeIcon.FontUnderline />
457
- </button>
458
- <button
459
- className="text-2xs relative -ml-[1px] flex h-5 w-2.5 items-center justify-center border border-l-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-600 focus-visible:z-[1]"
460
- onClick={openFontFormatUnderlineVariantDropdown}
214
+ <div className="mt-2 flex h-5 w-full items-center">
215
+ <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
216
+ Show Selection Stats:
217
+ </div>
218
+ <FormDropdownMenuTrigger
219
+ className="w-16"
220
+ onClick={openSelectionStatDropdown}
221
+ disabled={true}
222
+ open={selectionStatDropdownPropsOpen}
461
223
  >
462
- <div
463
- className={cn('h-4 w-[0.5px] bg-neutral-200', {
464
- 'opacity-0': configuration.fontUnderline !== undefined,
465
- })}
466
- />
467
- <DataCubeIcon.CaretDown />
468
- </button>
224
+ {'(None)'}
225
+ </FormDropdownMenuTrigger>
469
226
  <FormDropdownMenu
470
- className="w-14"
471
- {...fontFormatUnderlineVariantDropdownProps}
227
+ className="w-16"
228
+ {...selectionStatDropdownProps}
472
229
  >
473
230
  {[
474
- DataCubeFontFormatUnderlineVariant.SOLID,
475
- DataCubeFontFormatUnderlineVariant.DASHED,
476
- DataCubeFontFormatUnderlineVariant.DOTTED,
477
- DataCubeFontFormatUnderlineVariant.DOUBLE,
478
- DataCubeFontFormatUnderlineVariant.WAVY,
479
- ].map((variant) => (
231
+ DataCubeSelectionStat.SUM,
232
+ DataCubeSelectionStat.AVERAGE,
233
+ DataCubeSelectionStat.COUNT,
234
+ DataCubeSelectionStat.MIN,
235
+ DataCubeSelectionStat.MAX,
236
+ ].map((operation) => (
480
237
  <FormDropdownMenuItem
481
- className="relative"
482
- key={variant}
238
+ key={operation}
483
239
  onClick={() => {
484
- configuration.setFontUnderline(variant);
485
- configuration.setFontStrikethrough(false);
486
- closeFontFormatUnderlineVariantDropdown();
240
+ // TODO
241
+ closeSelectionStatDropdown();
487
242
  }}
488
243
  >
489
- <div
490
- className={cn(
491
- '!hover:underline absolute top-0 !underline',
492
- {
493
- '!hover:decoration-solid !decoration-solid':
494
- variant ===
495
- DataCubeFontFormatUnderlineVariant.SOLID,
496
- '!hover:decoration-dashed !decoration-dashed':
497
- variant ===
498
- DataCubeFontFormatUnderlineVariant.DASHED,
499
- '!hover:decoration-dotted !decoration-dotted':
500
- variant ===
501
- DataCubeFontFormatUnderlineVariant.DOTTED,
502
- '!hover:decoration-double !decoration-double':
503
- variant ===
504
- DataCubeFontFormatUnderlineVariant.DOUBLE,
505
- '!hover:decoration-wavy !decoration-wavy':
506
- variant === DataCubeFontFormatUnderlineVariant.WAVY,
507
- 'text-sky-600':
508
- variant === configuration.fontUnderline,
509
- },
510
- )}
511
- >
512
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
513
- </div>
244
+ {operation}
514
245
  </FormDropdownMenuItem>
515
246
  ))}
516
247
  </FormDropdownMenu>
517
- <button
518
- title="Strikethrough"
519
- className={cn(
520
- 'relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]',
521
- {
522
- 'bg-neutral-200': configuration.fontStrikethrough,
523
- },
524
- )}
525
- onClick={() => {
526
- if (configuration.fontStrikethrough) {
527
- configuration.setFontStrikethrough(false);
248
+ <FormBadge_WIP />
249
+ </div>
250
+
251
+ <div className="mt-2 flex h-5 w-full items-center">
252
+ <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
253
+ Row Limit:
254
+ </div>
255
+ <FormNumberInput
256
+ className="w-16 text-sm"
257
+ value={panel.limit}
258
+ min={-1}
259
+ step={1}
260
+ defaultValue={-1}
261
+ isValid={(value) =>
262
+ value !== undefined && (value === -1 || value > 0)
263
+ }
264
+ setValue={(value) => panel.setLimit(value ?? -1)}
265
+ />
266
+ <div className="flex-shrink-0 pl-1 text-sm italic text-neutral-500">
267
+ Truncate result to this many rows at every level. Use -1 for
268
+ unlimited.
269
+ </div>
270
+ </div>
271
+
272
+ <div className="mt-2 flex h-5 w-full items-center">
273
+ <div className="flex h-full w-32 flex-shrink-0 items-center text-sm" />
274
+ <FormCheckbox
275
+ label="Display warning when truncated"
276
+ checked={configuration.showWarningForTruncatedResult}
277
+ onChange={() =>
278
+ configuration.setShowWarningForTruncatedResult(
279
+ !configuration.showWarningForTruncatedResult,
280
+ )
281
+ }
282
+ />
283
+ </div>
284
+
285
+ <div className="mt-2 flex h-5 w-full items-center">
286
+ <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
287
+ Hightlight Rows:
288
+ </div>
289
+ <FormCheckbox
290
+ label="Standard mode"
291
+ checked={configuration.alternateRowsStandardMode}
292
+ onChange={() => {
293
+ if (configuration.alternateRowsStandardMode) {
294
+ configuration.setAlternateRowsStandardMode(false);
528
295
  } else {
529
- configuration.setFontStrikethrough(true);
530
- configuration.setFontUnderline(undefined);
296
+ configuration.setAlternateRowsStandardMode(true);
297
+ configuration.setAlternateRows(false);
531
298
  }
532
299
  }}
533
- >
534
- <DataCubeIcon.FontStrikethrough />
535
- </button>
536
- <button
537
- title={`Case${configuration.fontCase ? ` (${configuration.fontCase})` : ''}`}
538
- className={cn(
539
- 'relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-r-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]',
540
- {
541
- 'bg-neutral-200': configuration.fontCase !== undefined,
542
- },
543
- )}
544
- onClick={() => {
545
- configuration.setFontCase(
546
- configuration.fontCase === undefined
547
- ? DataCubeFontCase.UPPERCASE
548
- : undefined,
549
- );
300
+ />
301
+ <FormCheckbox
302
+ className="ml-3"
303
+ label="Custom: Alternate color every"
304
+ checked={configuration.alternateRows}
305
+ onChange={() => {
306
+ if (configuration.alternateRows) {
307
+ configuration.setAlternateRows(false);
308
+ } else {
309
+ configuration.setAlternateRows(true);
310
+ configuration.setAlternateRowsStandardMode(false);
311
+ }
550
312
  }}
313
+ />
314
+ <FormNumberInput
315
+ className="ml-1.5 w-16 text-sm"
316
+ disabled={!configuration.alternateRows}
317
+ min={1}
318
+ step={1}
319
+ defaultValue={1}
320
+ isValid={(value) => value !== undefined && value > 0}
321
+ value={configuration.alternateRowsCount}
322
+ setValue={(value) =>
323
+ configuration.setAlternateRowsCount(value ?? 1)
324
+ }
325
+ />
326
+ <div className="ml-1.5 flex-shrink-0 text-sm">{`row(s)`}</div>
327
+ <FormColorPickerButton
328
+ className="ml-[5px]"
329
+ disabled={!configuration.alternateRows}
330
+ color={configuration.alternateRowsColor}
331
+ defaultColor={DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR}
332
+ onChange={(value) => configuration.setAlternateRowsColor(value)}
333
+ />
334
+ </div>
335
+
336
+ <div className="my-2 h-[1px] w-full bg-neutral-200" />
337
+
338
+ <div className="mt-2 flex h-5 w-full items-center">
339
+ <div className="flex h-full w-32 flex-shrink-0 items-center text-sm">
340
+ Default Font:
341
+ </div>
342
+ <FormDropdownMenuTrigger
343
+ className="w-28"
344
+ onClick={openFontFamilyDropdown}
345
+ open={fontFamilyDropdownPropsOpen}
551
346
  >
552
- <DataCubeIcon.FontCase className="stroke-[0.5px]" />
553
- </button>
554
- <button
555
- className="text-2xs relative -ml-[1px] flex h-5 w-2.5 items-center justify-center rounded-br-sm rounded-tr-sm border border-l-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-600 focus-visible:z-[1]"
556
- onClick={openFontCaseDropdown}
557
- >
558
- <div
559
- className={cn('h-4 w-[0.5px] bg-neutral-200', {
560
- 'opacity-0': configuration.fontCase !== undefined,
561
- })}
562
- />
563
- <DataCubeIcon.CaretDown />
564
- </button>
565
- <FormDropdownMenu className="w-20" {...fontCaseDropdownProps}>
347
+ {configuration.fontFamily}
348
+ </FormDropdownMenuTrigger>
349
+ <FormDropdownMenu className="w-28" {...fontFamilyDropdownProps}>
566
350
  {[
567
- DataCubeFontCase.LOWERCASE,
568
- DataCubeFontCase.UPPERCASE,
569
- DataCubeFontCase.CAPITALIZE,
570
- ].map((fontCase) => (
351
+ DataCubeFont.ARIAL,
352
+ DataCubeFont.ROBOTO,
353
+ DataCubeFont.ROBOTO_CONDENSED,
354
+ ].map((font) => (
571
355
  <FormDropdownMenuItem
572
- className="relative"
573
- key={fontCase}
356
+ key={font}
574
357
  onClick={() => {
575
- configuration.setFontCase(fontCase);
576
- closeFontCaseDropdown();
358
+ configuration.setFontFamily(font);
359
+ closeFontFamilyDropdown();
577
360
  }}
361
+ autoFocus={font === configuration.fontFamily}
578
362
  >
579
- <div
580
- className={cn({
581
- lowercase: fontCase === DataCubeFontCase.LOWERCASE,
582
- uppercase: fontCase === DataCubeFontCase.UPPERCASE,
583
- capitalize: fontCase === DataCubeFontCase.CAPITALIZE,
584
- 'text-sky-600': fontCase === configuration.fontCase,
585
- })}
586
- >
587
- {fontCase}
588
- </div>
363
+ {font}
364
+ </FormDropdownMenuItem>
365
+ ))}
366
+ <FormDropdownMenuItemSeparator />
367
+ {[
368
+ DataCubeFont.GEORGIA,
369
+ DataCubeFont.ROBOTO_SERIF,
370
+ DataCubeFont.TIMES_NEW_ROMAN,
371
+ ].map((font) => (
372
+ <FormDropdownMenuItem
373
+ key={font}
374
+ onClick={() => {
375
+ configuration.setFontFamily(font);
376
+ closeFontFamilyDropdown();
377
+ }}
378
+ autoFocus={font === configuration.fontFamily}
379
+ >
380
+ {font}
381
+ </FormDropdownMenuItem>
382
+ ))}
383
+ <FormDropdownMenuItemSeparator />
384
+ {[
385
+ DataCubeFont.JERBRAINS_MONO,
386
+ DataCubeFont.ROBOTO_MONO,
387
+ DataCubeFont.UBUNTU_MONO,
388
+ ].map((font) => (
389
+ <FormDropdownMenuItem
390
+ key={font}
391
+ onClick={() => {
392
+ configuration.setFontFamily(font);
393
+ closeFontFamilyDropdown();
394
+ }}
395
+ autoFocus={font === configuration.fontFamily}
396
+ >
397
+ {font}
589
398
  </FormDropdownMenuItem>
590
399
  ))}
591
400
  </FormDropdownMenu>
592
- </div>
593
401
 
594
- <div className="relative ml-2 flex h-5">
595
- <button
596
- title="Align Left"
597
- className={cn(
598
- 'relative flex h-5 w-5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]',
599
- {
600
- 'bg-neutral-200':
601
- configuration.textAlign ===
602
- DataCubeFontTextAlignment.LEFT,
603
- },
604
- )}
605
- onClick={() =>
606
- configuration.setTextAlign(DataCubeFontTextAlignment.LEFT)
607
- }
402
+ <FormDropdownMenuTrigger
403
+ className="ml-1 w-10"
404
+ onClick={openFontSizeDropdown}
405
+ open={openFontSizeDropdownPropsOpen}
608
406
  >
609
- <DataCubeIcon.TextAlignLeft />
610
- </button>
611
- <button
612
- title="Align Center"
613
- className={cn(
614
- 'relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]',
615
- {
616
- 'bg-neutral-200':
617
- configuration.textAlign ===
618
- DataCubeFontTextAlignment.CENTER,
619
- },
620
- )}
621
- onClick={() =>
622
- configuration.setTextAlign(DataCubeFontTextAlignment.CENTER)
623
- }
624
- >
625
- <DataCubeIcon.TextAlignCenter />
626
- </button>
627
- <button
628
- title="Align Right"
629
- className={cn(
630
- 'relative -ml-[1px] flex h-5 w-5 items-center justify-center rounded-br-sm rounded-tr-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus-visible:z-[1]',
631
- {
632
- 'bg-neutral-200':
633
- configuration.textAlign ===
634
- DataCubeFontTextAlignment.RIGHT,
635
- },
636
- )}
637
- onClick={() =>
638
- configuration.setTextAlign(DataCubeFontTextAlignment.RIGHT)
639
- }
640
- >
641
- <DataCubeIcon.TextAlignRight />
642
- </button>
643
- </div>
644
- </div>
407
+ {configuration.fontSize}
408
+ </FormDropdownMenuTrigger>
409
+ <FormDropdownMenu className="w-10" {...openFontSizeDropdownProps}>
410
+ {[
411
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28,
412
+ 32, 36, 48, 72,
413
+ ].map((size) => (
414
+ <FormDropdownMenuItem
415
+ key={size}
416
+ onClick={() => {
417
+ configuration.setFontSize(size);
418
+ closeFontSizeDropdown();
419
+ }}
420
+ autoFocus={size === configuration.fontSize}
421
+ >
422
+ {size}
423
+ </FormDropdownMenuItem>
424
+ ))}
425
+ </FormDropdownMenu>
645
426
 
646
- <div className="mt-2 flex w-full">
647
- <div className="flex h-6 w-32 flex-shrink-0 items-center text-sm">
648
- Default Colors:
649
- </div>
650
- <div className="h-18">
651
- <div className="flex h-6">
652
- <div className="w-16 flex-shrink-0" />
653
- <div className="flex h-full w-12 flex-shrink-0 items-center justify-center text-sm">
654
- Normal
655
- </div>
656
- <div className="flex h-full w-12 flex-shrink-0 items-center justify-center text-sm">
657
- Negative
658
- </div>
659
- <div className="flex h-full w-12 flex-shrink-0 items-center justify-center text-sm">
660
- Zero
661
- </div>
662
- <div className="flex h-full w-12 flex-shrink-0 items-center justify-center text-sm">
663
- Error
664
- </div>
665
- </div>
666
- <div className="flex h-6">
667
- <div className="flex h-full w-16 flex-shrink-0 items-center text-sm">
668
- Foreground:
669
- </div>
670
- <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
671
- <FormColorPickerButton
672
- color={configuration.normalForegroundColor}
673
- defaultColor={DEFAULT_FOREGROUND_COLOR}
674
- onChange={(value) =>
675
- configuration.setNormalForegroundColor(value)
676
- }
677
- />
678
- </div>
679
- <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
680
- <FormColorPickerButton
681
- color={configuration.negativeForegroundColor}
682
- defaultColor={DEFAULT_NEGATIVE_FOREGROUND_COLOR}
683
- onChange={(value) =>
684
- configuration.setNegativeForegroundColor(value)
685
- }
686
- />
687
- </div>
688
- <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
689
- <FormColorPickerButton
690
- color={configuration.zeroForegroundColor}
691
- defaultColor={DEFAULT_ZERO_FOREGROUND_COLOR}
692
- onChange={(value) =>
693
- configuration.setZeroForegroundColor(value)
427
+ <div className="relative ml-2 flex h-5">
428
+ <button
429
+ title="Bold"
430
+ className={cn(
431
+ 'relative flex h-5 w-5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]',
432
+ {
433
+ 'bg-neutral-200': configuration.fontBold,
434
+ },
435
+ )}
436
+ onClick={() =>
437
+ configuration.setFontBold(!configuration.fontBold)
438
+ }
439
+ >
440
+ <DataCubeIcon.FontBold />
441
+ </button>
442
+ <button
443
+ title="Italic"
444
+ className={cn(
445
+ 'relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]',
446
+ {
447
+ 'bg-neutral-200': configuration.fontItalic,
448
+ },
449
+ )}
450
+ onClick={() =>
451
+ configuration.setFontItalic(!configuration.fontItalic)
452
+ }
453
+ >
454
+ <DataCubeIcon.FontItalic />
455
+ </button>
456
+ <button
457
+ title={`Underline${configuration.fontUnderline ? ` (${configuration.fontUnderline})` : ''}`}
458
+ className={cn(
459
+ 'relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-r-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]',
460
+ {
461
+ 'bg-neutral-200':
462
+ configuration.fontUnderline !== undefined,
463
+ },
464
+ )}
465
+ onClick={() => {
466
+ if (configuration.fontUnderline === undefined) {
467
+ configuration.setFontUnderline(
468
+ DataCubeFontFormatUnderlineVariant.SOLID,
469
+ );
470
+ configuration.setFontStrikethrough(false);
471
+ } else {
472
+ configuration.setFontUnderline(undefined);
694
473
  }
474
+ }}
475
+ >
476
+ <DataCubeIcon.FontUnderline />
477
+ </button>
478
+ <button
479
+ className="text-2xs relative -ml-[1px] flex h-5 w-2.5 items-center justify-center border border-l-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-600 focus:z-[1]"
480
+ onClick={openFontFormatUnderlineVariantDropdown}
481
+ >
482
+ <div
483
+ className={cn('h-4 w-[0.5px] bg-neutral-200', {
484
+ 'opacity-0': configuration.fontUnderline !== undefined,
485
+ })}
695
486
  />
696
- </div>
697
- <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
698
- <FormColorPickerButton
699
- color={configuration.errorForegroundColor}
700
- defaultColor={DEFAULT_ERROR_FOREGROUND_COLOR}
701
- onChange={(value) =>
702
- configuration.setErrorForegroundColor(value)
487
+ <DataCubeIcon.CaretDown />
488
+ </button>
489
+ <FormDropdownMenu
490
+ className="w-14"
491
+ {...fontFormatUnderlineVariantDropdownProps}
492
+ >
493
+ {[
494
+ DataCubeFontFormatUnderlineVariant.SOLID,
495
+ DataCubeFontFormatUnderlineVariant.DASHED,
496
+ DataCubeFontFormatUnderlineVariant.DOTTED,
497
+ DataCubeFontFormatUnderlineVariant.DOUBLE,
498
+ DataCubeFontFormatUnderlineVariant.WAVY,
499
+ ].map((variant) => (
500
+ <FormDropdownMenuItem
501
+ className="relative"
502
+ key={variant}
503
+ onClick={() => {
504
+ configuration.setFontUnderline(variant);
505
+ configuration.setFontStrikethrough(false);
506
+ closeFontFormatUnderlineVariantDropdown();
507
+ }}
508
+ autoFocus={variant === configuration.fontUnderline}
509
+ >
510
+ <div
511
+ className={cn(
512
+ '!hover:underline absolute top-0 !underline',
513
+ {
514
+ '!hover:decoration-solid !decoration-solid':
515
+ variant ===
516
+ DataCubeFontFormatUnderlineVariant.SOLID,
517
+ '!hover:decoration-dashed !decoration-dashed':
518
+ variant ===
519
+ DataCubeFontFormatUnderlineVariant.DASHED,
520
+ '!hover:decoration-dotted !decoration-dotted':
521
+ variant ===
522
+ DataCubeFontFormatUnderlineVariant.DOTTED,
523
+ '!hover:decoration-double !decoration-double':
524
+ variant ===
525
+ DataCubeFontFormatUnderlineVariant.DOUBLE,
526
+ '!hover:decoration-wavy !decoration-wavy':
527
+ variant ===
528
+ DataCubeFontFormatUnderlineVariant.WAVY,
529
+ },
530
+ )}
531
+ >
532
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
533
+ </div>
534
+ </FormDropdownMenuItem>
535
+ ))}
536
+ </FormDropdownMenu>
537
+ <button
538
+ title="Strikethrough"
539
+ className={cn(
540
+ 'relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]',
541
+ {
542
+ 'bg-neutral-200': configuration.fontStrikethrough,
543
+ },
544
+ )}
545
+ onClick={() => {
546
+ if (configuration.fontStrikethrough) {
547
+ configuration.setFontStrikethrough(false);
548
+ } else {
549
+ configuration.setFontStrikethrough(true);
550
+ configuration.setFontUnderline(undefined);
703
551
  }
552
+ }}
553
+ >
554
+ <DataCubeIcon.FontStrikethrough />
555
+ </button>
556
+ <button
557
+ title={`Case${configuration.fontCase ? ` (${configuration.fontCase})` : ''}`}
558
+ className={cn(
559
+ 'relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-r-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]',
560
+ {
561
+ 'bg-neutral-200': configuration.fontCase !== undefined,
562
+ },
563
+ )}
564
+ onClick={() => {
565
+ configuration.setFontCase(
566
+ configuration.fontCase === undefined
567
+ ? DataCubeFontCase.UPPERCASE
568
+ : undefined,
569
+ );
570
+ }}
571
+ >
572
+ <DataCubeIcon.FontCase className="stroke-[0.5px]" />
573
+ </button>
574
+ <button
575
+ className="text-2xs relative -ml-[1px] flex h-5 w-2.5 items-center justify-center rounded-br-sm rounded-tr-sm border border-l-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-600 focus:z-[1]"
576
+ onClick={openFontCaseDropdown}
577
+ >
578
+ <div
579
+ className={cn('h-4 w-[0.5px] bg-neutral-200', {
580
+ 'opacity-0': configuration.fontCase !== undefined,
581
+ })}
704
582
  />
705
- </div>
583
+ <DataCubeIcon.CaretDown />
584
+ </button>
585
+ <FormDropdownMenu className="w-20" {...fontCaseDropdownProps}>
586
+ {[
587
+ DataCubeFontCase.LOWERCASE,
588
+ DataCubeFontCase.UPPERCASE,
589
+ DataCubeFontCase.CAPITALIZE,
590
+ ].map((fontCase) => (
591
+ <FormDropdownMenuItem
592
+ key={fontCase}
593
+ onClick={() => {
594
+ configuration.setFontCase(fontCase);
595
+ closeFontCaseDropdown();
596
+ }}
597
+ autoFocus={fontCase === configuration.fontCase}
598
+ >
599
+ <div
600
+ className={cn({
601
+ lowercase: fontCase === DataCubeFontCase.LOWERCASE,
602
+ uppercase: fontCase === DataCubeFontCase.UPPERCASE,
603
+ capitalize: fontCase === DataCubeFontCase.CAPITALIZE,
604
+ })}
605
+ >
606
+ {fontCase}
607
+ </div>
608
+ </FormDropdownMenuItem>
609
+ ))}
610
+ </FormDropdownMenu>
706
611
  </div>
707
- <div className="flex h-6">
708
- <div className="flex h-full w-16 flex-shrink-0 items-center text-sm">
709
- Background:
710
- </div>
711
- <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
712
- <FormColorPickerButton
713
- color={configuration.normalBackgroundColor}
714
- defaultColor={DEFAULT_BACKGROUND_COLOR}
715
- onChange={(value) =>
716
- configuration.setNormalBackgroundColor(value)
717
- }
718
- />
719
- </div>
720
- <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
721
- <FormColorPickerButton
722
- color={configuration.negativeBackgroundColor}
723
- defaultColor={DEFAULT_BACKGROUND_COLOR}
724
- onChange={(value) =>
725
- configuration.setNegativeBackgroundColor(value)
726
- }
727
- />
612
+
613
+ <div className="relative ml-2 flex h-5">
614
+ <button
615
+ title="Align Left"
616
+ className={cn(
617
+ 'relative flex h-5 w-5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]',
618
+ {
619
+ 'bg-neutral-200':
620
+ configuration.textAlign ===
621
+ DataCubeFontTextAlignment.LEFT,
622
+ },
623
+ )}
624
+ onClick={() =>
625
+ configuration.setTextAlign(DataCubeFontTextAlignment.LEFT)
626
+ }
627
+ >
628
+ <DataCubeIcon.TextAlignLeft />
629
+ </button>
630
+ <button
631
+ title="Align Center"
632
+ className={cn(
633
+ 'relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]',
634
+ {
635
+ 'bg-neutral-200':
636
+ configuration.textAlign ===
637
+ DataCubeFontTextAlignment.CENTER,
638
+ },
639
+ )}
640
+ onClick={() =>
641
+ configuration.setTextAlign(DataCubeFontTextAlignment.CENTER)
642
+ }
643
+ >
644
+ <DataCubeIcon.TextAlignCenter />
645
+ </button>
646
+ <button
647
+ title="Align Right"
648
+ className={cn(
649
+ 'relative -ml-[1px] flex h-5 w-5 items-center justify-center rounded-br-sm rounded-tr-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]',
650
+ {
651
+ 'bg-neutral-200':
652
+ configuration.textAlign ===
653
+ DataCubeFontTextAlignment.RIGHT,
654
+ },
655
+ )}
656
+ onClick={() =>
657
+ configuration.setTextAlign(DataCubeFontTextAlignment.RIGHT)
658
+ }
659
+ >
660
+ <DataCubeIcon.TextAlignRight />
661
+ </button>
662
+ </div>
663
+ </div>
664
+
665
+ <div className="mt-2 flex w-full">
666
+ <div className="flex h-6 w-32 flex-shrink-0 items-center text-sm">
667
+ Default Colors:
668
+ </div>
669
+ <div className="h-18">
670
+ <div className="flex h-6">
671
+ <div className="w-16 flex-shrink-0" />
672
+ <div className="flex h-full w-12 flex-shrink-0 items-center justify-center text-sm">
673
+ Normal
674
+ </div>
675
+ <div className="flex h-full w-12 flex-shrink-0 items-center justify-center text-sm">
676
+ Negative
677
+ </div>
678
+ <div className="flex h-full w-12 flex-shrink-0 items-center justify-center text-sm">
679
+ Zero
680
+ </div>
681
+ <div className="flex h-full w-12 flex-shrink-0 items-center justify-center text-sm">
682
+ Error
683
+ </div>
728
684
  </div>
729
- <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
730
- <FormColorPickerButton
731
- color={configuration.zeroBackgroundColor}
732
- defaultColor={DEFAULT_BACKGROUND_COLOR}
733
- onChange={(value) =>
734
- configuration.setZeroBackgroundColor(value)
735
- }
736
- />
685
+ <div className="flex h-6">
686
+ <div className="flex h-full w-16 flex-shrink-0 items-center text-sm">
687
+ Foreground:
688
+ </div>
689
+ <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
690
+ <FormColorPickerButton
691
+ color={configuration.normalForegroundColor}
692
+ defaultColor={DEFAULT_FOREGROUND_COLOR}
693
+ onChange={(value) =>
694
+ configuration.setNormalForegroundColor(value)
695
+ }
696
+ />
697
+ </div>
698
+ <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
699
+ <FormColorPickerButton
700
+ color={configuration.negativeForegroundColor}
701
+ defaultColor={DEFAULT_NEGATIVE_FOREGROUND_COLOR}
702
+ onChange={(value) =>
703
+ configuration.setNegativeForegroundColor(value)
704
+ }
705
+ />
706
+ </div>
707
+ <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
708
+ <FormColorPickerButton
709
+ color={configuration.zeroForegroundColor}
710
+ defaultColor={DEFAULT_ZERO_FOREGROUND_COLOR}
711
+ onChange={(value) =>
712
+ configuration.setZeroForegroundColor(value)
713
+ }
714
+ />
715
+ </div>
716
+ <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
717
+ <FormColorPickerButton
718
+ color={configuration.errorForegroundColor}
719
+ defaultColor={DEFAULT_ERROR_FOREGROUND_COLOR}
720
+ onChange={(value) =>
721
+ configuration.setErrorForegroundColor(value)
722
+ }
723
+ />
724
+ </div>
737
725
  </div>
738
- <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
739
- <FormColorPickerButton
740
- color={configuration.errorBackgroundColor}
741
- defaultColor={DEFAULT_BACKGROUND_COLOR}
742
- onChange={(value) =>
743
- configuration.setErrorBackgroundColor(value)
744
- }
745
- />
726
+ <div className="flex h-6">
727
+ <div className="flex h-full w-16 flex-shrink-0 items-center text-sm">
728
+ Background:
729
+ </div>
730
+ <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
731
+ <FormColorPickerButton
732
+ color={configuration.normalBackgroundColor}
733
+ defaultColor={DEFAULT_BACKGROUND_COLOR}
734
+ onChange={(value) =>
735
+ configuration.setNormalBackgroundColor(value)
736
+ }
737
+ />
738
+ </div>
739
+ <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
740
+ <FormColorPickerButton
741
+ color={configuration.negativeBackgroundColor}
742
+ defaultColor={DEFAULT_BACKGROUND_COLOR}
743
+ onChange={(value) =>
744
+ configuration.setNegativeBackgroundColor(value)
745
+ }
746
+ />
747
+ </div>
748
+ <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
749
+ <FormColorPickerButton
750
+ color={configuration.zeroBackgroundColor}
751
+ defaultColor={DEFAULT_BACKGROUND_COLOR}
752
+ onChange={(value) =>
753
+ configuration.setZeroBackgroundColor(value)
754
+ }
755
+ />
756
+ </div>
757
+ <div className="flex h-full w-12 flex-shrink-0 items-center justify-center">
758
+ <FormColorPickerButton
759
+ color={configuration.errorBackgroundColor}
760
+ defaultColor={DEFAULT_BACKGROUND_COLOR}
761
+ onChange={(value) =>
762
+ configuration.setErrorBackgroundColor(value)
763
+ }
764
+ />
765
+ </div>
746
766
  </div>
747
767
  </div>
748
768
  </div>
749
- </div>
750
769
 
751
- <div className="mt-2 flex w-full">
752
- <div className="flex h-6 w-32 flex-shrink-0 items-center text-sm" />
753
- <div className="w-80">
754
- <div className="mb-2 h-[1px] w-full bg-neutral-200" />
755
- <button
756
- className="flex h-5 items-center justify-center rounded-sm border border-neutral-400 bg-neutral-200 p-0 px-1 text-sm text-neutral-700 disabled:text-neutral-400"
757
- disabled={configuration.isUsingDefaultStyling}
758
- onClick={() => configuration.useDefaultStyling()}
759
- >
760
- Use Default Styling
761
- </button>
770
+ <div className="mt-2 flex w-full">
771
+ <div className="flex h-6 w-32 flex-shrink-0 items-center text-sm" />
772
+ <div className="w-80">
773
+ <div className="mb-2 h-[1px] w-full bg-neutral-200" />
774
+ <button
775
+ className="flex h-5 items-center justify-center rounded-sm border border-neutral-400 bg-neutral-200 p-0 px-1 text-sm text-neutral-700 disabled:text-neutral-400"
776
+ disabled={configuration.isUsingDefaultStyling}
777
+ onClick={() => configuration.useDefaultStyling()}
778
+ >
779
+ Use Default Styling
780
+ </button>
781
+ </div>
762
782
  </div>
763
783
  </div>
764
784
  </div>
765
785
  </div>
766
- </div>
767
- );
768
- });
786
+ );
787
+ },
788
+ );