@finos/legend-cube-builder 0.0.5 → 0.0.6

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 (245) hide show
  1. package/docs/adding-an-operation.md +4 -2
  2. package/docs/demo/README.md +1 -1
  3. package/docs/hosting.md +40 -9
  4. package/lib/__lib__/LegendCubeHelpText.d.ts.map +1 -1
  5. package/lib/__lib__/LegendCubeHelpText.js +3 -1
  6. package/lib/__lib__/LegendCubeHelpText.js.map +1 -1
  7. package/lib/__lib__/LegendCubeLabels.d.ts +34 -5
  8. package/lib/__lib__/LegendCubeLabels.d.ts.map +1 -1
  9. package/lib/__lib__/LegendCubeLabels.js +45 -8
  10. package/lib/__lib__/LegendCubeLabels.js.map +1 -1
  11. package/lib/__lib__/LegendCubeNavigation.d.ts +23 -0
  12. package/lib/__lib__/LegendCubeNavigation.d.ts.map +1 -0
  13. package/lib/__lib__/LegendCubeNavigation.js +33 -0
  14. package/lib/__lib__/LegendCubeNavigation.js.map +1 -0
  15. package/lib/__lib__/LegendCubeTesting.d.ts +3 -1
  16. package/lib/__lib__/LegendCubeTesting.d.ts.map +1 -1
  17. package/lib/__lib__/LegendCubeTesting.js +2 -0
  18. package/lib/__lib__/LegendCubeTesting.js.map +1 -1
  19. package/lib/__lib__/LegendCubeTour.d.ts +62 -0
  20. package/lib/__lib__/LegendCubeTour.d.ts.map +1 -0
  21. package/lib/__lib__/LegendCubeTour.js +149 -0
  22. package/lib/__lib__/LegendCubeTour.js.map +1 -0
  23. package/lib/__test-utils__/CubeExampleTestUtils.d.ts +34 -0
  24. package/lib/__test-utils__/CubeExampleTestUtils.d.ts.map +1 -0
  25. package/lib/__test-utils__/CubeExampleTestUtils.js +72 -0
  26. package/lib/__test-utils__/CubeExampleTestUtils.js.map +1 -0
  27. package/lib/__test-utils__/CubeVariantTestUtils.d.ts +16 -0
  28. package/lib/__test-utils__/CubeVariantTestUtils.d.ts.map +1 -0
  29. package/lib/__test-utils__/CubeVariantTestUtils.js +66 -0
  30. package/lib/__test-utils__/CubeVariantTestUtils.js.map +1 -0
  31. package/lib/components/CubeAddItems.d.ts.map +1 -1
  32. package/lib/components/CubeAddItems.js +2 -1
  33. package/lib/components/CubeAddItems.js.map +1 -1
  34. package/lib/components/CubeEditor.d.ts.map +1 -1
  35. package/lib/components/CubeEditor.js +11 -5
  36. package/lib/components/CubeEditor.js.map +1 -1
  37. package/lib/components/CubeFileMenu.d.ts.map +1 -1
  38. package/lib/components/CubeFileMenu.js +2 -1
  39. package/lib/components/CubeFileMenu.js.map +1 -1
  40. package/lib/components/CubeNodeIcon.d.ts.map +1 -1
  41. package/lib/components/CubeNodeIcon.js +2 -1
  42. package/lib/components/CubeNodeIcon.js.map +1 -1
  43. package/lib/components/canvas/CubeCanvas.d.ts.map +1 -1
  44. package/lib/components/canvas/CubeCanvas.js +3 -2
  45. package/lib/components/canvas/CubeCanvas.js.map +1 -1
  46. package/lib/components/canvas/CubeCanvasNode.d.ts.map +1 -1
  47. package/lib/components/canvas/CubeCanvasNode.js +4 -1
  48. package/lib/components/canvas/CubeCanvasNode.js.map +1 -1
  49. package/lib/components/dev-settings/CubeDevSettings.d.ts +2 -2
  50. package/lib/components/dev-settings/CubeDevSettings.d.ts.map +1 -1
  51. package/lib/components/dev-settings/CubeDevSettings.js +12 -8
  52. package/lib/components/dev-settings/CubeDevSettings.js.map +1 -1
  53. package/lib/components/editors/CubeColumnPicker.d.ts.map +1 -1
  54. package/lib/components/editors/CubeColumnPicker.js +3 -1
  55. package/lib/components/editors/CubeColumnPicker.js.map +1 -1
  56. package/lib/components/editors/CubeExplodeEditor.d.ts +26 -0
  57. package/lib/components/editors/CubeExplodeEditor.d.ts.map +1 -0
  58. package/lib/components/editors/CubeExplodeEditor.js +61 -0
  59. package/lib/components/editors/CubeExplodeEditor.js.map +1 -0
  60. package/lib/components/editors/CubeExpressionFilterEditor.d.ts.map +1 -1
  61. package/lib/components/editors/CubeExpressionFilterEditor.js +8 -5
  62. package/lib/components/editors/CubeExpressionFilterEditor.js.map +1 -1
  63. package/lib/components/editors/CubeExtendEditor.d.ts +0 -2
  64. package/lib/components/editors/CubeExtendEditor.d.ts.map +1 -1
  65. package/lib/components/editors/CubeExtendEditor.js +12 -11
  66. package/lib/components/editors/CubeExtendEditor.js.map +1 -1
  67. package/lib/components/editors/CubeJsonFieldsTree.d.ts +46 -0
  68. package/lib/components/editors/CubeJsonFieldsTree.d.ts.map +1 -0
  69. package/lib/components/editors/CubeJsonFieldsTree.js +93 -0
  70. package/lib/components/editors/CubeJsonFieldsTree.js.map +1 -0
  71. package/lib/components/editors/CubeNodeEditorRegistry.d.ts.map +1 -1
  72. package/lib/components/editors/CubeNodeEditorRegistry.js +3 -1
  73. package/lib/components/editors/CubeNodeEditorRegistry.js.map +1 -1
  74. package/lib/components/grid/CubeGridRegion.d.ts.map +1 -1
  75. package/lib/components/grid/CubeGridRegion.js +5 -4
  76. package/lib/components/grid/CubeGridRegion.js.map +1 -1
  77. package/lib/components/grid/CubeGridValues.d.ts +5 -3
  78. package/lib/components/grid/CubeGridValues.d.ts.map +1 -1
  79. package/lib/components/grid/CubeGridValues.js +8 -3
  80. package/lib/components/grid/CubeGridValues.js.map +1 -1
  81. package/lib/components/grid/CubeJsonExplorerDialog.d.ts +27 -0
  82. package/lib/components/grid/CubeJsonExplorerDialog.d.ts.map +1 -0
  83. package/lib/components/grid/CubeJsonExplorerDialog.js +102 -0
  84. package/lib/components/grid/CubeJsonExplorerDialog.js.map +1 -0
  85. package/lib/components/grid/CubeJsonViewerDialog.d.ts +27 -0
  86. package/lib/components/grid/CubeJsonViewerDialog.d.ts.map +1 -0
  87. package/lib/components/grid/CubeJsonViewerDialog.js +68 -0
  88. package/lib/components/grid/CubeJsonViewerDialog.js.map +1 -0
  89. package/lib/components/grid/CubeResultGrid.d.ts +15 -3
  90. package/lib/components/grid/CubeResultGrid.d.ts.map +1 -1
  91. package/lib/components/grid/CubeResultGrid.js +95 -3
  92. package/lib/components/grid/CubeResultGrid.js.map +1 -1
  93. package/lib/components/grid/CubeServerSideGrid.d.ts.map +1 -1
  94. package/lib/components/grid/CubeServerSideGrid.js +4 -2
  95. package/lib/components/grid/CubeServerSideGrid.js.map +1 -1
  96. package/lib/components/palette/CubePalette.d.ts.map +1 -1
  97. package/lib/components/palette/CubePalette.js +4 -1
  98. package/lib/components/palette/CubePalette.js.map +1 -1
  99. package/lib/components/source-picker/CubeIngestTab.d.ts +2 -2
  100. package/lib/components/source-picker/CubeIngestTab.d.ts.map +1 -1
  101. package/lib/components/source-picker/CubeIngestTab.js +19 -13
  102. package/lib/components/source-picker/CubeIngestTab.js.map +1 -1
  103. package/lib/components/tour/CubeTour.d.ts +36 -0
  104. package/lib/components/tour/CubeTour.d.ts.map +1 -0
  105. package/lib/components/tour/CubeTour.js +183 -0
  106. package/lib/components/tour/CubeTour.js.map +1 -0
  107. package/lib/index.css +1 -1
  108. package/lib/index.d.ts +1 -0
  109. package/lib/index.d.ts.map +1 -1
  110. package/lib/index.js +1 -0
  111. package/lib/index.js.map +1 -1
  112. package/lib/stores/CubeEditorState.d.ts +17 -1
  113. package/lib/stores/CubeEditorState.d.ts.map +1 -1
  114. package/lib/stores/CubeEditorState.js +35 -5
  115. package/lib/stores/CubeEditorState.js.map +1 -1
  116. package/lib/stores/CubeExamples.d.ts.map +1 -1
  117. package/lib/stores/CubeExamples.js +101 -4
  118. package/lib/stores/CubeExamples.js.map +1 -1
  119. package/lib/stores/CubeExamplesState.d.ts.map +1 -1
  120. package/lib/stores/CubeExamplesState.js +4 -1
  121. package/lib/stores/CubeExamplesState.js.map +1 -1
  122. package/lib/stores/CubeGridQuickActions.d.ts +7 -0
  123. package/lib/stores/CubeGridQuickActions.d.ts.map +1 -1
  124. package/lib/stores/CubeGridQuickActions.js +20 -11
  125. package/lib/stores/CubeGridQuickActions.js.map +1 -1
  126. package/lib/stores/CubePureText.d.ts +20 -0
  127. package/lib/stores/CubePureText.d.ts.map +1 -0
  128. package/lib/stores/CubePureText.js +24 -0
  129. package/lib/stores/CubePureText.js.map +1 -0
  130. package/lib/stores/CubeTourState.d.ts +49 -0
  131. package/lib/stores/CubeTourState.d.ts.map +1 -0
  132. package/lib/stores/CubeTourState.js +92 -0
  133. package/lib/stores/CubeTourState.js.map +1 -0
  134. package/lib/stores/LegendCubeHost.d.ts +88 -0
  135. package/lib/stores/LegendCubeHost.d.ts.map +1 -0
  136. package/lib/stores/LegendCubeHost.js +149 -0
  137. package/lib/stores/LegendCubeHost.js.map +1 -0
  138. package/lib/stores/editors/CubeExplodeDraft.d.ts +87 -0
  139. package/lib/stores/editors/CubeExplodeDraft.d.ts.map +1 -0
  140. package/lib/stores/editors/CubeExplodeDraft.js +221 -0
  141. package/lib/stores/editors/CubeExplodeDraft.js.map +1 -0
  142. package/lib/stores/editors/CubeExpressionFilterDraft.d.ts +3 -0
  143. package/lib/stores/editors/CubeExpressionFilterDraft.d.ts.map +1 -1
  144. package/lib/stores/editors/CubeExpressionFilterDraft.js +4 -0
  145. package/lib/stores/editors/CubeExpressionFilterDraft.js.map +1 -1
  146. package/lib/stores/editors/CubeExtendDraft.d.ts +9 -0
  147. package/lib/stores/editors/CubeExtendDraft.d.ts.map +1 -1
  148. package/lib/stores/editors/CubeExtendDraft.js +26 -0
  149. package/lib/stores/editors/CubeExtendDraft.js.map +1 -1
  150. package/lib/stores/editors/CubeNodeDraftRegistry.d.ts.map +1 -1
  151. package/lib/stores/editors/CubeNodeDraftRegistry.js +6 -1
  152. package/lib/stores/editors/CubeNodeDraftRegistry.js.map +1 -1
  153. package/lib/stores/fixtures/CubeSalesDuckDbModel.d.ts +1 -0
  154. package/lib/stores/fixtures/CubeSalesDuckDbModel.d.ts.map +1 -1
  155. package/lib/stores/fixtures/CubeSalesDuckDbModel.js +8 -2
  156. package/lib/stores/fixtures/CubeSalesDuckDbModel.js.map +1 -1
  157. package/lib/stores/source-picker/CubeIngestTabState.d.ts +48 -14
  158. package/lib/stores/source-picker/CubeIngestTabState.d.ts.map +1 -1
  159. package/lib/stores/source-picker/CubeIngestTabState.js +159 -62
  160. package/lib/stores/source-picker/CubeIngestTabState.js.map +1 -1
  161. package/lib/stores/variant/CubeJson.d.ts +48 -0
  162. package/lib/stores/variant/CubeJson.d.ts.map +1 -0
  163. package/lib/stores/variant/CubeJson.js +207 -0
  164. package/lib/stores/variant/CubeJson.js.map +1 -0
  165. package/lib/stores/variant/CubeJsonExplorerState.d.ts +88 -0
  166. package/lib/stores/variant/CubeJsonExplorerState.d.ts.map +1 -0
  167. package/lib/stores/variant/CubeJsonExplorerState.js +297 -0
  168. package/lib/stores/variant/CubeJsonExplorerState.js.map +1 -0
  169. package/lib/stores/variant/CubeJsonFieldsState.d.ts +83 -0
  170. package/lib/stores/variant/CubeJsonFieldsState.d.ts.map +1 -0
  171. package/lib/stores/variant/CubeJsonFieldsState.js +207 -0
  172. package/lib/stores/variant/CubeJsonFieldsState.js.map +1 -0
  173. package/lib/stores/variant/CubeJsonOffers.d.ts +76 -0
  174. package/lib/stores/variant/CubeJsonOffers.d.ts.map +1 -0
  175. package/lib/stores/variant/CubeJsonOffers.js +250 -0
  176. package/lib/stores/variant/CubeJsonOffers.js.map +1 -0
  177. package/lib/stores/variant/CubeJsonParse.d.ts +28 -0
  178. package/lib/stores/variant/CubeJsonParse.d.ts.map +1 -0
  179. package/lib/stores/variant/CubeJsonParse.js +53 -0
  180. package/lib/stores/variant/CubeJsonParse.js.map +1 -0
  181. package/lib/stores/variant/CubeJsonSampling.d.ts +41 -0
  182. package/lib/stores/variant/CubeJsonSampling.d.ts.map +1 -0
  183. package/lib/stores/variant/CubeJsonSampling.js +59 -0
  184. package/lib/stores/variant/CubeJsonSampling.js.map +1 -0
  185. package/lib/stores/variant/CubeJsonShape.d.ts +87 -0
  186. package/lib/stores/variant/CubeJsonShape.d.ts.map +1 -0
  187. package/lib/stores/variant/CubeJsonShape.js +209 -0
  188. package/lib/stores/variant/CubeJsonShape.js.map +1 -0
  189. package/lib/stores/variant/CubeJsonViewerState.d.ts +33 -0
  190. package/lib/stores/variant/CubeJsonViewerState.d.ts.map +1 -0
  191. package/lib/stores/variant/CubeJsonViewerState.js +53 -0
  192. package/lib/stores/variant/CubeJsonViewerState.js.map +1 -0
  193. package/package.json +2 -2
  194. package/src/__lib__/LegendCubeHelpText.ts +4 -0
  195. package/src/__lib__/LegendCubeLabels.ts +60 -8
  196. package/src/__lib__/LegendCubeNavigation.ts +48 -0
  197. package/src/__lib__/LegendCubeTesting.ts +2 -0
  198. package/src/__lib__/LegendCubeTour.ts +173 -0
  199. package/src/__test-utils__/CubeExampleTestUtils.ts +119 -0
  200. package/src/__test-utils__/CubeVariantTestUtils.ts +103 -0
  201. package/src/components/CubeAddItems.tsx +2 -0
  202. package/src/components/CubeEditor.tsx +15 -0
  203. package/src/components/CubeFileMenu.tsx +2 -0
  204. package/src/components/CubeNodeIcon.tsx +2 -0
  205. package/src/components/canvas/CubeCanvas.tsx +17 -1
  206. package/src/components/canvas/CubeCanvasNode.tsx +7 -0
  207. package/src/components/dev-settings/CubeDevSettings.tsx +17 -2
  208. package/src/components/editors/CubeColumnPicker.tsx +3 -0
  209. package/src/components/editors/CubeExplodeEditor.tsx +207 -0
  210. package/src/components/editors/CubeExpressionFilterEditor.tsx +25 -8
  211. package/src/components/editors/CubeExtendEditor.tsx +32 -19
  212. package/src/components/editors/CubeJsonFieldsTree.tsx +316 -0
  213. package/src/components/editors/CubeNodeEditorRegistry.ts +3 -0
  214. package/src/components/grid/CubeGridRegion.tsx +21 -3
  215. package/src/components/grid/CubeGridValues.ts +8 -3
  216. package/src/components/grid/CubeJsonExplorerDialog.tsx +304 -0
  217. package/src/components/grid/CubeJsonViewerDialog.tsx +190 -0
  218. package/src/components/grid/CubeResultGrid.tsx +144 -2
  219. package/src/components/grid/CubeServerSideGrid.tsx +13 -0
  220. package/src/components/palette/CubePalette.tsx +9 -0
  221. package/src/components/source-picker/CubeIngestTab.tsx +62 -30
  222. package/src/components/tour/CubeTour.tsx +317 -0
  223. package/src/index.ts +7 -0
  224. package/src/stores/CubeEditorState.ts +36 -5
  225. package/src/stores/CubeExamples.ts +120 -2
  226. package/src/stores/CubeExamplesState.ts +9 -1
  227. package/src/stores/CubeGridQuickActions.ts +23 -12
  228. package/src/stores/CubePureText.ts +28 -0
  229. package/src/stores/CubeTourState.ts +116 -0
  230. package/src/stores/LegendCubeHost.ts +243 -0
  231. package/src/stores/editors/CubeExplodeDraft.ts +272 -0
  232. package/src/stores/editors/CubeExpressionFilterDraft.ts +4 -0
  233. package/src/stores/editors/CubeExtendDraft.ts +29 -0
  234. package/src/stores/editors/CubeNodeDraftRegistry.ts +7 -0
  235. package/src/stores/fixtures/CubeSalesDuckDbModel.ts +8 -2
  236. package/src/stores/source-picker/CubeIngestTabState.ts +253 -102
  237. package/src/stores/variant/CubeJson.ts +229 -0
  238. package/src/stores/variant/CubeJsonExplorerState.ts +378 -0
  239. package/src/stores/variant/CubeJsonFieldsState.ts +252 -0
  240. package/src/stores/variant/CubeJsonOffers.ts +359 -0
  241. package/src/stores/variant/CubeJsonParse.ts +75 -0
  242. package/src/stores/variant/CubeJsonSampling.ts +90 -0
  243. package/src/stores/variant/CubeJsonShape.ts +279 -0
  244. package/src/stores/variant/CubeJsonViewerState.ts +59 -0
  245. package/tsconfig.json +22 -1
@@ -0,0 +1,36 @@
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
+ /**
18
+ * Above the canvas, the grid and the node editor (1250), below MUI's dialogs
19
+ * (1300); inside the dialog that hosts the page, if one does
20
+ */
21
+ export declare const CUBE_TOUR_Z_INDEX = 1290;
22
+ /**
23
+ * The editor's guided tour (PLAN §11.21): the page dimmed but for the
24
+ * current step's controls, and a card beside them, or in the middle of the
25
+ * page for a step that points at nothing. The controls are followed as the
26
+ * page moves them (a panel resized, the grid loaded). Clicks on the page
27
+ * are held while it shows; Esc ends it, the arrow keys move through it.
28
+ */
29
+ export declare const CubeTour: ((props: {
30
+ editorState: CubeEditorState;
31
+ /** The page, whose controls the steps point at */
32
+ root: HTMLElement | null;
33
+ }) => import("react").ReactPortal | null) & {
34
+ displayName: string;
35
+ };
36
+ //# sourceMappingURL=CubeTour.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CubeTour.d.ts","sourceRoot":"","sources":["../../../src/components/tour/CubeTour.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAaH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGvE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAuEtC;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,WACX;IACN,WAAW,EAAE,eAAe,CAAC;IAC7B,kDAAkD;IAClD,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;CAC1B;;CAuMF,CAAC"}
@@ -0,0 +1,183 @@
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 { BasePopper } from '@finos/legend-art';
18
+ import { noop } from '@finos/legend-shared';
19
+ import { observer } from 'mobx-react-lite';
20
+ import { useEffect, useId, useMemo, useRef, useState } from 'react';
21
+ import { createPortal } from 'react-dom';
22
+ import { CUBE_TOUR_ANCHOR_ATTRIBUTE, CUBE_TOUR_LABEL, } from '../../__lib__/LegendCubeTour.js';
23
+ import { CubeButton } from '../CubeButton.js';
24
+ /**
25
+ * Above the canvas, the grid and the node editor (1250), below MUI's dialogs
26
+ * (1300); inside the dialog that hosts the page, if one does
27
+ */
28
+ export const CUBE_TOUR_Z_INDEX = 1290;
29
+ /** Room around the controls shown, and between them and the card */
30
+ const PADDING = 4;
31
+ const GAP = 12;
32
+ /** The card's width (Legend's root is 62.5%, so it is written in pixels) */
33
+ const CARD_WIDTH = 340;
34
+ const DIM = 'rgba(0, 0, 0, 0.45)';
35
+ const MODIFIERS = [
36
+ { name: 'offset', options: { offset: [0, GAP + PADDING] } },
37
+ { name: 'flip', options: { padding: GAP } },
38
+ {
39
+ name: 'preventOverflow',
40
+ options: { rootBoundary: 'viewport', padding: GAP, altAxis: true },
41
+ },
42
+ ];
43
+ /** The page's controls that carry the anchor */
44
+ const findAnchored = (root, anchor) => Array.from(root.querySelectorAll(`[${CUBE_TOUR_ANCHOR_ATTRIBUTE}~="${anchor}"]`));
45
+ /** The box around the anchor's controls that have a size; none if none has */
46
+ const boxOf = (root, anchor) => findAnchored(root, anchor)
47
+ .map((element) => element.getBoundingClientRect())
48
+ .filter((rect) => rect.width > 0 || rect.height > 0)
49
+ .reduce((box, rect) => {
50
+ if (!box) {
51
+ return {
52
+ left: rect.left,
53
+ top: rect.top,
54
+ width: rect.width,
55
+ height: rect.height,
56
+ };
57
+ }
58
+ const left = Math.min(box.left, rect.left);
59
+ const top = Math.min(box.top, rect.top);
60
+ return {
61
+ left,
62
+ top,
63
+ width: Math.max(box.left + box.width, rect.right) - left,
64
+ height: Math.max(box.top + box.height, rect.bottom) - top,
65
+ };
66
+ }, undefined);
67
+ const isSameBox = (a, b) => a === b ||
68
+ (a !== undefined &&
69
+ b !== undefined &&
70
+ a.left === b.left &&
71
+ a.top === b.top &&
72
+ a.width === b.width &&
73
+ a.height === b.height);
74
+ /**
75
+ * The editor's guided tour (PLAN §11.21): the page dimmed but for the
76
+ * current step's controls, and a card beside them, or in the middle of the
77
+ * page for a step that points at nothing. The controls are followed as the
78
+ * page moves them (a panel resized, the grid loaded). Clicks on the page
79
+ * are held while it shows; Esc ends it, the arrow keys move through it.
80
+ */
81
+ export const CubeTour = observer((props) => {
82
+ const { editorState, root } = props;
83
+ const { tour } = editorState;
84
+ const { step } = tour;
85
+ const titleId = useId();
86
+ const textId = useId();
87
+ const [box, setBox] = useState(undefined);
88
+ const popperRef = useRef(null);
89
+ const isShown = useMemo(() => (candidate) => candidate.anchor === undefined ||
90
+ (root !== null && findAnchored(root, candidate.anchor).length > 0), [root]);
91
+ // the step's controls followed, frame by frame, while it shows
92
+ const anchor = step?.anchor;
93
+ useEffect(() => {
94
+ if (anchor === undefined || !root) {
95
+ setBox(undefined);
96
+ return undefined;
97
+ }
98
+ let frame = 0;
99
+ const follow = () => {
100
+ const next = boxOf(root, anchor);
101
+ setBox((current) => (isSameBox(current, next) ? current : next));
102
+ frame = requestAnimationFrame(follow);
103
+ };
104
+ follow();
105
+ return () => cancelAnimationFrame(frame);
106
+ }, [anchor, root]);
107
+ useEffect(() => {
108
+ popperRef.current?.update().catch(noop());
109
+ }, [box]);
110
+ // the tour's keys come first: the page's shortcuts wait while it shows
111
+ const isOpen = step !== undefined;
112
+ useEffect(() => {
113
+ if (!isOpen) {
114
+ return undefined;
115
+ }
116
+ const onKeyDown = (event) => {
117
+ if (event.key === 'Escape') {
118
+ tour.close();
119
+ }
120
+ else if (event.key === 'ArrowRight') {
121
+ tour.move(1, isShown);
122
+ }
123
+ else if (event.key === 'ArrowLeft') {
124
+ tour.move(-1, isShown);
125
+ }
126
+ else {
127
+ return;
128
+ }
129
+ event.preventDefault();
130
+ event.stopPropagation();
131
+ };
132
+ window.addEventListener('keydown', onKeyDown, true);
133
+ return () => window.removeEventListener('keydown', onKeyDown, true);
134
+ }, [isOpen, tour, isShown]);
135
+ const spotlight = useMemo(() => box && {
136
+ left: box.left - PADDING,
137
+ top: box.top - PADDING,
138
+ width: box.width + 2 * PADDING,
139
+ height: box.height + 2 * PADDING,
140
+ }, [box]);
141
+ // the popper reads the spotlight wherever it places the card
142
+ const latest = useRef(spotlight);
143
+ latest.current = spotlight;
144
+ const virtualAnchor = useMemo(() => ({
145
+ getBoundingClientRect: () => {
146
+ const current = latest.current ?? {
147
+ left: 0,
148
+ top: 0,
149
+ width: 0,
150
+ height: 0,
151
+ };
152
+ return DOMRect.fromRect({
153
+ x: current.left,
154
+ y: current.top,
155
+ width: current.width,
156
+ height: current.height,
157
+ });
158
+ },
159
+ }), []);
160
+ if (!step || !root) {
161
+ return null;
162
+ }
163
+ // counted over the whole tour, steady while an example loads and adds
164
+ // the controls of later steps; a step skipped skips its number
165
+ const position = tour.index + 1;
166
+ const isLast = tour.steps.filter(isShown).at(-1) === step;
167
+ // a page hosted in a dialog, as Studio hosts Cube, keeps the tour in the
168
+ // dialog's layer, above the page
169
+ const container = root.closest('.MuiDialog-root') ?? root.ownerDocument.body;
170
+ const card = (_jsxs("div", { className: "legend-cube__tour flex flex-col gap-2 rounded-md border border-[var(--color-border-default)] bg-[var(--color-bg-elevated)] p-3 text-[var(--color-text-primary)] shadow-lg", style: { width: CARD_WIDTH, maxWidth: `calc(100vw - ${2 * GAP}px)` }, role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, "aria-describedby": textId, children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("h2", { id: titleId, className: "min-w-0 flex-1 text-lg font-medium", children: step.title }), _jsx("span", { className: "shrink-0 text-sm text-[var(--color-text-secondary)]", children: CUBE_TOUR_LABEL.progress(position, tour.steps.length) })] }), _jsxs("p", { id: textId, className: "text-base leading-snug", children: [step.text, tour.openedExample && tour.index === 0 && (_jsxs(_Fragment, { children: [" ", CUBE_TOUR_LABEL.EXAMPLE_OPENED] }))] }), _jsxs("div", { className: "flex items-center gap-2", children: [!isLast && (_jsx("button", { type: "button", className: "text-sm text-[var(--color-text-secondary)] underline hover:text-[var(--color-text-primary)]", onClick: () => tour.close(), children: CUBE_TOUR_LABEL.END })), _jsx("span", { className: "flex-1" }), position > 1 && (_jsx(CubeButton, { onClick: () => tour.move(-1, isShown), children: CUBE_TOUR_LABEL.BACK })), _jsx(CubeButton, { primary: true,
171
+ // the keyboard follows the tour: Enter moves on
172
+ autoFocus: true, onClick: () => tour.move(1, isShown), children: isLast ? CUBE_TOUR_LABEL.DONE : CUBE_TOUR_LABEL.NEXT })] })] }, tour.index));
173
+ return createPortal(_jsx("div", { className: "legend-cube__tour-layer", style: { position: 'fixed', inset: 0, zIndex: CUBE_TOUR_Z_INDEX },
174
+ // the page underneath takes no clicks, and shows no menu, meanwhile
175
+ onContextMenu: (event) => event.preventDefault(), children: spotlight ? (_jsxs(_Fragment, { children: [_jsx("div", { "aria-hidden": true, style: {
176
+ position: 'fixed',
177
+ ...spotlight,
178
+ borderRadius: 6,
179
+ boxShadow: `0 0 0 2px var(--color-accent), 0 0 0 9999px ${DIM}`,
180
+ pointerEvents: 'none',
181
+ } }), _jsx(BasePopper, { open: true, role: "presentation", popperRef: popperRef, anchorEl: virtualAnchor, container: container, placement: step.placement ?? 'bottom', modifiers: MODIFIERS, style: { zIndex: CUBE_TOUR_Z_INDEX + 1 }, children: card })] })) : (_jsx("div", { className: "flex items-center justify-center", style: { position: 'fixed', inset: 0, background: DIM }, children: card })) }), container);
182
+ });
183
+ //# sourceMappingURL=CubeTour.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CubeTour.js","sourceRoot":"","sources":["../../../src/components/tour/CubeTour.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;G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EAAE,IAAI,CAAC,SAAS,IAAI,QAAQ,EACrC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,EAAE,MAAM,EAAE,iBAAiB,GAAG,CAAC,EAAE,YAEvC,IAAI,GACM,IACZ,CACJ,CAAC,CAAC,CAAC,CACF,cACE,SAAS,EAAC,kCAAkC,EAC5C,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,YAEtD,IAAI,GACD,CACP,GACG,EACN,SAAS,CACV,CAAC;AACJ,CAAC,CACF,CAAC"}
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /** @license @finos/legend-cube-builder v0.0.5
1
+ /** @license @finos/legend-cube-builder v0.0.6
2
2
  * Copyright (c) 2020-present, Goldman Sachs
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
package/lib/index.d.ts CHANGED
@@ -36,6 +36,7 @@ export { getRuntimesForDatabase } from './graph-manager/CubeModelOutlineHelper.j
36
36
  export { buildCubeConnectionExplorer, buildCubeDataProductCatalog, buildCubeIngestCatalog, buildCubeEngine, buildCubeLakehouseEnvironment, buildCubeProjectCatalog, buildCubeServiceCatalog, readCubeIngestDataSets, serializeCubeLambdaForHost, type CubeEngineConfig, type CubeLakehouseServices, } from './graph-manager/protocol/pure/CubeEngineBuilder.js';
37
37
  export type { CubeLakehouseEnvironment } from './graph-manager/CubeLakehouseEnvironment.js';
38
38
  export { type CubeHost, type CubeHostProject, type CubeHostProjectRuntime, isCubeProjectHost, isCubeSampleDataOffered, } from './stores/CubeHost.js';
39
+ export { buildLegendCubeLakehouseServices, buildLegendCubeProjectCatalog, LegendCubeHost, type LegendCubeHostConfig, type LegendCubeHostParts, } from './stores/LegendCubeHost.js';
39
40
  export { getCubeRememberedWarehouse } from './stores/CubeDataProductWarehouse.js';
40
41
  export { CUBE_LAMBDA_IMPORT_MESSAGE, CubeLambdaFidelity, getCubeLambdaFidelity, readCubeLambdaDocument, type CubeInitialLambda, type CubeLambdaImportState, type CubeLambdaReading, } from './stores/CubeLambdaImportState.js';
41
42
  export { bindCubeLambdaSources, CUBE_LAMBDA_SOURCES_MESSAGE, type CubeLambdaBinding, } from './stores/CubeLambdaSources.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAChF,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,4BAA4B,GAC7B,MAAM,6BAA6B,CAAC;AAErC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACtB,eAAe,EACf,6BAA6B,EAC7B,uBAAuB,EACvB,uBAAuB,EACvB,s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iB,GACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,cAAc,EACd,KAAK,YAAY,EACjB,eAAe,EACf,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,yCAAyC,CAAC"}
package/lib/index.js CHANGED
@@ -34,6 +34,7 @@ export * from './graph-manager/CubeServiceCatalog.js';
34
34
  export { getRuntimesForDatabase } from './graph-manager/CubeModelOutlineHelper.js';
35
35
  export { buildCubeConnectionExplorer, buildCubeDataProductCatalog, buildCubeIngestCatalog, buildCubeEngine, buildCubeLakehouseEnvironment, buildCubeProjectCatalog, buildCubeServiceCatalog, readCubeIngestDataSets, serializeCubeLambdaForHost, } from './graph-manager/protocol/pure/CubeEngineBuilder.js';
36
36
  export { isCubeProjectHost, isCubeSampleDataOffered, } from './stores/CubeHost.js';
37
+ export { buildLegendCubeLakehouseServices, buildLegendCubeProjectCatalog, LegendCubeHost, } from './stores/LegendCubeHost.js';
37
38
  export { getCubeRememberedWarehouse } from './stores/CubeDataProductWarehouse.js';
38
39
  export { CUBE_LAMBDA_IMPORT_MESSAGE, CubeLambdaFidelity, getCubeLambdaFidelity, readCubeLambdaDocument, } from './stores/CubeLambdaImportState.js';
39
40
  export { bindCubeLambdaSources, CUBE_LAMBDA_SOURCES_MESSAGE, } from './stores/CubeLambdaSources.js';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,UAAU,EAA0B,MAAM,4BAA4B,CAAC;AAEhF,OAAO,E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+BAA+B,CAAC;AACvC,OAAO,EACL,cAAc,EAEd,eAAe,EACf,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,yCAAyC,CAAC"}
@@ -19,6 +19,7 @@ import type { GeneratorFn } from '@finos/legend-shared';
19
19
  import { CubeEngineError, type CubeModelOutline } from '../graph-manager/CubeEngine.js';
20
20
  import { CubeDataProductRuntimeState } from './CubeDataProductRuntimeState.js';
21
21
  import { CubeExamplesState } from './CubeExamplesState.js';
22
+ import { CubeTourState } from './CubeTourState.js';
22
23
  import { CubeExportState } from './CubeExportState.js';
23
24
  import { CubeGridFetcher } from './CubeGridFetcher.js';
24
25
  import { CubeGridState } from './CubeGridState.js';
@@ -29,6 +30,8 @@ import { type CubeEngineCheckedNode } from './CubeEngineChecks.js';
29
30
  import { type CubeHost } from './CubeHost.js';
30
31
  import { CubeNodeEditorState } from './CubeNodeEditorState.js';
31
32
  import { CubeShowPureState } from './CubeShowPureState.js';
33
+ import { CubeJsonViewerState } from './variant/CubeJsonViewerState.js';
34
+ import { CubeJsonExplorerState } from './variant/CubeJsonExplorerState.js';
32
35
  import { CubeLambdaImportState } from './CubeLambdaImportState.js';
33
36
  import { CubeSourcePickerState } from './CubeSourcePickerState.js';
34
37
  import { CubeSpecTransferState } from './CubeSpecTransferState.js';
@@ -78,6 +81,12 @@ export declare class CubeEditorState implements CommandRegistrar {
78
81
  readonly specTransfer: CubeSpecTransferState;
79
82
  readonly examples: CubeExamplesState;
80
83
  readonly showPure: CubeShowPureState;
84
+ /** The editor's guided tour (PLAN §11.21) */
85
+ readonly tour: CubeTourState;
86
+ /** Open JSON: a Variant cell's document as a tree (PLAN §11.20) */
87
+ readonly jsonViewer: CubeJsonViewerState;
88
+ /** Explore JSON: a Variant column's fields, and the columns they can become (PLAN §11.20) */
89
+ readonly jsonExplorer: CubeJsonExplorerState;
81
90
  /** Import Pure: the lambda the page opened on, read into the cube (PLAN §11.18) */
82
91
  readonly lambdaImport: CubeLambdaImportState;
83
92
  readonly nodeEditor: CubeNodeEditorState;
@@ -238,7 +247,7 @@ export declare class CubeEditorState implements CommandRegistrar {
238
247
  * way.
239
248
  */
240
249
  loadModelOutline(model?: ModelContext | undefined): GeneratorFn<void>;
241
- /** One of Cube's dialogs is open: the source picker, Examples, the group rows' settings, Import or Export, Show Pure */
250
+ /** One of Cube's dialogs is open: the source picker, Examples, the group rows' settings, Import or Export, Show Pure, or the tour */
242
251
  get isDialogOpen(): boolean;
243
252
  /**
244
253
  * The page's keyboard shortcuts, while it is open (spec §17.12). Each does
@@ -392,6 +401,13 @@ export declare class CubeEditorState implements CommandRegistrar {
392
401
  * read-only cube, or when the query can't take it.
393
402
  */
394
403
  addConfiguredNode(node: QueryNode, afterId?: string): void;
404
+ /**
405
+ * Adds nodes made elsewhere one after another, the first spliced in after
406
+ * `afterId`, as one undo step, the last then running when that one did
407
+ * (Explore JSON's Extend then Explode Array). Does nothing in a read-only
408
+ * cube, or when the query can't take one of them.
409
+ */
410
+ addConfiguredNodes(nodes: readonly QueryNode[], afterId?: string): void;
395
411
  /** Whether dropping a node on another does anything: connect it, or else move it after it */
396
412
  canDropNode(nodeId: string, targetId: string): boolean;
397
413
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"CubeEditorState.d.ts","sourceRoot":"","sources":["../../src/stores/CubeEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,EAGnB,YAAY,EAUZ,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,YAAY,EACZ,KAAK,SAAS,EAEd,qBAAqB,EAGrB,KAAK,qBAAqB,EAC1B,aAAa,EACb,KAAK,gBAAgB,EAErB,cAAc,EAEd,KAAK,WAAW,EAEjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BA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C,MAAM,EAAE,MAAM,GAAG,IAAI;IAMhC;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAYtC;;;;OAIG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAoBnD,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI;IAO1D,eAAe,IAAI,IAAI;IAMvB,mGAAmG;IACnG,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAYnC,sEAAsE;IACtE,mBAAmB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAQ7C,+CAA+C;IAC/C,OAAO,IAAI,IAAI;CAMhB"}
@@ -33,6 +33,7 @@ import { CUBE_FUNCTION_MESSAGE, getFunctionDriftWarning, getFunctionRecheckWarni
33
33
  import { recheckCubeFunctionSources } from './CubeFunctionRecheck.js';
34
34
  import { CubeDataProductRuntimeState } from './CubeDataProductRuntimeState.js';
35
35
  import { CubeExamplesState } from './CubeExamplesState.js';
36
+ import { CubeTourState } from './CubeTourState.js';
36
37
  import { CubeExportState } from './CubeExportState.js';
37
38
  import { CubeGridFetcher } from './CubeGridFetcher.js';
38
39
  import { CubeGridState } from './CubeGridState.js';
@@ -46,6 +47,8 @@ import { getCubeExtendUpstream } from './CubeExtendTyping.js';
46
47
  import { loadCubeModelOutline } from './CubeHost.js';
47
48
  import { CubeNodeEditorState } from './CubeNodeEditorState.js';
48
49
  import { CubeShowPureState } from './CubeShowPureState.js';
50
+ import { CubeJsonViewerState } from './variant/CubeJsonViewerState.js';
51
+ import { CubeJsonExplorerState } from './variant/CubeJsonExplorerState.js';
49
52
  import { CubeLambdaImportState } from './CubeLambdaImportState.js';
50
53
  import { CubeSourcePickerState } from './CubeSourcePickerState.js';
51
54
  import { CubeSpecTransferState } from './CubeSpecTransferState.js';
@@ -98,6 +101,12 @@ export class CubeEditorState {
98
101
  specTransfer;
99
102
  examples;
100
103
  showPure;
104
+ /** The editor's guided tour (PLAN §11.21) */
105
+ tour;
106
+ /** Open JSON: a Variant cell's document as a tree (PLAN §11.20) */
107
+ jsonViewer = new CubeJsonViewerState();
108
+ /** Explore JSON: a Variant column's fields, and the columns they can become (PLAN §11.20) */
109
+ jsonExplorer;
101
110
  /** Import Pure: the lambda the page opened on, read into the cube (PLAN §11.18) */
102
111
  lambdaImport;
103
112
  nodeEditor;
@@ -201,6 +210,7 @@ export class CubeEditorState {
201
210
  connect: action,
202
211
  addNode: action,
203
212
  addConfiguredNode: action,
213
+ addConfiguredNodes: action,
204
214
  dropNode: action,
205
215
  removeNode: action,
206
216
  copiedNode: observable.ref,
@@ -243,6 +253,8 @@ export class CubeEditorState {
243
253
  this.specTransfer = new CubeSpecTransferState(this);
244
254
  this.examples = new CubeExamplesState(this);
245
255
  this.showPure = new CubeShowPureState(this);
256
+ this.tour = new CubeTourState(this);
257
+ this.jsonExplorer = new CubeJsonExplorerState(this);
246
258
  this.lambdaImport = new CubeLambdaImportState(this);
247
259
  this.nodeEditor = new CubeNodeEditorState(this);
248
260
  this.rechecking = reaction(() => this.nodesToCheck, (waiting) => {
@@ -546,14 +558,15 @@ export class CubeEditorState {
546
558
  this.loadingOutlines.delete(key);
547
559
  }
548
560
  }
549
- /** One of Cube's dialogs is open: the source picker, Examples, the group rows' settings, Import or Export, Show Pure */
561
+ /** One of Cube's dialogs is open: the source picker, Examples, the group rows' settings, Import or Export, Show Pure, or the tour */
550
562
  get isDialogOpen() {
551
563
  return (this.sourcePicker.isOpen ||
552
564
  this.examples.isOpen ||
553
565
  this.grid.isSettingsShown ||
554
566
  this.grid.formatColumn !== undefined ||
555
567
  this.specTransfer.mode !== undefined ||
556
- this.showPure.isOpen);
568
+ this.showPure.isOpen ||
569
+ this.tour.isOpen);
557
570
  }
558
571
  /**
559
572
  * The page's keyboard shortcuts, while it is open (spec §17.12). Each does
@@ -1133,11 +1146,28 @@ export class CubeEditorState {
1133
1146
  * read-only cube, or when the query can't take it.
1134
1147
  */
1135
1148
  addConfiguredNode(node, afterId) {
1136
- const { query } = this.document;
1137
- if (this.readOnly || !query.canAdd(node, afterId)) {
1149
+ this.addConfiguredNodes([node], afterId);
1150
+ }
1151
+ /**
1152
+ * Adds nodes made elsewhere one after another, the first spliced in after
1153
+ * `afterId`, as one undo step, the last then running when that one did
1154
+ * (Explore JSON's Extend then Explode Array). Does nothing in a read-only
1155
+ * cube, or when the query can't take one of them.
1156
+ */
1157
+ addConfiguredNodes(nodes, afterId) {
1158
+ if (this.readOnly || !nodes.length) {
1138
1159
  return;
1139
1160
  }
1140
- this.applyQuery(query.add(node, afterId));
1161
+ let query = this.document.query;
1162
+ let after = afterId;
1163
+ for (const node of nodes) {
1164
+ if (!query.canAdd(node, after)) {
1165
+ return;
1166
+ }
1167
+ query = query.add(node, after);
1168
+ after = node.id;
1169
+ }
1170
+ this.applyQuery(query);
1141
1171
  }
1142
1172
  /** Whether dropping a node on another does anything: connect it, or else move it after it */
1143
1173
  canDropNode(nodeId, targetId) {