@finos/legend-application-query 13.8.64 → 13.8.65
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/lib/__lib__/LegendQueryNavigation.d.ts +0 -1
- package/lib/__lib__/LegendQueryNavigation.d.ts.map +1 -1
- package/lib/__lib__/LegendQueryNavigation.js +0 -2
- package/lib/__lib__/LegendQueryNavigation.js.map +1 -1
- package/lib/__lib__/LegendQueryUserDataHelper.d.ts +12 -2
- package/lib/__lib__/LegendQueryUserDataHelper.d.ts.map +1 -1
- package/lib/__lib__/LegendQueryUserDataHelper.js +33 -1
- package/lib/__lib__/LegendQueryUserDataHelper.js.map +1 -1
- package/lib/__lib__/LegendQueryUserDataSpaceHelper.d.ts +10 -0
- package/lib/__lib__/LegendQueryUserDataSpaceHelper.d.ts.map +1 -1
- package/lib/__lib__/LegendQueryUserDataSpaceHelper.js +5 -0
- package/lib/__lib__/LegendQueryUserDataSpaceHelper.js.map +1 -1
- package/lib/application/Core_LegendQuery_LegendApplicationPlugin.d.ts +1 -7
- package/lib/application/Core_LegendQuery_LegendApplicationPlugin.d.ts.map +1 -1
- package/lib/application/Core_LegendQuery_LegendApplicationPlugin.js +1 -10
- package/lib/application/Core_LegendQuery_LegendApplicationPlugin.js.map +1 -1
- package/lib/application/LegendQueryApplicationConfig.d.ts +1 -35
- package/lib/application/LegendQueryApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendQueryApplicationConfig.js +1 -37
- package/lib/application/LegendQueryApplicationConfig.js.map +1 -1
- package/lib/components/Core_LegendQueryApplicationPlugin.d.ts.map +1 -1
- package/lib/components/Core_LegendQueryApplicationPlugin.js +5 -1
- package/lib/components/Core_LegendQueryApplicationPlugin.js.map +1 -1
- package/lib/components/LegendQueryWebApplication.d.ts.map +1 -1
- package/lib/components/LegendQueryWebApplication.js +1 -2
- package/lib/components/LegendQueryWebApplication.js.map +1 -1
- package/lib/components/data-space/LegendQueryDataSpaceQueryBuilder.d.ts.map +1 -1
- package/lib/components/data-space/LegendQueryDataSpaceQueryBuilder.js +15 -12
- package/lib/components/data-space/LegendQueryDataSpaceQueryBuilder.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/light-mode.css +1 -1
- package/lib/package.json +1 -2
- package/lib/stores/QueryEditorStore.d.ts.map +1 -1
- package/lib/stores/QueryEditorStore.js +2 -0
- package/lib/stores/QueryEditorStore.js.map +1 -1
- package/lib/stores/data-space/DataProductQueryCreatorStore.d.ts.map +1 -1
- package/lib/stores/data-space/DataProductQueryCreatorStore.js +13 -2
- package/lib/stores/data-space/DataProductQueryCreatorStore.js.map +1 -1
- package/lib/stores/data-space/query-builder/LegendQueryDataSpaceQueryBuilderState.d.ts +33 -1
- package/lib/stores/data-space/query-builder/LegendQueryDataSpaceQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/data-space/query-builder/LegendQueryDataSpaceQueryBuilderState.js +120 -3
- package/lib/stores/data-space/query-builder/LegendQueryDataSpaceQueryBuilderState.js.map +1 -1
- package/package.json +14 -15
- package/src/__lib__/LegendQueryNavigation.ts +0 -2
- package/src/__lib__/LegendQueryUserDataHelper.ts +72 -1
- package/src/__lib__/LegendQueryUserDataSpaceHelper.ts +21 -0
- package/src/application/Core_LegendQuery_LegendApplicationPlugin.ts +0 -14
- package/src/application/LegendQueryApplicationConfig.ts +0 -68
- package/src/components/Core_LegendQueryApplicationPlugin.tsx +7 -1
- package/src/components/LegendQueryWebApplication.tsx +0 -14
- package/src/components/data-space/LegendQueryDataSpaceQueryBuilder.tsx +29 -22
- package/src/stores/QueryEditorStore.ts +2 -0
- package/src/stores/data-space/DataProductQueryCreatorStore.ts +19 -9
- package/src/stores/data-space/query-builder/LegendQueryDataSpaceQueryBuilderState.ts +167 -1
- package/tsconfig.json +0 -4
- package/lib/components/cube/LegendQueryCubePage.d.ts +0 -18
- package/lib/components/cube/LegendQueryCubePage.d.ts.map +0 -1
- package/lib/components/cube/LegendQueryCubePage.js +0 -31
- package/lib/components/cube/LegendQueryCubePage.js.map +0 -1
- package/lib/components/cube/LegendQueryCubeRoute.d.ts +0 -18
- package/lib/components/cube/LegendQueryCubeRoute.d.ts.map +0 -1
- package/lib/components/cube/LegendQueryCubeRoute.js +0 -26
- package/lib/components/cube/LegendQueryCubeRoute.js.map +0 -1
- package/lib/stores/cube/LegendQueryCubeEntry.d.ts +0 -38
- package/lib/stores/cube/LegendQueryCubeEntry.d.ts.map +0 -1
- package/lib/stores/cube/LegendQueryCubeEntry.js +0 -59
- package/lib/stores/cube/LegendQueryCubeEntry.js.map +0 -1
- package/lib/stores/cube/LegendQueryCubeHost.d.ts +0 -45
- package/lib/stores/cube/LegendQueryCubeHost.d.ts.map +0 -1
- package/lib/stores/cube/LegendQueryCubeHost.js +0 -80
- package/lib/stores/cube/LegendQueryCubeHost.js.map +0 -1
- package/src/components/cube/LegendQueryCubePage.tsx +0 -40
- package/src/components/cube/LegendQueryCubeRoute.tsx +0 -42
- package/src/stores/cube/LegendQueryCubeEntry.ts +0 -74
- package/src/stores/cube/LegendQueryCubeHost.ts +0 -114
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
PanelHeaderActionItem,
|
|
33
33
|
PanelHeaderActions,
|
|
34
34
|
SearchIcon,
|
|
35
|
+
UndoIcon,
|
|
35
36
|
} from '@finos/legend-art';
|
|
36
37
|
import {
|
|
37
38
|
ResolvedDataSpaceEntityWithOrigin,
|
|
@@ -45,10 +46,8 @@ import {
|
|
|
45
46
|
} from '@finos/legend-extension-dsl-data-space/application-query';
|
|
46
47
|
import { resolveExecutionContextMapping } from '@finos/legend-extension-dsl-data-space/graph';
|
|
47
48
|
import {
|
|
48
|
-
getMappingCompatibleRuntimes,
|
|
49
49
|
PackageableElementExplicitReference,
|
|
50
50
|
RuntimePointer,
|
|
51
|
-
type PackageableRuntime,
|
|
52
51
|
type Runtime,
|
|
53
52
|
} from '@finos/legend-graph';
|
|
54
53
|
import {
|
|
@@ -67,25 +66,6 @@ import { formatDataProductOrSpaceOptionLabel } from '../shared/LegendQueryDataPr
|
|
|
67
66
|
import type { LegendQueryDataSpaceQueryBuilderState } from '../../stores/data-space/query-builder/LegendQueryDataSpaceQueryBuilderState.js';
|
|
68
67
|
import { LegendQueryTelemetryHelper } from '../../__lib__/LegendQueryTelemetryHelper.js';
|
|
69
68
|
|
|
70
|
-
const resolveExecutionContextRuntimes = (
|
|
71
|
-
queryBuilderState: LegendQueryDataSpaceQueryBuilderState,
|
|
72
|
-
): PackageableRuntime[] => {
|
|
73
|
-
const currentMapping = guaranteeNonNullable(
|
|
74
|
-
resolveExecutionContextMapping(queryBuilderState.executionContext),
|
|
75
|
-
`Execution context '${queryBuilderState.executionContext.name}' does not have a resolvable mapping`,
|
|
76
|
-
);
|
|
77
|
-
if (queryBuilderState.dataSpaceAnalysisResult) {
|
|
78
|
-
const executionContext = Array.from(
|
|
79
|
-
queryBuilderState.dataSpaceAnalysisResult.executionContextsIndex.values(),
|
|
80
|
-
).find((e) => e.mapping.path === currentMapping.path);
|
|
81
|
-
return guaranteeNonNullable(executionContext).compatibleRuntimes;
|
|
82
|
-
}
|
|
83
|
-
return getMappingCompatibleRuntimes(
|
|
84
|
-
currentMapping,
|
|
85
|
-
queryBuilderState.graphManagerState.usableRuntimes,
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
|
|
89
69
|
/**
|
|
90
70
|
* LegendQuery-specific DataSpace query builder setup panel. Unlike the base
|
|
91
71
|
* DataSpaceQueryBuilderSetupPanelContent, this component explicitly knows about
|
|
@@ -194,7 +174,7 @@ const LegendQueryDataSpaceQueryBuilderSetupPanelContent = observer(
|
|
|
194
174
|
};
|
|
195
175
|
|
|
196
176
|
// runtime
|
|
197
|
-
const runtimeOptions =
|
|
177
|
+
const runtimeOptions = queryBuilderState.compatibleRuntimes
|
|
198
178
|
.map(
|
|
199
179
|
(rt) =>
|
|
200
180
|
new RuntimePointer(PackageableElementExplicitReference.create(rt)),
|
|
@@ -214,8 +194,23 @@ const LegendQueryDataSpaceQueryBuilderSetupPanelContent = observer(
|
|
|
214
194
|
return;
|
|
215
195
|
}
|
|
216
196
|
queryBuilderState.changeRuntime(option.value);
|
|
197
|
+
queryBuilderState.rememberRuntime(option.value);
|
|
217
198
|
queryBuilderState.onRuntimeChange?.(option.value);
|
|
218
199
|
};
|
|
200
|
+
// a runtime other than the context's default can always be undone here
|
|
201
|
+
const defaultRuntimePath = queryBuilderState.defaultRuntimePath;
|
|
202
|
+
const isUsingSavedRuntime =
|
|
203
|
+
queryBuilderState.currentRuntimePath !== undefined &&
|
|
204
|
+
queryBuilderState.currentRuntimePath ===
|
|
205
|
+
queryBuilderState.savedRuntimePath;
|
|
206
|
+
const canResetRuntime =
|
|
207
|
+
defaultRuntimePath !== undefined &&
|
|
208
|
+
queryBuilderState.currentRuntimePath !== defaultRuntimePath;
|
|
209
|
+
const resetRuntimeTitle = `${
|
|
210
|
+
isUsingSavedRuntime
|
|
211
|
+
? 'Using the runtime you picked for this context. '
|
|
212
|
+
: ''
|
|
213
|
+
}Use the context's default runtime '${defaultRuntimePath}' instead`;
|
|
219
214
|
const runtimeFilterOption = createFilter({
|
|
220
215
|
ignoreCase: true,
|
|
221
216
|
ignoreAccents: false,
|
|
@@ -434,6 +429,18 @@ const LegendQueryDataSpaceQueryBuilderSetupPanelContent = observer(
|
|
|
434
429
|
})}
|
|
435
430
|
/>
|
|
436
431
|
)}
|
|
432
|
+
{canResetRuntime && !injectedLakehouseRuntime && (
|
|
433
|
+
<button
|
|
434
|
+
tabIndex={-1}
|
|
435
|
+
className="query-builder__setup__runtime-reset__btn btn--dark"
|
|
436
|
+
onClick={(): void =>
|
|
437
|
+
queryBuilderState.resetToDefaultRuntime()
|
|
438
|
+
}
|
|
439
|
+
title={resetRuntimeTitle}
|
|
440
|
+
>
|
|
441
|
+
<UndoIcon />
|
|
442
|
+
</button>
|
|
443
|
+
)}
|
|
437
444
|
</div>
|
|
438
445
|
)}
|
|
439
446
|
<div className="query-builder__setup__config-group__item">
|
|
@@ -2410,6 +2410,8 @@ export class ExistingQueryEditorStore extends QueryEditorStore {
|
|
|
2410
2410
|
dataSpaceQueryBuilderState.executionContextState.setRuntimeValue(
|
|
2411
2411
|
matchingExecutionContextRuntime,
|
|
2412
2412
|
);
|
|
2413
|
+
// a saved query keeps no runtime, so each user gets the one they picked
|
|
2414
|
+
dataSpaceQueryBuilderState.applySavedRuntime();
|
|
2413
2415
|
return dataSpaceQueryBuilderState;
|
|
2414
2416
|
} else {
|
|
2415
2417
|
throw new Error(
|
|
@@ -582,17 +582,27 @@ export class DataProductQueryCreatorStore extends QueryEditorStore {
|
|
|
582
582
|
);
|
|
583
583
|
await queryBuilderState.propagateExecutionContextChange(true);
|
|
584
584
|
|
|
585
|
-
// set runtime if already chosen
|
|
585
|
+
// set runtime if already chosen: a link's runtime wins over the one this
|
|
586
|
+
// user saved for the context, which propagating the context has applied
|
|
586
587
|
if (queryableDataSpace.runtimePath) {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
PackageableElementExplicitReference.create(
|
|
590
|
-
this.graphManagerState.graph.getRuntime(
|
|
591
|
-
queryableDataSpace.runtimePath,
|
|
592
|
-
),
|
|
593
|
-
),
|
|
594
|
-
),
|
|
588
|
+
const runtime = this.graphManagerState.graph.getNullableRuntime(
|
|
589
|
+
queryableDataSpace.runtimePath,
|
|
595
590
|
);
|
|
591
|
+
if (runtime) {
|
|
592
|
+
queryBuilderState.changeRuntime(
|
|
593
|
+
new RuntimePointer(
|
|
594
|
+
PackageableElementExplicitReference.create(runtime),
|
|
595
|
+
),
|
|
596
|
+
);
|
|
597
|
+
if (runtime.path !== queryBuilderState.defaultRuntimePath) {
|
|
598
|
+
queryBuilderState.setShowRuntimeSelector(true);
|
|
599
|
+
}
|
|
600
|
+
} else {
|
|
601
|
+
// e.g. a link made before the runtime was removed from the project
|
|
602
|
+
this.applicationStore.notificationService.notifyWarning(
|
|
603
|
+
`Can't find runtime '${queryableDataSpace.runtimePath}' from the link: using runtime '${queryBuilderState.currentRuntimePath ?? '(none)'}' instead`,
|
|
604
|
+
);
|
|
605
|
+
}
|
|
596
606
|
}
|
|
597
607
|
|
|
598
608
|
// set class if already chosen
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
type DataSpace,
|
|
25
25
|
type DataSpaceExecutableAnalysisResult,
|
|
26
26
|
type DataSpaceAnalysisResult,
|
|
27
|
+
resolveExecutionContextMapping,
|
|
27
28
|
} from '@finos/legend-extension-dsl-data-space/graph';
|
|
28
29
|
import {
|
|
29
30
|
generateDataSpaceQueryCreatorRoute,
|
|
@@ -43,11 +44,14 @@ import {
|
|
|
43
44
|
INTERNAL_ELEMENT_PATH,
|
|
44
45
|
LakehouseRuntime,
|
|
45
46
|
LegendSDLC,
|
|
47
|
+
PackageableElementExplicitReference,
|
|
46
48
|
RuntimePointer,
|
|
49
|
+
getMappingCompatibleRuntimes,
|
|
47
50
|
type Class,
|
|
48
51
|
type GraphData,
|
|
49
52
|
type GraphManagerState,
|
|
50
53
|
type PackageableElement,
|
|
54
|
+
type PackageableRuntime,
|
|
51
55
|
type Runtime,
|
|
52
56
|
} from '@finos/legend-graph';
|
|
53
57
|
import {
|
|
@@ -62,7 +66,11 @@ import {
|
|
|
62
66
|
createViewProjectHandler,
|
|
63
67
|
createViewSDLCProjectHandler,
|
|
64
68
|
} from '../DataSpaceQueryBuilderHelper.js';
|
|
65
|
-
import {
|
|
69
|
+
import {
|
|
70
|
+
type GeneratorFn,
|
|
71
|
+
LogEvent,
|
|
72
|
+
assertErrorThrown,
|
|
73
|
+
} from '@finos/legend-shared';
|
|
66
74
|
import { action, flowResult, makeObservable, observable, reaction } from 'mobx';
|
|
67
75
|
import type {
|
|
68
76
|
DepotEntityWithOrigin,
|
|
@@ -70,6 +78,9 @@ import type {
|
|
|
70
78
|
QueryableSourceInfo,
|
|
71
79
|
} from '@finos/legend-storage';
|
|
72
80
|
import type { DataProductSelectorState } from '../DataProductSelectorState.js';
|
|
81
|
+
import { LegendQueryUserDataHelper } from '../../../__lib__/LegendQueryUserDataHelper.js';
|
|
82
|
+
import { createDataSpaceRuntimePreferenceId } from '../../../__lib__/LegendQueryUserDataSpaceHelper.js';
|
|
83
|
+
import { LEGEND_QUERY_APP_EVENT } from '../../../__lib__/LegendQueryEvent.js';
|
|
73
84
|
|
|
74
85
|
export class LegendQueryDataSpaceQueryBuilderState extends DataSpaceQueryBuilderState {
|
|
75
86
|
declare applicationStore: LegendQueryApplicationStore;
|
|
@@ -79,6 +90,10 @@ export class LegendQueryDataSpaceQueryBuilderState extends DataSpaceQueryBuilder
|
|
|
79
90
|
productSelectorState: DataProductSelectorState;
|
|
80
91
|
|
|
81
92
|
injectedLakehouseRuntime: LakehouseRuntime | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* The runtime this user saved for the current execution context, if any
|
|
95
|
+
*/
|
|
96
|
+
savedRuntimePath: string | undefined;
|
|
82
97
|
|
|
83
98
|
override TEMPORARY__setupPanelContentRenderer = (): React.ReactNode =>
|
|
84
99
|
renderLegendQueryDataSpaceQueryBuilderSetupPanelContent(this);
|
|
@@ -135,7 +150,9 @@ export class LegendQueryDataSpaceQueryBuilderState extends DataSpaceQueryBuilder
|
|
|
135
150
|
|
|
136
151
|
makeObservable(this, {
|
|
137
152
|
injectedLakehouseRuntime: observable,
|
|
153
|
+
savedRuntimePath: observable,
|
|
138
154
|
setInjectedLakehouseRuntime: action,
|
|
155
|
+
setSavedRuntimePath: action,
|
|
139
156
|
});
|
|
140
157
|
|
|
141
158
|
reaction(
|
|
@@ -151,6 +168,155 @@ export class LegendQueryDataSpaceQueryBuilderState extends DataSpaceQueryBuilder
|
|
|
151
168
|
this.injectedLakehouseRuntime = val;
|
|
152
169
|
}
|
|
153
170
|
|
|
171
|
+
setSavedRuntimePath(val: string | undefined): void {
|
|
172
|
+
this.savedRuntimePath = val;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The runtimes that can run the mapping of the current execution context
|
|
177
|
+
*/
|
|
178
|
+
get compatibleRuntimes(): PackageableRuntime[] {
|
|
179
|
+
const mapping = resolveExecutionContextMapping(this.executionContext);
|
|
180
|
+
if (!mapping) {
|
|
181
|
+
return [];
|
|
182
|
+
}
|
|
183
|
+
const analyzedExecutionContext = this.dataSpaceAnalysisResult
|
|
184
|
+
? Array.from(
|
|
185
|
+
this.dataSpaceAnalysisResult.executionContextsIndex.values(),
|
|
186
|
+
).find((context) => context.mapping.path === mapping.path)
|
|
187
|
+
: undefined;
|
|
188
|
+
return (
|
|
189
|
+
analyzedExecutionContext?.compatibleRuntimes ??
|
|
190
|
+
getMappingCompatibleRuntimes(
|
|
191
|
+
mapping,
|
|
192
|
+
this.graphManagerState.usableRuntimes,
|
|
193
|
+
)
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
get currentRuntimePath(): string | undefined {
|
|
198
|
+
const runtime = this.executionContextState.runtimeValue;
|
|
199
|
+
return runtime instanceof RuntimePointer
|
|
200
|
+
? runtime.packageableRuntime.value.path
|
|
201
|
+
: undefined;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
get defaultRuntimePath(): string | undefined {
|
|
205
|
+
return this.executionContext.defaultRuntime?.value.path;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
private get runtimePreferenceId(): string {
|
|
209
|
+
return createDataSpaceRuntimePreferenceId(
|
|
210
|
+
this.project.groupId,
|
|
211
|
+
this.project.artifactId,
|
|
212
|
+
this.dataSpace.path,
|
|
213
|
+
this.executionContext.name,
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Switches to the runtime this user picked for the current execution context
|
|
219
|
+
* before, if any. A saved runtime that can no longer run the context, e.g.
|
|
220
|
+
* removed in a newer version of the project, is forgotten.
|
|
221
|
+
*
|
|
222
|
+
* Returns whether the saved runtime is in use.
|
|
223
|
+
*/
|
|
224
|
+
applySavedRuntime(): boolean {
|
|
225
|
+
this.setSavedRuntimePath(undefined);
|
|
226
|
+
const savedRuntimePath =
|
|
227
|
+
LegendQueryUserDataHelper.getDataSpaceRuntimePreference(
|
|
228
|
+
this.applicationStore.userDataService,
|
|
229
|
+
this.runtimePreferenceId,
|
|
230
|
+
);
|
|
231
|
+
if (!savedRuntimePath) {
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
const runtime = this.compatibleRuntimes.find(
|
|
235
|
+
(compatibleRuntime) => compatibleRuntime.path === savedRuntimePath,
|
|
236
|
+
);
|
|
237
|
+
if (!runtime || savedRuntimePath === this.defaultRuntimePath) {
|
|
238
|
+
this.forgetSavedRuntime();
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
// mark the choice as used again, so choices in use are not the ones
|
|
242
|
+
// dropped when the list is full
|
|
243
|
+
this.saveRuntime(savedRuntimePath);
|
|
244
|
+
if (this.currentRuntimePath !== savedRuntimePath) {
|
|
245
|
+
this.changeRuntime(
|
|
246
|
+
new RuntimePointer(PackageableElementExplicitReference.create(runtime)),
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
// a runtime other than the default is never applied out of sight
|
|
250
|
+
this.setShowRuntimeSelector(true);
|
|
251
|
+
return true;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Saves the runtime this user picked in the setup panel for the current
|
|
256
|
+
* execution context. Picking the context's default runtime forgets the choice.
|
|
257
|
+
*/
|
|
258
|
+
rememberRuntime(runtime: Runtime): void {
|
|
259
|
+
if (!(runtime instanceof RuntimePointer)) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
const packageableRuntime = runtime.packageableRuntime.value;
|
|
263
|
+
// runtimes Query builds for the session, e.g. the lakehouse fallback, are
|
|
264
|
+
// not found again by their path
|
|
265
|
+
if (packageableRuntime.package?.path === INTERNAL_ELEMENT_PATH) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
if (packageableRuntime.path === this.defaultRuntimePath) {
|
|
269
|
+
this.forgetSavedRuntime();
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
this.saveRuntime(packageableRuntime.path);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Goes back to the default runtime of the current execution context and
|
|
277
|
+
* forgets the runtime this user saved for it
|
|
278
|
+
*/
|
|
279
|
+
resetToDefaultRuntime(): void {
|
|
280
|
+
const defaultRuntime = this.executionContext.defaultRuntime;
|
|
281
|
+
if (defaultRuntime) {
|
|
282
|
+
this.changeRuntime(new RuntimePointer(defaultRuntime));
|
|
283
|
+
}
|
|
284
|
+
this.forgetSavedRuntime();
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
private saveRuntime(runtimePath: string): void {
|
|
288
|
+
this.setSavedRuntimePath(runtimePath);
|
|
289
|
+
try {
|
|
290
|
+
LegendQueryUserDataHelper.persistDataSpaceRuntimePreference(
|
|
291
|
+
this.applicationStore.userDataService,
|
|
292
|
+
this.runtimePreferenceId,
|
|
293
|
+
runtimePath,
|
|
294
|
+
);
|
|
295
|
+
} catch (error) {
|
|
296
|
+
assertErrorThrown(error);
|
|
297
|
+
this.applicationStore.logService.warn(
|
|
298
|
+
LogEvent.create(LEGEND_QUERY_APP_EVENT.LOCAL_STORAGE_PERSIST_ERROR),
|
|
299
|
+
error.message,
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
private forgetSavedRuntime(): void {
|
|
305
|
+
this.setSavedRuntimePath(undefined);
|
|
306
|
+
try {
|
|
307
|
+
LegendQueryUserDataHelper.removeDataSpaceRuntimePreference(
|
|
308
|
+
this.applicationStore.userDataService,
|
|
309
|
+
this.runtimePreferenceId,
|
|
310
|
+
);
|
|
311
|
+
} catch (error) {
|
|
312
|
+
assertErrorThrown(error);
|
|
313
|
+
this.applicationStore.logService.warn(
|
|
314
|
+
LogEvent.create(LEGEND_QUERY_APP_EVENT.LOCAL_STORAGE_PERSIST_ERROR),
|
|
315
|
+
error.message,
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
154
320
|
private resolveInjectedLakehouseRuntime(): LakehouseRuntime | undefined {
|
|
155
321
|
const runtime = this.executionContextState.runtimeValue;
|
|
156
322
|
if (!(runtime instanceof RuntimePointer)) {
|
package/tsconfig.json
CHANGED
|
@@ -82,8 +82,6 @@
|
|
|
82
82
|
"./src/stores/UpdateExistingServiceQuerySetupStore.ts",
|
|
83
83
|
"./src/stores/__test-utils__/DataSpaceQueryBuilderStateTestUtils.ts",
|
|
84
84
|
"./src/stores/__test-utils__/LegendQueryApplicationTestUtils.ts",
|
|
85
|
-
"./src/stores/cube/LegendQueryCubeEntry.ts",
|
|
86
|
-
"./src/stores/cube/LegendQueryCubeHost.ts",
|
|
87
85
|
"./src/stores/data-cube/ExistingQueryDataCubeViewer.ts",
|
|
88
86
|
"./src/stores/data-product/query-builder/DataProductArtifactHelper.ts",
|
|
89
87
|
"./src/stores/data-product/query-builder/LegendQueryDataProductQueryBuilderState.ts",
|
|
@@ -113,8 +111,6 @@
|
|
|
113
111
|
"./src/components/QuerySetup.tsx",
|
|
114
112
|
"./src/components/UpdateExistingServiceQuerySetup.tsx",
|
|
115
113
|
"./src/components/__test-utils__/QueryEditorComponentTestUtils.tsx",
|
|
116
|
-
"./src/components/cube/LegendQueryCubePage.tsx",
|
|
117
|
-
"./src/components/cube/LegendQueryCubeRoute.tsx",
|
|
118
114
|
"./src/components/data-cube/ExistingQueryDataCubeViewer.tsx",
|
|
119
115
|
"./src/components/data-cube/ExistingQueryEditorStoreProviderProvider.tsx",
|
|
120
116
|
"./src/components/data-product/DataProductInfo.tsx",
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
/** The Cube page in Legend Query, with a host that lasts as long as the visit */
|
|
17
|
-
export declare const LegendQueryCubePage: React.FC;
|
|
18
|
-
//# sourceMappingURL=LegendQueryCubePage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LegendQueryCubePage.d.ts","sourceRoot":"","sources":["../../../src/components/cube/LegendQueryCubePage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAavC,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } 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 { CubeEditor } from '@finos/legend-cube-builder';
|
|
18
|
-
import { useEffect, useState } from 'react';
|
|
19
|
-
import { readLegendQueryCubeEntry, stripLegendQueryCubeEntry, } from '../../stores/cube/LegendQueryCubeEntry.js';
|
|
20
|
-
import { LegendQueryCubeHost } from '../../stores/cube/LegendQueryCubeHost.js';
|
|
21
|
-
import { useLegendQueryApplicationStore } from '../LegendQueryFrameworkProvider.js';
|
|
22
|
-
/** The Cube page in Legend Query, with a host that lasts as long as the visit */
|
|
23
|
-
export const LegendQueryCubePage = () => {
|
|
24
|
-
const applicationStore = useLegendQueryApplicationStore();
|
|
25
|
-
const [host] = useState(() => new LegendQueryCubeHost(applicationStore));
|
|
26
|
-
// read once, as the page opens; the address loses it once shown
|
|
27
|
-
const [initialSource] = useState(() => readLegendQueryCubeEntry(applicationStore.navigationService.navigator));
|
|
28
|
-
useEffect(() => stripLegendQueryCubeEntry(applicationStore.navigationService.navigator), [applicationStore]);
|
|
29
|
-
return _jsx(CubeEditor, { host: host, initialSource: initialSource });
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=LegendQueryCubePage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LegendQueryCubePage.js","sourceRoot":"","sources":["../../../src/components/cube/LegendQueryCubePage.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EACL,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AAEpF,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAa,GAAG,EAAE;IAChD,MAAM,gBAAgB,GAAG,8BAA8B,EAAE,CAAC;IAC1D,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACzE,gEAAgE;IAChE,MAAM,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CACpC,wBAAwB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,CACvE,CAAC;IACF,SAAS,CACP,GAAG,EAAE,CACH,yBAAyB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,SAAS,CAAC,EACzE,CAAC,gBAAgB,CAAC,CACnB,CAAC;IACF,OAAO,KAAC,UAAU,IAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,GAAI,CAAC;AAClE,CAAC,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
/** The element of the `/cube` route */
|
|
17
|
-
export declare const LegendQueryCubeRoute: React.FC;
|
|
18
|
-
//# sourceMappingURL=LegendQueryCubeRoute.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LegendQueryCubeRoute.d.ts","sourceRoot":"","sources":["../../../src/components/cube/LegendQueryCubeRoute.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgBH,uCAAuC;AACvC,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAUxC,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } 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 { CubesLoadingIndicator, CubesLoadingIndicatorIcon, } from '@finos/legend-art';
|
|
18
|
-
import { lazy, Suspense } from 'react';
|
|
19
|
-
// Loaded on the first visit, so the Cube page and its UI libraries stay out
|
|
20
|
-
// of Query's main bundle (PLAN §3.5, Settled before M1.8)
|
|
21
|
-
const LazyLegendQueryCubePage = lazy(() => import('./LegendQueryCubePage.js').then((module) => ({
|
|
22
|
-
default: module.LegendQueryCubePage,
|
|
23
|
-
})));
|
|
24
|
-
/** The element of the `/cube` route */
|
|
25
|
-
export const LegendQueryCubeRoute = () => (_jsx(Suspense, { fallback: _jsx(CubesLoadingIndicator, { isLoading: true, children: _jsx(CubesLoadingIndicatorIcon, {}) }), children: _jsx(LazyLegendQueryCubePage, {}) }));
|
|
26
|
-
//# sourceMappingURL=LegendQueryCubeRoute.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LegendQueryCubeRoute.js","sourceRoot":"","sources":["../../../src/components/cube/LegendQueryCubeRoute.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvC,4EAA4E;AAC5E,0DAA0D;AAC1D,MAAM,uBAAuB,GAAG,IAAI,CAAC,GAAG,EAAE,CACxC,MAAM,CAAC,0BAA0B,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACnD,OAAO,EAAE,MAAM,CAAC,mBAAmB;CACpC,CAAC,CAAC,CACJ,CAAC;AAEF,uCAAuC;AACvC,MAAM,CAAC,MAAM,oBAAoB,GAAa,GAAG,EAAE,CAAC,CAClD,KAAC,QAAQ,IACP,QAAQ,EACN,KAAC,qBAAqB,IAAC,SAAS,EAAE,IAAI,YACpC,KAAC,yBAAyB,KAAG,GACP,YAG1B,KAAC,uBAAuB,KAAG,GAClB,CACZ,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
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 { NavigationService } from '@finos/legend-application';
|
|
17
|
-
import type { CubeEntrySource } from '@finos/legend-cube-builder';
|
|
18
|
-
/** The Cube page's address parameters (spec §17.15) */
|
|
19
|
-
export declare enum LEGEND_QUERY_CUBE_PARAMETER {
|
|
20
|
-
SOURCE_TYPE = "sourceType",
|
|
21
|
-
SOURCE_ID = "sourceId",
|
|
22
|
-
QUERY_ID = "queryId"
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The source a link asks the Cube page to start with (spec §17.15,
|
|
26
|
-
* QUESTIONS.md U9): `?sourceType=…&sourceId=…`. A saved query (`?queryId=`)
|
|
27
|
-
* wins; it opens once Cube saves queries (M8). Reads only: the page takes
|
|
28
|
-
* the parameters out of the address once it is shown
|
|
29
|
-
* (`stripLegendQueryCubeEntry`).
|
|
30
|
-
*/
|
|
31
|
-
export declare const readLegendQueryCubeEntry: (navigator: NavigationService["navigator"]) => CubeEntrySource | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* Takes a link's source out of the address, whether or not it resolves,
|
|
34
|
-
* keeping the address's other parameters and its hash, a saved query's id
|
|
35
|
-
* among them (U9: the address then names the cube shown)
|
|
36
|
-
*/
|
|
37
|
-
export declare const stripLegendQueryCubeEntry: (navigator: NavigationService["navigator"]) => void;
|
|
38
|
-
//# sourceMappingURL=LegendQueryCubeEntry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LegendQueryCubeEntry.d.ts","sourceRoot":"","sources":["../../../src/stores/cube/LegendQueryCubeEntry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,uDAAuD;AACvD,oBAAY,2BAA2B;IACrC,WAAW,eAAe;IAC1B,SAAS,aAAa;IACtB,QAAQ,YAAY;CACrB;AAOD;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GACnC,WAAW,iBAAiB,CAAC,WAAW,CAAC,KACxC,eAAe,GAAG,SASpB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GACpC,WAAW,iBAAiB,CAAC,WAAW,CAAC,KACxC,IAeF,CAAC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
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
|
-
/** The Cube page's address parameters (spec §17.15) */
|
|
17
|
-
export var LEGEND_QUERY_CUBE_PARAMETER;
|
|
18
|
-
(function (LEGEND_QUERY_CUBE_PARAMETER) {
|
|
19
|
-
LEGEND_QUERY_CUBE_PARAMETER["SOURCE_TYPE"] = "sourceType";
|
|
20
|
-
LEGEND_QUERY_CUBE_PARAMETER["SOURCE_ID"] = "sourceId";
|
|
21
|
-
LEGEND_QUERY_CUBE_PARAMETER["QUERY_ID"] = "queryId";
|
|
22
|
-
})(LEGEND_QUERY_CUBE_PARAMETER || (LEGEND_QUERY_CUBE_PARAMETER = {}));
|
|
23
|
-
/** The page's address parameters, each decoded once, as a link writes them */
|
|
24
|
-
const readParameters = (navigator) => new URL(navigator.getCurrentAddress()).searchParams;
|
|
25
|
-
/**
|
|
26
|
-
* The source a link asks the Cube page to start with (spec §17.15,
|
|
27
|
-
* QUESTIONS.md U9): `?sourceType=…&sourceId=…`. A saved query (`?queryId=`)
|
|
28
|
-
* wins; it opens once Cube saves queries (M8). Reads only: the page takes
|
|
29
|
-
* the parameters out of the address once it is shown
|
|
30
|
-
* (`stripLegendQueryCubeEntry`).
|
|
31
|
-
*/
|
|
32
|
-
export const readLegendQueryCubeEntry = (navigator) => {
|
|
33
|
-
const parameters = readParameters(navigator);
|
|
34
|
-
const sourceType = parameters.get(LEGEND_QUERY_CUBE_PARAMETER.SOURCE_TYPE);
|
|
35
|
-
const sourceId = parameters.get(LEGEND_QUERY_CUBE_PARAMETER.SOURCE_ID);
|
|
36
|
-
return !parameters.has(LEGEND_QUERY_CUBE_PARAMETER.QUERY_ID) &&
|
|
37
|
-
sourceType &&
|
|
38
|
-
sourceId
|
|
39
|
-
? { sourceType, sourceId }
|
|
40
|
-
: undefined;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Takes a link's source out of the address, whether or not it resolves,
|
|
44
|
-
* keeping the address's other parameters and its hash, a saved query's id
|
|
45
|
-
* among them (U9: the address then names the cube shown)
|
|
46
|
-
*/
|
|
47
|
-
export const stripLegendQueryCubeEntry = (navigator) => {
|
|
48
|
-
const parameters = readParameters(navigator);
|
|
49
|
-
if (!parameters.has(LEGEND_QUERY_CUBE_PARAMETER.SOURCE_TYPE) &&
|
|
50
|
-
!parameters.has(LEGEND_QUERY_CUBE_PARAMETER.SOURCE_ID)) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
// only the source's parameters: the rest, a saved query's id included, stay
|
|
54
|
-
parameters.delete(LEGEND_QUERY_CUBE_PARAMETER.SOURCE_TYPE);
|
|
55
|
-
parameters.delete(LEGEND_QUERY_CUBE_PARAMETER.SOURCE_ID);
|
|
56
|
-
const rest = parameters.toString();
|
|
57
|
-
navigator.updateCurrentLocation(`${navigator.getCurrentLocation()}${rest ? `?${rest}` : ''}${new URL(navigator.getCurrentAddress()).hash}`);
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=LegendQueryCubeEntry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LegendQueryCubeEntry.js","sourceRoot":"","sources":["../../../src/stores/cube/LegendQueryCubeEntry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,uDAAuD;AACvD,MAAM,CAAN,IAAY,2BAIX;AAJD,WAAY,2BAA2B;IACrC,yDAA0B,CAAA;IAC1B,qDAAsB,CAAA;IACtB,mDAAoB,CAAA;AACtB,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,QAItC;AAED,8EAA8E;AAC9E,MAAM,cAAc,GAAG,CACrB,SAAyC,EACxB,EAAE,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC,YAAY,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,SAAyC,EACZ,EAAE;IAC/B,MAAM,UAAU,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,2BAA2B,CAAC,WAAW,CAAC,CAAC;IAC3E,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC;IACvE,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,2BAA2B,CAAC,QAAQ,CAAC;QAC1D,UAAU;QACV,QAAQ;QACR,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE;QAC1B,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,SAAyC,EACnC,EAAE;IACR,MAAM,UAAU,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAC7C,IACE,CAAC,UAAU,CAAC,GAAG,CAAC,2BAA2B,CAAC,WAAW,CAAC;QACxD,CAAC,UAAU,CAAC,GAAG,CAAC,2BAA2B,CAAC,SAAS,CAAC,EACtD,CAAC;QACD,OAAO;IACT,CAAC;IACD,4EAA4E;IAC5E,UAAU,CAAC,MAAM,CAAC,2BAA2B,CAAC,WAAW,CAAC,CAAC;IAC3D,UAAU,CAAC,MAAM,CAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC;IACnC,SAAS,CAAC,qBAAqB,CAC7B,GAAG,SAAS,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC,IAAI,EAAE,CAC3G,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
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 { LegendCubeHost, type CubeConnectionExplorer, type CubeEngine, type CubeEngineConfig, type CubeLakehouseServices, type CubeProjectCatalog, type LegendCubeHostConfig } from '@finos/legend-cube-builder';
|
|
17
|
-
import type { LegendQueryApplicationConfig } from '../../application/LegendQueryApplicationConfig.js';
|
|
18
|
-
import type { LegendQueryApplicationStore } from '../LegendQueryBaseStore.js';
|
|
19
|
-
/** Cube talks to the engine Query's own editor uses, configured the same way */
|
|
20
|
-
export declare const buildLegendQueryCubeEngineConfig: (config: LegendQueryApplicationConfig) => CubeEngineConfig;
|
|
21
|
-
/**
|
|
22
|
-
* Query's servers, as Cube's host reads them (PLAN §11.18): Query's engine,
|
|
23
|
-
* depot, lakehouse and marketplace, configured as Query's own, and the
|
|
24
|
-
* lakehouse environment Query remembers for the viewer
|
|
25
|
-
*/
|
|
26
|
-
export declare const buildLegendQueryCubeHostConfig: (applicationStore: LegendQueryApplicationStore) => LegendCubeHostConfig;
|
|
27
|
-
/**
|
|
28
|
-
* What Cube needs to read and run data products (PLAN §6.8), with Query's
|
|
29
|
-
* lakehouse and depot: none when Query has no lakehouse, so an open-source
|
|
30
|
-
* deployment without one offers no data products
|
|
31
|
-
*/
|
|
32
|
-
export declare const buildLegendQueryCubeLakehouseServices: (applicationStore: LegendQueryApplicationStore) => CubeLakehouseServices | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Legend Query as the host of the Cube page (PLAN §3.5): the host a Legend
|
|
35
|
-
* deployment gives Cube (PLAN §11.18), from Query's config. One per visit to
|
|
36
|
-
* the page.
|
|
37
|
-
*/
|
|
38
|
-
export declare class LegendQueryCubeHost extends LegendCubeHost {
|
|
39
|
-
/**
|
|
40
|
-
* Tests give an engine, an explorer and a project catalog; otherwise each
|
|
41
|
-
* is built from Query's config
|
|
42
|
-
*/
|
|
43
|
-
constructor(applicationStore: LegendQueryApplicationStore, engine?: CubeEngine, connectionExplorer?: CubeConnectionExplorer, projectCatalog?: CubeProjectCatalog);
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=LegendQueryCubeHost.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LegendQueryCubeHost.d.ts","sourceRoot":"","sources":["../../../src/stores/cube/LegendQueryCubeHost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,cAAc,EACd,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AACtG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAE9E,gFAAgF;AAChF,eAAO,MAAM,gCAAgC,GAC3C,QAAQ,4BAA4B,KACnC,gBAMD,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,GACzC,kBAAkB,2BAA2B,KAC5C,oBA4BF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,GAChD,kBAAkB,2BAA2B,KAC5C,qBAAqB,GAAG,SAIxB,CAAC;AAEJ;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;IACrD;;;OAGG;gBAED,gBAAgB,EAAE,2BAA2B,EAC7C,MAAM,CAAC,EAAE,UAAU,EACnB,kBAAkB,CAAC,EAAE,sBAAsB,EAC3C,cAAc,CAAC,EAAE,kBAAkB;CAQtC"}
|