@finos/legend-cube-builder 0.0.0-stage → 0.0.3

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 (379) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +64 -2
  3. package/docs/adding-an-operation.md +92 -0
  4. package/docs/hosting.md +79 -0
  5. package/docs/testing.md +83 -0
  6. package/lib/__lib__/LegendCubeCommand.d.ts +26 -0
  7. package/lib/__lib__/LegendCubeCommand.d.ts.map +1 -0
  8. package/lib/__lib__/LegendCubeCommand.js +40 -0
  9. package/lib/__lib__/LegendCubeCommand.js.map +1 -0
  10. package/lib/__lib__/LegendCubeHelpText.d.ts +19 -0
  11. package/lib/__lib__/LegendCubeHelpText.d.ts.map +1 -0
  12. package/lib/__lib__/LegendCubeHelpText.js +35 -0
  13. package/lib/__lib__/LegendCubeHelpText.js.map +1 -0
  14. package/lib/__lib__/LegendCubeLabels.d.ts +87 -0
  15. package/lib/__lib__/LegendCubeLabels.d.ts.map +1 -0
  16. package/lib/__lib__/LegendCubeLabels.js +128 -0
  17. package/lib/__lib__/LegendCubeLabels.js.map +1 -0
  18. package/lib/__lib__/LegendCubeTesting.d.ts +33 -0
  19. package/lib/__lib__/LegendCubeTesting.d.ts.map +1 -0
  20. package/lib/__lib__/LegendCubeTesting.js +34 -0
  21. package/lib/__lib__/LegendCubeTesting.js.map +1 -0
  22. package/lib/__test-utils__/CubeCanvasTestUtils.d.ts +24 -0
  23. package/lib/__test-utils__/CubeCanvasTestUtils.d.ts.map +1 -0
  24. package/lib/__test-utils__/CubeCanvasTestUtils.js +37 -0
  25. package/lib/__test-utils__/CubeCanvasTestUtils.js.map +1 -0
  26. package/lib/__test-utils__/CubeEngineTestSupport.d.ts +47 -0
  27. package/lib/__test-utils__/CubeEngineTestSupport.d.ts.map +1 -0
  28. package/lib/__test-utils__/CubeEngineTestSupport.js +106 -0
  29. package/lib/__test-utils__/CubeEngineTestSupport.js.map +1 -0
  30. package/lib/__test-utils__/CubeNorthwindTestQueries.d.ts +31 -0
  31. package/lib/__test-utils__/CubeNorthwindTestQueries.d.ts.map +1 -0
  32. package/lib/__test-utils__/CubeNorthwindTestQueries.js +102 -0
  33. package/lib/__test-utils__/CubeNorthwindTestQueries.js.map +1 -0
  34. package/lib/__test-utils__/CubeOperationsTestUtils.d.ts +42 -0
  35. package/lib/__test-utils__/CubeOperationsTestUtils.d.ts.map +1 -0
  36. package/lib/__test-utils__/CubeOperationsTestUtils.js +92 -0
  37. package/lib/__test-utils__/CubeOperationsTestUtils.js.map +1 -0
  38. package/lib/__test-utils__/CubePageTestUtils.d.ts +33 -0
  39. package/lib/__test-utils__/CubePageTestUtils.d.ts.map +1 -0
  40. package/lib/__test-utils__/CubePageTestUtils.js +68 -0
  41. package/lib/__test-utils__/CubePageTestUtils.js.map +1 -0
  42. package/lib/__test-utils__/CubeTestApplication.d.ts +30 -0
  43. package/lib/__test-utils__/CubeTestApplication.d.ts.map +1 -0
  44. package/lib/__test-utils__/CubeTestApplication.js +57 -0
  45. package/lib/__test-utils__/CubeTestApplication.js.map +1 -0
  46. package/lib/__test-utils__/FakeCubeEngine.d.ts +41 -0
  47. package/lib/__test-utils__/FakeCubeEngine.d.ts.map +1 -0
  48. package/lib/__test-utils__/FakeCubeEngine.js +91 -0
  49. package/lib/__test-utils__/FakeCubeEngine.js.map +1 -0
  50. package/lib/components/CubeButton.d.ts +20 -0
  51. package/lib/components/CubeButton.d.ts.map +1 -0
  52. package/lib/components/CubeButton.js +24 -0
  53. package/lib/components/CubeButton.js.map +1 -0
  54. package/lib/components/CubeEditor.d.ts +31 -0
  55. package/lib/components/CubeEditor.d.ts.map +1 -0
  56. package/lib/components/CubeEditor.js +90 -0
  57. package/lib/components/CubeEditor.js.map +1 -0
  58. package/lib/components/CubeNodeIcon.d.ts +23 -0
  59. package/lib/components/CubeNodeIcon.d.ts.map +1 -0
  60. package/lib/components/CubeNodeIcon.js +42 -0
  61. package/lib/components/CubeNodeIcon.js.map +1 -0
  62. package/lib/components/canvas/CubeCanvas.d.ts +37 -0
  63. package/lib/components/canvas/CubeCanvas.d.ts.map +1 -0
  64. package/lib/components/canvas/CubeCanvas.js +137 -0
  65. package/lib/components/canvas/CubeCanvas.js.map +1 -0
  66. package/lib/components/canvas/CubeCanvasContext.d.ts +19 -0
  67. package/lib/components/canvas/CubeCanvasContext.d.ts.map +1 -0
  68. package/lib/components/canvas/CubeCanvasContext.js +22 -0
  69. package/lib/components/canvas/CubeCanvasContext.js.map +1 -0
  70. package/lib/components/canvas/CubeCanvasContextMenu.d.ts +28 -0
  71. package/lib/components/canvas/CubeCanvasContextMenu.d.ts.map +1 -0
  72. package/lib/components/canvas/CubeCanvasContextMenu.js +35 -0
  73. package/lib/components/canvas/CubeCanvasContextMenu.js.map +1 -0
  74. package/lib/components/canvas/CubeCanvasDnd.d.ts +43 -0
  75. package/lib/components/canvas/CubeCanvasDnd.d.ts.map +1 -0
  76. package/lib/components/canvas/CubeCanvasDnd.js +51 -0
  77. package/lib/components/canvas/CubeCanvasDnd.js.map +1 -0
  78. package/lib/components/canvas/CubeCanvasEdge.d.ts +24 -0
  79. package/lib/components/canvas/CubeCanvasEdge.d.ts.map +1 -0
  80. package/lib/components/canvas/CubeCanvasEdge.js +33 -0
  81. package/lib/components/canvas/CubeCanvasEdge.js.map +1 -0
  82. package/lib/components/canvas/CubeCanvasElements.d.ts +66 -0
  83. package/lib/components/canvas/CubeCanvasElements.d.ts.map +1 -0
  84. package/lib/components/canvas/CubeCanvasElements.js +97 -0
  85. package/lib/components/canvas/CubeCanvasElements.js.map +1 -0
  86. package/lib/components/canvas/CubeCanvasLayout.d.ts +32 -0
  87. package/lib/components/canvas/CubeCanvasLayout.d.ts.map +1 -0
  88. package/lib/components/canvas/CubeCanvasLayout.js +63 -0
  89. package/lib/components/canvas/CubeCanvasLayout.js.map +1 -0
  90. package/lib/components/canvas/CubeCanvasNode.d.ts +29 -0
  91. package/lib/components/canvas/CubeCanvasNode.d.ts.map +1 -0
  92. package/lib/components/canvas/CubeCanvasNode.js +75 -0
  93. package/lib/components/canvas/CubeCanvasNode.js.map +1 -0
  94. package/lib/components/editors/CubeColumnPicker.d.ts +47 -0
  95. package/lib/components/editors/CubeColumnPicker.d.ts.map +1 -0
  96. package/lib/components/editors/CubeColumnPicker.js +56 -0
  97. package/lib/components/editors/CubeColumnPicker.js.map +1 -0
  98. package/lib/components/editors/CubeDistinctEditor.d.ts +23 -0
  99. package/lib/components/editors/CubeDistinctEditor.d.ts.map +1 -0
  100. package/lib/components/editors/CubeDistinctEditor.js +24 -0
  101. package/lib/components/editors/CubeDistinctEditor.js.map +1 -0
  102. package/lib/components/editors/CubeFilterEditor.d.ts +26 -0
  103. package/lib/components/editors/CubeFilterEditor.d.ts.map +1 -0
  104. package/lib/components/editors/CubeFilterEditor.js +90 -0
  105. package/lib/components/editors/CubeFilterEditor.js.map +1 -0
  106. package/lib/components/editors/CubeIntegerField.d.ts +29 -0
  107. package/lib/components/editors/CubeIntegerField.d.ts.map +1 -0
  108. package/lib/components/editors/CubeIntegerField.js +30 -0
  109. package/lib/components/editors/CubeIntegerField.js.map +1 -0
  110. package/lib/components/editors/CubeJoinEditor.d.ts +26 -0
  111. package/lib/components/editors/CubeJoinEditor.d.ts.map +1 -0
  112. package/lib/components/editors/CubeJoinEditor.js +84 -0
  113. package/lib/components/editors/CubeJoinEditor.js.map +1 -0
  114. package/lib/components/editors/CubeNodeEditorPanel.d.ts +29 -0
  115. package/lib/components/editors/CubeNodeEditorPanel.d.ts.map +1 -0
  116. package/lib/components/editors/CubeNodeEditorPanel.js +72 -0
  117. package/lib/components/editors/CubeNodeEditorPanel.js.map +1 -0
  118. package/lib/components/editors/CubeNodeEditorRegistry.d.ts +44 -0
  119. package/lib/components/editors/CubeNodeEditorRegistry.d.ts.map +1 -0
  120. package/lib/components/editors/CubeNodeEditorRegistry.js +43 -0
  121. package/lib/components/editors/CubeNodeEditorRegistry.js.map +1 -0
  122. package/lib/components/editors/CubeRenameEditor.d.ts +26 -0
  123. package/lib/components/editors/CubeRenameEditor.d.ts.map +1 -0
  124. package/lib/components/editors/CubeRenameEditor.js +58 -0
  125. package/lib/components/editors/CubeRenameEditor.js.map +1 -0
  126. package/lib/components/editors/CubeRestrictEditor.d.ts +26 -0
  127. package/lib/components/editors/CubeRestrictEditor.d.ts.map +1 -0
  128. package/lib/components/editors/CubeRestrictEditor.js +23 -0
  129. package/lib/components/editors/CubeRestrictEditor.js.map +1 -0
  130. package/lib/components/editors/CubeRowCountEditor.d.ts +25 -0
  131. package/lib/components/editors/CubeRowCountEditor.d.ts.map +1 -0
  132. package/lib/components/editors/CubeRowCountEditor.js +38 -0
  133. package/lib/components/editors/CubeRowCountEditor.js.map +1 -0
  134. package/lib/components/editors/CubeSliceEditor.d.ts +25 -0
  135. package/lib/components/editors/CubeSliceEditor.d.ts.map +1 -0
  136. package/lib/components/editors/CubeSliceEditor.js +40 -0
  137. package/lib/components/editors/CubeSliceEditor.js.map +1 -0
  138. package/lib/components/editors/CubeSortEditor.d.ts +27 -0
  139. package/lib/components/editors/CubeSortEditor.d.ts.map +1 -0
  140. package/lib/components/editors/CubeSortEditor.js +72 -0
  141. package/lib/components/editors/CubeSortEditor.js.map +1 -0
  142. package/lib/components/editors/CubeSourceEditor.d.ts +25 -0
  143. package/lib/components/editors/CubeSourceEditor.d.ts.map +1 -0
  144. package/lib/components/editors/CubeSourceEditor.js +41 -0
  145. package/lib/components/editors/CubeSourceEditor.js.map +1 -0
  146. package/lib/components/editors/CubeValueEditor.d.ts +40 -0
  147. package/lib/components/editors/CubeValueEditor.d.ts.map +1 -0
  148. package/lib/components/editors/CubeValueEditor.js +178 -0
  149. package/lib/components/editors/CubeValueEditor.js.map +1 -0
  150. package/lib/components/grid/CubeGridRegion.d.ts +23 -0
  151. package/lib/components/grid/CubeGridRegion.d.ts.map +1 -0
  152. package/lib/components/grid/CubeGridRegion.js +94 -0
  153. package/lib/components/grid/CubeGridRegion.js.map +1 -0
  154. package/lib/components/grid/CubeGridValues.d.ts +25 -0
  155. package/lib/components/grid/CubeGridValues.d.ts.map +1 -0
  156. package/lib/components/grid/CubeGridValues.js +95 -0
  157. package/lib/components/grid/CubeGridValues.js.map +1 -0
  158. package/lib/components/grid/CubeResultGrid.d.ts +39 -0
  159. package/lib/components/grid/CubeResultGrid.d.ts.map +1 -0
  160. package/lib/components/grid/CubeResultGrid.js +86 -0
  161. package/lib/components/grid/CubeResultGrid.js.map +1 -0
  162. package/lib/components/palette/CubePalette.d.ts +29 -0
  163. package/lib/components/palette/CubePalette.d.ts.map +1 -0
  164. package/lib/components/palette/CubePalette.js +73 -0
  165. package/lib/components/palette/CubePalette.js.map +1 -0
  166. package/lib/components/show-pure/CubeShowPureDialog.d.ts +23 -0
  167. package/lib/components/show-pure/CubeShowPureDialog.d.ts.map +1 -0
  168. package/lib/components/show-pure/CubeShowPureDialog.js +37 -0
  169. package/lib/components/show-pure/CubeShowPureDialog.js.map +1 -0
  170. package/lib/components/source-picker/CubeSourcePicker.d.ts +22 -0
  171. package/lib/components/source-picker/CubeSourcePicker.d.ts.map +1 -0
  172. package/lib/components/source-picker/CubeSourcePicker.js +89 -0
  173. package/lib/components/source-picker/CubeSourcePicker.js.map +1 -0
  174. package/lib/components/spec-transfer/CubeSpecTransferDialog.d.ts +26 -0
  175. package/lib/components/spec-transfer/CubeSpecTransferDialog.d.ts.map +1 -0
  176. package/lib/components/spec-transfer/CubeSpecTransferDialog.js +45 -0
  177. package/lib/components/spec-transfer/CubeSpecTransferDialog.js.map +1 -0
  178. package/lib/graph-manager/CubeEngine.d.ts +128 -0
  179. package/lib/graph-manager/CubeEngine.d.ts.map +1 -0
  180. package/lib/graph-manager/CubeEngine.js +61 -0
  181. package/lib/graph-manager/CubeEngine.js.map +1 -0
  182. package/lib/graph-manager/CubeModelOutlineHelper.d.ts +33 -0
  183. package/lib/graph-manager/CubeModelOutlineHelper.d.ts.map +1 -0
  184. package/lib/graph-manager/CubeModelOutlineHelper.js +45 -0
  185. package/lib/graph-manager/CubeModelOutlineHelper.js.map +1 -0
  186. package/lib/graph-manager/protocol/pure/CubeEngineBuilder.d.ts +26 -0
  187. package/lib/graph-manager/protocol/pure/CubeEngineBuilder.d.ts.map +1 -0
  188. package/lib/graph-manager/protocol/pure/CubeEngineBuilder.js +22 -0
  189. package/lib/graph-manager/protocol/pure/CubeEngineBuilder.js.map +1 -0
  190. package/lib/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.d.ts +27 -0
  191. package/lib/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.d.ts.map +1 -0
  192. package/lib/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.js +76 -0
  193. package/lib/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.js.map +1 -0
  194. package/lib/graph-manager/protocol/pure/v1/V1_CubeExecutionResultReader.d.ts +27 -0
  195. package/lib/graph-manager/protocol/pure/v1/V1_CubeExecutionResultReader.d.ts.map +1 -0
  196. package/lib/graph-manager/protocol/pure/v1/V1_CubeExecutionResultReader.js +82 -0
  197. package/lib/graph-manager/protocol/pure/v1/V1_CubeExecutionResultReader.js.map +1 -0
  198. package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.d.ts +32 -0
  199. package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.d.ts.map +1 -0
  200. package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.js +195 -0
  201. package/lib/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.js.map +1 -0
  202. package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.d.ts +20 -0
  203. package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.d.ts.map +1 -0
  204. package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js +174 -0
  205. package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js.map +1 -0
  206. package/lib/graph-manager/protocol/pure/v1/V1_CubeRelationTypeAdapter.d.ts +24 -0
  207. package/lib/graph-manager/protocol/pure/v1/V1_CubeRelationTypeAdapter.d.ts.map +1 -0
  208. package/lib/graph-manager/protocol/pure/v1/V1_CubeRelationTypeAdapter.js +43 -0
  209. package/lib/graph-manager/protocol/pure/v1/V1_CubeRelationTypeAdapter.js.map +1 -0
  210. package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.d.ts +45 -0
  211. package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.d.ts.map +1 -0
  212. package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.js +171 -0
  213. package/lib/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.js.map +1 -0
  214. package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.d.ts +22 -0
  215. package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.d.ts.map +1 -0
  216. package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js +79 -0
  217. package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js.map +1 -0
  218. package/lib/index.css +17 -0
  219. package/lib/index.css.map +1 -0
  220. package/lib/index.d.ts +25 -0
  221. package/lib/index.d.ts.map +1 -0
  222. package/lib/index.js +24 -0
  223. package/lib/index.js.map +1 -0
  224. package/lib/stores/CubeEditorState.d.ts +236 -0
  225. package/lib/stores/CubeEditorState.d.ts.map +1 -0
  226. package/lib/stores/CubeEditorState.js +632 -0
  227. package/lib/stores/CubeEditorState.js.map +1 -0
  228. package/lib/stores/CubeExecutionState.d.ts +67 -0
  229. package/lib/stores/CubeExecutionState.d.ts.map +1 -0
  230. package/lib/stores/CubeExecutionState.js +212 -0
  231. package/lib/stores/CubeExecutionState.js.map +1 -0
  232. package/lib/stores/CubeGridQuickActions.d.ts +40 -0
  233. package/lib/stores/CubeGridQuickActions.d.ts.map +1 -0
  234. package/lib/stores/CubeGridQuickActions.js +86 -0
  235. package/lib/stores/CubeGridQuickActions.js.map +1 -0
  236. package/lib/stores/CubeHost.d.ts +31 -0
  237. package/lib/stores/CubeHost.d.ts.map +1 -0
  238. package/lib/stores/CubeHost.js +17 -0
  239. package/lib/stores/CubeHost.js.map +1 -0
  240. package/lib/stores/CubeNodeEditorState.d.ts +103 -0
  241. package/lib/stores/CubeNodeEditorState.d.ts.map +1 -0
  242. package/lib/stores/CubeNodeEditorState.js +262 -0
  243. package/lib/stores/CubeNodeEditorState.js.map +1 -0
  244. package/lib/stores/CubeShowPureState.d.ts +41 -0
  245. package/lib/stores/CubeShowPureState.d.ts.map +1 -0
  246. package/lib/stores/CubeShowPureState.js +100 -0
  247. package/lib/stores/CubeShowPureState.js.map +1 -0
  248. package/lib/stores/CubeSourcePickerState.d.ts +98 -0
  249. package/lib/stores/CubeSourcePickerState.d.ts.map +1 -0
  250. package/lib/stores/CubeSourcePickerState.js +334 -0
  251. package/lib/stores/CubeSourcePickerState.js.map +1 -0
  252. package/lib/stores/CubeSpecTransferState.d.ts +60 -0
  253. package/lib/stores/CubeSpecTransferState.d.ts.map +1 -0
  254. package/lib/stores/CubeSpecTransferState.js +167 -0
  255. package/lib/stores/CubeSpecTransferState.js.map +1 -0
  256. package/lib/stores/LocalModelCatalog.d.ts +37 -0
  257. package/lib/stores/LocalModelCatalog.d.ts.map +1 -0
  258. package/lib/stores/LocalModelCatalog.js +49 -0
  259. package/lib/stores/LocalModelCatalog.js.map +1 -0
  260. package/lib/stores/editors/CubeFilterDraft.d.ts +61 -0
  261. package/lib/stores/editors/CubeFilterDraft.d.ts.map +1 -0
  262. package/lib/stores/editors/CubeFilterDraft.js +186 -0
  263. package/lib/stores/editors/CubeFilterDraft.js.map +1 -0
  264. package/lib/stores/editors/CubeIntegerText.d.ts +24 -0
  265. package/lib/stores/editors/CubeIntegerText.d.ts.map +1 -0
  266. package/lib/stores/editors/CubeIntegerText.js +33 -0
  267. package/lib/stores/editors/CubeIntegerText.js.map +1 -0
  268. package/lib/stores/editors/CubeJoinDraft.d.ts +71 -0
  269. package/lib/stores/editors/CubeJoinDraft.d.ts.map +1 -0
  270. package/lib/stores/editors/CubeJoinDraft.js +145 -0
  271. package/lib/stores/editors/CubeJoinDraft.js.map +1 -0
  272. package/lib/stores/editors/CubeNodeDraft.d.ts +38 -0
  273. package/lib/stores/editors/CubeNodeDraft.d.ts.map +1 -0
  274. package/lib/stores/editors/CubeNodeDraft.js +35 -0
  275. package/lib/stores/editors/CubeNodeDraft.js.map +1 -0
  276. package/lib/stores/editors/CubeNodeDraftRegistry.d.ts +35 -0
  277. package/lib/stores/editors/CubeNodeDraftRegistry.d.ts.map +1 -0
  278. package/lib/stores/editors/CubeNodeDraftRegistry.js +55 -0
  279. package/lib/stores/editors/CubeNodeDraftRegistry.js.map +1 -0
  280. package/lib/stores/editors/CubeRenameDraft.d.ts +44 -0
  281. package/lib/stores/editors/CubeRenameDraft.d.ts.map +1 -0
  282. package/lib/stores/editors/CubeRenameDraft.js +79 -0
  283. package/lib/stores/editors/CubeRenameDraft.js.map +1 -0
  284. package/lib/stores/editors/CubeRestrictDraft.d.ts +37 -0
  285. package/lib/stores/editors/CubeRestrictDraft.d.ts.map +1 -0
  286. package/lib/stores/editors/CubeRestrictDraft.js +73 -0
  287. package/lib/stores/editors/CubeRestrictDraft.js.map +1 -0
  288. package/lib/stores/editors/CubeRowCountDraft.d.ts +42 -0
  289. package/lib/stores/editors/CubeRowCountDraft.d.ts.map +1 -0
  290. package/lib/stores/editors/CubeRowCountDraft.js +55 -0
  291. package/lib/stores/editors/CubeRowCountDraft.js.map +1 -0
  292. package/lib/stores/editors/CubeSliceDraft.d.ts +42 -0
  293. package/lib/stores/editors/CubeSliceDraft.d.ts.map +1 -0
  294. package/lib/stores/editors/CubeSliceDraft.js +72 -0
  295. package/lib/stores/editors/CubeSliceDraft.js.map +1 -0
  296. package/lib/stores/editors/CubeSortDraft.d.ts +49 -0
  297. package/lib/stores/editors/CubeSortDraft.d.ts.map +1 -0
  298. package/lib/stores/editors/CubeSortDraft.js +99 -0
  299. package/lib/stores/editors/CubeSortDraft.js.map +1 -0
  300. package/lib/stores/fixtures/CubeNorthwindModel.d.ts +23 -0
  301. package/lib/stores/fixtures/CubeNorthwindModel.d.ts.map +1 -0
  302. package/lib/stores/fixtures/CubeNorthwindModel.js +338 -0
  303. package/lib/stores/fixtures/CubeNorthwindModel.js.map +1 -0
  304. package/package.json +81 -3
  305. package/src/__lib__/LegendCubeCommand.ts +44 -0
  306. package/src/__lib__/LegendCubeHelpText.ts +58 -0
  307. package/src/__lib__/LegendCubeLabels.ts +171 -0
  308. package/src/__lib__/LegendCubeTesting.ts +33 -0
  309. package/src/__test-utils__/CubeCanvasTestUtils.ts +53 -0
  310. package/src/__test-utils__/CubeEngineTestSupport.ts +172 -0
  311. package/src/__test-utils__/CubeNorthwindTestQueries.ts +165 -0
  312. package/src/__test-utils__/CubeOperationsTestUtils.ts +177 -0
  313. package/src/__test-utils__/CubePageTestUtils.tsx +96 -0
  314. package/src/__test-utils__/CubeTestApplication.ts +82 -0
  315. package/src/__test-utils__/FakeCubeEngine.ts +145 -0
  316. package/src/components/CubeButton.tsx +35 -0
  317. package/src/components/CubeEditor.tsx +239 -0
  318. package/src/components/CubeNodeIcon.tsx +64 -0
  319. package/src/components/canvas/CubeCanvas.tsx +262 -0
  320. package/src/components/canvas/CubeCanvasContext.ts +31 -0
  321. package/src/components/canvas/CubeCanvasContextMenu.tsx +89 -0
  322. package/src/components/canvas/CubeCanvasDnd.ts +82 -0
  323. package/src/components/canvas/CubeCanvasEdge.tsx +57 -0
  324. package/src/components/canvas/CubeCanvasElements.ts +153 -0
  325. package/src/components/canvas/CubeCanvasLayout.ts +88 -0
  326. package/src/components/canvas/CubeCanvasNode.tsx +149 -0
  327. package/src/components/editors/CubeColumnPicker.tsx +138 -0
  328. package/src/components/editors/CubeDistinctEditor.tsx +28 -0
  329. package/src/components/editors/CubeFilterEditor.tsx +309 -0
  330. package/src/components/editors/CubeIntegerField.tsx +51 -0
  331. package/src/components/editors/CubeJoinEditor.tsx +247 -0
  332. package/src/components/editors/CubeNodeEditorPanel.tsx +215 -0
  333. package/src/components/editors/CubeNodeEditorRegistry.ts +81 -0
  334. package/src/components/editors/CubeRenameEditor.tsx +143 -0
  335. package/src/components/editors/CubeRestrictEditor.tsx +103 -0
  336. package/src/components/editors/CubeRowCountEditor.tsx +53 -0
  337. package/src/components/editors/CubeSliceEditor.tsx +69 -0
  338. package/src/components/editors/CubeSortEditor.tsx +206 -0
  339. package/src/components/editors/CubeSourceEditor.tsx +106 -0
  340. package/src/components/editors/CubeValueEditor.tsx +333 -0
  341. package/src/components/grid/CubeGridRegion.tsx +275 -0
  342. package/src/components/grid/CubeGridValues.ts +125 -0
  343. package/src/components/grid/CubeResultGrid.tsx +138 -0
  344. package/src/components/palette/CubePalette.tsx +177 -0
  345. package/src/components/show-pure/CubeShowPureDialog.tsx +101 -0
  346. package/src/components/source-picker/CubeSourcePicker.tsx +304 -0
  347. package/src/components/spec-transfer/CubeSpecTransferDialog.tsx +157 -0
  348. package/src/graph-manager/CubeEngine.ts +169 -0
  349. package/src/graph-manager/CubeModelOutlineHelper.ts +58 -0
  350. package/src/graph-manager/protocol/pure/CubeEngineBuilder.ts +34 -0
  351. package/src/graph-manager/protocol/pure/v1/V1_CubeEngineErrors.ts +109 -0
  352. package/src/graph-manager/protocol/pure/v1/V1_CubeExecutionResultReader.ts +115 -0
  353. package/src/graph-manager/protocol/pure/v1/V1_CubeLambdaSerializer.ts +257 -0
  354. package/src/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.ts +243 -0
  355. package/src/graph-manager/protocol/pure/v1/V1_CubeRelationTypeAdapter.ts +58 -0
  356. package/src/graph-manager/protocol/pure/v1/V1_LegendCubeEngine.ts +278 -0
  357. package/src/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.ts +127 -0
  358. package/src/index.ts +41 -0
  359. package/src/stores/CubeEditorState.ts +807 -0
  360. package/src/stores/CubeExecutionState.ts +288 -0
  361. package/src/stores/CubeGridQuickActions.ts +129 -0
  362. package/src/stores/CubeHost.ts +32 -0
  363. package/src/stores/CubeNodeEditorState.ts +324 -0
  364. package/src/stores/CubeShowPureState.ts +118 -0
  365. package/src/stores/CubeSourcePickerState.ts +426 -0
  366. package/src/stores/CubeSpecTransferState.ts +198 -0
  367. package/src/stores/LocalModelCatalog.ts +70 -0
  368. package/src/stores/editors/CubeFilterDraft.ts +241 -0
  369. package/src/stores/editors/CubeIntegerText.ts +34 -0
  370. package/src/stores/editors/CubeJoinDraft.ts +224 -0
  371. package/src/stores/editors/CubeNodeDraft.ts +46 -0
  372. package/src/stores/editors/CubeNodeDraftRegistry.ts +83 -0
  373. package/src/stores/editors/CubeRenameDraft.ts +110 -0
  374. package/src/stores/editors/CubeRestrictDraft.ts +83 -0
  375. package/src/stores/editors/CubeRowCountDraft.ts +69 -0
  376. package/src/stores/editors/CubeSliceDraft.ts +87 -0
  377. package/src/stores/editors/CubeSortDraft.ts +135 -0
  378. package/src/stores/fixtures/CubeNorthwindModel.ts +355 -0
  379. package/tsconfig.json +133 -0
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Copyright (c) 2026-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
+ import { type CubeType, type FilterValue, type FilterValueItem, type FilterValueShape } from '@finos/legend-cube';
17
+ /** Why a value is not one of the type, worded as the validation says it; nothing for a valid one or none */
18
+ export declare const getValueProblem: (item: FilterValueItem | undefined, type: CubeType) => string | undefined;
19
+ /**
20
+ * The text a date-time input gives, with its seconds: a browser leaves out
21
+ * zero seconds (`1997-01-01T10:30`), and the engine truncates a date-time
22
+ * without them
23
+ */
24
+ export declare const withDateTimeSeconds: (text: string) => string;
25
+ /**
26
+ * The value of a condition, as its operator wants it (spec §17.7): none,
27
+ * one, or a list (In and NotIn), each value entered as its column's type
28
+ * wants (`parseValue`): a date input for dates, a picker for an enumeration
29
+ * or a boolean, text for the rest.
30
+ */
31
+ export declare const CubeValueEditor: React.FC<{
32
+ /** What the value is for: the editor's accessible name, e.g. `Filter value` */
33
+ label: string;
34
+ type: CubeType;
35
+ shape: FilterValueShape;
36
+ value: FilterValue | undefined;
37
+ onChange: (value: FilterValue | undefined) => void;
38
+ disabled?: boolean | undefined;
39
+ }>;
40
+ //# sourceMappingURL=CubeValueEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CubeValueEditor.d.ts","sourceRoot":"","sources":["../../../src/components/editors/CubeValueEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAQtB,MAAM,oBAAoB,CAAC;AAG5B,4GAA4G;AAC5G,eAAO,MAAM,eAAe,GAC1B,MAAM,eAAe,GAAG,SAAS,EACjC,MAAM,QAAQ,KACb,MAAM,GAAG,SAQX,CAAC;AAeF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,KAAG,MACS,CAAC;AAqL7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC;IACrC,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAChC,CAsEA,CAAC"}
@@ -0,0 +1,178 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2026-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { clsx, TimesIcon } from '@finos/legend-art';
18
+ import { BLANK_PLACEHOLDER, checkValue, getLiteralText, isEnumType, isFilterValueList, MESSAGE_FILTER_VALUE_INVALID, MESSAGE_FILTER_VALUE_OUT_OF_RANGE, parseValue, TypeFamily, } from '@finos/legend-cube';
19
+ import { useEffect, useRef, useState } from 'react';
20
+ /** Why a value is not one of the type, worded as the validation says it; nothing for a valid one or none */
21
+ export const getValueProblem = (item, type) => {
22
+ const problem = checkValue(item, type);
23
+ if (!problem || problem.reason === 'required') {
24
+ return undefined;
25
+ }
26
+ return problem.reason === 'invalid'
27
+ ? MESSAGE_FILTER_VALUE_INVALID(problem.text, type.displayName)
28
+ : MESSAGE_FILTER_VALUE_OUT_OF_RANGE(problem.text, type.displayName);
29
+ };
30
+ /** A value as typed and shown: a literal's text, or the text that is not a value */
31
+ const getItemText = (item) => item === undefined
32
+ ? ''
33
+ : item.kind === 'invalid'
34
+ ? item.text
35
+ : getLiteralText(item);
36
+ const INPUT_CLASS = 'h-6 min-w-0 flex-1 rounded-sm border bg-[var(--color-bg-input)] px-1 text-base';
37
+ const DATE_TIME_WITHOUT_SECONDS = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/u;
38
+ /**
39
+ * The text a date-time input gives, with its seconds: a browser leaves out
40
+ * zero seconds (`1997-01-01T10:30`), and the engine truncates a date-time
41
+ * without them
42
+ */
43
+ export const withDateTimeSeconds = (text) => DATE_TIME_WITHOUT_SECONDS.test(text) ? `${text}:00` : text;
44
+ /** The input a type's values are typed in (spec §17.7) */
45
+ const getInputType = (type) => type.family === TypeFamily.STRICT_DATE
46
+ ? 'date'
47
+ : type.family === TypeFamily.DATETIME
48
+ ? 'datetime-local'
49
+ : 'text';
50
+ /**
51
+ * Picks one of a fixed set of values, never typed: an enumeration's values,
52
+ * or true and false. A value that is not one of them (e.g. after the column
53
+ * changed) stays shown, marked.
54
+ */
55
+ const CubeValueSelect = (props) => {
56
+ const { label, type, item, onChange, disabled } = props;
57
+ const choices = isEnumType(type) ? type.values : ['true', 'false'];
58
+ const text = getItemText(item);
59
+ const problem = getValueProblem(item, type);
60
+ return (_jsxs("select", { "aria-label": label, "aria-invalid": problem !== undefined, title: problem, className: clsx(INPUT_CLASS, problem
61
+ ? 'border-[var(--color-status-error)]'
62
+ : 'border-[var(--color-border-default)]'), value: text, disabled: disabled, onChange: (event) => onChange(parseValue(event.target.value, type)), children: [_jsx("option", { value: "", children: BLANK_PLACEHOLDER }), text && !choices.includes(text) && (_jsx("option", { value: text, disabled: true, children: text })), choices.map((choice) => (_jsx("option", { value: choice, children: choice }, choice)))] }));
63
+ };
64
+ /**
65
+ * One typed value (spec §17.7): shown as text, or `(blank)`, until clicked;
66
+ * then typed, and read when the input loses focus or on Enter. Text that is
67
+ * not a value of the type is kept, to be fixed, and marked in both modes.
68
+ * Leaving a blank value without typing keeps it blank; Enter on it confirms
69
+ * an empty text, a value of a STRING column. Enter and Escape give the focus
70
+ * back to the value; leaving it by focus leaves the focus where it went.
71
+ */
72
+ const CubeValueText = (props) => {
73
+ const { label, type, item, onChange, disabled } = props;
74
+ const [editedText, setEditedText] = useState(undefined);
75
+ const [returnFocus, setReturnFocus] = useState(false);
76
+ const inputRef = useRef(null);
77
+ /** Enter and Escape, as the input being typed handles them now */
78
+ const onKeyRef = useRef(() => undefined);
79
+ const isTyping = editedText !== undefined;
80
+ // a native listener: Chrome's date input gives React no Enter keydown
81
+ useEffect(() => {
82
+ const input = inputRef.current;
83
+ if (!isTyping || !input) {
84
+ return undefined;
85
+ }
86
+ const onKeyDown = (event) => {
87
+ if (event.key === 'Enter' || event.key === 'Escape') {
88
+ // or the key's press would reach the value it gives the focus to,
89
+ // and open it again
90
+ event.preventDefault();
91
+ onKeyRef.current(event.key);
92
+ }
93
+ };
94
+ input.addEventListener('keydown', onKeyDown);
95
+ return () => input.removeEventListener('keydown', onKeyDown);
96
+ }, [isTyping]);
97
+ const text = getItemText(item);
98
+ const problem = getValueProblem(item, type);
99
+ const markClass = problem
100
+ ? 'border-[var(--color-status-error)] text-[var(--color-status-error)]'
101
+ : 'border-[var(--color-border-default)]';
102
+ if (editedText === undefined) {
103
+ return (_jsx("button", { "aria-label": label, "aria-invalid": problem !== undefined, title: problem ?? 'Click to change', className: clsx(INPUT_CLASS, 'truncate text-left', markClass, {
104
+ 'text-[var(--color-text-muted)]': item === undefined,
105
+ }), disabled: disabled,
106
+ // back from typing with Enter or Escape
107
+ autoFocus: returnFocus, onClick: () => setEditedText(text), children: item === undefined
108
+ ? BLANK_PLACEHOLDER
109
+ : item.kind === 'string' && !item.value
110
+ ? '""'
111
+ : text }));
112
+ }
113
+ const commit = (confirmed) => {
114
+ setEditedText(undefined);
115
+ const typed = type.family === TypeFamily.DATETIME
116
+ ? withDateTimeSeconds(editedText)
117
+ : editedText;
118
+ if (typed !== text ||
119
+ (confirmed && item === undefined && type.family === TypeFamily.STRING)) {
120
+ onChange(parseValue(typed, type));
121
+ }
122
+ };
123
+ onKeyRef.current = (key) => {
124
+ if (key === 'Enter') {
125
+ setReturnFocus(true);
126
+ commit(true);
127
+ }
128
+ else if (key === 'Escape') {
129
+ setReturnFocus(true);
130
+ setEditedText(undefined);
131
+ }
132
+ };
133
+ return (_jsx("input", { "aria-label": label, "aria-invalid": problem !== undefined, title: problem, className: clsx(INPUT_CLASS, markClass), type: getInputType(type),
134
+ // seconds are needed: the engine truncates a date-time without them
135
+ step: type.family === TypeFamily.DATETIME ? 1 : undefined,
136
+ // the input replaces the button the user just clicked
137
+ autoFocus: true, value: editedText, onChange: (event) => setEditedText(event.target.value), ref: inputRef, onBlur: () => {
138
+ setReturnFocus(false);
139
+ commit(false);
140
+ } }));
141
+ };
142
+ /** One value of a column type, picked or typed as the type wants */
143
+ const CubeSingleValueEditor = (props) => props.type.family === TypeFamily.ENUM ||
144
+ props.type.family === TypeFamily.BOOLEAN ? (_jsx(CubeValueSelect, { ...props })) : (_jsx(CubeValueText, { ...props }));
145
+ /**
146
+ * The value of a condition, as its operator wants it (spec §17.7): none,
147
+ * one, or a list (In and NotIn), each value entered as its column's type
148
+ * wants (`parseValue`): a date input for dates, a picker for an enumeration
149
+ * or a boolean, text for the rest.
150
+ */
151
+ export const CubeValueEditor = (props) => {
152
+ const { label, type, shape, value, onChange } = props;
153
+ const disabled = Boolean(props.disabled);
154
+ if (shape === 'none') {
155
+ return null;
156
+ }
157
+ if (shape === 'single') {
158
+ return (_jsx(CubeSingleValueEditor, { label: label, type: type, item: isFilterValueList(value) ? undefined : value, onChange: onChange, disabled: disabled }));
159
+ }
160
+ const items = isFilterValueList(value) ? value : value ? [value] : [];
161
+ const setItems = (next) => onChange(next.length ? next : undefined);
162
+ return (_jsxs("ul", { "aria-label": label, className: "flex min-w-0 flex-1 flex-col gap-1", children: [items.map((item, index) => (
163
+ // values can repeat and have no id. A row's only state is its text
164
+ // while typed, which blur commits before another row can be removed
165
+ // eslint-disable-next-line react/no-array-index-key
166
+ _jsxs("li", { className: "flex items-center gap-1", children: [_jsx(CubeSingleValueEditor, { label: `${label} ${index + 1}`, type: type, item: item, disabled: disabled, onChange: (changed) => setItems(changed === undefined
167
+ ? items.filter((_, other) => other !== index)
168
+ : items.map((other, position) => position === index ? changed : other)) }), _jsx("button", { className: "flex h-6 w-6 shrink-0 items-center justify-center text-[var(--color-text-secondary)] disabled:text-[var(--color-text-disabled)]", "aria-label": `Remove ${label.toLowerCase()} ${index + 1}`, disabled: disabled, onClick: () => setItems(items.filter((_, other) => other !== index)), children: _jsx(TimesIcon, {}) })] }, index))), _jsx("li", { className: "flex items-center gap-1", children: _jsx(CubeSingleValueEditor
169
+ // always blank: what it adds goes to the list above
170
+ , {
171
+ // always blank: what it adds goes to the list above
172
+ label: `Add ${label.toLowerCase()}`, type: type, item: undefined, disabled: disabled, onChange: (added) => {
173
+ if (added !== undefined) {
174
+ setItems([...items, added]);
175
+ }
176
+ } }) })] }));
177
+ };
178
+ //# sourceMappingURL=CubeValueEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CubeValueEditor.js","sourceRoot":"","sources":["../../../src/components/editors/CubeValueEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,iBAAiB,EACjB,UAAU,EAKV,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,4BAA4B,EAC5B,iCAAiC,EACjC,UAAU,EACV,UAAU,GACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,4GAA4G;AAC5G,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAiC,EACjC,IAAc,EACM,EAAE;IACtB,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACvC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,MAAM,KAAK,SAAS;QACjC,CAAC,CAAC,4BAA4B,CAAC,OAAO,CAAC,IA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AAC,OAAO,CAAC,CAAC,CAAC,KAAK,CACrC,CACN,GAEH,EACF,iBACE,SAAS,EAAC,iIAAiI,gBAC/H,UAAU,KAAK,CAAC,WAAW,EAAE,IAAI,KAAK,GAAG,CAAC,EAAE,EACxD,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CACZ,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,YAGvD,KAAC,SAAS,KAAG,GACN,KAzBF,KAAK,CA0BT,CACN,CAAC,EACF,aAAI,SAAS,EAAC,yBAAyB,YACrC,KAAC,qBAAqB;gBACpB,oDAAoD;;oBAApD,oDAAoD;oBACpD,KAAK,EAAE,OAAO,KAAK,CAAC,WAAW,EAAE,EAAE,EACnC,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;wBAClB,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;4BACxB,QAAQ,CAAC,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;wBAC9B,CAAC;oBACH,CAAC,GACD,GACC,IACF,CACN,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright (c) 2026-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
+ import type { CubeEditorState } from '../../stores/CubeEditorState.js';
17
+ /** The results: Execute, the row limit and the run's stats above the grid (PLAN §9) */
18
+ export declare const CubeGridRegion: ((props: {
19
+ editorState: CubeEditorState;
20
+ }) => import("react/jsx-runtime").JSX.Element) & {
21
+ displayName: string;
22
+ };
23
+ //# sourceMappingURL=CubeGridRegion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CubeGridRegion.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeGridRegion.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAeH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AA4MvE,uFAAuF;AACvF,eAAO,MAAM,cAAc,WACjB;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE;;CAuCzC,CAAC"}
@@ -0,0 +1,94 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2026-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { PanelLoadingIndicator } from '@finos/legend-art';
18
+ import { flowResult } from 'mobx';
19
+ import { observer } from 'mobx-react-lite';
20
+ import { useState } from 'react';
21
+ import { EXECUTE_SHORTCUT_LABEL } from '../../__lib__/LegendCubeCommand.js';
22
+ import { CUBE_PENDING_LABEL, formatDisabledReasons, getRowLimitError, getTruncationMessage, ROW_LIMIT_WARNING_THRESHOLD, } from '../../__lib__/LegendCubeLabels.js';
23
+ import { LEGEND_CUBE_TEST_ID } from '../../__lib__/LegendCubeTesting.js';
24
+ import { CubeButton } from '../CubeButton.js';
25
+ import { CubeResultGrid } from './CubeResultGrid.js';
26
+ import { formatDuration } from './CubeGridValues.js';
27
+ /** The first line of an error is shown, at most this long; the rest is under Details */
28
+ const MAX_ERROR_LINE_LENGTH = 500;
29
+ const CubeRowLimitInput = observer((props) => {
30
+ const { editorState } = props;
31
+ const [draft, setDraft] = useState(String(editorState.rowLimit));
32
+ const [error, setError] = useState();
33
+ const commit = () => {
34
+ const problem = getRowLimitError(draft);
35
+ setError(problem);
36
+ if (!problem) {
37
+ editorState.setRowLimit(Number(draft.trim()));
38
+ }
39
+ };
40
+ return (_jsxs("div", { className: "flex items-center gap-1", children: [_jsxs("label", { className: "flex items-center gap-1 text-base", children: ["Rows", _jsx("input", { className: "h-6 w-20 rounded-sm border border-[var(--color-border-default)] bg-[var(--color-bg-input)] px-1 text-right text-base text-[var(--color-text-primary)]", "aria-label": "Row limit", "aria-invalid": error !== undefined, value: draft, onChange: (event) => setDraft(event.target.value), onBlur: commit, onKeyDown: (event) => {
41
+ if (event.key === 'Enter') {
42
+ commit();
43
+ }
44
+ } })] }), error !== undefined && (_jsx("span", { className: "text-sm text-[var(--color-status-error)]", role: "alert", children: error })), error === undefined &&
45
+ editorState.rowLimit > ROW_LIMIT_WARNING_THRESHOLD && (_jsx("span", { className: "text-sm text-[var(--color-status-warn)]", children: "A large row limit can slow the page down." }))] }));
46
+ });
47
+ const CubeGridToolbar = observer((props) => {
48
+ const { editorState, showSql, onToggleSql } = props;
49
+ const { execution, host } = editorState;
50
+ const { applicationStore } = host;
51
+ const { result } = execution;
52
+ const disabledReasons = execution.disabledReasons;
53
+ const execute = () => {
54
+ flowResult(execution.execute()).catch(applicationStore.alertUnhandledError);
55
+ };
56
+ return (_jsxs("div", { className: "flex h-8 shrink-0 items-center gap-3 border-b border-[var(--color-border-default)] bg-[var(--color-bg-panel-header)] px-2", "data-testid": LEGEND_CUBE_TEST_ID.GRID_TOOLBAR, children: [execution.isRunning ? (_jsx(CubeButton, { title: "Stop the run", onClick: () => execution.stop(), children: "Stop" })) : (_jsx(CubeButton, { primary: true, disabled: !execution.canExecute, title: disabledReasons.length
57
+ ? `${formatDisabledReasons(disabledReasons)}\n(${EXECUTE_SHORTCUT_LABEL})`
58
+ : `Run the query up to the selected node (${EXECUTE_SHORTCUT_LABEL})`, onClick: execute, children: "Execute" })), _jsx(CubeRowLimitInput, { editorState: editorState }), execution.isRunning && (_jsx("span", { className: "text-base text-[var(--color-text-secondary)]", children: CUBE_PENDING_LABEL.EXECUTING_QUERY })), execution.isStale && (_jsx("span", { className: "rounded-sm bg-[var(--color-status-warn-bg)] px-1 text-base text-[var(--color-status-warn)]", title: "The query or the row limit changed since this run", children: "Stale: execute again to refresh" })), result && !execution.isRunning && (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-base text-[var(--color-text-secondary)]", children: `${result.rows.length.toLocaleString('en-US')} row${result.rows.length === 1 ? '' : 's'} in ${formatDuration(result.durationMs)}` }), result.limited && (_jsx("span", { className: "text-base text-[var(--color-status-warn)]", children: getTruncationMessage(result.rowLimit) })), result.sql.length > 0 && (_jsx(CubeButton, { "aria-expanded": showSql, onClick: onToggleSql, children: showSql ? 'Hide SQL' : 'Show SQL' }))] }))] }));
59
+ });
60
+ /** The SQL the run's database ran, with Copy */
61
+ const CubeSqlPanel = observer((props) => {
62
+ const { editorState } = props;
63
+ const { applicationStore } = editorState.host;
64
+ const sql = editorState.execution.result?.sql ?? [];
65
+ if (!sql.length) {
66
+ return null;
67
+ }
68
+ const copySql = () => {
69
+ applicationStore.clipboardService
70
+ .copyTextToClipboard(sql.join('\n\n'))
71
+ .catch(applicationStore.alertUnhandledError);
72
+ };
73
+ return (_jsxs("div", { className: "flex max-h-40 shrink-0 gap-2 overflow-auto border-b border-[var(--color-border-default)] p-2", "data-testid": LEGEND_CUBE_TEST_ID.SQL_PANEL, children: [_jsx("div", { className: "min-w-0 flex-1", children: sql.map((statement, index) => (_jsx("pre", { className: "whitespace-pre-wrap font-mono text-sm", children: statement }, index))) }), _jsx(CubeButton, { onClick: copySql, children: "Copy SQL" })] }));
74
+ });
75
+ const CubeExecutionError = observer((props) => {
76
+ const error = props.editorState.execution.error;
77
+ if (!error) {
78
+ return null;
79
+ }
80
+ const isCut = error.firstLine.length > MAX_ERROR_LINE_LENGTH;
81
+ const firstLine = isCut
82
+ ? `${error.firstLine.slice(0, MAX_ERROR_LINE_LENGTH)}…`
83
+ : error.firstLine;
84
+ return (_jsxs("div", { className: "m-2 rounded-sm border border-[var(--color-status-error)] bg-[var(--color-status-error-bg)] p-2 text-base", "data-testid": LEGEND_CUBE_TEST_ID.EXECUTION_ERROR, role: "alert", children: [_jsx("div", { className: "font-medium text-[var(--color-status-error)]", title: isCut ? error.firstLine : undefined, children: firstLine }), (isCut || error.detail !== error.firstLine) && (_jsxs("details", { className: "mt-1", children: [_jsx("summary", { className: "cursor-pointer text-[var(--color-text-secondary)]", children: "Details" }), _jsx("pre", { className: "mt-1 max-h-60 overflow-auto whitespace-pre-wrap text-sm", children: error.detail })] }))] }));
85
+ });
86
+ /** The results: Execute, the row limit and the run's stats above the grid (PLAN §9) */
87
+ export const CubeGridRegion = observer((props) => {
88
+ const { editorState } = props;
89
+ const { execution, host } = editorState;
90
+ const [showSql, setShowSql] = useState(false);
91
+ const darkMode = !host.applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled;
92
+ return (_jsxs("div", { className: "flex h-full flex-col bg-[var(--color-bg-panel)]", "data-testid": LEGEND_CUBE_TEST_ID.GRID_REGION, children: [_jsx(PanelLoadingIndicator, { isLoading: execution.isRunning }), _jsx(CubeGridToolbar, { editorState: editorState, showSql: showSql, onToggleSql: () => setShowSql(!showSql) }), showSql && !execution.isRunning && (_jsx(CubeSqlPanel, { editorState: editorState })), _jsx("div", { className: "min-h-0 flex-1", children: execution.error ? (_jsx(CubeExecutionError, { editorState: editorState })) : execution.result ? (_jsx(CubeResultGrid, { editorState: editorState, result: execution.result, darkMode: darkMode }, execution.result.id)) : (_jsx("div", { className: "flex h-full items-center justify-center text-base text-[var(--color-text-secondary)]", children: "Execute the query to see its rows." })) })] }));
93
+ });
94
+ //# sourceMappingURL=CubeGridRegion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CubeGridRegion.js","sourceRoot":"","sources":["../../../src/components/grid/CubeGridRegion.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,wFAAwF;AACxF,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC,MAAM,iBAAiB,GAAG,QAAQ,CAChC,CAAC,KAAuC,EAAE,EAAE;IAC1C,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,EAAsB,CAAC;IACzD,MAAM,MAAM,GAAG,GAAS,EAAE;QACxB,MAAM,OAAO,GAAG,g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CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,QAAQ,GACZ,CAAC,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,mCAAmC,CAAC;IAC3E,OAAO,CACL,eACE,SAAS,EAAC,iDAAiD,iBAC9C,mBAAmB,CAAC,WAAW,aAE5C,KAAC,qBAAqB,IAAC,SAAS,EAAE,SAAS,CAAC,SAAS,GAAI,EACzD,KAAC,eAAe,IACd,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,GACvC,EACD,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,IAAI,CAClC,KAAC,YAAY,IAAC,WAAW,EAAE,WAAW,GAAI,CAC3C,EACD,cAAK,SAAS,EAAC,gBAAgB,YAC5B,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CACjB,KAAC,kBAAkB,IAAC,WAAW,EAAE,WAAW,GAAI,CACjD,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CACrB,KAAC,cAAc,IAEb,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,SAAS,CAAC,MAAM,EACxB,QAAQ,EAAE,QAAQ,IAHb,SAAS,CAAC,MAAM,CAAC,EAAE,CAIxB,CACH,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,sFAAsF,mDAE/F,CACP,GACG,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright (c) 2026-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
+ import { TypeFamily } from '@finos/legend-cube';
17
+ import type { CubeResultValue } from '../../graph-manager/CubeEngine.js';
18
+ export declare const isNumericFamily: (family: TypeFamily) => boolean;
19
+ /** Compares two numbers written as text, digit for digit: `'9' < '10'`, `'9007199254740993' > '9007199254740992'` */
20
+ export declare const compareNumberText: (left: string, right: string) => number;
21
+ /** Orders a column's values: nulls first, then numbers by value whether they are JS numbers or exact text */
22
+ export declare const compareCellValues: (left: CubeResultValue | undefined, right: CubeResultValue | undefined) => number;
23
+ /** A run's duration for the toolbar: milliseconds under a second, else seconds */
24
+ export declare const formatDuration: (durationMs: number) => string;
25
+ //# sourceMappingURL=CubeGridValues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CubeGridValues.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeGridValues.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAazE,eAAO,MAAM,eAAe,GAAI,QAAQ,UAAU,KAAG,OACvB,CAAC;AA6C/B,qHAAqH;AACrH,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,KAAG,MAY/D,CAAC;AAEF,6GAA6G;AAC7G,eAAO,MAAM,iBAAiB,GAC5B,MAAM,eAAe,GAAG,SAAS,EACjC,OAAO,eAAe,GAAG,SAAS,KACjC,MAuBF,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,KAAG,MAGT,CAAC"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Copyright (c) 2026-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
+ import { TypeFamily } from '@finos/legend-cube';
17
+ // How the grid shows and sorts values (PLAN §9, Settled before M1.8).
18
+ // Integer and Decimal values arrive as their exact text and are never turned
19
+ // into JS numbers, which would lose digits.
20
+ const NUMERIC_FAMILIES = new Set([
21
+ TypeFamily.INTEGER,
22
+ TypeFamily.FLOAT,
23
+ TypeFamily.DECIMAL,
24
+ TypeFamily.NUMBER,
25
+ ]);
26
+ export const isNumericFamily = (family) => NUMERIC_FAMILIES.has(family);
27
+ const NUMBER_TEXT = /^(?<sign>[+-]?)(?<whole>\d*)(?:\.(?<fraction>\d*))?(?:[eE](?<exponent>[+-]?\d+))?$/u;
28
+ /** A number's text as sign, digits without leading or trailing zeros, and the position of the decimal point */
29
+ const parseNumberText = (text) => {
30
+ const groups = NUMBER_TEXT.exec(text.trim())?.groups;
31
+ if (!groups || (!groups.whole && !groups.fraction)) {
32
+ return undefined;
33
+ }
34
+ const { sign, whole = '', fraction = '', exponent = '0', } = groups;
35
+ const allDigits = whole + fraction;
36
+ const leadingZeros = allDigits.length - allDigits.replace(/^0+/u, '').length;
37
+ const digits = allDigits.slice(leadingZeros).replace(/0+$/u, '');
38
+ return {
39
+ negative: sign === '-' && digits !== '',
40
+ digits,
41
+ point: whole.length - leadingZeros + Number(exponent),
42
+ };
43
+ };
44
+ const compareMagnitudes = (left, right) => {
45
+ if (!left.digits || !right.digits) {
46
+ return (left.digits ? 1 : 0) - (right.digits ? 1 : 0);
47
+ }
48
+ if (left.point !== right.point) {
49
+ return left.point < right.point ? -1 : 1;
50
+ }
51
+ const length = Math.max(left.digits.length, right.digits.length);
52
+ const a = left.digits.padEnd(length, '0');
53
+ const b = right.digits.padEnd(length, '0');
54
+ return a === b ? 0 : a < b ? -1 : 1;
55
+ };
56
+ /** Compares two numbers written as text, digit for digit: `'9' < '10'`, `'9007199254740993' > '9007199254740992'` */
57
+ export const compareNumberText = (left, right) => {
58
+ const a = parseNumberText(left);
59
+ const b = parseNumberText(right);
60
+ if (!a || !b) {
61
+ // not a number: keep a stable order by text
62
+ return left < right ? -1 : left > right ? 1 : 0;
63
+ }
64
+ if (a.negative !== b.negative) {
65
+ return a.negative ? -1 : 1;
66
+ }
67
+ const magnitude = compareMagnitudes(a, b);
68
+ return a.negative ? -magnitude : magnitude;
69
+ };
70
+ /** Orders a column's values: nulls first, then numbers by value whether they are JS numbers or exact text */
71
+ export const compareCellValues = (left, right) => {
72
+ if (left === null ||
73
+ left === undefined ||
74
+ right === null ||
75
+ right === undefined) {
76
+ return (left ?? null) === null ? ((right ?? null) === null ? 0 : -1) : 1;
77
+ }
78
+ if (typeof left === 'number' && typeof right === 'number') {
79
+ return left - right;
80
+ }
81
+ if ((typeof left === 'string' || typeof left === 'number') &&
82
+ (typeof right === 'string' || typeof right === 'number')) {
83
+ return compareNumberText(String(left), String(right));
84
+ }
85
+ return String(left) < String(right)
86
+ ? -1
87
+ : String(left) > String(right)
88
+ ? 1
89
+ : 0;
90
+ };
91
+ /** A run's duration for the toolbar: milliseconds under a second, else seconds */
92
+ export const formatDuration = (durationMs) => durationMs < 1000
93
+ ? `${Math.round(durationMs)} ms`
94
+ : `${(durationMs / 1000).toFixed(1)} s`;
95
+ //# sourceMappingURL=CubeGridValues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CubeGridValues.js","sourceRoot":"","sources":["../../../src/components/grid/CubeGridValues.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,sEAAsE;AACtE,6EAA6E;AAC7E,4CAA4C;AAE5C,MAAM,gB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ACD,OAAO,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;YAC5B,CAAC,CAAC,CAAC;YACH,CAAC,CAAC,CAAC,CAAC;AACV,CAAC,CAAC;AAEF,kFAAkF;AAClF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,UAAkB,EAAU,EAAE,CAC3D,UAAU,GAAG,IAAI;IACf,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK;IAChC,CAAC,CAAC,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright (c) 2026-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
+ import { type DataGridDefaultMenuItem, type DataGridGetContextMenuItemsParams, type DataGridMenuItemDef } from '@finos/legend-lego/data-grid';
17
+ import type { CubeResultValue } from '../../graph-manager/CubeEngine.js';
18
+ import type { CubeEditorState } from '../../stores/CubeEditorState.js';
19
+ import type { CubeExecutionResult } from '../../stores/CubeExecutionState.js';
20
+ type CubeRow = readonly CubeResultValue[];
21
+ /**
22
+ * The grid's context menu (spec §12.4): on a cell, its quick actions, then
23
+ * ag-grid's own items, which M7 curates; elsewhere ag-grid's only. Read when
24
+ * the menu opens, so it reflects the cube and the run as they are then.
25
+ */
26
+ export declare const getCubeGridContextMenuItems: (editorState: CubeEditorState, params: DataGridGetContextMenuItemsParams<CubeRow>) => (DataGridDefaultMenuItem | DataGridMenuItemDef<CubeRow>)[];
27
+ /**
28
+ * The rows of a run (PLAN §9): columns from Cube's own schema of the capture
29
+ * node, by position, so any column name works. Numbers are right-aligned and
30
+ * shown and sorted exactly as the engine wrote them. A cell's context menu
31
+ * offers the quick actions (`getCubeGridContextMenuItems`).
32
+ */
33
+ export declare const CubeResultGrid: import("react").MemoExoticComponent<(props: {
34
+ editorState: CubeEditorState;
35
+ result: CubeExecutionResult;
36
+ darkMode: boolean;
37
+ }) => import("react/jsx-runtime").JSX.Element>;
38
+ export {};
39
+ //# sourceMappingURL=CubeResultGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CubeResultGrid.d.ts","sourceRoot":"","sources":["../../../src/components/grid/CubeResultGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAIL,KAAK,uBAAuB,EAC5B,KAAK,iCAAiC,EACtC,KAAK,mBAAmB,EACzB,MAAM,8BAA8B,CAAC;AAItC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAI9E,KAAK,OAAO,GAAG,SAAS,eAAe,EAAE,CAAC;AAK1C;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GACtC,aAAa,eAAe,EAC5B,QAAQ,iCAAiC,CAAC,OAAO,CAAC,KACjD,CAAC,uBAAuB,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC,EAyB1D,CAAC;AAWF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,8CACjB;IACN,WAAW,EAAE,eAAe,CAAC;IAC7B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;CACnB,6CA0CF,CAAC"}