@finos/legend-cube-builder 0.0.2 → 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 (197) hide show
  1. package/README.md +60 -1
  2. package/docs/adding-an-operation.md +92 -0
  3. package/docs/hosting.md +79 -0
  4. package/docs/testing.md +83 -0
  5. package/lib/__lib__/LegendCubeHelpText.d.ts.map +1 -1
  6. package/lib/__lib__/LegendCubeHelpText.js +11 -3
  7. package/lib/__lib__/LegendCubeHelpText.js.map +1 -1
  8. package/lib/__lib__/LegendCubeLabels.d.ts +19 -0
  9. package/lib/__lib__/LegendCubeLabels.d.ts.map +1 -1
  10. package/lib/__lib__/LegendCubeLabels.js +19 -0
  11. package/lib/__lib__/LegendCubeLabels.js.map +1 -1
  12. package/lib/__test-utils__/CubeEngineTestSupport.d.ts +6 -0
  13. package/lib/__test-utils__/CubeEngineTestSupport.d.ts.map +1 -1
  14. package/lib/__test-utils__/CubeEngineTestSupport.js +30 -0
  15. package/lib/__test-utils__/CubeEngineTestSupport.js.map +1 -1
  16. package/lib/__test-utils__/CubeOperationsTestUtils.d.ts +42 -0
  17. package/lib/__test-utils__/CubeOperationsTestUtils.d.ts.map +1 -0
  18. package/lib/__test-utils__/CubeOperationsTestUtils.js +92 -0
  19. package/lib/__test-utils__/CubeOperationsTestUtils.js.map +1 -0
  20. package/lib/__test-utils__/FakeCubeEngine.d.ts.map +1 -1
  21. package/lib/__test-utils__/FakeCubeEngine.js +7 -1
  22. package/lib/__test-utils__/FakeCubeEngine.js.map +1 -1
  23. package/lib/components/CubeNodeIcon.d.ts.map +1 -1
  24. package/lib/components/CubeNodeIcon.js +12 -2
  25. package/lib/components/CubeNodeIcon.js.map +1 -1
  26. package/lib/components/canvas/CubeCanvas.d.ts.map +1 -1
  27. package/lib/components/canvas/CubeCanvas.js +5 -3
  28. package/lib/components/canvas/CubeCanvas.js.map +1 -1
  29. package/lib/components/canvas/CubeCanvasElements.d.ts +2 -0
  30. package/lib/components/canvas/CubeCanvasElements.d.ts.map +1 -1
  31. package/lib/components/canvas/CubeCanvasElements.js +2 -1
  32. package/lib/components/canvas/CubeCanvasElements.js.map +1 -1
  33. package/lib/components/canvas/CubeCanvasNode.d.ts.map +1 -1
  34. package/lib/components/canvas/CubeCanvasNode.js +5 -2
  35. package/lib/components/canvas/CubeCanvasNode.js.map +1 -1
  36. package/lib/components/editors/CubeColumnPicker.d.ts +9 -2
  37. package/lib/components/editors/CubeColumnPicker.d.ts.map +1 -1
  38. package/lib/components/editors/CubeColumnPicker.js +9 -4
  39. package/lib/components/editors/CubeColumnPicker.js.map +1 -1
  40. package/lib/components/editors/CubeDistinctEditor.d.ts +23 -0
  41. package/lib/components/editors/CubeDistinctEditor.d.ts.map +1 -0
  42. package/lib/components/editors/CubeDistinctEditor.js +24 -0
  43. package/lib/components/editors/CubeDistinctEditor.js.map +1 -0
  44. package/lib/components/editors/CubeIntegerField.d.ts +29 -0
  45. package/lib/components/editors/CubeIntegerField.d.ts.map +1 -0
  46. package/lib/components/editors/CubeIntegerField.js +30 -0
  47. package/lib/components/editors/CubeIntegerField.js.map +1 -0
  48. package/lib/components/editors/CubeJoinEditor.d.ts.map +1 -1
  49. package/lib/components/editors/CubeJoinEditor.js +11 -3
  50. package/lib/components/editors/CubeJoinEditor.js.map +1 -1
  51. package/lib/components/editors/CubeNodeEditorPanel.d.ts.map +1 -1
  52. package/lib/components/editors/CubeNodeEditorPanel.js +3 -2
  53. package/lib/components/editors/CubeNodeEditorPanel.js.map +1 -1
  54. package/lib/components/editors/CubeNodeEditorRegistry.d.ts.map +1 -1
  55. package/lib/components/editors/CubeNodeEditorRegistry.js +14 -1
  56. package/lib/components/editors/CubeNodeEditorRegistry.js.map +1 -1
  57. package/lib/components/editors/CubeRenameEditor.d.ts +26 -0
  58. package/lib/components/editors/CubeRenameEditor.d.ts.map +1 -0
  59. package/lib/components/editors/CubeRenameEditor.js +58 -0
  60. package/lib/components/editors/CubeRenameEditor.js.map +1 -0
  61. package/lib/components/editors/CubeRestrictEditor.d.ts +26 -0
  62. package/lib/components/editors/CubeRestrictEditor.d.ts.map +1 -0
  63. package/lib/components/editors/CubeRestrictEditor.js +23 -0
  64. package/lib/components/editors/CubeRestrictEditor.js.map +1 -0
  65. package/lib/components/editors/CubeRowCountEditor.d.ts +25 -0
  66. package/lib/components/editors/CubeRowCountEditor.d.ts.map +1 -0
  67. package/lib/components/editors/CubeRowCountEditor.js +38 -0
  68. package/lib/components/editors/CubeRowCountEditor.js.map +1 -0
  69. package/lib/components/editors/CubeSliceEditor.d.ts +25 -0
  70. package/lib/components/editors/CubeSliceEditor.d.ts.map +1 -0
  71. package/lib/components/editors/CubeSliceEditor.js +40 -0
  72. package/lib/components/editors/CubeSliceEditor.js.map +1 -0
  73. package/lib/components/editors/CubeSortEditor.d.ts +27 -0
  74. package/lib/components/editors/CubeSortEditor.d.ts.map +1 -0
  75. package/lib/components/editors/CubeSortEditor.js +72 -0
  76. package/lib/components/editors/CubeSortEditor.js.map +1 -0
  77. package/lib/components/editors/CubeSourceEditor.d.ts.map +1 -1
  78. package/lib/components/editors/CubeSourceEditor.js +1 -2
  79. package/lib/components/editors/CubeSourceEditor.js.map +1 -1
  80. package/lib/components/editors/CubeValueEditor.d.ts.map +1 -1
  81. package/lib/components/editors/CubeValueEditor.js +2 -1
  82. package/lib/components/editors/CubeValueEditor.js.map +1 -1
  83. package/lib/components/grid/CubeGridRegion.d.ts.map +1 -1
  84. package/lib/components/grid/CubeGridRegion.js +1 -1
  85. package/lib/components/grid/CubeGridRegion.js.map +1 -1
  86. package/lib/components/grid/CubeResultGrid.d.ts +14 -1
  87. package/lib/components/grid/CubeResultGrid.d.ts.map +1 -1
  88. package/lib/components/grid/CubeResultGrid.js +41 -5
  89. package/lib/components/grid/CubeResultGrid.js.map +1 -1
  90. package/lib/graph-manager/CubeEngine.d.ts +13 -0
  91. package/lib/graph-manager/CubeEngine.d.ts.map +1 -1
  92. package/lib/graph-manager/CubeEngine.js.map +1 -1
  93. package/lib/graph-manager/CubeModelOutlineHelper.d.ts +8 -0
  94. package/lib/graph-manager/CubeModelOutlineHelper.d.ts.map +1 -1
  95. package/lib/graph-manager/CubeModelOutlineHelper.js +21 -0
  96. package/lib/graph-manager/CubeModelOutlineHelper.js.map +1 -1
  97. package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.d.ts.map +1 -1
  98. package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js +56 -3
  99. package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js.map +1 -1
  100. package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.d.ts.map +1 -1
  101. package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js +3 -3
  102. package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js.map +1 -1
  103. package/lib/index.css +1 -1
  104. package/lib/stores/CubeEditorState.d.ts +34 -4
  105. package/lib/stores/CubeEditorState.d.ts.map +1 -1
  106. package/lib/stores/CubeEditorState.js +87 -6
  107. package/lib/stores/CubeEditorState.js.map +1 -1
  108. package/lib/stores/CubeExecutionState.d.ts.map +1 -1
  109. package/lib/stores/CubeExecutionState.js +19 -3
  110. package/lib/stores/CubeExecutionState.js.map +1 -1
  111. package/lib/stores/CubeGridQuickActions.d.ts +40 -0
  112. package/lib/stores/CubeGridQuickActions.d.ts.map +1 -0
  113. package/lib/stores/CubeGridQuickActions.js +86 -0
  114. package/lib/stores/CubeGridQuickActions.js.map +1 -0
  115. package/lib/stores/CubeNodeEditorState.d.ts +19 -1
  116. package/lib/stores/CubeNodeEditorState.d.ts.map +1 -1
  117. package/lib/stores/CubeNodeEditorState.js +55 -0
  118. package/lib/stores/CubeNodeEditorState.js.map +1 -1
  119. package/lib/stores/CubeShowPureState.d.ts +4 -1
  120. package/lib/stores/CubeShowPureState.d.ts.map +1 -1
  121. package/lib/stores/CubeShowPureState.js +22 -5
  122. package/lib/stores/CubeShowPureState.js.map +1 -1
  123. package/lib/stores/editors/CubeIntegerText.d.ts +24 -0
  124. package/lib/stores/editors/CubeIntegerText.d.ts.map +1 -0
  125. package/lib/stores/editors/CubeIntegerText.js +33 -0
  126. package/lib/stores/editors/CubeIntegerText.js.map +1 -0
  127. package/lib/stores/editors/CubeJoinDraft.d.ts +13 -5
  128. package/lib/stores/editors/CubeJoinDraft.d.ts.map +1 -1
  129. package/lib/stores/editors/CubeJoinDraft.js +21 -12
  130. package/lib/stores/editors/CubeJoinDraft.js.map +1 -1
  131. package/lib/stores/editors/CubeNodeDraftRegistry.d.ts +6 -0
  132. package/lib/stores/editors/CubeNodeDraftRegistry.d.ts.map +1 -1
  133. package/lib/stores/editors/CubeNodeDraftRegistry.js +23 -1
  134. package/lib/stores/editors/CubeNodeDraftRegistry.js.map +1 -1
  135. package/lib/stores/editors/CubeRenameDraft.d.ts +44 -0
  136. package/lib/stores/editors/CubeRenameDraft.d.ts.map +1 -0
  137. package/lib/stores/editors/CubeRenameDraft.js +79 -0
  138. package/lib/stores/editors/CubeRenameDraft.js.map +1 -0
  139. package/lib/stores/editors/CubeRestrictDraft.d.ts +37 -0
  140. package/lib/stores/editors/CubeRestrictDraft.d.ts.map +1 -0
  141. package/lib/stores/editors/CubeRestrictDraft.js +73 -0
  142. package/lib/stores/editors/CubeRestrictDraft.js.map +1 -0
  143. package/lib/stores/editors/CubeRowCountDraft.d.ts +42 -0
  144. package/lib/stores/editors/CubeRowCountDraft.d.ts.map +1 -0
  145. package/lib/stores/editors/CubeRowCountDraft.js +55 -0
  146. package/lib/stores/editors/CubeRowCountDraft.js.map +1 -0
  147. package/lib/stores/editors/CubeSliceDraft.d.ts +42 -0
  148. package/lib/stores/editors/CubeSliceDraft.d.ts.map +1 -0
  149. package/lib/stores/editors/CubeSliceDraft.js +72 -0
  150. package/lib/stores/editors/CubeSliceDraft.js.map +1 -0
  151. package/lib/stores/editors/CubeSortDraft.d.ts +49 -0
  152. package/lib/stores/editors/CubeSortDraft.d.ts.map +1 -0
  153. package/lib/stores/editors/CubeSortDraft.js +99 -0
  154. package/lib/stores/editors/CubeSortDraft.js.map +1 -0
  155. package/package.json +8 -8
  156. package/src/__lib__/LegendCubeHelpText.ts +22 -2
  157. package/src/__lib__/LegendCubeLabels.ts +30 -0
  158. package/src/__test-utils__/CubeEngineTestSupport.ts +35 -0
  159. package/src/__test-utils__/CubeOperationsTestUtils.ts +177 -0
  160. package/src/__test-utils__/FakeCubeEngine.ts +7 -1
  161. package/src/components/CubeNodeIcon.tsx +18 -1
  162. package/src/components/canvas/CubeCanvas.tsx +5 -3
  163. package/src/components/canvas/CubeCanvasElements.ts +4 -1
  164. package/src/components/canvas/CubeCanvasNode.tsx +9 -1
  165. package/src/components/editors/CubeColumnPicker.tsx +36 -12
  166. package/src/components/editors/CubeDistinctEditor.tsx +28 -0
  167. package/src/components/editors/CubeIntegerField.tsx +51 -0
  168. package/src/components/editors/CubeJoinEditor.tsx +26 -3
  169. package/src/components/editors/CubeNodeEditorPanel.tsx +12 -1
  170. package/src/components/editors/CubeNodeEditorRegistry.ts +20 -0
  171. package/src/components/editors/CubeRenameEditor.tsx +143 -0
  172. package/src/components/editors/CubeRestrictEditor.tsx +103 -0
  173. package/src/components/editors/CubeRowCountEditor.tsx +53 -0
  174. package/src/components/editors/CubeSliceEditor.tsx +69 -0
  175. package/src/components/editors/CubeSortEditor.tsx +206 -0
  176. package/src/components/editors/CubeSourceEditor.tsx +0 -10
  177. package/src/components/editors/CubeValueEditor.tsx +2 -1
  178. package/src/components/grid/CubeGridRegion.tsx +1 -0
  179. package/src/components/grid/CubeResultGrid.tsx +59 -5
  180. package/src/graph-manager/CubeEngine.ts +14 -0
  181. package/src/graph-manager/CubeModelOutlineHelper.ts +26 -0
  182. package/src/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.ts +89 -3
  183. package/src/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.ts +6 -3
  184. package/src/stores/CubeEditorState.ts +110 -5
  185. package/src/stores/CubeExecutionState.ts +36 -3
  186. package/src/stores/CubeGridQuickActions.ts +129 -0
  187. package/src/stores/CubeNodeEditorState.ts +70 -1
  188. package/src/stores/CubeShowPureState.ts +27 -5
  189. package/src/stores/editors/CubeIntegerText.ts +34 -0
  190. package/src/stores/editors/CubeJoinDraft.ts +43 -16
  191. package/src/stores/editors/CubeNodeDraftRegistry.ts +35 -1
  192. package/src/stores/editors/CubeRenameDraft.ts +110 -0
  193. package/src/stores/editors/CubeRestrictDraft.ts +83 -0
  194. package/src/stores/editors/CubeRowCountDraft.ts +69 -0
  195. package/src/stores/editors/CubeSliceDraft.ts +87 -0
  196. package/src/stores/editors/CubeSortDraft.ts +135 -0
  197. package/tsconfig.json +15 -0
package/README.md CHANGED
@@ -3,4 +3,63 @@
3
3
  The UI and the Legend engine adapter of Legend Cube, a canvas-based visual query builder. The domain model lives in the
4
4
  host-free [`@finos/legend-cube`](../legend-cube).
5
5
 
6
- Legend Query mounts Legend Cube at `/query/cube`.
6
+ It holds the page (the canvas, the palette, the side-panel editors, the source picker and the results grid), its MobX
7
+ stores, the engine port with its `v1/` adapter, and the bundled model catalog. Legend Query hosts the page at
8
+ `/query/cube`.
9
+
10
+ **Status:** work in progress, version 0.0.x. This version has relational tables, Join, Sort, Filter, Restrict, Rename, Distinct, Drop, Limit and Slice, with one model, one
11
+ runtime and one database per query. A cube is kept only through Export and Import of its spec, marked "(dev)", until
12
+ the Cube store exists. A pasted model is kept in the cube. Nothing links to the page yet, there is no redo, and Cube sends no telemetry.
13
+
14
+ ## Layout
15
+
16
+ | Folder | Holds |
17
+ | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
18
+ | `src/components/` | the page, `CubeEditor`, and its parts: `canvas/`, `palette/`, `editors/`, `source-picker/`, `grid/`, `show-pure/`, `spec-transfer/` |
19
+ | `src/stores/` | the MobX state of the page, its parts and the side panel; `editors/` (node drafts); `LocalModelCatalog` and `fixtures/` (the bundled model); `CubeHost` |
20
+ | `src/graph-manager/` | the engine port (`CubeEngine.ts`) and `buildCubeEngine` |
21
+ | `src/graph-manager/protocol/pure/v1/` | the engine adapter, `V1_LegendCubeEngine`: the lambda serializer, the result and relation-type readers, the error mapping |
22
+ | `src/__lib__/` | labels, help text, the command config and test ids |
23
+ | `src/__test-utils__/` | the fake engine and the helpers of the tests |
24
+ | `style/` | the stylesheet, built to `lib/index.css` |
25
+
26
+ It depends on `@finos/legend-cube`, legend-graph, legend-application, legend-art, legend-lego and legend-shared, never
27
+ on an application package (`legend-application-*`) or on legend-query-builder.
28
+
29
+ **The V1 rule:** `V1_*` protocol code lives under `src/graph-manager/protocol/pure/v1/`. The one product file outside
30
+ it that names `V1_*` is the seam `src/graph-manager/protocol/pure/CubeEngineBuilder.ts`: `buildCubeEngine` is the only
31
+ product code that makes a `V1_LegendCubeEngine`, so hosts never name a `V1_*` symbol. The repo's
32
+ `enforce-module-import-hierarchy` lint rule forbids imports between `stores/` or `components/` and `v1/`, both ways.
33
+ The engine-backed tests in `src/__tests__/` are an exception: they need both the adapter and `stores/`.
34
+
35
+ ## Public API
36
+
37
+ `src/index.ts` exports:
38
+
39
+ - `CubeEditor`, the page, and `CubeHost`, what a host gives it;
40
+ - the engine port, everything in `CubeEngine.ts` (`CubeEngine`, `CubeEngineError`, `CubeEngineErrorKind`,
41
+ `CubeResult`, `CubeModelOutline`, …), with `buildCubeEngine` and `CubeEngineConfig`;
42
+ - `LocalModelCatalog` and `BUNDLED_MODELS`;
43
+ - `LEGEND_CUBE_COMMAND_CONFIG` and `LEGEND_CUBE_COMMAND_KEY`, the page's shortcuts;
44
+ - `LEGEND_CUBE_TEST_ID`;
45
+ - helpers that 0.0.2 published and nothing outside the package uses yet: `getRuntimesForDatabase`, `createTextModel`,
46
+ `BundledModel`, and the bundled model's `CUBE_NORTHWIND_MODEL`, `CUBE_NORTHWIND_DATABASE` and
47
+ `CUBE_NORTHWIND_RUNTIME`.
48
+
49
+ The node-type registries (drafts, editors, help text and icons) are internal: there is no plugin API for node types
50
+ yet.
51
+
52
+ ## New source kinds
53
+
54
+ Adding a kind of source (beyond relational tables) is not a registration yet. The builder is wired to relational
55
+ tables in `CubeEditorState` (re-checking tables, opening the picker), `CubeSourcePickerState`, `CubeJoinDraft`,
56
+ `CubeSourceEditor`, and the port's `resolveSchemas` and `CubeModelOutline`. New sources wait on the design of the
57
+ sources dialog.
58
+
59
+ ## Documentation
60
+
61
+ - [Hosting the page](./docs/hosting.md): what a host gives the page, the shortcuts, the stylesheet, and the dev loop.
62
+ - [Testing](./docs/testing.md): the test groups, the fake engine, and the tests against a real engine.
63
+ - [Adding an operation](./docs/adding-an-operation.md): the builder half of a new transform. The core half is in
64
+ [`@finos/legend-cube`](../legend-cube/docs/adding-an-operation.md).
65
+ - [The plan](../../docs/wip/legend-cube/PLAN.md) and [the known issues](../../docs/wip/legend-cube/ISSUES.md).
@@ -0,0 +1,92 @@
1
+ # Adding an operation: the builder half
2
+
3
+ Start with the core half, in [`@finos/legend-cube`'s guide](../../legend-cube/docs/adding-an-operation.md): the
4
+ node, its messages, emitter and codec, and its entry in the node registry. The palette, the context menu and the
5
+ canvas read that registry, so the new type shows there with no change here.
6
+
7
+ The builder adds four pieces: a draft, an editor and help text, in registries keyed by node type, and an icon, keyed by
8
+ the icon name the node's definition gives. Join and Filter are the examples to follow.
9
+
10
+ ## 1. A draft
11
+
12
+ The side panel never edits the document: an editor edits a draft, and the panel's **Apply** stores the draft's node
13
+ as one undo step (**Cancel** drops it).
14
+
15
+ - In `src/stores/editors/Cube<Type>Draft.ts`, extend `CubeNodeDraft<Type>`: observable fields for the settings being
16
+ edited, actions that change them, and `build()`. `build()` returns `original` itself while nothing was edited, and
17
+ otherwise a new node with the same id and `rest`. The panel also treats a node that saves the same as `original`
18
+ as no change.
19
+ - Register a factory in `CUBE_NODE_DRAFT_FACTORIES` (`src/stores/editors/CubeNodeDraftRegistry.ts`).
20
+ - A transform with nothing to set, such as Distinct, has no draft: it registers an editor that only describes it
21
+ (`CubeDistinctEditor`) and is listed in `CUBE_NODE_TYPES_WITHOUT_SETTINGS`, which the registry test skips when it
22
+ asks for a factory. The panel then shows no Apply or Cancel (PLAN §7.4 item 2).
23
+
24
+ ## 2. An editor
25
+
26
+ - In `src/components/editors/Cube<Type>Editor.tsx`, an `observer` component taking `CubeNodeEditorProps`:
27
+ `editorState`, `draft`, `inputSchemas` (the inputs' schemas in port order; the panel shows the editor only once all
28
+ are there) and `readOnly` (a cube saved by a newer version: show, don't edit).
29
+ - It changes only the draft. An action on the document, such as Join's Swap Inputs, goes through
30
+ `editorState.nodeEditor`, which applies the draft first.
31
+ - `CubeColumnPicker` picks a column from a schema, and `CubeValueEditor` takes a value as a column's type wants it.
32
+ `isColumnDisabled` gives the reason a column can't be picked, shown after its type, as Sort does for a type that can't
33
+ be sorted (`isSortableType`) and a column another row has; the column stays shown.
34
+ - A whole-number setting (a size, a row index) is a `CubeIntegerField` over text the draft keeps as typed, read with
35
+ `parseWholeNumberText` (`src/stores/editors/CubeIntegerText.ts`): an optional sign and digits, nothing else, and empty
36
+ text gives `undefined`, which the node reports. Never `Number()` the raw text (it reads `''` as 0, `0x10` as 16 and
37
+ `1e3` as 1000) and never fall back to a default. `CubeRowCountDraft` and `CubeRowCountEditor` (Limit's) are the
38
+ example.
39
+ - Give each control a stable `aria-label` (numbered per row in a list, e.g. `Sort column 2`): the tests and the
40
+ browser rehearsal find controls by it.
41
+ - An editor must work in either host: today's side panel, or a floating editor anchored under the node, which M3
42
+ decides on (PLAN §11.4, §12.2 question 1). Don't rely on the panel's height: a list scrolls on its own (a
43
+ `max-height` with `overflow: auto`), column and direction pickers stay native `<select>` elements, as
44
+ `CubeColumnPicker` is, and no editor measures the panel or reads its size.
45
+ - A Tailwind class no other file uses yet, such as an arbitrary `grid-cols-[…]`, does nothing in the dev server until
46
+ the deployment's Tailwind build runs again ([hosting.md](./hosting.md)); jsdom tests don't see it either way, so
47
+ check a new layout in the browser.
48
+ - Register it in `CUBE_NODE_EDITORS` (`src/components/editors/CubeNodeEditorRegistry.ts`).
49
+
50
+ ## 3. Help text
51
+
52
+ An entry in `CUBE_NODE_HELP_TEXT` (`src/__lib__/LegendCubeHelpText.ts`), shown in the panel's header. Use the spec's
53
+ text (§17.9) where it has one.
54
+
55
+ ## 4. An icon
56
+
57
+ Map the icon name of the node's definition to a legend-art icon in `NODE_ICONS` (`src/components/CubeNodeIcon.tsx`).
58
+
59
+ ## Warnings
60
+
61
+ A warning is never an error: it doesn't make the node invalid or keep Execute from running. A warning worked out from
62
+ the query, as the Sort warning is (`findLostSortOrders` in the core), goes in `CubeEditorState.derivedWarnings`, by
63
+ node id, so it follows every edit and undo and is never stored; one about the outside world, such as a table that
64
+ changed, is stored in `CubeEditorState.warnings`, by node key. `getNodeWarnings(node)` gives both: the canvas marks the
65
+ node (`legend-cube__node--warning`) and lists them in its tooltip after its errors, and the panel shows each one as a
66
+ `role="status"` line above the editor. A derived warning waits until the nodes it names have no errors of their own.
67
+
68
+ ## Columns that change name
69
+
70
+ The Join editor warns when a join key's column has no type in the model, tracing the column back to its table and the
71
+ table's own name for it with `findColumnOrigins` (`src/stores/editors/CubeJoinDraft.ts`). It requires each node's
72
+ output to have the column, maps a Rename's new name back to its old one, and follows a Join's same-named keys to the
73
+ side the join keeps. Every other node is taken to pass its input's columns through under the same name. If a new
74
+ transform's output columns aren't its inputs' under the same name (a computed column, say), teach `findColumnOrigins`
75
+ how they map back, or the warning goes missing or shows on the wrong column.
76
+
77
+ ## Tests
78
+
79
+ - `src/components/editors/__tests__/CubeNodeEditorRegistry.test.ts` fails for a type missing a piece: it checks every
80
+ registered type for help text, an icon and an editor, and that each transform's draft gives back its node until
81
+ edited. Add the new help text to its exact list.
82
+ - Add the new item, in the spec's menu order, to the lists in `src/components/palette/__tests__/CubePalette.test.tsx`
83
+ and to `TRANSFORMS` in `src/components/canvas/__tests__/CubeCanvasContextMenu.test.tsx`.
84
+ - A draft test (`src/stores/editors/__tests__/`) and an editor test (`src/components/editors/__tests__/`), as Join's
85
+ and Filter's are.
86
+ - An engine test of the operation in `src/__tests__/LegendCubeOperations.engine-roundtrip-test.ts` (see
87
+ [Testing](./testing.md)): its lambda as the engine parses the printed Pure, its typing against Cube's inferred
88
+ schema, and what it returns, not its text.
89
+
90
+ The `v1/` adapter (`V1_CubeLambdaSerializer`) needs no change while the operation's emitter uses only IR and literal
91
+ kinds it already writes. A new kind of IR node or literal needs its own case there, with a test in
92
+ `src/graph-manager/protocol/pure/v1/__tests__/`.
@@ -0,0 +1,79 @@
1
+ # Hosting the Cube page
2
+
3
+ A Legend application hosts the page by giving it a `CubeHost` and contributing its shortcuts. Legend Query is the
4
+ host today: `LegendQueryCubeHost` (`src/stores/cube/`), and the lazy route and page (`src/components/cube/`) of
5
+ `@finos/legend-application-query`.
6
+
7
+ ## The host
8
+
9
+ ```ts
10
+ interface CubeHost {
11
+ readonly applicationStore: GenericLegendApplicationStore;
12
+ readonly engine: CubeEngine;
13
+ readonly modelCatalog: LocalModelCatalog;
14
+ }
15
+ ```
16
+
17
+ - **The application store** gives the page its commands, user data, clipboard, theme, notifications and alerts, and
18
+ its telemetry service, which Cube doesn't use yet: it sends no events. Cube keeps no auth or config of its own.
19
+ - **The engine:** `buildCubeEngine(config, tracerService)` builds Legend's implementation of the `CubeEngine` port.
20
+ `config` is the engine client's configuration (`CubeEngineConfig`); Legend Query passes its own engine server URL
21
+ and options, so Cube talks to the engine its query editor uses.
22
+ - **The models:** `new LocalModelCatalog(engine)`. It offers `BUNDLED_MODELS` (the "Northwind (Cube fixture)" model)
23
+ and caches each model's outline: its tables, for the source picker, and its runtimes' connections with their
24
+ database types, which Drop, Slice, Limit and Distinct need on some databases (PLAN §11.4). Users can also paste a Pure
25
+ model.
26
+
27
+ Render the page with `<CubeEditor host={host} />`, and pass `initialDocument` to open a given cube. The page's state
28
+ lives as long as the page; Legend Query makes a new host on each visit.
29
+
30
+ **The bundled model runs only on an engine that allows LocalH2.** It sets up Northwind in an in-memory H2 database
31
+ through its connection's `testDataSetupSqls`. On an engine that forbids LocalH2, its queries don't run.
32
+
33
+ ## Shortcuts
34
+
35
+ A Legend application binds keys only through its plugins. The host returns the page's commands from one of its
36
+ plugins:
37
+
38
+ ```ts
39
+ override getExtraKeyedCommandConfigEntries(): KeyedCommandConfigEntry[] {
40
+ return collectKeyedCommandConfigEntriesFromConfig(LEGEND_CUBE_COMMAND_CONFIG);
41
+ }
42
+ ```
43
+
44
+ The page registers the commands while it is open: F9 runs the query, and Ctrl+Z or Cmd+Z undoes.
45
+
46
+ ## The stylesheet
47
+
48
+ - Import `@finos/legend-cube-builder/lib/index.css` in the host's stylesheet (Legend Query does it in
49
+ `legend-application-query-bootstrap/style/index.scss`). The page's root element has the class `legend-cube`.
50
+ - The page uses Tailwind classes. The host's Tailwind build must scan the builder's sources: Legend Query's deployment
51
+ scans `../legend-*/src/**/*.tsx`. So Tailwind classes go in `.tsx` files only.
52
+ - React Flow's stylesheet comes with the canvas. Load the page lazily, as Legend Query does, to keep it and the page's
53
+ libraries out of the host's main bundle.
54
+
55
+ ## The dev loop
56
+
57
+ 1. Start an engine on `localhost:6300` that allows LocalH2: legend-engine's `org.finos.legend.engine.server.Server`
58
+ from an IDE, or the repo's docker compose
59
+ (`fixtures/legend-docker-setup/grammar-test-setup/grammar-test-setup-docker-compose.yml`). Check it with
60
+ `curl -s localhost:6300/api/server/v1/info`.
61
+ 2. Run `yarn build` once: `yarn dev:ts` doesn't build the stylesheets.
62
+ 3. Run `yarn dev:ts` and `yarn dev:query`, and open `http://localhost:9001/query/cube`.
63
+ 4. Run `yarn workspace @finos/legend-cube-builder dev:sass` to rebuild the stylesheet as you change it (the root
64
+ `yarn dev:ts` already rebuilds the TypeScript).
65
+
66
+ If Tailwind classes seem to do nothing, the deployment's Tailwind watcher may have stopped: it exits when
67
+ `yarn dev:query` runs without a terminal. Restart it in a terminal of its own with
68
+ `yarn workspace @finos/legend-application-query-deployment dev:tailwindcss`, or rebuild once with `build:tailwindcss`
69
+ (again after each new class).
70
+
71
+ **A second checkout.** To run a second copy next to the first (another git worktree, say), give it its own port and
72
+ skip the watchers you don't need: in that checkout, run `yarn install`, `yarn build` and
73
+ `yarn workspace @finos/legend-application-query-deployment setup` once, then
74
+ `yarn workspace @finos/legend-application-query-deployment build:tailwindcss` and
75
+ `yarn workspace @finos/legend-application-query-deployment dev:webpack --port 9002`, and open
76
+ `http://localhost:9002/query/cube`. The dev server serves the packages' built `lib/`, so rebuild what you change
77
+ (`yarn workspace @finos/legend-cube-builder build:ts`, and `@finos/legend-cube`'s) before looking, or run `yarn dev:ts`.
78
+
79
+ The manual check of the whole page is the plan's Part B (PLAN §11.2).
@@ -0,0 +1,83 @@
1
+ # Testing Legend Cube's builder
2
+
3
+ The builder has two test groups:
4
+
5
+ - **`core`** (the default group): unit tests and jsdom page tests against a fake engine. No engine needed:
6
+ `TEST_GROUP=core yarn workspace @finos/legend-cube-builder test`.
7
+ - **`engine-roundtrip`**: tests against a real engine on `localhost:6300`, in files named
8
+ `*.engine-roundtrip-test.ts`: `TEST_GROUP=engine-roundtrip yarn workspace @finos/legend-cube-builder test`.
9
+
10
+ A plain `yarn workspace @finos/legend-cube-builder test` runs both, so it fails without an engine. Add a path pattern to
11
+ run some files, e.g. `TEST_GROUP=core yarn workspace @finos/legend-cube-builder test source-picker`. The core
12
+ (`@finos/legend-cube`) has no engine tests.
13
+
14
+ ## Page tests, against a fake engine
15
+
16
+ - `const { host, fake } = TEST__createCubeHost()` gives a host over `createFakeCubeEngine()`'s engine, and `fake`,
17
+ its Jest mocks, answering from `FAKE_NORTHWIND_OUTLINE` and `FAKE_NORTHWIND_SCHEMAS`. Override an answer per test,
18
+ e.g. `fake.execute.mockRejectedValueOnce(…)`, or pass answers to `TEST__createCubeHost(answers)`.
19
+ - `TEST__renderInCubeApplication(<CubeEditor host={host} />, host.applicationStore, LEGEND_CUBE_TEST_ID.EDITOR)`
20
+ renders the page in a Legend application and waits for it.
21
+ - A test of one part of the page makes the state itself, `new CubeEditorState(host, document)`, and renders the part
22
+ with it, e.g. `<CubeCanvas editorState={editorState} />` and `<CubeNodeEditorPanel editorState={editorState} />`
23
+ (as `CubeJoinEditor.test.tsx` does). `TEST__importDocument(editorState, document)` then imports a cube and waits
24
+ for its tables to be typed again, so nothing changes after the test. A `<CubeEditor>` test has no handle on the
25
+ state, so it imports through the Import dialog.
26
+ - `TEST__findCanvasNode(id)`, `TEST__getCanvasNodes()` and `TEST__getCanvasNodeTooltip(node)` read the canvas.
27
+ - `src/__test-utils__/CubeNorthwindTestQueries.ts` has the Northwind tables' columns and ready-made queries, e.g.
28
+ `sliceQuery()`.
29
+
30
+ What jsdom can't do:
31
+
32
+ - **Fit the canvas.** jsdom measures nothing, so React Flow never reports the nodes measured and the refit never runs.
33
+ Check fitting in a browser (PLAN §11.2 Part B).
34
+ - **Show Chrome's own behaviour**, e.g. its date input sending React no Enter key.
35
+ - **Print a failing comparison of two queries.** A query holds `BigInt`s, which Jest can't print, so a failing
36
+ `toBe` between queries crashes the worker. Compare them as booleans: `expect(a === b).toBe(true)`.
37
+
38
+ Drag and drop goes through react-dnd's HTML5 backend: fire `dragStart`, `dragEnter`, `dragOver`, `drop` and
39
+ `dragEnd` on the elements.
40
+
41
+ **Proving a test.** To show a new test fails without the code it covers, change the code in a copy of the package
42
+ outside the checkout, never in place: a running `yarn dev:ts` rebuilds `lib/` from the changed file, and the dev server
43
+ would serve it.
44
+
45
+ ## Engine tests
46
+
47
+ - **The engine:** a local legend-engine, or the repo's docker compose
48
+ (`fixtures/legend-docker-setup/grammar-test-setup/grammar-test-setup-docker-compose.yml`), on `localhost:6300`. CI
49
+ runs the group on that docker image.
50
+ - **No `fetch` in Jest:** the repo's Jest setup blocks it. Engine tests reach the engine through axios: the
51
+ `CUBE_ENGINE_TEST__*` helpers (`src/__test-utils__/CubeEngineTestSupport.ts`) for direct calls, and
52
+ `V1_createEngineBackedCubeEngine()` (`src/graph-manager/protocol/pure/v1/__test-utils__/`). The latter returns
53
+ `{ engine, calls }`: a real `V1_LegendCubeEngine` whose client calls are spied onto those helpers (and legend-graph's
54
+ `ENGINE_TEST_SUPPORT__grammarToJSON_model`), and the spies. Make it in `beforeEach` or in the test: the repo's Jest
55
+ config restores mocks before each test, so an engine made in `beforeAll` would call the real client, and the
56
+ blocked `fetch`.
57
+ - **Assert meaning, not text.** The CI engine image changes with every engine merge, so assert row counts, the set of
58
+ keys returned, types and nullability, not SQL or Pure formatting, and never an engine answer that is a known
59
+ defect.
60
+ - **Rows come back in the database's order** unless a Sort reaches the node that runs, and H2's order changes between
61
+ queries, so compare counts and sets, never positions, without a Sort. Facts of the Cube Northwind data a test may
62
+ rely on: ORDERS has 830 orders, `ORDER_ID` running from 10248 to 11077 with no gap. Avoid comparing or sorting on its
63
+ 32-bit `REAL` columns (`FREIGHT`, `UNIT_PRICE`, `DISCOUNT`), where exact equality silently matches nothing.
64
+ - `src/__tests__/LegendCubeNorthwind.engine-roundtrip-test.ts` is the slice's automated acceptance (PLAN §11.2 Part
65
+ A). It logs the engine's commit.
66
+ - `src/__tests__/LegendCubeOperations.engine-roundtrip-test.ts` checks each operation: its lambda as the engine parses
67
+ the printed Pure, its typing against Cube's inferred schema, and its rows. Its helpers are in
68
+ `src/__test-utils__/CubeOperationsTestUtils.ts`; they take any `CubeEngine` and import no `V1_*` class.
69
+ - **Sort descending in order tests.** H2 scans ORDERS in ascending `ORDER_ID` order, so a test that sorts ascending,
70
+ or numbers rows by `ORDER_ID`, passes without the sort; the operations tests sort descending, with a control test
71
+ pinning H2's own order.
72
+ - **Database workarounds** (PLAN §11.4) are checked two ways. The operations tests write them for `SqlServer` and run
73
+ them on the fixture's H2, which takes both forms, so their rows can be compared with the native forms'.
74
+ `src/__tests__/LegendCubeDialects.engine-roundtrip-test.ts` plans them, never running anything, on a test-only copy
75
+ of the fixture model with a static connection per database type (`CUBE_ENGINE_TEST__generatePlanSql`), and checks
76
+ facts about the SQL: row numbers in the Sort's order, no `limit m,n`, no `top N distinct`. A check that should catch
77
+ a missing workaround must fail without it: run it once with the workaround off before relying on it.
78
+ - `src/__tests__/CubeNorthwindRelationTypes.json` records the engine's relation type for every table of the bundled
79
+ model. If the test comparing with it fails, the engine's typing changed: check the change, then record the file
80
+ again by hand.
81
+
82
+ The engine tests in `src/__tests__/` import `V1_*` classes there, as an exception to the V1 rule: they need both the
83
+ `v1/` adapter and `stores/`, which the import-hierarchy lint rule keeps apart.
@@ -1 +1 @@
1
- {"version":3,"file":"LegendCubeHelpText.d.ts","sourceRoot":"","sources":["../../src/__lib__/LegendCubeHelpText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOhE,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,mBAAmB,iGACgE,CAAC"}
1
+ {"version":3,"file":"LegendCubeHelpText.d.ts","sourceRoot":"","sources":["../../src/__lib__/LegendCubeHelpText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAoBH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmBhE,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,mBAAmB,iGACgE,CAAC"}
@@ -13,13 +13,21 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Filter, Join, RelationalTableSource, UnknownNode, } from '@finos/legend-cube';
17
- // The node editor's help text, verbatim from the original (spec §17.9). A
18
- // new node type adds its entry here.
16
+ import { Distinct, Drop, Filter, Join, Limit, RelationalTableSource, Rename, Restrict, Slice, Sort, UnknownNode, } from '@finos/legend-cube';
17
+ // The node editor's help text, verbatim from the original (spec §17.9), but
18
+ // Slice's, which counts rows from 0 and leaves the stop row out (D5, PLAN
19
+ // §11.4). A new node type adds its entry here.
19
20
  export const CUBE_NODE_HELP_TEXT = {
20
21
  [RelationalTableSource.TYPE]: 'Sources data from relational database table.',
22
+ [Distinct.TYPE]: 'Removes duplicate rows from the previous data set.',
23
+ [Drop.TYPE]: 'Reduces the number of rows in the previous data set, removing the specified number of rows from the beginning of the data set.',
21
24
  [Filter.TYPE]: 'Reduces the number of rows in the previous data set, keeping only rows matching the specified criteria.',
22
25
  [Join.TYPE]: 'Joins two previous data sets using specified columns as join keys.',
26
+ [Limit.TYPE]: 'Reduces the number of rows in the previous data set, keeping the specified number of rows from the beginning of the data set.',
27
+ [Rename.TYPE]: 'Renames specified columns in the previous data set to new names.',
28
+ [Restrict.TYPE]: 'Restricts outgoing data set to the specified columns only.',
29
+ [Slice.TYPE]: 'Reduces the number of rows in the previous data set, keeping only the rows from position "start" up to, but not including, position "stop", counting from 0.',
30
+ [Sort.TYPE]: 'Reorders rows of the previous data set by one or more columns, either in ascending or descending order per column.',
23
31
  [UnknownNode.TYPE]: 'Source or transformation unknown to the application.',
24
32
  };
25
33
  /** The tooltip of the editor's Select link (spec §17.9) */
@@ -1 +1 @@
1
- {"version":3,"file":"LegendCubeHelpText.js","sourceRoot":"","sources":["../../src/__lib__/LegendCubeHelpText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,MAAM,EACN,IAAI,EACJ,qBAAqB,EACrB,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAE5B,0EAA0E;AAC1E,qCAAqC;AAErC,MAAM,CAAC,MAAM,mBAAmB,GAAqC;IACnE,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,8CAA8C;IAC5E,CAAC,MAAM,CAAC,IAAI,CAAC,EACX,yGAAyG;IAC3G,CAAC,IAAI,CAAC,IAAI,CAAC,EACT,oEAAoE;IACtE,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,sDAAsD;CAC3E,CAAC;AAEF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,mBAAmB,GAC9B,8FAA8F,CAAC"}
1
+ {"version":3,"file":"LegendCubeHelpText.js","sourceRoot":"","sources":["../../src/__lib__/LegendCubeHelpText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,qBAAqB,EACrB,MAAM,EACN,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAE5B,4EAA4E;AAC5E,0EAA0E;AAC1E,+CAA+C;AAE/C,MAAM,CAAC,MAAM,mBAAmB,GAAqC;IACnE,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,8CAA8C;IAC5E,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,oDAAoD;IACrE,CAAC,IAAI,CAAC,IAAI,CAAC,EACT,gIAAgI;IAClI,CAAC,MAAM,CAAC,IAAI,CAAC,EACX,yGAAyG;IAC3G,CAAC,IAAI,CAAC,IAAI,CAAC,EACT,oEAAoE;IACtE,CAAC,KAAK,CAAC,IAAI,CAAC,EACV,+HAA+H;IACjI,CAAC,MAAM,CAAC,IAAI,CAAC,EACX,kEAAkE;IACpE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,4DAA4D;IAC7E,CAAC,KAAK,CAAC,IAAI,CAAC,EACV,8JAA8J;IAChK,CAAC,IAAI,CAAC,IAAI,CAAC,EACT,oHAAoH;IACtH,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,sDAAsD;CAC3E,CAAC;AAEF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,mBAAmB,GAC9B,8FAA8F,CAAC"}
@@ -51,6 +51,19 @@ export declare const getColumnTypeLabel: (column: SchemaColumn) => string;
51
51
  export declare const formatDisabledReasons: (reasons: readonly string[]) => string;
52
52
  /** The warning on a source whose table changed since the cube was saved; the table's new columns are used */
53
53
  export declare const getSchemaDriftWarning: (diff: SchemaDiff) => string;
54
+ /** Why the Sort editor's picker doesn't offer a column, after its type */
55
+ export declare const CUBE_SORT_COLUMN_DISABLED_REASON: {
56
+ NOT_SORTABLE: string;
57
+ TAKEN: string;
58
+ };
59
+ /** Why the grid's quick actions (spec §12.4) can't be used */
60
+ export declare const CUBE_QUICK_ACTION_DISABLED_REASON: {
61
+ STALE_ROWS: string;
62
+ RUNNING: string;
63
+ UNREADABLE_VALUE: string;
64
+ notSortable: (typeName: string) => string;
65
+ notComparable: (typeName: string) => string;
66
+ };
54
67
  /** Beside a condition comparing a floating-point column for equality (R133) */
55
68
  export declare const FILTER_FLOAT_COMPARISON_HINT = "exact comparison on floating-point columns may not match";
56
69
  /** The Filter editor's note on NULLs (D4): negated conditions keep them */
@@ -65,4 +78,10 @@ export declare enum CUBE_EDITOR_CLOSED_REASON {
65
78
  export declare const getEditorClosedNotice: (nodeId: string, reason: CUBE_EDITOR_CLOSED_REASON) => string;
66
79
  /** The warning on a source with saved columns that the engine couldn't type again */
67
80
  export declare const getSourceRecheckWarning: (firstLine: string) => string;
81
+ /** Under the Slice editor's fields: the range counts from 0, and leaves out its stop row (D5) */
82
+ export declare const SLICE_RANGE_HINT = "Rows count from 0: the start row is kept, the stop row is not.";
83
+ /** The Distinct editor's text: it has nothing to set (spec §17.6) */
84
+ export declare const DISTINCT_EDITOR_TEXT = "Keeps one row of each set of identical rows. There is nothing to set.";
85
+ /** Under the Rename editor's rows: the rule for new column names (PLAN §11.4) */
86
+ export declare const COLUMN_NAME_RULES_HINT = "Names can't start or end with a space, or contain \" or \\ or control characters, and have at most 128 characters.";
68
87
  //# sourceMappingURL=LegendCubeLabels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendCubeLabels.d.ts","sourceRoot":"","sources":["../../src/__lib__/LegendCubeLabels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EA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MAAM,sBAAsB,EAAE,QAAQ,CAC3C,MAAM,CAAC,aAAa,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAc9D,CAAC;AAEF,2GAA2G;AAC3G,eAAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY,KAAG,MACC,CAAC;AAK5D,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB,GAAI,SAAS,SAAS,MAAM,EAAE,KAAG,MAChB,CAAC;AAEpD,6GAA6G;AAC7G,eAAO,MAAM,qBAAqB,GAAI,MAAM,UAAU,KAAG,MAiBxD,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,gCAAgC;;;CAG5C,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,iCAAiC;;;;4BAKpB,MAAM,KAAG,MAAM;8BAEb,MAAM,KAAG,MAAM;CAE1C,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,4BAA4B,6DACmB,CAAC;AAE7D,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,iIACmG,CAAC;AAEjI,4DAA4D;AAC5D,oBAAY,yBAAyB;IACnC,YAAY,gBAAgB;IAC5B,YAAY,gBAAgB;IAC5B,aAAa,iBAAiB;CAC/B;AAED,oFAAoF;AACpF,eAAO,MAAM,qBAAqB,GAChC,QAAQ,MAAM,EACd,QAAQ,yBAAyB,KAChC,MAQF,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,uBAAuB,GAAI,WAAW,MAAM,KAAG,MACkB,CAAC;AAE/E,iGAAiG;AACjG,eAAO,MAAM,gBAAgB,mEACqC,CAAC;AAEnE,qEAAqE;AACrE,eAAO,MAAM,oBAAoB,0EACwC,CAAC;AAE1E,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,uHACmF,CAAC"}
@@ -84,6 +84,19 @@ export const getSchemaDriftWarning = (diff) => {
84
84
  ];
85
85
  return `This table changed since the cube was saved: ${changes.join('; ')}`;
86
86
  };
87
+ /** Why the Sort editor's picker doesn't offer a column, after its type */
88
+ export const CUBE_SORT_COLUMN_DISABLED_REASON = {
89
+ NOT_SORTABLE: "can't be sorted",
90
+ TAKEN: 'already sorted on',
91
+ };
92
+ /** Why the grid's quick actions (spec §12.4) can't be used */
93
+ export const CUBE_QUICK_ACTION_DISABLED_REASON = {
94
+ STALE_ROWS: 'Execute again: these rows are from an earlier version of the query.',
95
+ RUNNING: 'Wait for the run to finish.',
96
+ UNREADABLE_VALUE: "This value can't be used in a filter.",
97
+ notSortable: (typeName) => `Values of type ${typeName} can't be sorted.`,
98
+ notComparable: (typeName) => `Values of type ${typeName} can't be compared.`,
99
+ };
87
100
  /** Beside a condition comparing a floating-point column for equality (R133) */
88
101
  export const FILTER_FLOAT_COMPARISON_HINT = 'exact comparison on floating-point columns may not match';
89
102
  /** The Filter editor's note on NULLs (D4): negated conditions keep them */
@@ -106,4 +119,10 @@ export const getEditorClosedNotice = (nodeId, reason) => {
106
119
  };
107
120
  /** The warning on a source with saved columns that the engine couldn't type again */
108
121
  export const getSourceRecheckWarning = (firstLine) => `Could not re-check this table, so it keeps its saved columns: ${firstLine}`;
122
+ /** Under the Slice editor's fields: the range counts from 0, and leaves out its stop row (D5) */
123
+ export const SLICE_RANGE_HINT = 'Rows count from 0: the start row is kept, the stop row is not.';
124
+ /** The Distinct editor's text: it has nothing to set (spec §17.6) */
125
+ export const DISTINCT_EDITOR_TEXT = 'Keeps one row of each set of identical rows. There is nothing to set.';
126
+ /** Under the Rename editor's rows: the rule for new column names (PLAN §11.4) */
127
+ export const COLUMN_NAME_RULES_HINT = 'Names can\'t start or end with a space, or contain " or \\ or control characters, and have at most 128 characters.';
109
128
  //# sourceMappingURL=LegendCubeLabels.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendCubeLabels.js","sourceRoot":"","sources":["../../src/__lib__/LegendCubeLabels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,aAAa,EAAE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oBAAoB,GAC/B,uEAAuE,CAAC;AAE1E,iFAAiF;AACjF,MAAM,CAAC,MAAM,sBAAsB,GACjC,oHAAoH,CAAC"}
@@ -38,4 +38,10 @@ export declare const CUBE_ENGINE_TEST__execute: (input: object | string) => Prom
38
38
  status: number;
39
39
  text: () => Promise<string>;
40
40
  }>;
41
+ /**
42
+ * Generates the execution plan of a query, never running it, and gives the
43
+ * SQL of its nodes, outermost first; a body given as text (with lossless
44
+ * numbers) is sent as it is
45
+ */
46
+ export declare const CUBE_ENGINE_TEST__generatePlanSql: (input: object | string) => Promise<string[]>;
41
47
  //# sourceMappingURL=CubeEngineTestSupport.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CubeEngineTestSupport.d.ts","sourceRoot":"","sources":["../../src/__test-utils__/CubeEngineTestSupport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAa9B,qDAAqD;AACrD,eAAO,MAAM,2BAA2B,QAAa,OAAO,CAAC,MAAM,CAMlE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sCAAsC,GACjD,MAAM,MAAM,KACX,OAAO,CAAC,OAAO,CAcf,CAAC;AAEJ,uFAAuF;AACvF,eAAO,MAAM,yCAAyC,GACpD,OAAO,MAAM,KACZ,OAAO,CAAC,WAAW,CAOd,CAAC;AAET,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,GACpC,OAAO,MAAM,KACZ,OAAO,CAAC,WAAW,CAOd,CAAC;AAET,0DAA0D;AAC1D,eAAO,MAAM,sCAAsC,GACjD,QAAQ,WAAW,EACnB,cAAc,MAAM,GAAG,SAAS,KAC/B,OAAO,CAAC,MAAM,CAeT,CAAC;AAET;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GACpC,OAAO,MAAM,GAAG,MAAM,KACrB,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;CAAE,CAiBtE,CAAC"}
1
+ {"version":3,"file":"CubeEngineTestSupport.d.ts","sourceRoot":"","sources":["../../src/__test-utils__/CubeEngineTestSupport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAa9B,qDAAqD;AACrD,eAAO,MAAM,2BAA2B,QAAa,OAAO,CAAC,MAAM,CAMlE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sCAAsC,GACjD,MAAM,MAAM,KACX,OAAO,CAAC,OAAO,CAcf,CAAC;AAEJ,uFAAuF;AACvF,eAAO,MAAM,yCAAyC,GACpD,OAAO,MAAM,KACZ,OAAO,CAAC,WAAW,CAOd,CAAC;AAET,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,GACpC,OAAO,MAAM,KACZ,OAAO,CAAC,WAAW,CAOd,CAAC;AAET,0DAA0D;AAC1D,eAAO,MAAM,sCAAsC,GACjD,QAAQ,WAAW,EACnB,cAAc,MAAM,GAAG,SAAS,KAC/B,OAAO,CAAC,MAAM,CAeT,CAAC;AAET;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GACpC,OAAO,MAAM,GAAG,MAAM,KACrB,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;CAAE,CAiBtE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,GAC5C,OAAO,MAAM,GAAG,MAAM,KACrB,OAAO,CAAC,MAAM,EAAE,CA0BlB,CAAC"}
@@ -73,4 +73,34 @@ export const CUBE_ENGINE_TEST__execute = async (input) => {
73
73
  text: async () => response.data,
74
74
  };
75
75
  };
76
+ /**
77
+ * Generates the execution plan of a query, never running it, and gives the
78
+ * SQL of its nodes, outermost first; a body given as text (with lossless
79
+ * numbers) is sent as it is
80
+ */
81
+ export const CUBE_ENGINE_TEST__generatePlanSql = async (input) => {
82
+ const { data } = await axios.post(`${PURE_API}/execution/generatePlan`, input, {
83
+ headers: JSON_HEADERS,
84
+ responseType: 'text',
85
+ transformResponse: (text) => text,
86
+ });
87
+ const sql = [];
88
+ const visit = (node) => {
89
+ if (Array.isArray(node)) {
90
+ node.forEach(visit);
91
+ }
92
+ else if (node && typeof node === 'object') {
93
+ Object.entries(node).forEach(([key, value]) => {
94
+ if (key === 'sqlQuery' && typeof value === 'string') {
95
+ sql.push(value);
96
+ }
97
+ else {
98
+ visit(value);
99
+ }
100
+ });
101
+ }
102
+ };
103
+ visit(parseLosslessJSON(data));
104
+ return sql;
105
+ };
76
106
  //# sourceMappingURL=CubeEngineTestSupport.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CubeEngineTestSupport.js","sourceRoot":"","sources":["../../src/__test-utils__/CubeEngineTestSupport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAAsB,MAAM,OAAO,CAAC;AAClD,OAAO,EACL,WAAW,EACX,UAAU,EACV,iBAAiB,GAElB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAEvE,kFAAkF;AAClF,2EAA2E;AAC3E,wEAAwE;AAExE,MAAM,QAAQ,GAAG,GAAG,2BAA2B,UAAU,CAAC;AAE1D,MAAM,YAAY,GAAG;IACnB,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,gBAAgB;CACxD,CAAC;AAEF,qDAAqD;AACrD,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,IAAqB,EAAE;IACrE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,KAAK,CAAC,GAAG,CAC9B,GAAG,2BAA2B,iBAAiB,CAChD,CAAC;IACF,MAAM,IAA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,CAC/B,GAAG,QAAQ,yBAAyB,EACpC,KAAK,EACL;QACE,OAAO,EAAE,YAAY;QACrB,YAAY,EAAE,MAAM;QACpB,iBAAiB,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI;KAC1C,CACF,CAAC;IACF,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,KAAK,GAAG,CAAC,IAAa,EAAQ,EAAE;QACpC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;aAAM,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC5C,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;gBAC5C,IAAI,GAAG,KAAK,UAAU,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;oBACpD,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAClB,CAAC;qBAAM,CAAC;oBACN,KAAK,CAAC,KAAK,CAAC,CAAC;gBACf,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;IACF,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/B,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -0,0 +1,42 @@
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 { Query, type QueryNode, RelationalTableSource, Schema } from '@finos/legend-cube';
17
+ import type { CubeEngine, CubeResult, CubeResultValue } from '../graph-manager/CubeEngine.js';
18
+ /** A table of the Cube Northwind model, not resolved yet */
19
+ export declare const TEST__northwindTable: (id: string, table: string, schema?: string) => RelationalTableSource;
20
+ /** The sources, resolved through the engine as the editor resolves them */
21
+ export declare const TEST__resolveSources: (engine: CubeEngine, sources: readonly RelationalTableSource[]) => Promise<RelationalTableSource[]>;
22
+ /** A chain of nodes, each feeding the next on its first port, captured at the last */
23
+ export declare const TEST__chainOf: (nodes: readonly QueryNode[]) => Query;
24
+ /** Every node of the query is valid */
25
+ export declare const TEST__expectValidQuery: (query: Query) => void;
26
+ /**
27
+ * Runs the query up to its capture node, with this row limit; with a database
28
+ * type, written as for that database (on the fixture's H2 all the same, so a
29
+ * workaround's rows can be checked)
30
+ */
31
+ export declare const TEST__runQuery: (engine: CubeEngine, query: Query, rowLimit: number, databaseType?: string) => Promise<CubeResult>;
32
+ /** The values of one column of a result */
33
+ export declare const TEST__columnValues: (result: CubeResult, column: string) => CubeResultValue[];
34
+ /** The schema Cube infers for a node of the query, its capture node by default */
35
+ export declare const TEST__inferredSchema: (query: Query, nodeId?: string) => Schema;
36
+ /**
37
+ * The engine types the node as Cube infers it: the same names, in the same
38
+ * order, of the same types and parameters. Cube's nullability may only be
39
+ * wider, since the engine misreports it after outer joins (PLAN §4.7).
40
+ */
41
+ export declare const TEST__expectEngineTyping: (engine: CubeEngine, query: Query, nodeId?: string) => Promise<void>;
42
+ //# sourceMappingURL=CubeOperationsTestUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CubeOperationsTestUtils.d.ts","sourceRoot":"","sources":["../../src/__test-utils__/CubeOperationsTestUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAIL,KAAK,EACL,KAAK,SAAS,EAEd,qBAAqB,EACrB,MAAM,EACP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,eAAe,EAChB,MAAM,gCAAgC,CAAC;AAUxC,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,GAC/B,IAAI,MAAM,EACV,OAAO,MAAM,EACb,eAAoB,KACnB,qBAKC,CAAC;AAEL,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,UAAU,EAClB,SAAS,SAAS,qBAAqB,EAAE,KACxC,OAAO,CAAC,qBAAqB,EAAE,CAiBjC,CAAC;AAEF,sFAAsF;AACtF,eAAO,MAAM,aAAa,GAAI,OAAO,SAAS,SAAS,EAAE,KAAG,KAczD,CAAC;AAEJ,uCAAuC;AACvC,eAAO,MAAM,sBAAsB,GAAI,OAAO,KAAK,KAAG,IAMrD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,QAAQ,UAAU,EAClB,OAAO,KAAK,EACZ,UAAU,MAAM,EAChB,eAAe,MAAM,KACpB,OAAO,CAAC,UAAU,CAUpB,CAAC;AAEF,2CAA2C;AAC3C,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,UAAU,EAClB,QAAQ,MAAM,KACb,eAAe,EAIjB,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,EACZ,eAA6B,KAC5B,MAOF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,QAAQ,UAAU,EAClB,OAAO,KAAK,EACZ,eAA6B,KAC5B,OAAO,CAAC,IAAI,CAoBd,CAAC"}