@finos/legend-data-cube 0.0.7 → 0.0.8

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 (556) hide show
  1. package/lib/__lib__/DataCubeDocumentation.d.ts.map +1 -0
  2. package/lib/__lib__/DataCubeDocumentation.js.map +1 -0
  3. package/lib/components/DataCube.d.ts.map +1 -1
  4. package/lib/components/DataCube.js +4 -4
  5. package/lib/components/DataCube.js.map +1 -1
  6. package/lib/components/DataCubeProvider.d.ts +2 -2
  7. package/lib/components/DataCubeProvider.d.ts.map +1 -1
  8. package/lib/components/core/DataCubeAlert.d.ts.map +1 -0
  9. package/lib/components/core/DataCubeAlert.js.map +1 -0
  10. package/lib/components/core/DataCubeCodeCheckErrorAlert.d.ts +24 -0
  11. package/lib/components/core/DataCubeCodeCheckErrorAlert.d.ts.map +1 -0
  12. package/lib/components/core/DataCubeCodeCheckErrorAlert.js +78 -0
  13. package/lib/components/core/DataCubeCodeCheckErrorAlert.js.map +1 -0
  14. package/lib/components/core/DataCubeDocumentationPanel.d.ts.map +1 -0
  15. package/lib/components/core/DataCubeDocumentationPanel.js.map +1 -0
  16. package/lib/components/core/DataCubeFormUtils.d.ts.map +1 -0
  17. package/lib/components/core/DataCubeFormUtils.js.map +1 -0
  18. package/lib/components/{application → core}/DataCubeLayoutManager.d.ts +1 -1
  19. package/lib/components/core/DataCubeLayoutManager.d.ts.map +1 -0
  20. package/lib/components/{application → core}/DataCubeLayoutManager.js +1 -1
  21. package/lib/components/core/DataCubeLayoutManager.js.map +1 -0
  22. package/lib/components/{shared → core}/DataCubePureCodeEditorUtils.d.ts +2 -2
  23. package/lib/components/core/DataCubePureCodeEditorUtils.d.ts.map +1 -0
  24. package/lib/components/{shared → core}/DataCubePureCodeEditorUtils.js +2 -2
  25. package/lib/components/core/DataCubePureCodeEditorUtils.js.map +1 -0
  26. package/lib/components/core/DataCubeSettingsPanel.d.ts.map +1 -0
  27. package/lib/components/{application → core}/DataCubeSettingsPanel.js +3 -6
  28. package/lib/components/core/DataCubeSettingsPanel.js.map +1 -0
  29. package/lib/components/{editor → view/editor}/DataCubeEditor.d.ts +1 -1
  30. package/lib/components/view/editor/DataCubeEditor.d.ts.map +1 -0
  31. package/lib/components/{editor → view/editor}/DataCubeEditor.js +1 -1
  32. package/lib/components/view/editor/DataCubeEditor.js.map +1 -0
  33. package/lib/components/{editor → view/editor}/DataCubeEditorColumnPropertiesPanel.d.ts +1 -1
  34. package/lib/components/view/editor/DataCubeEditorColumnPropertiesPanel.d.ts.map +1 -0
  35. package/lib/components/{editor → view/editor}/DataCubeEditorColumnPropertiesPanel.js +11 -11
  36. package/lib/components/view/editor/DataCubeEditorColumnPropertiesPanel.js.map +1 -0
  37. package/lib/components/{editor/DataCubeEditorColumnsSelector.d.ts → view/editor/DataCubeEditorColumnSelector.d.ts} +6 -6
  38. package/lib/components/view/editor/DataCubeEditorColumnSelector.d.ts.map +1 -0
  39. package/lib/components/{editor/DataCubeEditorColumnsSelector.js → view/editor/DataCubeEditorColumnSelector.js} +4 -4
  40. package/lib/components/view/editor/DataCubeEditorColumnSelector.js.map +1 -0
  41. package/lib/components/{editor → view/editor}/DataCubeEditorColumnsPanel.d.ts +1 -1
  42. package/lib/components/view/editor/DataCubeEditorColumnsPanel.d.ts.map +1 -0
  43. package/lib/components/{editor → view/editor}/DataCubeEditorColumnsPanel.js +4 -4
  44. package/lib/components/view/editor/DataCubeEditorColumnsPanel.js.map +1 -0
  45. package/lib/components/{editor → view/editor}/DataCubeEditorGeneralPropertiesPanel.d.ts +1 -1
  46. package/lib/components/view/editor/DataCubeEditorGeneralPropertiesPanel.d.ts.map +1 -0
  47. package/lib/components/{editor → view/editor}/DataCubeEditorGeneralPropertiesPanel.js +5 -5
  48. package/lib/components/view/editor/DataCubeEditorGeneralPropertiesPanel.js.map +1 -0
  49. package/lib/components/{editor → view/editor}/DataCubeEditorHorizontalPivotsPanel.d.ts +1 -1
  50. package/lib/components/view/editor/DataCubeEditorHorizontalPivotsPanel.d.ts.map +1 -0
  51. package/lib/components/{editor → view/editor}/DataCubeEditorHorizontalPivotsPanel.js +3 -3
  52. package/lib/components/view/editor/DataCubeEditorHorizontalPivotsPanel.js.map +1 -0
  53. package/lib/components/{editor → view/editor}/DataCubeEditorSortsPanel.d.ts +1 -1
  54. package/lib/components/view/editor/DataCubeEditorSortsPanel.d.ts.map +1 -0
  55. package/lib/components/view/editor/DataCubeEditorSortsPanel.js +51 -0
  56. package/lib/components/view/editor/DataCubeEditorSortsPanel.js.map +1 -0
  57. package/lib/components/{editor → view/editor}/DataCubeEditorVerticalPivotsPanel.d.ts +1 -1
  58. package/lib/components/view/editor/DataCubeEditorVerticalPivotsPanel.d.ts.map +1 -0
  59. package/lib/components/{editor → view/editor}/DataCubeEditorVerticalPivotsPanel.js +2 -2
  60. package/lib/components/view/editor/DataCubeEditorVerticalPivotsPanel.js.map +1 -0
  61. package/lib/components/{extend → view/extend}/DataCubeColumnEditor.d.ts +2 -2
  62. package/lib/components/view/extend/DataCubeColumnEditor.d.ts.map +1 -0
  63. package/lib/components/{extend → view/extend}/DataCubeColumnEditor.js +15 -7
  64. package/lib/components/view/extend/DataCubeColumnEditor.js.map +1 -0
  65. package/lib/components/{filter → view/filter}/DataCubeFilterEditor.d.ts +1 -1
  66. package/lib/components/view/filter/DataCubeFilterEditor.d.ts.map +1 -0
  67. package/lib/components/{filter → view/filter}/DataCubeFilterEditor.js +17 -17
  68. package/lib/components/view/filter/DataCubeFilterEditor.js.map +1 -0
  69. package/lib/components/{grid → view/grid}/DataCubeGrid.d.ts +1 -1
  70. package/lib/components/view/grid/DataCubeGrid.d.ts.map +1 -0
  71. package/lib/components/{grid → view/grid}/DataCubeGrid.js +3 -3
  72. package/lib/components/view/grid/DataCubeGrid.js.map +1 -0
  73. package/lib/components/view/grid/DataCubeGridShared.d.ts.map +1 -0
  74. package/lib/components/{grid → view/grid}/DataCubeGridShared.js +1 -1
  75. package/lib/components/view/grid/DataCubeGridShared.js.map +1 -0
  76. package/lib/index.css +2 -2
  77. package/lib/index.css.map +1 -1
  78. package/lib/index.d.ts +5 -5
  79. package/lib/index.d.ts.map +1 -1
  80. package/lib/index.js +5 -5
  81. package/lib/index.js.map +1 -1
  82. package/lib/package.json +1 -1
  83. package/lib/stores/DataCubeState.d.ts +4 -5
  84. package/lib/stores/DataCubeState.d.ts.map +1 -1
  85. package/lib/stores/DataCubeState.js +11 -12
  86. package/lib/stores/DataCubeState.js.map +1 -1
  87. package/lib/stores/{engine → core}/DataCubeApplicationEngine.d.ts +15 -7
  88. package/lib/stores/core/DataCubeApplicationEngine.d.ts.map +1 -0
  89. package/lib/stores/core/DataCubeApplicationEngine.js +94 -0
  90. package/lib/stores/core/DataCubeApplicationEngine.js.map +1 -0
  91. package/lib/stores/core/DataCubeConfiguration.d.ts +3 -0
  92. package/lib/stores/core/DataCubeConfiguration.d.ts.map +1 -1
  93. package/lib/stores/core/DataCubeConfiguration.js +9 -0
  94. package/lib/stores/core/DataCubeConfiguration.js.map +1 -1
  95. package/lib/stores/core/DataCubeConfigurationBuilder.js +4 -4
  96. package/lib/stores/core/DataCubeConfigurationBuilder.js.map +1 -1
  97. package/lib/stores/{engine → core}/DataCubeEngine.d.ts +17 -6
  98. package/lib/stores/core/DataCubeEngine.d.ts.map +1 -0
  99. package/lib/stores/{engine → core}/DataCubeEngine.js +35 -11
  100. package/lib/stores/core/DataCubeEngine.js.map +1 -0
  101. package/lib/stores/core/DataCubeEngineUtils.d.ts +2 -0
  102. package/lib/stores/core/DataCubeEngineUtils.d.ts.map +1 -0
  103. package/lib/stores/core/DataCubeEngineUtils.js +2 -0
  104. package/lib/stores/core/DataCubeEngineUtils.js.map +1 -0
  105. package/lib/stores/core/DataCubeLayoutManagerState.d.ts.map +1 -0
  106. package/lib/stores/core/DataCubeLayoutManagerState.js.map +1 -0
  107. package/lib/stores/core/DataCubeQuery.d.ts.map +1 -0
  108. package/lib/stores/core/DataCubeQuery.js.map +1 -0
  109. package/lib/stores/core/DataCubeQueryBuilder.d.ts +3 -2
  110. package/lib/stores/core/DataCubeQueryBuilder.d.ts.map +1 -1
  111. package/lib/stores/core/DataCubeQueryBuilder.js +25 -26
  112. package/lib/stores/core/DataCubeQueryBuilder.js.map +1 -1
  113. package/lib/stores/core/DataCubeQueryBuilderUtils.d.ts +3 -2
  114. package/lib/stores/core/DataCubeQueryBuilderUtils.d.ts.map +1 -1
  115. package/lib/stores/core/DataCubeQueryBuilderUtils.js +12 -6
  116. package/lib/stores/core/DataCubeQueryBuilderUtils.js.map +1 -1
  117. package/lib/stores/core/DataCubeQueryEngine.d.ts +5 -7
  118. package/lib/stores/core/DataCubeQueryEngine.d.ts.map +1 -1
  119. package/lib/stores/core/DataCubeQueryEngine.js +32 -37
  120. package/lib/stores/core/DataCubeQueryEngine.js.map +1 -1
  121. package/lib/stores/core/DataCubeQuerySnapshot.d.ts +32 -10
  122. package/lib/stores/core/DataCubeQuerySnapshot.d.ts.map +1 -1
  123. package/lib/stores/core/DataCubeQuerySnapshot.js +42 -4
  124. package/lib/stores/core/DataCubeQuerySnapshot.js.map +1 -1
  125. package/lib/stores/core/DataCubeQuerySnapshotBuilder.d.ts +1 -1
  126. package/lib/stores/core/DataCubeQuerySnapshotBuilder.d.ts.map +1 -1
  127. package/lib/stores/core/DataCubeQuerySnapshotBuilder.js +10 -12
  128. package/lib/stores/core/DataCubeQuerySnapshotBuilder.js.map +1 -1
  129. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.d.ts +2 -1
  130. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.d.ts.map +1 -1
  131. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.js +2 -2
  132. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.js.map +1 -1
  133. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.d.ts +2 -1
  134. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.d.ts.map +1 -1
  135. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.js +2 -2
  136. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.js.map +1 -1
  137. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.d.ts +2 -1
  138. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.d.ts.map +1 -1
  139. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.js +2 -2
  140. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.js.map +1 -1
  141. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.d.ts +2 -1
  142. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.d.ts.map +1 -1
  143. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.js +2 -2
  144. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.js.map +1 -1
  145. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.d.ts +2 -1
  146. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.d.ts.map +1 -1
  147. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.js +2 -2
  148. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.js.map +1 -1
  149. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.d.ts +2 -1
  150. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.d.ts.map +1 -1
  151. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.js +2 -2
  152. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.js.map +1 -1
  153. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.d.ts +2 -1
  154. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.d.ts.map +1 -1
  155. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.js +2 -2
  156. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.js.map +1 -1
  157. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.d.ts +2 -1
  158. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.d.ts.map +1 -1
  159. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.js +2 -2
  160. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.js.map +1 -1
  161. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.d.ts +2 -1
  162. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.d.ts.map +1 -1
  163. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.js +2 -2
  164. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.js.map +1 -1
  165. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.d.ts +2 -1
  166. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.d.ts.map +1 -1
  167. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.js +2 -2
  168. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.js.map +1 -1
  169. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.d.ts +2 -1
  170. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.d.ts.map +1 -1
  171. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.js +2 -2
  172. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.js.map +1 -1
  173. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.d.ts +2 -1
  174. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.d.ts.map +1 -1
  175. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.js +2 -2
  176. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.js.map +1 -1
  177. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.d.ts +2 -1
  178. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.d.ts.map +1 -1
  179. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.js +2 -2
  180. package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.js.map +1 -1
  181. package/lib/stores/core/filter/DataCubeQueryFilterEditorState.js +2 -2
  182. package/lib/stores/core/filter/DataCubeQueryFilterEditorState.js.map +1 -1
  183. package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.d.ts +2 -2
  184. package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.d.ts.map +1 -1
  185. package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.d.ts +2 -2
  186. package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.d.ts.map +1 -1
  187. package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.d.ts +2 -2
  188. package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.d.ts.map +1 -1
  189. package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.d.ts +2 -2
  190. package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.d.ts.map +1 -1
  191. package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.d.ts +2 -2
  192. package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.d.ts.map +1 -1
  193. package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.js +1 -1
  194. package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.js.map +1 -1
  195. package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.d.ts +2 -2
  196. package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.d.ts.map +1 -1
  197. package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.d.ts +2 -2
  198. package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.d.ts.map +1 -1
  199. package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.d.ts +2 -2
  200. package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.d.ts.map +1 -1
  201. package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.d.ts +2 -2
  202. package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.d.ts.map +1 -1
  203. package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.d.ts +2 -2
  204. package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.d.ts.map +1 -1
  205. package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.d.ts +2 -2
  206. package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.d.ts.map +1 -1
  207. package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.d.ts +2 -2
  208. package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.d.ts.map +1 -1
  209. package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.d.ts +2 -2
  210. package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.d.ts.map +1 -1
  211. package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.d.ts +2 -2
  212. package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.d.ts.map +1 -1
  213. package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.d.ts +2 -2
  214. package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.d.ts.map +1 -1
  215. package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.d.ts +2 -2
  216. package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.d.ts.map +1 -1
  217. package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.d.ts +2 -2
  218. package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.d.ts.map +1 -1
  219. package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.d.ts +2 -2
  220. package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.d.ts.map +1 -1
  221. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.d.ts +2 -2
  222. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.d.ts.map +1 -1
  223. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.d.ts +2 -2
  224. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.d.ts.map +1 -1
  225. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.d.ts +2 -2
  226. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.d.ts.map +1 -1
  227. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.d.ts +2 -2
  228. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.d.ts.map +1 -1
  229. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.d.ts +2 -2
  230. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.d.ts.map +1 -1
  231. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.d.ts +2 -2
  232. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.d.ts.map +1 -1
  233. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.d.ts +2 -2
  234. package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.d.ts.map +1 -1
  235. package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.d.ts +2 -2
  236. package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.d.ts.map +1 -1
  237. package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.d.ts +2 -2
  238. package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.d.ts.map +1 -1
  239. package/lib/stores/{core → view}/DataCubeInfoState.d.ts +4 -3
  240. package/lib/stores/view/DataCubeInfoState.d.ts.map +1 -0
  241. package/lib/stores/{core → view}/DataCubeInfoState.js +4 -1
  242. package/lib/stores/view/DataCubeInfoState.js.map +1 -0
  243. package/lib/stores/{core → view}/DataCubeQuerySnapshotManager.d.ts +5 -3
  244. package/lib/stores/view/DataCubeQuerySnapshotManager.d.ts.map +1 -0
  245. package/lib/stores/{core → view}/DataCubeQuerySnapshotManager.js +11 -3
  246. package/lib/stores/view/DataCubeQuerySnapshotManager.js.map +1 -0
  247. package/lib/stores/{DataCubeViewState.d.ts → view/DataCubeViewState.d.ts} +5 -5
  248. package/lib/stores/view/DataCubeViewState.d.ts.map +1 -0
  249. package/lib/stores/{DataCubeViewState.js → view/DataCubeViewState.js} +6 -6
  250. package/lib/stores/view/DataCubeViewState.js.map +1 -0
  251. package/lib/stores/{editor → view/editor}/DataCubeEditorColumnPropertiesPanelState.d.ts +2 -2
  252. package/lib/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.d.ts.map +1 -0
  253. package/lib/stores/{editor → view/editor}/DataCubeEditorColumnPropertiesPanelState.js +1 -1
  254. package/lib/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.js.map +1 -0
  255. package/lib/stores/{editor/DataCubeEditorColumnsSelectorState.d.ts → view/editor/DataCubeEditorColumnSelectorState.d.ts} +5 -5
  256. package/lib/stores/view/editor/DataCubeEditorColumnSelectorState.d.ts.map +1 -0
  257. package/lib/stores/{editor/DataCubeEditorColumnsSelectorState.js → view/editor/DataCubeEditorColumnSelectorState.js} +4 -4
  258. package/lib/stores/view/editor/DataCubeEditorColumnSelectorState.js.map +1 -0
  259. package/lib/stores/{editor → view/editor}/DataCubeEditorColumnsPanelState.d.ts +10 -10
  260. package/lib/stores/view/editor/DataCubeEditorColumnsPanelState.d.ts.map +1 -0
  261. package/lib/stores/{editor → view/editor}/DataCubeEditorColumnsPanelState.js +8 -8
  262. package/lib/stores/view/editor/DataCubeEditorColumnsPanelState.js.map +1 -0
  263. package/lib/stores/{editor → view/editor}/DataCubeEditorGeneralPropertiesPanelState.d.ts +2 -2
  264. package/lib/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.d.ts.map +1 -0
  265. package/lib/stores/{editor → view/editor}/DataCubeEditorGeneralPropertiesPanelState.js +1 -1
  266. package/lib/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.js.map +1 -0
  267. package/lib/stores/{editor → view/editor}/DataCubeEditorHorizontalPivotsPanelState.d.ts +7 -7
  268. package/lib/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.d.ts.map +1 -0
  269. package/lib/stores/{editor → view/editor}/DataCubeEditorHorizontalPivotsPanelState.js +8 -8
  270. package/lib/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.js.map +1 -0
  271. package/lib/stores/{editor → view/editor}/DataCubeEditorMutableConfiguration.d.ts +4 -7
  272. package/lib/stores/view/editor/DataCubeEditorMutableConfiguration.d.ts.map +1 -0
  273. package/lib/stores/{editor → view/editor}/DataCubeEditorMutableConfiguration.js +5 -14
  274. package/lib/stores/view/editor/DataCubeEditorMutableConfiguration.js.map +1 -0
  275. package/lib/stores/{editor → view/editor}/DataCubeEditorPanelState.d.ts +2 -2
  276. package/lib/stores/view/editor/DataCubeEditorPanelState.d.ts.map +1 -0
  277. package/lib/stores/view/editor/DataCubeEditorPanelState.js.map +1 -0
  278. package/lib/stores/{editor → view/editor}/DataCubeEditorPivotLayoutPanelState.d.ts +2 -2
  279. package/lib/stores/view/editor/DataCubeEditorPivotLayoutPanelState.d.ts.map +1 -0
  280. package/lib/stores/{editor → view/editor}/DataCubeEditorPivotLayoutPanelState.js +2 -2
  281. package/lib/stores/view/editor/DataCubeEditorPivotLayoutPanelState.js.map +1 -0
  282. package/lib/stores/{editor → view/editor}/DataCubeEditorSortsPanelState.d.ts +9 -9
  283. package/lib/stores/view/editor/DataCubeEditorSortsPanelState.d.ts.map +1 -0
  284. package/lib/stores/{editor → view/editor}/DataCubeEditorSortsPanelState.js +7 -8
  285. package/lib/stores/view/editor/DataCubeEditorSortsPanelState.js.map +1 -0
  286. package/lib/stores/{editor → view/editor}/DataCubeEditorState.d.ts +4 -3
  287. package/lib/stores/view/editor/DataCubeEditorState.d.ts.map +1 -0
  288. package/lib/stores/{editor → view/editor}/DataCubeEditorState.js +37 -26
  289. package/lib/stores/view/editor/DataCubeEditorState.js.map +1 -0
  290. package/lib/stores/{editor → view/editor}/DataCubeEditorVerticalPivotsPanelState.d.ts +7 -7
  291. package/lib/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.d.ts.map +1 -0
  292. package/lib/stores/{editor → view/editor}/DataCubeEditorVerticalPivotsPanelState.js +8 -8
  293. package/lib/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.js.map +1 -0
  294. package/lib/stores/{extend → view/extend}/DataCubeColumnEditorState.d.ts +35 -10
  295. package/lib/stores/view/extend/DataCubeColumnEditorState.d.ts.map +1 -0
  296. package/lib/stores/{extend → view/extend}/DataCubeColumnEditorState.js +135 -38
  297. package/lib/stores/view/extend/DataCubeColumnEditorState.js.map +1 -0
  298. package/lib/stores/{extend → view/extend}/DataCubeExtendManagerState.d.ts +18 -10
  299. package/lib/stores/view/extend/DataCubeExtendManagerState.d.ts.map +1 -0
  300. package/lib/stores/view/extend/DataCubeExtendManagerState.js +305 -0
  301. package/lib/stores/view/extend/DataCubeExtendManagerState.js.map +1 -0
  302. package/lib/stores/{filter → view/filter}/DataCubeFilterEditorState.d.ts +6 -5
  303. package/lib/stores/view/filter/DataCubeFilterEditorState.d.ts.map +1 -0
  304. package/lib/stores/{filter → view/filter}/DataCubeFilterEditorState.js +8 -5
  305. package/lib/stores/view/filter/DataCubeFilterEditorState.js.map +1 -0
  306. package/lib/stores/{grid → view/grid}/DataCubeGridClientEngine.d.ts +2 -2
  307. package/lib/stores/view/grid/DataCubeGridClientEngine.d.ts.map +1 -0
  308. package/lib/stores/{grid → view/grid}/DataCubeGridClientEngine.js +25 -13
  309. package/lib/stores/view/grid/DataCubeGridClientEngine.js.map +1 -0
  310. package/lib/stores/view/grid/DataCubeGridClientExportEngine.d.ts.map +1 -0
  311. package/lib/stores/view/grid/DataCubeGridClientExportEngine.js.map +1 -0
  312. package/lib/stores/{grid → view/grid}/DataCubeGridConfigurationBuilder.d.ts +3 -3
  313. package/lib/stores/view/grid/DataCubeGridConfigurationBuilder.d.ts.map +1 -0
  314. package/lib/stores/{grid → view/grid}/DataCubeGridConfigurationBuilder.js +12 -9
  315. package/lib/stores/view/grid/DataCubeGridConfigurationBuilder.js.map +1 -0
  316. package/lib/stores/{grid → view/grid}/DataCubeGridControllerState.d.ts +9 -9
  317. package/lib/stores/view/grid/DataCubeGridControllerState.d.ts.map +1 -0
  318. package/lib/stores/{grid → view/grid}/DataCubeGridControllerState.js +28 -36
  319. package/lib/stores/view/grid/DataCubeGridControllerState.js.map +1 -0
  320. package/lib/stores/view/grid/DataCubeGridMenuBuilder.d.ts.map +1 -0
  321. package/lib/stores/{grid → view/grid}/DataCubeGridMenuBuilder.js +23 -61
  322. package/lib/stores/view/grid/DataCubeGridMenuBuilder.js.map +1 -0
  323. package/lib/stores/{grid → view/grid}/DataCubeGridQueryBuilder.d.ts +5 -5
  324. package/lib/stores/view/grid/DataCubeGridQueryBuilder.d.ts.map +1 -0
  325. package/lib/stores/{grid → view/grid}/DataCubeGridQueryBuilder.js +41 -9
  326. package/lib/stores/view/grid/DataCubeGridQueryBuilder.js.map +1 -0
  327. package/lib/stores/{grid → view/grid}/DataCubeGridQuerySnapshotBuilder.d.ts +3 -3
  328. package/lib/stores/view/grid/DataCubeGridQuerySnapshotBuilder.d.ts.map +1 -0
  329. package/lib/stores/{grid → view/grid}/DataCubeGridQuerySnapshotBuilder.js +9 -9
  330. package/lib/stores/view/grid/DataCubeGridQuerySnapshotBuilder.js.map +1 -0
  331. package/lib/stores/{grid → view/grid}/DataCubeGridState.d.ts +4 -3
  332. package/lib/stores/view/grid/DataCubeGridState.d.ts.map +1 -0
  333. package/lib/stores/{grid → view/grid}/DataCubeGridState.js +9 -3
  334. package/lib/stores/view/grid/DataCubeGridState.js.map +1 -0
  335. package/package.json +3 -3
  336. package/src/components/DataCube.tsx +6 -5
  337. package/src/components/DataCubeProvider.tsx +2 -2
  338. package/src/components/core/DataCubeCodeCheckErrorAlert.tsx +127 -0
  339. package/src/components/{application → core}/DataCubeLayoutManager.tsx +1 -1
  340. package/src/components/{shared → core}/DataCubePureCodeEditorUtils.tsx +6 -4
  341. package/src/components/{application → core}/DataCubeSettingsPanel.tsx +2 -20
  342. package/src/components/{editor → view/editor}/DataCubeEditor.tsx +2 -2
  343. package/src/components/{editor → view/editor}/DataCubeEditorColumnPropertiesPanel.tsx +23 -23
  344. package/src/components/{editor/DataCubeEditorColumnsSelector.tsx → view/editor/DataCubeEditorColumnSelector.tsx} +14 -14
  345. package/src/components/{editor → view/editor}/DataCubeEditorColumnsPanel.tsx +11 -11
  346. package/src/components/{editor → view/editor}/DataCubeEditorGeneralPropertiesPanel.tsx +11 -11
  347. package/src/components/{editor → view/editor}/DataCubeEditorHorizontalPivotsPanel.tsx +4 -4
  348. package/src/components/{editor → view/editor}/DataCubeEditorSortsPanel.tsx +35 -63
  349. package/src/components/{editor → view/editor}/DataCubeEditorVerticalPivotsPanel.tsx +3 -3
  350. package/src/components/{extend → view/extend}/DataCubeColumnEditor.tsx +34 -7
  351. package/src/components/{filter → view/filter}/DataCubeFilterEditor.tsx +37 -37
  352. package/src/components/{grid → view/grid}/DataCubeGrid.tsx +5 -5
  353. package/src/components/{grid → view/grid}/DataCubeGridShared.tsx +1 -1
  354. package/src/index.tsx +5 -6
  355. package/src/stores/DataCubeState.tsx +12 -14
  356. package/src/stores/{engine → core}/DataCubeApplicationEngine.tsx +108 -28
  357. package/src/stores/core/DataCubeConfiguration.ts +12 -0
  358. package/src/stores/core/DataCubeConfigurationBuilder.ts +4 -4
  359. package/src/stores/{engine → core}/DataCubeEngine.ts +65 -14
  360. package/src/stores/core/DataCubeEngineUtils.ts +0 -0
  361. package/src/stores/core/DataCubeQueryBuilder.ts +28 -44
  362. package/src/stores/core/DataCubeQueryBuilderUtils.ts +20 -7
  363. package/src/stores/core/DataCubeQueryEngine.ts +5 -10
  364. package/src/stores/core/DataCubeQuerySnapshot.ts +65 -17
  365. package/src/stores/core/DataCubeQuerySnapshotBuilder.ts +11 -14
  366. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.tsx +3 -3
  367. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.tsx +3 -3
  368. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__First.tsx +3 -3
  369. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.tsx +3 -3
  370. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.tsx +3 -3
  371. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.tsx +3 -3
  372. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.tsx +3 -3
  373. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.tsx +3 -3
  374. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.tsx +3 -3
  375. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.tsx +3 -3
  376. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.tsx +3 -3
  377. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.tsx +3 -3
  378. package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.tsx +3 -3
  379. package/src/stores/core/filter/DataCubeQueryFilterEditorState.ts +2 -2
  380. package/src/stores/core/filter/DataCubeQueryFilterOperation__Contain.tsx +2 -2
  381. package/src/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.tsx +2 -2
  382. package/src/stores/core/filter/DataCubeQueryFilterOperation__EndWith.tsx +2 -2
  383. package/src/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.tsx +2 -2
  384. package/src/stores/core/filter/DataCubeQueryFilterOperation__Equal.tsx +3 -3
  385. package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.tsx +2 -2
  386. package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.tsx +2 -2
  387. package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.tsx +2 -2
  388. package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.tsx +2 -2
  389. package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.tsx +2 -2
  390. package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.tsx +2 -2
  391. package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.tsx +2 -2
  392. package/src/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.tsx +2 -2
  393. package/src/stores/core/filter/DataCubeQueryFilterOperation__IsNull.tsx +2 -2
  394. package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThan.tsx +2 -2
  395. package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.tsx +2 -2
  396. package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.tsx +2 -2
  397. package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.tsx +2 -2
  398. package/src/stores/core/filter/DataCubeQueryFilterOperation__NotContain.tsx +2 -2
  399. package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.tsx +2 -2
  400. package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.tsx +2 -2
  401. package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.tsx +2 -2
  402. package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.tsx +2 -2
  403. package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.tsx +2 -2
  404. package/src/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.tsx +2 -2
  405. package/src/stores/core/filter/DataCubeQueryFilterOperation__StartWith.tsx +2 -2
  406. package/src/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.tsx +2 -2
  407. package/src/stores/{core → view}/DataCubeInfoState.ts +8 -4
  408. package/src/stores/{core → view}/DataCubeQuerySnapshotManager.ts +28 -11
  409. package/src/stores/{DataCubeViewState.ts → view/DataCubeViewState.ts} +8 -8
  410. package/src/stores/{editor → view/editor}/DataCubeEditorColumnPropertiesPanelState.ts +2 -2
  411. package/src/stores/{editor/DataCubeEditorColumnsSelectorState.ts → view/editor/DataCubeEditorColumnSelectorState.ts} +6 -6
  412. package/src/stores/{editor → view/editor}/DataCubeEditorColumnsPanelState.ts +15 -15
  413. package/src/stores/{editor → view/editor}/DataCubeEditorGeneralPropertiesPanelState.ts +2 -2
  414. package/src/stores/{editor → view/editor}/DataCubeEditorHorizontalPivotsPanelState.ts +14 -14
  415. package/src/stores/{editor → view/editor}/DataCubeEditorMutableConfiguration.ts +5 -17
  416. package/src/stores/{editor → view/editor}/DataCubeEditorPanelState.ts +2 -2
  417. package/src/stores/{editor → view/editor}/DataCubeEditorPivotLayoutPanelState.ts +3 -3
  418. package/src/stores/{editor → view/editor}/DataCubeEditorSortsPanelState.ts +20 -14
  419. package/src/stores/{editor → view/editor}/DataCubeEditorState.tsx +58 -39
  420. package/src/stores/{editor → view/editor}/DataCubeEditorVerticalPivotsPanelState.ts +14 -14
  421. package/src/stores/{extend → view/extend}/DataCubeColumnEditorState.tsx +208 -48
  422. package/src/stores/view/extend/DataCubeExtendManagerState.tsx +470 -0
  423. package/src/stores/{filter → view/filter}/DataCubeFilterEditorState.tsx +11 -7
  424. package/src/stores/{grid → view/grid}/DataCubeGridClientEngine.ts +47 -20
  425. package/src/stores/{grid → view/grid}/DataCubeGridConfigurationBuilder.tsx +18 -13
  426. package/src/stores/{grid → view/grid}/DataCubeGridControllerState.ts +34 -43
  427. package/src/stores/{grid → view/grid}/DataCubeGridMenuBuilder.tsx +24 -62
  428. package/src/stores/{grid → view/grid}/DataCubeGridQueryBuilder.ts +87 -12
  429. package/src/stores/{grid → view/grid}/DataCubeGridQuerySnapshotBuilder.ts +13 -15
  430. package/src/stores/{grid → view/grid}/DataCubeGridState.ts +11 -4
  431. package/tsconfig.json +50 -48
  432. package/lib/application/DataCubeDocumentation.d.ts.map +0 -1
  433. package/lib/application/DataCubeDocumentation.js.map +0 -1
  434. package/lib/components/application/DataCubeAlert.d.ts.map +0 -1
  435. package/lib/components/application/DataCubeAlert.js.map +0 -1
  436. package/lib/components/application/DataCubeDocumentationPanel.d.ts.map +0 -1
  437. package/lib/components/application/DataCubeDocumentationPanel.js.map +0 -1
  438. package/lib/components/application/DataCubeLayoutManager.d.ts.map +0 -1
  439. package/lib/components/application/DataCubeLayoutManager.js.map +0 -1
  440. package/lib/components/application/DataCubeSettingsPanel.d.ts.map +0 -1
  441. package/lib/components/application/DataCubeSettingsPanel.js.map +0 -1
  442. package/lib/components/editor/DataCubeEditor.d.ts.map +0 -1
  443. package/lib/components/editor/DataCubeEditor.js.map +0 -1
  444. package/lib/components/editor/DataCubeEditorColumnPropertiesPanel.d.ts.map +0 -1
  445. package/lib/components/editor/DataCubeEditorColumnPropertiesPanel.js.map +0 -1
  446. package/lib/components/editor/DataCubeEditorColumnsPanel.d.ts.map +0 -1
  447. package/lib/components/editor/DataCubeEditorColumnsPanel.js.map +0 -1
  448. package/lib/components/editor/DataCubeEditorColumnsSelector.d.ts.map +0 -1
  449. package/lib/components/editor/DataCubeEditorColumnsSelector.js.map +0 -1
  450. package/lib/components/editor/DataCubeEditorGeneralPropertiesPanel.d.ts.map +0 -1
  451. package/lib/components/editor/DataCubeEditorGeneralPropertiesPanel.js.map +0 -1
  452. package/lib/components/editor/DataCubeEditorHorizontalPivotsPanel.d.ts.map +0 -1
  453. package/lib/components/editor/DataCubeEditorHorizontalPivotsPanel.js.map +0 -1
  454. package/lib/components/editor/DataCubeEditorSortsPanel.d.ts.map +0 -1
  455. package/lib/components/editor/DataCubeEditorSortsPanel.js +0 -62
  456. package/lib/components/editor/DataCubeEditorSortsPanel.js.map +0 -1
  457. package/lib/components/editor/DataCubeEditorVerticalPivotsPanel.d.ts.map +0 -1
  458. package/lib/components/editor/DataCubeEditorVerticalPivotsPanel.js.map +0 -1
  459. package/lib/components/extend/DataCubeColumnEditor.d.ts.map +0 -1
  460. package/lib/components/extend/DataCubeColumnEditor.js.map +0 -1
  461. package/lib/components/filter/DataCubeFilterEditor.d.ts.map +0 -1
  462. package/lib/components/filter/DataCubeFilterEditor.js.map +0 -1
  463. package/lib/components/grid/DataCubeGrid.d.ts.map +0 -1
  464. package/lib/components/grid/DataCubeGrid.js.map +0 -1
  465. package/lib/components/grid/DataCubeGridShared.d.ts.map +0 -1
  466. package/lib/components/grid/DataCubeGridShared.js.map +0 -1
  467. package/lib/components/shared/DataCubeFormUtils.d.ts.map +0 -1
  468. package/lib/components/shared/DataCubeFormUtils.js.map +0 -1
  469. package/lib/components/shared/DataCubePureCodeEditorUtils.d.ts.map +0 -1
  470. package/lib/components/shared/DataCubePureCodeEditorUtils.js.map +0 -1
  471. package/lib/stores/DataCubeViewState.d.ts.map +0 -1
  472. package/lib/stores/DataCubeViewState.js.map +0 -1
  473. package/lib/stores/core/DataCubeInfoState.d.ts.map +0 -1
  474. package/lib/stores/core/DataCubeInfoState.js.map +0 -1
  475. package/lib/stores/core/DataCubeQuerySnapshotManager.d.ts.map +0 -1
  476. package/lib/stores/core/DataCubeQuerySnapshotManager.js.map +0 -1
  477. package/lib/stores/editor/DataCubeEditorColumnPropertiesPanelState.d.ts.map +0 -1
  478. package/lib/stores/editor/DataCubeEditorColumnPropertiesPanelState.js.map +0 -1
  479. package/lib/stores/editor/DataCubeEditorColumnsPanelState.d.ts.map +0 -1
  480. package/lib/stores/editor/DataCubeEditorColumnsPanelState.js.map +0 -1
  481. package/lib/stores/editor/DataCubeEditorColumnsSelectorState.d.ts.map +0 -1
  482. package/lib/stores/editor/DataCubeEditorColumnsSelectorState.js.map +0 -1
  483. package/lib/stores/editor/DataCubeEditorGeneralPropertiesPanelState.d.ts.map +0 -1
  484. package/lib/stores/editor/DataCubeEditorGeneralPropertiesPanelState.js.map +0 -1
  485. package/lib/stores/editor/DataCubeEditorHorizontalPivotsPanelState.d.ts.map +0 -1
  486. package/lib/stores/editor/DataCubeEditorHorizontalPivotsPanelState.js.map +0 -1
  487. package/lib/stores/editor/DataCubeEditorMutableConfiguration.d.ts.map +0 -1
  488. package/lib/stores/editor/DataCubeEditorMutableConfiguration.js.map +0 -1
  489. package/lib/stores/editor/DataCubeEditorPanelState.d.ts.map +0 -1
  490. package/lib/stores/editor/DataCubeEditorPanelState.js.map +0 -1
  491. package/lib/stores/editor/DataCubeEditorPivotLayoutPanelState.d.ts.map +0 -1
  492. package/lib/stores/editor/DataCubeEditorPivotLayoutPanelState.js.map +0 -1
  493. package/lib/stores/editor/DataCubeEditorSortsPanelState.d.ts.map +0 -1
  494. package/lib/stores/editor/DataCubeEditorSortsPanelState.js.map +0 -1
  495. package/lib/stores/editor/DataCubeEditorState.d.ts.map +0 -1
  496. package/lib/stores/editor/DataCubeEditorState.js.map +0 -1
  497. package/lib/stores/editor/DataCubeEditorVerticalPivotsPanelState.d.ts.map +0 -1
  498. package/lib/stores/editor/DataCubeEditorVerticalPivotsPanelState.js.map +0 -1
  499. package/lib/stores/engine/DataCubeApplicationEngine.d.ts.map +0 -1
  500. package/lib/stores/engine/DataCubeApplicationEngine.js +0 -33
  501. package/lib/stores/engine/DataCubeApplicationEngine.js.map +0 -1
  502. package/lib/stores/engine/DataCubeEngine.d.ts.map +0 -1
  503. package/lib/stores/engine/DataCubeEngine.js.map +0 -1
  504. package/lib/stores/engine/DataCubeLayoutManagerState.d.ts.map +0 -1
  505. package/lib/stores/engine/DataCubeLayoutManagerState.js.map +0 -1
  506. package/lib/stores/engine/DataCubeQuery.d.ts.map +0 -1
  507. package/lib/stores/engine/DataCubeQuery.js.map +0 -1
  508. package/lib/stores/extend/DataCubeColumnEditorState.d.ts.map +0 -1
  509. package/lib/stores/extend/DataCubeColumnEditorState.js.map +0 -1
  510. package/lib/stores/extend/DataCubeExtendManagerState.d.ts.map +0 -1
  511. package/lib/stores/extend/DataCubeExtendManagerState.js +0 -119
  512. package/lib/stores/extend/DataCubeExtendManagerState.js.map +0 -1
  513. package/lib/stores/filter/DataCubeFilterEditorState.d.ts.map +0 -1
  514. package/lib/stores/filter/DataCubeFilterEditorState.js.map +0 -1
  515. package/lib/stores/grid/DataCubeGridClientEngine.d.ts.map +0 -1
  516. package/lib/stores/grid/DataCubeGridClientEngine.js.map +0 -1
  517. package/lib/stores/grid/DataCubeGridClientExportEngine.d.ts.map +0 -1
  518. package/lib/stores/grid/DataCubeGridClientExportEngine.js.map +0 -1
  519. package/lib/stores/grid/DataCubeGridConfigurationBuilder.d.ts.map +0 -1
  520. package/lib/stores/grid/DataCubeGridConfigurationBuilder.js.map +0 -1
  521. package/lib/stores/grid/DataCubeGridControllerState.d.ts.map +0 -1
  522. package/lib/stores/grid/DataCubeGridControllerState.js.map +0 -1
  523. package/lib/stores/grid/DataCubeGridMenuBuilder.d.ts.map +0 -1
  524. package/lib/stores/grid/DataCubeGridMenuBuilder.js.map +0 -1
  525. package/lib/stores/grid/DataCubeGridQueryBuilder.d.ts.map +0 -1
  526. package/lib/stores/grid/DataCubeGridQueryBuilder.js.map +0 -1
  527. package/lib/stores/grid/DataCubeGridQuerySnapshotBuilder.d.ts.map +0 -1
  528. package/lib/stores/grid/DataCubeGridQuerySnapshotBuilder.js.map +0 -1
  529. package/lib/stores/grid/DataCubeGridState.d.ts.map +0 -1
  530. package/lib/stores/grid/DataCubeGridState.js.map +0 -1
  531. package/src/stores/extend/DataCubeExtendManagerState.tsx +0 -175
  532. /package/lib/{application → __lib__}/DataCubeDocumentation.d.ts +0 -0
  533. /package/lib/{application → __lib__}/DataCubeDocumentation.js +0 -0
  534. /package/lib/components/{application → core}/DataCubeAlert.d.ts +0 -0
  535. /package/lib/components/{application → core}/DataCubeAlert.js +0 -0
  536. /package/lib/components/{application → core}/DataCubeDocumentationPanel.d.ts +0 -0
  537. /package/lib/components/{application → core}/DataCubeDocumentationPanel.js +0 -0
  538. /package/lib/components/{shared → core}/DataCubeFormUtils.d.ts +0 -0
  539. /package/lib/components/{shared → core}/DataCubeFormUtils.js +0 -0
  540. /package/lib/components/{application → core}/DataCubeSettingsPanel.d.ts +0 -0
  541. /package/lib/components/{grid → view/grid}/DataCubeGridShared.d.ts +0 -0
  542. /package/lib/stores/{engine → core}/DataCubeLayoutManagerState.d.ts +0 -0
  543. /package/lib/stores/{engine → core}/DataCubeLayoutManagerState.js +0 -0
  544. /package/lib/stores/{engine → core}/DataCubeQuery.d.ts +0 -0
  545. /package/lib/stores/{engine → core}/DataCubeQuery.js +0 -0
  546. /package/lib/stores/{editor → view/editor}/DataCubeEditorPanelState.js +0 -0
  547. /package/lib/stores/{grid → view/grid}/DataCubeGridClientExportEngine.d.ts +0 -0
  548. /package/lib/stores/{grid → view/grid}/DataCubeGridClientExportEngine.js +0 -0
  549. /package/lib/stores/{grid → view/grid}/DataCubeGridMenuBuilder.d.ts +0 -0
  550. /package/src/{application → __lib__}/DataCubeDocumentation.ts +0 -0
  551. /package/src/components/{application → core}/DataCubeAlert.tsx +0 -0
  552. /package/src/components/{application → core}/DataCubeDocumentationPanel.tsx +0 -0
  553. /package/src/components/{shared → core}/DataCubeFormUtils.tsx +0 -0
  554. /package/src/stores/{engine → core}/DataCubeLayoutManagerState.ts +0 -0
  555. /package/src/stores/{engine → core}/DataCubeQuery.ts +0 -0
  556. /package/src/stores/{grid → view/grid}/DataCubeGridClientExportEngine.ts +0 -0
@@ -0,0 +1,470 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { action, computed, makeObservable, observable } from 'mobx';
18
+ import {
19
+ _toCol,
20
+ type DataCubeQuerySnapshot,
21
+ type DataCubeQuerySnapshotColumn,
22
+ type DataCubeQuerySnapshotExtendedColumn,
23
+ } from '../../core/DataCubeQuerySnapshot.js';
24
+ import {
25
+ assertErrorThrown,
26
+ deleteEntry,
27
+ guaranteeNonNullable,
28
+ HttpStatus,
29
+ NetworkClientError,
30
+ noop,
31
+ uniqBy,
32
+ } from '@finos/legend-shared';
33
+ import type { DataCubeViewState } from '../DataCubeViewState.js';
34
+ import { DataCubeQuerySnapshotController } from '../DataCubeQuerySnapshotManager.js';
35
+ import {
36
+ DataCubeConfiguration,
37
+ type DataCubeColumnConfiguration,
38
+ } from '../../core/DataCubeConfiguration.js';
39
+ import {
40
+ DataCubeExistingColumnEditorState,
41
+ DataCubeNewColumnState,
42
+ } from './DataCubeColumnEditorState.js';
43
+ import {
44
+ DataCubeColumnDataType,
45
+ DataCubeColumnKind,
46
+ getDataType,
47
+ } from '../../core/DataCubeQueryEngine.js';
48
+ import { buildDefaultColumnConfiguration } from '../../core/DataCubeConfigurationBuilder.js';
49
+ import { V1_deserializeValueSpecification } from '@finos/legend-graph';
50
+ import type { DataCubeQueryBuilderError } from '../../core/DataCubeEngine.js';
51
+
52
+ class DataCubeQueryExtendedColumnState {
53
+ name: string;
54
+ type: string;
55
+ data: DataCubeQuerySnapshotExtendedColumn;
56
+
57
+ constructor(data: DataCubeQuerySnapshotExtendedColumn) {
58
+ makeObservable(this, {
59
+ name: observable,
60
+ type: observable,
61
+ });
62
+
63
+ this.name = data.name;
64
+ this.type = data.type;
65
+ this.data = data;
66
+ }
67
+ }
68
+
69
+ /**
70
+ * This query editor state backs the form editor for extend columns, i.e. creating new columns.
71
+ */
72
+ export class DataCubeExtendManagerState extends DataCubeQuerySnapshotController {
73
+ columnConfigurations: DataCubeColumnConfiguration[] = [];
74
+ selectColumns: DataCubeQuerySnapshotColumn[] = [];
75
+ sourceColumns: DataCubeQuerySnapshotColumn[] = [];
76
+ horizontalPivotCastColumns: DataCubeQuerySnapshotColumn[] = [];
77
+
78
+ leafExtendedColumns: DataCubeQueryExtendedColumnState[] = [];
79
+ groupExtendedColumns: DataCubeQueryExtendedColumnState[] = [];
80
+
81
+ newColumnEditors: DataCubeNewColumnState[] = [];
82
+ existingColumnEditors: DataCubeExistingColumnEditorState[] = [];
83
+
84
+ constructor(view: DataCubeViewState) {
85
+ super(view);
86
+
87
+ makeObservable(this, {
88
+ sourceColumns: observable.ref,
89
+ horizontalPivotCastColumns: observable.ref,
90
+
91
+ leafExtendedColumns: observable,
92
+ setLeafExtendedColumns: action,
93
+
94
+ groupExtendedColumns: observable,
95
+ setGroupExtendedColumns: action,
96
+
97
+ allColumnNames: computed,
98
+
99
+ addNewColumn: action,
100
+ updateColumn: action,
101
+ deleteColumn: action,
102
+
103
+ applySnapshot: action,
104
+ });
105
+ }
106
+
107
+ setLeafExtendedColumns(val: DataCubeQueryExtendedColumnState[]): void {
108
+ this.leafExtendedColumns = val;
109
+ }
110
+
111
+ setGroupExtendedColumns(val: DataCubeQueryExtendedColumnState[]): void {
112
+ this.groupExtendedColumns = val;
113
+ }
114
+
115
+ get allColumnNames(): string[] {
116
+ return uniqBy(
117
+ [
118
+ ...this.sourceColumns,
119
+ ...this.leafExtendedColumns,
120
+ ...this.groupExtendedColumns,
121
+ ...this.horizontalPivotCastColumns,
122
+ ],
123
+ (col) => col.name,
124
+ ).map((col) => col.name);
125
+ }
126
+
127
+ async openNewColumnEditor(
128
+ referenceColumn?: DataCubeColumnConfiguration | undefined,
129
+ ) {
130
+ const editor = new DataCubeNewColumnState(this, referenceColumn);
131
+ await editor.initialize();
132
+ this.newColumnEditors.push(editor);
133
+ editor.display.open();
134
+ }
135
+
136
+ async openExistingColumnEditor(columnName: string) {
137
+ const existingEditor = this.existingColumnEditors.find(
138
+ (editor) => editor.initialData.name === columnName,
139
+ );
140
+ if (existingEditor) {
141
+ existingEditor.display.open();
142
+ return;
143
+ }
144
+
145
+ if (
146
+ !this.leafExtendedColumns.find((col) => col.name === columnName) &&
147
+ !this.groupExtendedColumns.find((col) => col.name === columnName)
148
+ ) {
149
+ return;
150
+ }
151
+ const editor = new DataCubeExistingColumnEditorState(
152
+ this,
153
+ guaranteeNonNullable(
154
+ this.leafExtendedColumns.find((col) => col.name === columnName) ??
155
+ this.groupExtendedColumns.find((col) => col.name === columnName),
156
+ ).data,
157
+ guaranteeNonNullable(
158
+ this.columnConfigurations.find((col) => col.name === columnName),
159
+ ).kind,
160
+ Boolean(this.groupExtendedColumns.find((col) => col.name === columnName)),
161
+ );
162
+ await editor.initialize();
163
+ this.existingColumnEditors.push(editor);
164
+ editor.display.open();
165
+ }
166
+
167
+ addNewColumn(
168
+ column: DataCubeQuerySnapshotExtendedColumn,
169
+ isGroupLevel: boolean,
170
+ columnKind: DataCubeColumnKind | undefined,
171
+ editor: DataCubeNewColumnState,
172
+ ) {
173
+ const columnConfiguration = buildDefaultColumnConfiguration(column);
174
+ if (columnKind) {
175
+ columnConfiguration.kind = columnKind;
176
+ columnConfiguration.excludedFromPivot =
177
+ columnKind === DataCubeColumnKind.DIMENSION;
178
+ }
179
+ this.columnConfigurations.push(columnConfiguration);
180
+ deleteEntry(this.newColumnEditors, editor);
181
+ if (isGroupLevel) {
182
+ this.groupExtendedColumns.push(
183
+ new DataCubeQueryExtendedColumnState(column),
184
+ );
185
+ } else {
186
+ this.leafExtendedColumns.push(
187
+ new DataCubeQueryExtendedColumnState(column),
188
+ );
189
+ this.selectColumns.push(_toCol(column));
190
+ }
191
+ this.applyChanges();
192
+ }
193
+
194
+ async updateColumn(
195
+ columnName: string,
196
+ updatedColumn: DataCubeQuerySnapshotExtendedColumn,
197
+ isGroupLevel: boolean,
198
+ columnKind: DataCubeColumnKind | undefined,
199
+ ) {
200
+ if (
201
+ !this.leafExtendedColumns.find((col) => col.name === columnName) &&
202
+ !this.groupExtendedColumns.find((col) => col.name === columnName)
203
+ ) {
204
+ return;
205
+ }
206
+
207
+ const columnConfiguration = guaranteeNonNullable(
208
+ this.columnConfigurations.find((col) => col.name === columnName),
209
+ );
210
+
211
+ const task = this.view.newTask('Column update check');
212
+
213
+ const currentSnapshot = guaranteeNonNullable(this.getLatestSnapshot());
214
+ const tempSnapshot = currentSnapshot.clone();
215
+ tempSnapshot.data.leafExtendedColumns =
216
+ tempSnapshot.data.leafExtendedColumns.filter(
217
+ (col) => col.name !== columnName,
218
+ );
219
+ tempSnapshot.data.groupExtendedColumns =
220
+ tempSnapshot.data.groupExtendedColumns.filter(
221
+ (col) => col.name !== columnName,
222
+ );
223
+ tempSnapshot.data.selectColumns = tempSnapshot.data.selectColumns.filter(
224
+ (col) => col.name !== columnName,
225
+ );
226
+ if (isGroupLevel) {
227
+ tempSnapshot.data.groupExtendedColumns.push(updatedColumn);
228
+ } else {
229
+ tempSnapshot.data.leafExtendedColumns.push(updatedColumn);
230
+ if (columnConfiguration.isSelected) {
231
+ tempSnapshot.data.selectColumns.push(_toCol(updatedColumn));
232
+ }
233
+ }
234
+ tempSnapshot.data.configuration = {
235
+ ...tempSnapshot.data.configuration,
236
+ columns: this.columnConfigurations.map((col) => {
237
+ if (col.name === columnName) {
238
+ return {
239
+ ...col.serialize(),
240
+ ..._toCol(updatedColumn),
241
+ kind: columnKind,
242
+ };
243
+ }
244
+ return col.serialize();
245
+ }),
246
+ };
247
+
248
+ const codePrefix = `->`;
249
+ const code = await this.view.engine.getPartialQueryCode(tempSnapshot, true);
250
+ try {
251
+ await this.view.engine.getQueryCodeRelationReturnType(
252
+ codePrefix + code,
253
+ V1_deserializeValueSpecification(tempSnapshot.data.sourceQuery, []),
254
+ );
255
+ } catch (error) {
256
+ assertErrorThrown(error);
257
+ if (
258
+ error instanceof NetworkClientError &&
259
+ error.response.status === HttpStatus.BAD_REQUEST
260
+ ) {
261
+ this.view.application.alertCodeCheckError(
262
+ error.payload as DataCubeQueryBuilderError,
263
+ code,
264
+ codePrefix,
265
+ {
266
+ message: `Column Update Check Failure: Can't safely update column '${columnName}'. Check the query code below for more details.`,
267
+ text: `Error: ${error.message}`,
268
+ },
269
+ );
270
+ } else {
271
+ this.view.application.alertError(error, {
272
+ message: `Column Update Check Failure: Can't safely update column '${columnName}'.`,
273
+ text: `Error: ${error.message}`,
274
+ });
275
+ }
276
+ return;
277
+ } finally {
278
+ this.view.endTask(task);
279
+ }
280
+
281
+ this.setLeafExtendedColumns(
282
+ this.leafExtendedColumns.filter((col) => col.name !== columnName),
283
+ );
284
+ this.setGroupExtendedColumns(
285
+ this.groupExtendedColumns.filter((col) => col.name !== columnName),
286
+ );
287
+ this.selectColumns = this.selectColumns.filter(
288
+ (col) => col.name !== columnName,
289
+ );
290
+ if (isGroupLevel) {
291
+ this.setGroupExtendedColumns([
292
+ ...this.groupExtendedColumns,
293
+ new DataCubeQueryExtendedColumnState(updatedColumn),
294
+ ]);
295
+ } else {
296
+ this.setLeafExtendedColumns([
297
+ ...this.leafExtendedColumns,
298
+ new DataCubeQueryExtendedColumnState(updatedColumn),
299
+ ]);
300
+ if (columnConfiguration.isSelected) {
301
+ this.selectColumns.push(_toCol(updatedColumn));
302
+ }
303
+ }
304
+ this.columnConfigurations = this.columnConfigurations.map((col) => {
305
+ if (col.name === columnName) {
306
+ col.kind =
307
+ (columnKind ??
308
+ getDataType(updatedColumn.type) === DataCubeColumnDataType.NUMBER)
309
+ ? DataCubeColumnKind.MEASURE
310
+ : DataCubeColumnKind.DIMENSION;
311
+ col.name = updatedColumn.name;
312
+ col.type = updatedColumn.type;
313
+ col.excludedFromPivot = col.kind === DataCubeColumnKind.DIMENSION;
314
+ }
315
+ return col;
316
+ });
317
+
318
+ // close and remove editors for the updated column
319
+ const matchingEditors = this.existingColumnEditors.filter(
320
+ (editor) => editor.initialData.name === columnName,
321
+ );
322
+ matchingEditors.forEach((editor) => editor.display.close());
323
+ this.existingColumnEditors = this.existingColumnEditors.filter(
324
+ (editor) => editor.initialData.name !== columnName,
325
+ );
326
+
327
+ this.applyChanges();
328
+ }
329
+
330
+ async deleteColumn(columnName: string) {
331
+ if (
332
+ !this.leafExtendedColumns.find((col) => col.name === columnName) &&
333
+ !this.groupExtendedColumns.find((col) => col.name === columnName)
334
+ ) {
335
+ return;
336
+ }
337
+
338
+ const task = this.view.newTask('Column delete check');
339
+
340
+ const currentSnapshot = guaranteeNonNullable(this.getLatestSnapshot());
341
+ const tempSnapshot = currentSnapshot.clone();
342
+ tempSnapshot.data.leafExtendedColumns =
343
+ tempSnapshot.data.leafExtendedColumns.filter(
344
+ (col) => col.name !== columnName,
345
+ );
346
+ tempSnapshot.data.groupExtendedColumns =
347
+ tempSnapshot.data.groupExtendedColumns.filter(
348
+ (col) => col.name !== columnName,
349
+ );
350
+ tempSnapshot.data.selectColumns = tempSnapshot.data.selectColumns.filter(
351
+ (col) => col.name !== columnName,
352
+ );
353
+ tempSnapshot.data.configuration = {
354
+ ...tempSnapshot.data.configuration,
355
+ columns: this.columnConfigurations
356
+ .filter((col) => col.name !== columnName)
357
+ .map((col) => col.serialize()),
358
+ };
359
+
360
+ const codePrefix = `->`;
361
+ const code = await this.view.engine.getPartialQueryCode(tempSnapshot, true);
362
+ try {
363
+ await this.view.engine.getQueryCodeRelationReturnType(
364
+ codePrefix + code,
365
+ V1_deserializeValueSpecification(tempSnapshot.data.sourceQuery, []),
366
+ );
367
+ } catch (error) {
368
+ assertErrorThrown(error);
369
+ if (
370
+ error instanceof NetworkClientError &&
371
+ error.response.status === HttpStatus.BAD_REQUEST
372
+ ) {
373
+ this.view.application.alertCodeCheckError(
374
+ error.payload as DataCubeQueryBuilderError,
375
+ code,
376
+ codePrefix,
377
+ {
378
+ message: `Column Delete Check Failure: Can't safely delete column '${columnName}'. Check the query code below for more details.`,
379
+ text: `Error: ${error.message}`,
380
+ },
381
+ );
382
+ } else {
383
+ this.view.application.alertError(error, {
384
+ message: `Column Delete Check Failure: Can't safely delete column '${columnName}'.`,
385
+ text: `Error: ${error.message}`,
386
+ });
387
+ }
388
+ return;
389
+ } finally {
390
+ this.view.endTask(task);
391
+ }
392
+
393
+ this.setLeafExtendedColumns(
394
+ this.leafExtendedColumns.filter((col) => col.name !== columnName),
395
+ );
396
+ this.setGroupExtendedColumns(
397
+ this.groupExtendedColumns.filter((col) => col.name !== columnName),
398
+ );
399
+ this.columnConfigurations = this.columnConfigurations.filter(
400
+ (col) => col.name !== columnName,
401
+ );
402
+ this.selectColumns = this.selectColumns.filter(
403
+ (col) => col.name !== columnName,
404
+ );
405
+
406
+ // close and remove editors for the deleted column
407
+ const matchingEditors = this.existingColumnEditors.filter(
408
+ (editor) => editor.initialData.name === columnName,
409
+ );
410
+ matchingEditors.forEach((editor) => editor.display.close());
411
+ this.existingColumnEditors = this.existingColumnEditors.filter(
412
+ (editor) => editor.initialData.name !== columnName,
413
+ );
414
+
415
+ this.applyChanges();
416
+ }
417
+
418
+ override getSnapshotSubscriberName() {
419
+ return 'extend-manager';
420
+ }
421
+
422
+ override async applySnapshot(
423
+ snapshot: DataCubeQuerySnapshot,
424
+ previousSnapshot: DataCubeQuerySnapshot | undefined,
425
+ ): Promise<void> {
426
+ const configuration = DataCubeConfiguration.serialization.fromJson(
427
+ snapshot.data.configuration,
428
+ );
429
+ this.columnConfigurations = configuration.columns;
430
+ this.sourceColumns = snapshot.data.sourceColumns;
431
+ this.leafExtendedColumns = snapshot.data.leafExtendedColumns.map(
432
+ (col) => new DataCubeQueryExtendedColumnState(col),
433
+ );
434
+ this.groupExtendedColumns = snapshot.data.groupExtendedColumns.map(
435
+ (col) => new DataCubeQueryExtendedColumnState(col),
436
+ );
437
+ this.horizontalPivotCastColumns = snapshot.data.pivot?.castColumns ?? [];
438
+ this.selectColumns = snapshot.data.selectColumns.map(_toCol);
439
+
440
+ // trigger re-compile in each existing column editor as the base query has changed
441
+ [...this.newColumnEditors, ...this.existingColumnEditors].forEach(
442
+ (editor) => {
443
+ editor.getReturnType().catch(noop());
444
+ },
445
+ );
446
+ }
447
+
448
+ applyChanges() {
449
+ const baseSnapshot = guaranteeNonNullable(this.getLatestSnapshot());
450
+ const newSnapshot = baseSnapshot.clone();
451
+
452
+ newSnapshot.data.configuration = {
453
+ ...baseSnapshot.data.configuration,
454
+ columns: this.columnConfigurations.map((col) => col.serialize()),
455
+ };
456
+
457
+ newSnapshot.data.leafExtendedColumns = this.leafExtendedColumns.map(
458
+ (col) => col.data,
459
+ );
460
+ newSnapshot.data.groupExtendedColumns = this.groupExtendedColumns.map(
461
+ (col) => col.data,
462
+ );
463
+ newSnapshot.data.selectColumns = [...this.selectColumns];
464
+
465
+ newSnapshot.finalize();
466
+ if (newSnapshot.hashCode !== baseSnapshot.hashCode) {
467
+ this.publishSnapshot(newSnapshot);
468
+ }
469
+ }
470
+ }
@@ -18,8 +18,8 @@ import { action, computed, makeObservable, observable } from 'mobx';
18
18
  import {
19
19
  DataCubeQueryFilterGroupOperator,
20
20
  DataCubeQueryFilterOperator,
21
- } from '../core/DataCubeQueryEngine.js';
22
- import type { DataCubeQuerySnapshot } from '../core/DataCubeQuerySnapshot.js';
21
+ } from '../../core/DataCubeQueryEngine.js';
22
+ import type { DataCubeQuerySnapshot } from '../../core/DataCubeQuerySnapshot.js';
23
23
  import {
24
24
  deepClone,
25
25
  getNonNullableEntry,
@@ -33,14 +33,14 @@ import {
33
33
  DataCubeFilterEditorConditionTreeNode,
34
34
  buildFilterEditorTree,
35
35
  buildFilterQuerySnapshot,
36
- } from '../core/filter/DataCubeQueryFilterEditorState.js';
37
- import { DataCubeQuerySnapshotController } from '../core/DataCubeQuerySnapshotManager.js';
36
+ } from '../../core/filter/DataCubeQueryFilterEditorState.js';
37
+ import { DataCubeQuerySnapshotController } from '../DataCubeQuerySnapshotManager.js';
38
38
  import {
39
39
  DataCubeConfiguration,
40
40
  type DataCubeColumnConfiguration,
41
- } from '../core/DataCubeConfiguration.js';
42
- import type { DisplayState } from '../engine/DataCubeLayoutManagerState.js';
43
- import { DataCubeFilterEditor } from '../../components/filter/DataCubeFilterEditor.js';
41
+ } from '../../core/DataCubeConfiguration.js';
42
+ import type { DisplayState } from '../../core/DataCubeLayoutManagerState.js';
43
+ import { DataCubeFilterEditor } from '../../../components/view/filter/DataCubeFilterEditor.js';
44
44
 
45
45
  /**
46
46
  * This query editor state backs the form editor for filter. It batches changes made
@@ -283,6 +283,10 @@ export class DataCubeFilterEditorState extends DataCubeQuerySnapshotController {
283
283
  }
284
284
  }
285
285
 
286
+ override getSnapshotSubscriberName() {
287
+ return 'filter-editor';
288
+ }
289
+
286
290
  override async applySnapshot(
287
291
  snapshot: DataCubeQuerySnapshot,
288
292
  previousSnapshot: DataCubeQuerySnapshot | undefined,
@@ -30,7 +30,7 @@ import {
30
30
  isNonNullable,
31
31
  pruneObject,
32
32
  } from '@finos/legend-shared';
33
- import { buildExecutableQuery } from '../core/DataCubeQueryBuilder.js';
33
+ import { buildExecutableQuery } from '../../core/DataCubeQueryBuilder.js';
34
34
  import {
35
35
  type TabularDataSet,
36
36
  type V1_AppliedFunction,
@@ -41,19 +41,23 @@ import { makeObservable, observable, runInAction } from 'mobx';
41
41
  import type {
42
42
  DataCubeConfiguration,
43
43
  DataCubeConfigurationColorKey,
44
- } from '../core/DataCubeConfiguration.js';
45
- import { DEFAULT_LARGE_ALERT_WINDOW_CONFIG } from '../engine/DataCubeLayoutManagerState.js';
44
+ } from '../../core/DataCubeConfiguration.js';
45
+ import { DEFAULT_LARGE_ALERT_WINDOW_CONFIG } from '../../core/DataCubeLayoutManagerState.js';
46
46
  import {
47
47
  _sortByColName,
48
48
  type DataCubeQuerySnapshot,
49
49
  type DataCubeQuerySnapshotData,
50
- } from '../core/DataCubeQuerySnapshot.js';
51
- import type { DataCubeEngine } from '../engine/DataCubeEngine.js';
52
- import { type DataCubeQueryFunctionMap } from '../core/DataCubeQueryEngine.js';
53
- import type { DataCubeQueryFilterOperation } from '../core/filter/DataCubeQueryFilterOperation.js';
54
- import type { DataCubeQueryAggregateOperation } from '../core/aggregation/DataCubeQueryAggregateOperation.js';
50
+ } from '../../core/DataCubeQuerySnapshot.js';
51
+ import type { DataCubeEngine } from '../../core/DataCubeEngine.js';
52
+ import {
53
+ isPivotResultColumnName,
54
+ type DataCubeQueryFunctionMap,
55
+ } from '../../core/DataCubeQueryEngine.js';
56
+ import type { DataCubeQueryFilterOperation } from '../../core/filter/DataCubeQueryFilterOperation.js';
57
+ import type { DataCubeQueryAggregateOperation } from '../../core/aggregation/DataCubeQueryAggregateOperation.js';
55
58
  import { buildQuerySnapshot } from './DataCubeGridQuerySnapshotBuilder.js';
56
- import { AlertType } from '../../components/application/DataCubeAlert.js';
59
+ import { AlertType } from '../../../components/core/DataCubeAlert.js';
60
+ import { sum } from 'mathjs';
57
61
 
58
62
  type GridClientCellValue = string | number | boolean | null | undefined;
59
63
  type GridClientRowData = {
@@ -212,10 +216,13 @@ export function computeHashCodeForDataFetchManualTrigger(
212
216
  );
213
217
  }
214
218
 
215
- function TDStoRowData(tds: TabularDataSet): GridClientRowData[] {
216
- return tds.rows.map((_row, rowIdx) => {
219
+ function buildRowData(
220
+ result: TabularDataSet,
221
+ snapshot: DataCubeQuerySnapshot,
222
+ ): GridClientRowData[] {
223
+ return result.rows.map((_row, rowIdx) => {
217
224
  const row: GridClientRowData = {};
218
- const cols = tds.columns;
225
+ const cols = result.columns;
219
226
  _row.values.forEach((value, colIdx) => {
220
227
  // `ag-grid` shows `false` value as empty string so we have
221
228
  // call `.toString()` to avoid this behavior.
@@ -224,6 +231,21 @@ function TDStoRowData(tds: TabularDataSet): GridClientRowData[] {
224
231
  : isNonNullable(value)
225
232
  ? value
226
233
  : INTERNAL__GRID_CLIENT_MISSING_VALUE;
234
+ if (snapshot.data.pivot && snapshot.data.groupBy) {
235
+ row[INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID] = Number(
236
+ sum(
237
+ result.columns
238
+ .filter(
239
+ (col) =>
240
+ isPivotResultColumnName(col) &&
241
+ col.endsWith(
242
+ INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID,
243
+ ),
244
+ )
245
+ .map((col) => (row[col] as number | undefined) ?? 0),
246
+ ).toString(),
247
+ );
248
+ }
227
249
  });
228
250
  return row;
229
251
  });
@@ -359,9 +381,11 @@ export class DataCubeGridClientServerSideDataSource
359
381
 
360
382
  newSnapshot.finalize();
361
383
  if (newSnapshot.hashCode !== currentSnapshot.hashCode) {
362
- // NOTE: if we mess up the computation of the snapshot, we run the risk
363
- // of triggering an infinite loop, by keep updating the grid options
364
- // so we need to be careful here when making this call!
384
+ // NOTE: we need to be careful with the computation of the snapshot
385
+ // here since we run the risk of triggering an multiple data-fetches,
386
+ // as applying snapshot to grid state could potentially update the grid
387
+ // options and set SSRM filter model.
388
+ newSnapshot.markAsPatchChange();
365
389
  await this.grid.applySnapshot(newSnapshot, currentSnapshot);
366
390
  this.grid.publishSnapshot(newSnapshot);
367
391
  }
@@ -393,14 +417,17 @@ export class DataCubeGridClientServerSideDataSource
393
417
  const lambda = new V1_Lambda();
394
418
  lambda.body.push(executableQuery);
395
419
  const result = await this.grid.view.engine.executeQuery(lambda);
396
- const rowData = TDStoRowData(result.result.result);
420
+ const rowData = buildRowData(result.result.result, newSnapshot);
397
421
  if (this.grid.view.engine.enableDebugMode) {
398
422
  this.grid.view.application.debugProcess(
399
423
  `Execution`,
400
- `\nQuery: ${result.executedQuery}`,
401
- `\nConfig: pagination=${this.grid.isPaginationEnabled}`,
402
- `\nStats: ${rowData.length} rows, ${result.result.result.columns.length} columns`,
403
- `\nSQL: ${result.executedSQL}`,
424
+ ['Query', result.executedQuery],
425
+ ['Config', `pagination=${this.grid.isPaginationEnabled}`],
426
+ [
427
+ 'Stats',
428
+ `${rowData.length} rows, ${result.result.result.columns.length} columns`,
429
+ ],
430
+ ['SQL', result.executedSQL],
404
431
  );
405
432
  }
406
433