@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.
- package/README.md +60 -1
- package/docs/adding-an-operation.md +92 -0
- package/docs/hosting.md +79 -0
- package/docs/testing.md +83 -0
- package/lib/__lib__/LegendCubeHelpText.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeHelpText.js +11 -3
- package/lib/__lib__/LegendCubeHelpText.js.map +1 -1
- package/lib/__lib__/LegendCubeLabels.d.ts +19 -0
- package/lib/__lib__/LegendCubeLabels.d.ts.map +1 -1
- package/lib/__lib__/LegendCubeLabels.js +19 -0
- package/lib/__lib__/LegendCubeLabels.js.map +1 -1
- package/lib/__test-utils__/CubeEngineTestSupport.d.ts +6 -0
- package/lib/__test-utils__/CubeEngineTestSupport.d.ts.map +1 -1
- package/lib/__test-utils__/CubeEngineTestSupport.js +30 -0
- package/lib/__test-utils__/CubeEngineTestSupport.js.map +1 -1
- package/lib/__test-utils__/CubeOperationsTestUtils.d.ts +42 -0
- package/lib/__test-utils__/CubeOperationsTestUtils.d.ts.map +1 -0
- package/lib/__test-utils__/CubeOperationsTestUtils.js +92 -0
- package/lib/__test-utils__/CubeOperationsTestUtils.js.map +1 -0
- package/lib/__test-utils__/FakeCubeEngine.d.ts.map +1 -1
- package/lib/__test-utils__/FakeCubeEngine.js +7 -1
- package/lib/__test-utils__/FakeCubeEngine.js.map +1 -1
- package/lib/components/CubeNodeIcon.d.ts.map +1 -1
- package/lib/components/CubeNodeIcon.js +12 -2
- package/lib/components/CubeNodeIcon.js.map +1 -1
- package/lib/components/canvas/CubeCanvas.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvas.js +5 -3
- package/lib/components/canvas/CubeCanvas.js.map +1 -1
- package/lib/components/canvas/CubeCanvasElements.d.ts +2 -0
- package/lib/components/canvas/CubeCanvasElements.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasElements.js +2 -1
- package/lib/components/canvas/CubeCanvasElements.js.map +1 -1
- package/lib/components/canvas/CubeCanvasNode.d.ts.map +1 -1
- package/lib/components/canvas/CubeCanvasNode.js +5 -2
- package/lib/components/canvas/CubeCanvasNode.js.map +1 -1
- package/lib/components/editors/CubeColumnPicker.d.ts +9 -2
- package/lib/components/editors/CubeColumnPicker.d.ts.map +1 -1
- package/lib/components/editors/CubeColumnPicker.js +9 -4
- package/lib/components/editors/CubeColumnPicker.js.map +1 -1
- package/lib/components/editors/CubeDistinctEditor.d.ts +23 -0
- package/lib/components/editors/CubeDistinctEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeDistinctEditor.js +24 -0
- package/lib/components/editors/CubeDistinctEditor.js.map +1 -0
- package/lib/components/editors/CubeIntegerField.d.ts +29 -0
- package/lib/components/editors/CubeIntegerField.d.ts.map +1 -0
- package/lib/components/editors/CubeIntegerField.js +30 -0
- package/lib/components/editors/CubeIntegerField.js.map +1 -0
- package/lib/components/editors/CubeJoinEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeJoinEditor.js +11 -3
- package/lib/components/editors/CubeJoinEditor.js.map +1 -1
- package/lib/components/editors/CubeNodeEditorPanel.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorPanel.js +3 -2
- package/lib/components/editors/CubeNodeEditorPanel.js.map +1 -1
- package/lib/components/editors/CubeNodeEditorRegistry.d.ts.map +1 -1
- package/lib/components/editors/CubeNodeEditorRegistry.js +14 -1
- package/lib/components/editors/CubeNodeEditorRegistry.js.map +1 -1
- package/lib/components/editors/CubeRenameEditor.d.ts +26 -0
- package/lib/components/editors/CubeRenameEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeRenameEditor.js +58 -0
- package/lib/components/editors/CubeRenameEditor.js.map +1 -0
- package/lib/components/editors/CubeRestrictEditor.d.ts +26 -0
- package/lib/components/editors/CubeRestrictEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeRestrictEditor.js +23 -0
- package/lib/components/editors/CubeRestrictEditor.js.map +1 -0
- package/lib/components/editors/CubeRowCountEditor.d.ts +25 -0
- package/lib/components/editors/CubeRowCountEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeRowCountEditor.js +38 -0
- package/lib/components/editors/CubeRowCountEditor.js.map +1 -0
- package/lib/components/editors/CubeSliceEditor.d.ts +25 -0
- package/lib/components/editors/CubeSliceEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeSliceEditor.js +40 -0
- package/lib/components/editors/CubeSliceEditor.js.map +1 -0
- package/lib/components/editors/CubeSortEditor.d.ts +27 -0
- package/lib/components/editors/CubeSortEditor.d.ts.map +1 -0
- package/lib/components/editors/CubeSortEditor.js +72 -0
- package/lib/components/editors/CubeSortEditor.js.map +1 -0
- package/lib/components/editors/CubeSourceEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeSourceEditor.js +1 -2
- package/lib/components/editors/CubeSourceEditor.js.map +1 -1
- package/lib/components/editors/CubeValueEditor.d.ts.map +1 -1
- package/lib/components/editors/CubeValueEditor.js +2 -1
- package/lib/components/editors/CubeValueEditor.js.map +1 -1
- package/lib/components/grid/CubeGridRegion.d.ts.map +1 -1
- package/lib/components/grid/CubeGridRegion.js +1 -1
- package/lib/components/grid/CubeGridRegion.js.map +1 -1
- package/lib/components/grid/CubeResultGrid.d.ts +14 -1
- package/lib/components/grid/CubeResultGrid.d.ts.map +1 -1
- package/lib/components/grid/CubeResultGrid.js +41 -5
- package/lib/components/grid/CubeResultGrid.js.map +1 -1
- package/lib/graph-manager/CubeEngine.d.ts +13 -0
- package/lib/graph-manager/CubeEngine.d.ts.map +1 -1
- package/lib/graph-manager/CubeEngine.js.map +1 -1
- package/lib/graph-manager/CubeModelOutlineHelper.d.ts +8 -0
- package/lib/graph-manager/CubeModelOutlineHelper.d.ts.map +1 -1
- package/lib/graph-manager/CubeModelOutlineHelper.js +21 -0
- package/lib/graph-manager/CubeModelOutlineHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js +56 -3
- package/lib/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js +3 -3
- package/lib/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/stores/CubeEditorState.d.ts +34 -4
- package/lib/stores/CubeEditorState.d.ts.map +1 -1
- package/lib/stores/CubeEditorState.js +87 -6
- package/lib/stores/CubeEditorState.js.map +1 -1
- package/lib/stores/CubeExecutionState.d.ts.map +1 -1
- package/lib/stores/CubeExecutionState.js +19 -3
- package/lib/stores/CubeExecutionState.js.map +1 -1
- package/lib/stores/CubeGridQuickActions.d.ts +40 -0
- package/lib/stores/CubeGridQuickActions.d.ts.map +1 -0
- package/lib/stores/CubeGridQuickActions.js +86 -0
- package/lib/stores/CubeGridQuickActions.js.map +1 -0
- package/lib/stores/CubeNodeEditorState.d.ts +19 -1
- package/lib/stores/CubeNodeEditorState.d.ts.map +1 -1
- package/lib/stores/CubeNodeEditorState.js +55 -0
- package/lib/stores/CubeNodeEditorState.js.map +1 -1
- package/lib/stores/CubeShowPureState.d.ts +4 -1
- package/lib/stores/CubeShowPureState.d.ts.map +1 -1
- package/lib/stores/CubeShowPureState.js +22 -5
- package/lib/stores/CubeShowPureState.js.map +1 -1
- package/lib/stores/editors/CubeIntegerText.d.ts +24 -0
- package/lib/stores/editors/CubeIntegerText.d.ts.map +1 -0
- package/lib/stores/editors/CubeIntegerText.js +33 -0
- package/lib/stores/editors/CubeIntegerText.js.map +1 -0
- package/lib/stores/editors/CubeJoinDraft.d.ts +13 -5
- package/lib/stores/editors/CubeJoinDraft.d.ts.map +1 -1
- package/lib/stores/editors/CubeJoinDraft.js +21 -12
- package/lib/stores/editors/CubeJoinDraft.js.map +1 -1
- package/lib/stores/editors/CubeNodeDraftRegistry.d.ts +6 -0
- package/lib/stores/editors/CubeNodeDraftRegistry.d.ts.map +1 -1
- package/lib/stores/editors/CubeNodeDraftRegistry.js +23 -1
- package/lib/stores/editors/CubeNodeDraftRegistry.js.map +1 -1
- package/lib/stores/editors/CubeRenameDraft.d.ts +44 -0
- package/lib/stores/editors/CubeRenameDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeRenameDraft.js +79 -0
- package/lib/stores/editors/CubeRenameDraft.js.map +1 -0
- package/lib/stores/editors/CubeRestrictDraft.d.ts +37 -0
- package/lib/stores/editors/CubeRestrictDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeRestrictDraft.js +73 -0
- package/lib/stores/editors/CubeRestrictDraft.js.map +1 -0
- package/lib/stores/editors/CubeRowCountDraft.d.ts +42 -0
- package/lib/stores/editors/CubeRowCountDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeRowCountDraft.js +55 -0
- package/lib/stores/editors/CubeRowCountDraft.js.map +1 -0
- package/lib/stores/editors/CubeSliceDraft.d.ts +42 -0
- package/lib/stores/editors/CubeSliceDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeSliceDraft.js +72 -0
- package/lib/stores/editors/CubeSliceDraft.js.map +1 -0
- package/lib/stores/editors/CubeSortDraft.d.ts +49 -0
- package/lib/stores/editors/CubeSortDraft.d.ts.map +1 -0
- package/lib/stores/editors/CubeSortDraft.js +99 -0
- package/lib/stores/editors/CubeSortDraft.js.map +1 -0
- package/package.json +8 -8
- package/src/__lib__/LegendCubeHelpText.ts +22 -2
- package/src/__lib__/LegendCubeLabels.ts +30 -0
- package/src/__test-utils__/CubeEngineTestSupport.ts +35 -0
- package/src/__test-utils__/CubeOperationsTestUtils.ts +177 -0
- package/src/__test-utils__/FakeCubeEngine.ts +7 -1
- package/src/components/CubeNodeIcon.tsx +18 -1
- package/src/components/canvas/CubeCanvas.tsx +5 -3
- package/src/components/canvas/CubeCanvasElements.ts +4 -1
- package/src/components/canvas/CubeCanvasNode.tsx +9 -1
- package/src/components/editors/CubeColumnPicker.tsx +36 -12
- package/src/components/editors/CubeDistinctEditor.tsx +28 -0
- package/src/components/editors/CubeIntegerField.tsx +51 -0
- package/src/components/editors/CubeJoinEditor.tsx +26 -3
- package/src/components/editors/CubeNodeEditorPanel.tsx +12 -1
- package/src/components/editors/CubeNodeEditorRegistry.ts +20 -0
- package/src/components/editors/CubeRenameEditor.tsx +143 -0
- package/src/components/editors/CubeRestrictEditor.tsx +103 -0
- package/src/components/editors/CubeRowCountEditor.tsx +53 -0
- package/src/components/editors/CubeSliceEditor.tsx +69 -0
- package/src/components/editors/CubeSortEditor.tsx +206 -0
- package/src/components/editors/CubeSourceEditor.tsx +0 -10
- package/src/components/editors/CubeValueEditor.tsx +2 -1
- package/src/components/grid/CubeGridRegion.tsx +1 -0
- package/src/components/grid/CubeResultGrid.tsx +59 -5
- package/src/graph-manager/CubeEngine.ts +14 -0
- package/src/graph-manager/CubeModelOutlineHelper.ts +26 -0
- package/src/graph-manager/protocol/pure/v1/V1_CubeModelOutlineBuilder.ts +89 -3
- package/src/graph-manager/protocol/pure/v1/__test-utils__/V1_CubeEngineTestUtils.ts +6 -3
- package/src/stores/CubeEditorState.ts +110 -5
- package/src/stores/CubeExecutionState.ts +36 -3
- package/src/stores/CubeGridQuickActions.ts +129 -0
- package/src/stores/CubeNodeEditorState.ts +70 -1
- package/src/stores/CubeShowPureState.ts +27 -5
- package/src/stores/editors/CubeIntegerText.ts +34 -0
- package/src/stores/editors/CubeJoinDraft.ts +43 -16
- package/src/stores/editors/CubeNodeDraftRegistry.ts +35 -1
- package/src/stores/editors/CubeRenameDraft.ts +110 -0
- package/src/stores/editors/CubeRestrictDraft.ts +83 -0
- package/src/stores/editors/CubeRowCountDraft.ts +69 -0
- package/src/stores/editors/CubeSliceDraft.ts +87 -0
- package/src/stores/editors/CubeSortDraft.ts +135 -0
- package/tsconfig.json +15 -0
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { canFixJoinDuplicates, fixJoinDuplicates, } from '@finos/legend-cube';
|
|
16
17
|
import { action, computed, makeObservable, observable, reaction, } from 'mobx';
|
|
17
18
|
import { CUBE_EDITOR_CLOSED_REASON, getEditorClosedNotice, } from '../__lib__/LegendCubeLabels.js';
|
|
18
19
|
import { createCubeNodeDraft } from './editors/CubeNodeDraftRegistry.js';
|
|
@@ -62,8 +63,10 @@ export class CubeNodeEditorState {
|
|
|
62
63
|
hasChanges: computed,
|
|
63
64
|
open: action,
|
|
64
65
|
canSwapInputs: computed,
|
|
66
|
+
canRenameDuplicateColumns: computed,
|
|
65
67
|
apply: action,
|
|
66
68
|
swapInputs: action,
|
|
69
|
+
renameDuplicateColumns: action,
|
|
67
70
|
close: action,
|
|
68
71
|
cancel: action,
|
|
69
72
|
discard: action,
|
|
@@ -148,6 +151,58 @@ export class CubeNodeEditorState {
|
|
|
148
151
|
this.editorState.applyQuery(query);
|
|
149
152
|
this.bind(query.getNode(node.id) ?? node);
|
|
150
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* The cube's query with the draft in place of its node, when it has
|
|
156
|
+
* changes, and the schemas of the node's inputs, which the draft doesn't
|
|
157
|
+
* change
|
|
158
|
+
*/
|
|
159
|
+
get queryWithEdits() {
|
|
160
|
+
const { node, edited } = this;
|
|
161
|
+
let { query } = this.editorState.document;
|
|
162
|
+
if (edited && this.hasChanges && query.canReplace(edited)) {
|
|
163
|
+
query = query.replace(edited);
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
query,
|
|
167
|
+
inputSchemas: node
|
|
168
|
+
? query
|
|
169
|
+
.getInputIds(node.id)
|
|
170
|
+
.map((inputId) => inputId === undefined
|
|
171
|
+
? undefined
|
|
172
|
+
: this.editorState.analysis.schemas.get(inputId))
|
|
173
|
+
: [],
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Whether the join being edited, edits included, can have the columns its
|
|
178
|
+
* inputs share renamed (spec §7.11's autofix, PLAN §11.4): its only problem
|
|
179
|
+
* is the duplicate rule, and the cube isn't read-only
|
|
180
|
+
*/
|
|
181
|
+
get canRenameDuplicateColumns() {
|
|
182
|
+
const { node } = this;
|
|
183
|
+
if (!node || node.key !== this.nodeKey || this.editorState.readOnly) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
const { query, inputSchemas } = this.queryWithEdits;
|
|
187
|
+
const [leftSchema, rightSchema] = inputSchemas;
|
|
188
|
+
return canFixJoinDuplicates(query, node.id, leftSchema, rightSchema);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Renames the columns the join's inputs share with a Rename before each
|
|
192
|
+
* input, applying the draft first, as one undo step, then goes on editing
|
|
193
|
+
* the join, whose keys follow the renames
|
|
194
|
+
*/
|
|
195
|
+
renameDuplicateColumns() {
|
|
196
|
+
const { node } = this;
|
|
197
|
+
if (!node || !this.canRenameDuplicateColumns) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
const { query, inputSchemas } = this.queryWithEdits;
|
|
201
|
+
const [leftSchema, rightSchema] = inputSchemas;
|
|
202
|
+
const fixed = fixJoinDuplicates(query, node.id, leftSchema, rightSchema);
|
|
203
|
+
this.editorState.applyQuery(fixed);
|
|
204
|
+
this.bind(fixed.getNode(node.id) ?? node);
|
|
205
|
+
}
|
|
151
206
|
/** Applies the draft, then closes the panel (spec §17.5: edits commit on close) */
|
|
152
207
|
close() {
|
|
153
208
|
this.apply();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeNodeEditorState.js","sourceRoot":"","sources":["../../src/stores/CubeNodeEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"CubeNodeEditorState.js","sourceRoot":"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OAAO;QACT,CAAC;QACD,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,CACV,IAAI;gBACF,CAAC,CAAC,yBAAyB,CAAC,YAAY;gBACxC,CAAC,CAAC,yBAAyB,CAAC,YAAY,CAC3C,CAAC;QACJ,CAAC;aAAM,IAAI,IAAI,EAAE,CAAC;YAChB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC;IACH,CAAC;CACF"}
|
|
@@ -31,7 +31,10 @@ export declare class CubeShowPureState {
|
|
|
31
31
|
/** Counts renders, so one that finishes after the dialog closed is dropped */
|
|
32
32
|
private request;
|
|
33
33
|
constructor(editorState: CubeEditorState);
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Opens the dialog and renders the query, written for the database it runs
|
|
36
|
+
* on, as Execute writes it; does nothing when Execute can't run
|
|
37
|
+
*/
|
|
35
38
|
open(): GeneratorFn<void>;
|
|
36
39
|
close(): void;
|
|
37
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeShowPureState.d.ts","sourceRoot":"","sources":["../../src/stores/CubeShowPureState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"CubeShowPureState.d.ts","sourceRoot":"","sources":["../../src/stores/CubeShowPureState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EACL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,QAAQ,CAAC,WAAW,EAAE,eAAe,CAAC;IAEtC,MAAM,UAAS;IACf,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,oEAAoE;IACpE,KAAK,EAAE,eAAe,GAAG,SAAS,CAAC;IACnC,WAAW,UAAS;IACpB,8EAA8E;IAC9E,OAAO,CAAC,OAAO,CAAK;gBAER,WAAW,EAAE,eAAe;IAYxC;;;OAGG;IACF,IAAI,IAAI,WAAW,CAAC,IAAI,CAAC;IAqD1B,KAAK,IAAI,IAAI;CAOd"}
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
16
|
+
import { needsDatabaseType } from '@finos/legend-cube';
|
|
17
|
+
import { action, flow, flowResult, makeObservable, observable } from 'mobx';
|
|
17
18
|
import { CubeEngineError, CubeEngineErrorKind, } from '../graph-manager/CubeEngine.js';
|
|
18
19
|
/**
|
|
19
20
|
* Show Pure: the Pure text of what Execute would run, the capture node's
|
|
@@ -40,11 +41,18 @@ export class CubeShowPureState {
|
|
|
40
41
|
});
|
|
41
42
|
this.editorState = editorState;
|
|
42
43
|
}
|
|
43
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Opens the dialog and renders the query, written for the database it runs
|
|
46
|
+
* on, as Execute writes it; does nothing when Execute can't run
|
|
47
|
+
*/
|
|
44
48
|
*open() {
|
|
45
49
|
const { execution, document, emitter, rowLimit, host } = this.editorState;
|
|
46
|
-
const
|
|
47
|
-
|
|
50
|
+
const { query, context } = document;
|
|
51
|
+
const runtime = context?.runtime;
|
|
52
|
+
const model = context?.model;
|
|
53
|
+
// checked by canExecute
|
|
54
|
+
const captureId = query.selected;
|
|
55
|
+
if (!execution.canExecute || runtime === undefined || model === undefined) {
|
|
48
56
|
return;
|
|
49
57
|
}
|
|
50
58
|
const request = ++this.request;
|
|
@@ -53,7 +61,16 @@ export class CubeShowPureState {
|
|
|
53
61
|
this.error = undefined;
|
|
54
62
|
this.isRendering = true;
|
|
55
63
|
try {
|
|
56
|
-
|
|
64
|
+
let databaseType;
|
|
65
|
+
if (needsDatabaseType(query, captureId)) {
|
|
66
|
+
yield flowResult(this.editorState.loadModelOutline(model));
|
|
67
|
+
// closed, or opened again, while the outline loaded
|
|
68
|
+
if (request !== this.request) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
databaseType = this.editorState.getRunDatabaseType(query, captureId, model, runtime);
|
|
72
|
+
}
|
|
73
|
+
const text = (yield host.engine.renderPure(emitter.emitExecutionLambda({ rowLimit, runtime, databaseType })));
|
|
57
74
|
if (request === this.request) {
|
|
58
75
|
this.text = text;
|
|
59
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeShowPureState.js","sourceRoot":"","sources":["../../src/stores/CubeShowPureState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"CubeShowPureState.js","sourceRoot":"","sources":["../../src/stores/CubeShowPureState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,GACpB,MAAM,gCAAgC,CAAC;AAGxC;;;;GAIG;AACH,MAAM,OAAO,iBAAiB;IACnB,WAAW,CAAkB;IAEtC,MAAM,GAAG,KAAK,CAAC;IACf,IAAI,CAAqB;IACzB,oEAAoE;IACpE,KAAK,CAA8B;IACnC,WAAW,GAAG,KAAK,CAAC;IACpB,8EAA8E;IACtE,OAAO,GAAG,CAAC,CAAC;IAEpB,YAAY,WAA4B;QACtC,cAAc,CAAC,IAAI,EAAE;YACnB,MAAM,EAAE,UAAU;YAClB,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,UAAU,CAAC,GAAG;YACrB,WAAW,EAAE,UAAU;Y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YACD,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CACxC,OAAO,CAAC,mBAAmB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CACjE,CAAW,CAAC;YACb,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;gBAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACnB,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;gBAC7B,IAAI,CAAC,KAAK;oBACR,KAAK,YAAY,eAAe;wBAC9B,CAAC,CAAC,KAAK;wBACP,CAAC,CAAC,IAAI,eAAe,CACjB,mBAAmB,CAAC,OAAO,EAC3B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACvD,CAAC;YACV,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,IAAI,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;gBAC7B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* The number a size or row index field holds. Text that isn't a whole number,
|
|
18
|
+
* empty text included, gives `undefined`, which the node then reports: never
|
|
19
|
+
* a default. It doesn't use `Number()` on the raw text, which reads `''` as 0,
|
|
20
|
+
* `0x10` as 16 and `1e3` as 1000. Spaces around the digits are allowed; a
|
|
21
|
+
* number too long for a double gives `undefined`.
|
|
22
|
+
*/
|
|
23
|
+
export declare const parseWholeNumberText: (text: string) => number | undefined;
|
|
24
|
+
//# sourceMappingURL=CubeIntegerText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeIntegerText.d.ts","sourceRoot":"","sources":["../../../src/stores/editors/CubeIntegerText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,KAAG,MAAM,GAAG,SAO5D,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
/** Whole-number text: an optional sign, then digits */
|
|
17
|
+
const WHOLE_NUMBER_TEXT = /^[+-]?\d+$/u;
|
|
18
|
+
/**
|
|
19
|
+
* The number a size or row index field holds. Text that isn't a whole number,
|
|
20
|
+
* empty text included, gives `undefined`, which the node then reports: never
|
|
21
|
+
* a default. It doesn't use `Number()` on the raw text, which reads `''` as 0,
|
|
22
|
+
* `0x10` as 16 and `1e3` as 1000. Spaces around the digits are allowed; a
|
|
23
|
+
* number too long for a double gives `undefined`.
|
|
24
|
+
*/
|
|
25
|
+
export const parseWholeNumberText = (text) => {
|
|
26
|
+
const trimmed = text.trim();
|
|
27
|
+
if (!WHOLE_NUMBER_TEXT.test(trimmed)) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
const value = Number(trimmed);
|
|
31
|
+
return Number.isFinite(value) ? value : undefined;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=CubeIntegerText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeIntegerText.js","sourceRoot":"","sources":["../../../src/stores/editors/CubeIntegerText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,uDAAuD;AACvD,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAsB,EAAE;IACvE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACrC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9B,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACpD,CAAC,CAAC"}
|
|
@@ -46,13 +46,21 @@ export declare class CubeJoinDraft extends CubeNodeDraft<Join> {
|
|
|
46
46
|
setRightColumn(key: number, right: string): void;
|
|
47
47
|
build(): Join;
|
|
48
48
|
}
|
|
49
|
+
/** Where a column of a node's output comes from: a table, and the column's name in it */
|
|
50
|
+
export interface CubeColumnOrigin {
|
|
51
|
+
readonly source: RelationalTableSource;
|
|
52
|
+
readonly column: string;
|
|
53
|
+
}
|
|
49
54
|
/**
|
|
50
|
-
* The table
|
|
51
|
-
* through the inputs whose output has
|
|
52
|
-
* on both sides comes from the side the
|
|
53
|
-
*
|
|
54
|
-
* merges them.
|
|
55
|
+
* The table columns a column of a node's output comes from: followed back
|
|
56
|
+
* through the inputs whose output has it, and through a Rename to its old
|
|
57
|
+
* name. A join key of the same name on both sides comes from the side the
|
|
58
|
+
* join keeps (the left for INNER and LEFT OUTER, the right for RIGHT OUTER),
|
|
59
|
+
* and from both for FULL OUTER, which merges them. A column the node's output
|
|
60
|
+
* doesn't have, e.g. one a Restrict dropped, comes from nowhere.
|
|
55
61
|
*/
|
|
62
|
+
export declare const findColumnOrigins: (query: Query, analysis: SchemaInferenceResult, nodeId: string, columnName: string) => CubeColumnOrigin[];
|
|
63
|
+
/** The table sources a column of a node's output comes from (`findColumnOrigins`) */
|
|
56
64
|
export declare const findColumnSources: (query: Query, analysis: SchemaInferenceResult, nodeId: string, columnName: string) => RelationalTableSource[];
|
|
57
65
|
/**
|
|
58
66
|
* Whether the column of the node's output comes from a table column whose
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeJoinDraft.d.ts","sourceRoot":"","sources":["../../../src/stores/editors/CubeJoinDraft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,EACR,KAAK,KAAK,EACV,qBAAqB,
|
|
1
|
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AC;CACzB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAC5B,OAAO,KAAK,EACZ,UAAU,qBAAqB,EAC/B,QAAQ,MAAM,EACd,YAAY,MAAM,KACjB,gBAAgB,EA8BlB,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,iBAAiB,GAC5B,OAAO,KAAK,EACZ,UAAU,qBAAqB,EAC/B,QAAQ,MAAM,EACd,YAAY,MAAM,KACjB,qBAAqB,EAGrB,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,SAAS,gBAAgB,GAAG,SAAS,EACrC,OAAO,KAAK,EACZ,UAAU,qBAAqB,EAC/B,QAAQ,MAAM,EACd,YAAY,MAAM,KACjB,OASA,CAAC"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { getSameNamedJoinKeys, Join, JoinType, RelationalTableSource, } from '@finos/legend-cube';
|
|
16
|
+
import { getSameNamedJoinKeys, Join, JoinType, RelationalTableSource, Rename, } from '@finos/legend-cube';
|
|
17
17
|
import { action, makeObservable, observable } from 'mobx';
|
|
18
18
|
import { CubeNodeDraft } from './CubeNodeDraft.js';
|
|
19
19
|
let nextPairKey = 1;
|
|
@@ -97,40 +97,49 @@ export class CubeJoinDraft extends CubeNodeDraft {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
* The table
|
|
101
|
-
* through the inputs whose output has
|
|
102
|
-
* on both sides comes from the side the
|
|
103
|
-
*
|
|
104
|
-
* merges them.
|
|
100
|
+
* The table columns a column of a node's output comes from: followed back
|
|
101
|
+
* through the inputs whose output has it, and through a Rename to its old
|
|
102
|
+
* name. A join key of the same name on both sides comes from the side the
|
|
103
|
+
* join keeps (the left for INNER and LEFT OUTER, the right for RIGHT OUTER),
|
|
104
|
+
* and from both for FULL OUTER, which merges them. A column the node's output
|
|
105
|
+
* doesn't have, e.g. one a Restrict dropped, comes from nowhere.
|
|
105
106
|
*/
|
|
106
|
-
export const
|
|
107
|
+
export const findColumnOrigins = (query, analysis, nodeId, columnName) => {
|
|
107
108
|
const node = query.getNode(nodeId);
|
|
108
109
|
if (node instanceof RelationalTableSource) {
|
|
109
110
|
return node.resolution.kind === 'resolved' &&
|
|
110
111
|
node.resolution.schema.lookup(columnName)
|
|
111
|
-
? [node]
|
|
112
|
+
? [{ source: node, column: columnName }]
|
|
112
113
|
: [];
|
|
113
114
|
}
|
|
115
|
+
if (!node || !analysis.schemas.get(nodeId)?.lookup(columnName)) {
|
|
116
|
+
return [];
|
|
117
|
+
}
|
|
114
118
|
const inputIds = query.getInputIds(nodeId);
|
|
115
119
|
const [leftId, rightId] = inputIds;
|
|
120
|
+
const inputName = node instanceof Rename
|
|
121
|
+
? (node.mappings.find(({ to }) => to === columnName)?.from ?? columnName)
|
|
122
|
+
: columnName;
|
|
116
123
|
const followed = node instanceof Join &&
|
|
117
124
|
node.joinType !== JoinType.FULL_OUTER &&
|
|
118
125
|
getSameNamedJoinKeys(node.leftColumns, node.rightColumns).includes(columnName)
|
|
119
126
|
? [node.joinType === JoinType.RIGHT_OUTER ? rightId : leftId]
|
|
120
127
|
: inputIds;
|
|
121
|
-
return followed.flatMap((inputId) => inputId !== undefined && analysis.schemas.get(inputId)?.lookup(
|
|
122
|
-
?
|
|
128
|
+
return followed.flatMap((inputId) => inputId !== undefined && analysis.schemas.get(inputId)?.lookup(inputName)
|
|
129
|
+
? findColumnOrigins(query, analysis, inputId, inputName)
|
|
123
130
|
: []);
|
|
124
131
|
};
|
|
132
|
+
/** The table sources a column of a node's output comes from (`findColumnOrigins`) */
|
|
133
|
+
export const findColumnSources = (query, analysis, nodeId, columnName) => findColumnOrigins(query, analysis, nodeId, columnName).map(({ source }) => source);
|
|
125
134
|
/**
|
|
126
135
|
* Whether the column of the node's output comes from a table column whose
|
|
127
136
|
* type Cube can't read (OTHER or ARRAY), so it was typed as a bare String
|
|
128
137
|
* (PLAN §8.7). Unknown until the model's outline has loaded.
|
|
129
138
|
*/
|
|
130
139
|
export const isUntypedColumn = (outline, query, analysis, nodeId, columnName) => outline !== undefined &&
|
|
131
|
-
|
|
140
|
+
findColumnOrigins(query, analysis, nodeId, columnName).some(({ source, column }) => outline.databases
|
|
132
141
|
.find((database) => database.path === source.database)
|
|
133
142
|
?.schemas.find((schema) => schema.name === source.schema)
|
|
134
143
|
?.tables.find((table) => table.name === source.table)
|
|
135
|
-
?.untypedColumns.includes(
|
|
144
|
+
?.untypedColumns.includes(column));
|
|
136
145
|
//# sourceMappingURL=CubeJoinDraft.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeJoinDraft.js","sourceRoot":"","sources":["../../../src/stores/editors/CubeJoinDraft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EACpB,IAAI,EACJ,QAAQ,EAER,qBAAqB,
|
|
1
|
+
{"version":3,"file":"CubeJoinDraft.js","sourceRoot":"","sources":["../../../src/stores/editors/CubeJoinDraft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,EACpB,IAAI,EACJ,QAAQ,EAER,qBAAqB,EACrB,MAAM,GAEP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAUnD,IAAI,WAAW,GAAG,CAAC,CAAC;AAEpB,MAAM,UAAU,GAAG,CAAC,CAAoB,EAAE,CAAoB,EAAW,EAAE,CACzE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC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ACZ,QAA+B,EAC/B,MAAc,EACd,UAAkB,EACO,EAAE,CAC3B,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,GAAG,CACxD,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,CACvB,CAAC;AAEJ;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,OAAqC,EACrC,KAAY,EACZ,QAA+B,EAC/B,MAAc,EACd,UAAkB,EACT,EAAE,CACX,OAAO,KAAK,SAAS;IACrB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,IAAI,CACzD,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CACrB,OAAO,CAAC,SAAS;SACd,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC,QAAQ,CAAC;QACtD,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,MAAM,CAAC;QACzD,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,KAAK,CAAC;QACrD,EAAE,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,CACtC,CAAC"}
|
|
@@ -24,6 +24,12 @@ export type CubeNodeDraftFactory = (node: QueryNode, editorState: CubeEditorStat
|
|
|
24
24
|
* source, which has nothing to edit, has none, and so no Apply or Cancel.
|
|
25
25
|
*/
|
|
26
26
|
export declare const CUBE_NODE_DRAFT_FACTORIES: ReadonlyMap<string, CubeNodeDraftFactory>;
|
|
27
|
+
/**
|
|
28
|
+
* The transforms with nothing to set (spec §17.6: Distinct is "description
|
|
29
|
+
* only"): an editor in `CUBE_NODE_EDITORS` and no draft factory, so the panel
|
|
30
|
+
* shows no Apply or Cancel (PLAN §7.4 item 2)
|
|
31
|
+
*/
|
|
32
|
+
export declare const CUBE_NODE_TYPES_WITHOUT_SETTINGS: readonly string[];
|
|
27
33
|
/** The node's draft; a node with nothing to edit gets a read-only one */
|
|
28
34
|
export declare const createCubeNodeDraft: (node: QueryNode, editorState: CubeEditorState) => CubeNodeDraft;
|
|
29
35
|
//# sourceMappingURL=CubeNodeDraftRegistry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeNodeDraftRegistry.d.ts","sourceRoot":"","sources":["../../../src/stores/editors/CubeNodeDraftRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"CubeNodeDraftRegistry.d.ts","sourceRoot":"","sources":["../../../src/stores/editors/CubeNodeDraftRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAML,KAAK,SAAS,EAKf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAAE,KAAK,aAAa,EAAyB,MAAM,oBAAoB,CAAC;AAO/E,4CAA4C;AAC5C,MAAM,MAAM,oBAAoB,GAAG,CACjC,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,eAAe,KACzB,aAAa,CAAC;AAEnB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,WAAW,CACjD,MAAM,EACN,oBAAoB,CAapB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,EAAE,SAAS,MAAM,EAE7D,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,GAC9B,MAAM,SAAS,EACf,aAAa,eAAe,KAC3B,aAE8B,CAAC"}
|
|
@@ -13,20 +13,42 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Filter, Join } from '@finos/legend-cube';
|
|
16
|
+
import { Distinct, Drop, Filter, Join, Limit, Rename, Restrict, Slice, Sort, } from '@finos/legend-cube';
|
|
17
17
|
import { guaranteeType } from '@finos/legend-shared';
|
|
18
18
|
import { CubeFilterDraft } from './CubeFilterDraft.js';
|
|
19
19
|
import { CubeJoinDraft } from './CubeJoinDraft.js';
|
|
20
20
|
import { CubeReadOnlyNodeDraft } from './CubeNodeDraft.js';
|
|
21
|
+
import { CubeRenameDraft } from './CubeRenameDraft.js';
|
|
22
|
+
import { CubeRestrictDraft } from './CubeRestrictDraft.js';
|
|
23
|
+
import { CubeRowCountDraft } from './CubeRowCountDraft.js';
|
|
24
|
+
import { CubeSliceDraft } from './CubeSliceDraft.js';
|
|
25
|
+
import { CubeSortDraft } from './CubeSortDraft.js';
|
|
21
26
|
/**
|
|
22
27
|
* The draft of each node type the panel edits, by type (PLAN §7.4). A
|
|
23
28
|
* transform with an editor in `CUBE_NODE_EDITORS` has its factory here; a
|
|
24
29
|
* source, which has nothing to edit, has none, and so no Apply or Cancel.
|
|
25
30
|
*/
|
|
26
31
|
export const CUBE_NODE_DRAFT_FACTORIES = new Map([
|
|
32
|
+
[Sort.TYPE, (node) => new CubeSortDraft(guaranteeType(node, Sort))],
|
|
27
33
|
[Filter.TYPE, (node) => new CubeFilterDraft(guaranteeType(node, Filter))],
|
|
34
|
+
[
|
|
35
|
+
Restrict.TYPE,
|
|
36
|
+
(node) => new CubeRestrictDraft(guaranteeType(node, Restrict)),
|
|
37
|
+
],
|
|
38
|
+
[Rename.TYPE, (node) => new CubeRenameDraft(guaranteeType(node, Rename))],
|
|
28
39
|
[Join.TYPE, (node) => new CubeJoinDraft(guaranteeType(node, Join))],
|
|
40
|
+
[Drop.TYPE, (node) => new CubeRowCountDraft(guaranteeType(node, Drop))],
|
|
41
|
+
[Limit.TYPE, (node) => new CubeRowCountDraft(guaranteeType(node, Limit))],
|
|
42
|
+
[Slice.TYPE, (node) => new CubeSliceDraft(guaranteeType(node, Slice))],
|
|
29
43
|
]);
|
|
44
|
+
/**
|
|
45
|
+
* The transforms with nothing to set (spec §17.6: Distinct is "description
|
|
46
|
+
* only"): an editor in `CUBE_NODE_EDITORS` and no draft factory, so the panel
|
|
47
|
+
* shows no Apply or Cancel (PLAN §7.4 item 2)
|
|
48
|
+
*/
|
|
49
|
+
export const CUBE_NODE_TYPES_WITHOUT_SETTINGS = [
|
|
50
|
+
Distinct.TYPE,
|
|
51
|
+
];
|
|
30
52
|
/** The node's draft; a node with nothing to edit gets a read-only one */
|
|
31
53
|
export const createCubeNodeDraft = (node, editorState) => CUBE_NODE_DRAFT_FACTORIES.get(node.type)?.(node, editorState) ??
|
|
32
54
|
new CubeReadOnlyNodeDraft(node);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CubeNodeDraftRegistry.js","sourceRoot":"","sources":["../../../src/stores/editors/CubeNodeDraftRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"CubeNodeDraftRegistry.js","sourceRoot":"","sources":["../../../src/stores/editors/CubeNodeDraftRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EAEL,MAAM,EACN,QAAQ,EACR,KAAK,EACL,IAAI,GACL,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAsB,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;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AAI,cAAc,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;CACvE,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAsB;IACjE,QAAQ,CAAC,IAAI;CACd,CAAC;AAEF,yEAAyE;AACzE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,IAAe,EACf,WAA4B,EACb,EAAE,CACjB,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC;IAC7D,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { Rename, RenameMapping } from '@finos/legend-cube';
|
|
17
|
+
import { CubeNodeDraft } from './CubeNodeDraft.js';
|
|
18
|
+
/** One row of the Rename editor: an old column and its new name, `''` until picked or typed */
|
|
19
|
+
export interface CubeRenameRow {
|
|
20
|
+
/** Identifies the row in the editor */
|
|
21
|
+
readonly key: number;
|
|
22
|
+
readonly from: string;
|
|
23
|
+
readonly to: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The Rename editor's draft (spec §17.6: a list of old column and new name
|
|
27
|
+
* rows). A new name is kept exactly as typed, never trimmed. A row with
|
|
28
|
+
* neither name is left out when built, as a Filter's blank rows are; a row
|
|
29
|
+
* with only one is kept, so validation reports it.
|
|
30
|
+
*/
|
|
31
|
+
export declare class CubeRenameDraft extends CubeNodeDraft<Rename> {
|
|
32
|
+
rows: readonly CubeRenameRow[];
|
|
33
|
+
/** Anything was changed; until then, `build()` gives the original back */
|
|
34
|
+
private touched;
|
|
35
|
+
constructor(original: Rename);
|
|
36
|
+
/** The mappings the rows build, in order: a row with neither name is left out */
|
|
37
|
+
get mappings(): RenameMapping[];
|
|
38
|
+
addRow(): void;
|
|
39
|
+
removeRow(key: number): void;
|
|
40
|
+
setFrom(key: number, from: string): void;
|
|
41
|
+
setTo(key: number, to: string): void;
|
|
42
|
+
build(): Rename;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=CubeRenameDraft.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CubeRenameDraft.d.ts","sourceRoot":"","sources":["../../../src/stores/editors/CubeRenameDraft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,+FAA+F;AAC/F,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAgBD;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,aAAa,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,SAAS,aAAa,EAAE,CAAC;IAC/B,0EAA0E;IAC1E,OAAO,CAAC,OAAO,CAAS;gBAEZ,QAAQ,EAAE,MAAM;IAmB5B,iFAAiF;IACjF,IAAI,QAAQ,IAAI,aAAa,EAAE,CAI9B;IAED,MAAM,IAAI,IAAI;IAKd,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK5B,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAOxC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IAOpC,KAAK,IAAI,MAAM;CAMhB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
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 { action, makeObservable, observable } from 'mobx';
|
|
17
|
+
import { CubeNodeDraft } from './CubeNodeDraft.js';
|
|
18
|
+
let nextRowKey = 1;
|
|
19
|
+
const blankRow = () => ({ key: nextRowKey++, from: '', to: '' });
|
|
20
|
+
const isSameMappings = (a, b) => a.length === b.length &&
|
|
21
|
+
a.every((mapping, index) => mapping.from === b[index]?.from && mapping.to === b[index]?.to);
|
|
22
|
+
/**
|
|
23
|
+
* The Rename editor's draft (spec §17.6: a list of old column and new name
|
|
24
|
+
* rows). A new name is kept exactly as typed, never trimmed. A row with
|
|
25
|
+
* neither name is left out when built, as a Filter's blank rows are; a row
|
|
26
|
+
* with only one is kept, so validation reports it.
|
|
27
|
+
*/
|
|
28
|
+
export class CubeRenameDraft extends CubeNodeDraft {
|
|
29
|
+
rows;
|
|
30
|
+
/** Anything was changed; until then, `build()` gives the original back */
|
|
31
|
+
touched = false;
|
|
32
|
+
constructor(original) {
|
|
33
|
+
super(original);
|
|
34
|
+
makeObservable(this, {
|
|
35
|
+
rows: observable.ref,
|
|
36
|
+
touched: observable,
|
|
37
|
+
addRow: action,
|
|
38
|
+
removeRow: action,
|
|
39
|
+
setFrom: action,
|
|
40
|
+
setTo: action,
|
|
41
|
+
});
|
|
42
|
+
this.rows = original.mappings.length
|
|
43
|
+
? original.mappings.map(({ from, to }) => ({
|
|
44
|
+
key: nextRowKey++,
|
|
45
|
+
from,
|
|
46
|
+
to,
|
|
47
|
+
}))
|
|
48
|
+
: [blankRow()];
|
|
49
|
+
}
|
|
50
|
+
/** The mappings the rows build, in order: a row with neither name is left out */
|
|
51
|
+
get mappings() {
|
|
52
|
+
return this.rows
|
|
53
|
+
.filter((row) => row.from || row.to)
|
|
54
|
+
.map(({ from, to }) => ({ from, to }));
|
|
55
|
+
}
|
|
56
|
+
addRow() {
|
|
57
|
+
this.rows = [...this.rows, blankRow()];
|
|
58
|
+
this.touched = true;
|
|
59
|
+
}
|
|
60
|
+
removeRow(key) {
|
|
61
|
+
this.rows = this.rows.filter((row) => row.key !== key);
|
|
62
|
+
this.touched = true;
|
|
63
|
+
}
|
|
64
|
+
setFrom(key, from) {
|
|
65
|
+
this.rows = this.rows.map((row) => row.key === key ? { ...row, from } : row);
|
|
66
|
+
this.touched = true;
|
|
67
|
+
}
|
|
68
|
+
setTo(key, to) {
|
|
69
|
+
this.rows = this.rows.map((row) => row.key === key ? { ...row, to } : row);
|
|
70
|
+
this.touched = true;
|
|
71
|
+
}
|
|
72
|
+
build() {
|
|
73
|
+
const { original, mappings } = this;
|
|
74
|
+
return !this.touched || isSameMappings(mappings, original.mappings)
|
|
75
|
+
? original
|
|
76
|
+
: original.withMappings(mappings);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL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