@finos/legend-application-repl 1.0.34 → 1.0.36
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__/LegendREPLSetting.d.ts +2 -5
- package/lib/__lib__/LegendREPLSetting.d.ts.map +1 -1
- package/lib/__lib__/LegendREPLSetting.js +4 -7
- package/lib/__lib__/LegendREPLSetting.js.map +1 -1
- package/lib/application/LegendREPL.js +1 -1
- package/lib/application/LegendREPL.js.map +1 -1
- package/lib/application/LegendREPLNavigation.d.ts +1 -1
- package/lib/application/LegendREPLNavigation.js +1 -1
- package/lib/components/LegendREPLDataCubeHeader.d.ts +2 -4
- package/lib/components/LegendREPLDataCubeHeader.d.ts.map +1 -1
- package/lib/components/LegendREPLDataCubeHeader.js +25 -9
- package/lib/components/LegendREPLDataCubeHeader.js.map +1 -1
- package/lib/components/LegendREPLFramworkProvider.d.ts.map +1 -1
- package/lib/components/LegendREPLFramworkProvider.js +2 -2
- package/lib/components/LegendREPLFramworkProvider.js.map +1 -1
- package/lib/components/LegendREPLPublishDataCubeAlert.js +1 -1
- package/lib/components/LegendREPLPublishDataCubeAlert.js.map +1 -1
- package/lib/components/{LegendREPLApplication.d.ts → LegendREPLWebApplication.d.ts} +1 -1
- package/lib/components/LegendREPLWebApplication.d.ts.map +1 -0
- package/lib/components/LegendREPLWebApplication.js +84 -0
- package/lib/components/LegendREPLWebApplication.js.map +1 -0
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/LegendREPLBaseStore.d.ts +15 -6
- package/lib/stores/LegendREPLBaseStore.d.ts.map +1 -1
- package/lib/stores/LegendREPLBaseStore.js +75 -33
- package/lib/stores/LegendREPLBaseStore.js.map +1 -1
- package/lib/stores/LegendREPLDataCubeEngine.d.ts +16 -22
- package/lib/stores/LegendREPLDataCubeEngine.d.ts.map +1 -1
- package/lib/stores/LegendREPLDataCubeEngine.js +89 -88
- package/lib/stores/LegendREPLDataCubeEngine.js.map +1 -1
- package/lib/stores/LegendREPLDataCubeSource.d.ts +14 -2
- package/lib/stores/LegendREPLDataCubeSource.d.ts.map +1 -1
- package/lib/stores/LegendREPLDataCubeSource.js +24 -0
- package/lib/stores/LegendREPLDataCubeSource.js.map +1 -1
- package/lib/stores/LegendREPLServerClient.d.ts +5 -17
- package/lib/stores/LegendREPLServerClient.d.ts.map +1 -1
- package/lib/stores/LegendREPLServerClient.js +1 -26
- package/lib/stores/LegendREPLServerClient.js.map +1 -1
- package/package.json +6 -6
- package/src/__lib__/LegendREPLSetting.ts +2 -5
- package/src/application/LegendREPL.tsx +1 -1
- package/src/application/LegendREPLNavigation.ts +1 -1
- package/src/components/LegendREPLDataCubeHeader.tsx +15 -12
- package/src/components/LegendREPLFramworkProvider.tsx +2 -4
- package/src/components/LegendREPLPublishDataCubeAlert.tsx +1 -1
- package/src/components/LegendREPLWebApplication.tsx +157 -0
- package/src/stores/LegendREPLBaseStore.tsx +104 -40
- package/src/stores/LegendREPLDataCubeEngine.ts +135 -139
- package/src/stores/LegendREPLDataCubeSource.ts +35 -2
- package/src/stores/LegendREPLServerClient.ts +3 -39
- package/tsconfig.json +1 -1
- package/lib/components/LegendREPLApplication.d.ts.map +0 -1
- package/lib/components/LegendREPLApplication.js +0 -67
- package/lib/components/LegendREPLApplication.js.map +0 -1
- package/src/components/LegendREPLApplication.tsx +0 -125
|
@@ -14,41 +14,32 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { type LegendREPLServerClient } from './LegendREPLServerClient.js';
|
|
17
|
-
import { DataCubeEngine, type DataCubeSource, type
|
|
17
|
+
import { DataCubeEngine, type DataCubeSource, type DataCubeExecutionOptions } from '@finos/legend-data-cube';
|
|
18
18
|
import { TDSExecutionResult, type V1_AppliedFunction, type V1_Lambda, type V1_ValueSpecification } from '@finos/legend-graph';
|
|
19
|
-
import {
|
|
19
|
+
import { LogEvent, type PlainObject } from '@finos/legend-shared';
|
|
20
20
|
import { LegendREPLDataCubeSource } from './LegendREPLDataCubeSource.js';
|
|
21
21
|
import type { LegendREPLApplicationStore } from '../application/LegendREPLApplicationStore.js';
|
|
22
|
-
import type { LegendREPLBaseStore } from './LegendREPLBaseStore.js';
|
|
23
22
|
export declare class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
|
|
27
|
-
constructor(baseStore: LegendREPLBaseStore);
|
|
28
|
-
blockNavigation(blockCheckers: (() => boolean)[], onBlock?: ((onProceed: () => void) => void) | undefined, onNativePlatformNavigationBlock?: (() => void) | undefined): void;
|
|
29
|
-
unblockNavigation(): void;
|
|
30
|
-
persistSettingValue(key: string, value: string | number | boolean | object | undefined): void;
|
|
31
|
-
fetchConfiguration(): Promise<{
|
|
32
|
-
gridClientLicense: string | undefined;
|
|
33
|
-
}>;
|
|
34
|
-
getBaseQuery(): Promise<DataCubeQuery>;
|
|
23
|
+
private readonly _application;
|
|
24
|
+
private readonly _client;
|
|
25
|
+
constructor(application: LegendREPLApplicationStore, client: LegendREPLServerClient);
|
|
35
26
|
processQuerySource(value: PlainObject): Promise<LegendREPLDataCubeSource>;
|
|
36
27
|
parseValueSpecification(code: string, returnSourceInformation?: boolean): Promise<V1_ValueSpecification>;
|
|
37
28
|
getValueSpecificationCode(value: V1_ValueSpecification, pretty?: boolean): Promise<string>;
|
|
38
29
|
getQueryTypeahead(code: string, baseQuery: V1_Lambda, source: DataCubeSource): Promise<import("@finos/legend-data-cube").CompletionItem[]>;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
getQueryCodeRelationReturnType(code: string, baseQuery: V1_ValueSpecification, source: DataCubeSource): Promise<{
|
|
31
|
+
columns: {
|
|
32
|
+
name: string;
|
|
33
|
+
type: string;
|
|
34
|
+
}[];
|
|
35
|
+
}>;
|
|
36
|
+
executeQuery(query: V1_Lambda, source: DataCubeSource, options?: DataCubeExecutionOptions | undefined): Promise<{
|
|
42
37
|
result: TDSExecutionResult;
|
|
43
38
|
executedQuery: string;
|
|
44
39
|
executedSQL: string;
|
|
45
40
|
}>;
|
|
46
41
|
buildExecutionContext(source: DataCubeSource): V1_AppliedFunction | undefined;
|
|
47
|
-
|
|
48
|
-
getDocumentationEntry(key: string): DocumentationEntry | undefined;
|
|
49
|
-
shouldDisplayDocumentationEntry(entry: DocumentationEntry): boolean;
|
|
50
|
-
openLink(url: string): void;
|
|
51
|
-
sendTelemetry(event: string, data: PlainObject): void;
|
|
42
|
+
private _getQueryRelationType;
|
|
52
43
|
logDebug(message: string, ...data: unknown[]): void;
|
|
53
44
|
debugProcess(processName: string, ...data: [string, unknown][]): void;
|
|
54
45
|
logInfo(event: LogEvent, ...data: unknown[]): void;
|
|
@@ -56,5 +47,8 @@ export declare class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
56
47
|
logError(event: LogEvent, ...data: unknown[]): void;
|
|
57
48
|
logUnhandledError(error: Error): void;
|
|
58
49
|
logIllegalStateError(message: string, error?: Error): void;
|
|
50
|
+
getDocumentationEntry(key: string): import("@finos/legend-shared").DocumentationEntry | undefined;
|
|
51
|
+
openLink(url: string): void;
|
|
52
|
+
sendTelemetry(event: string, data: PlainObject): void;
|
|
59
53
|
}
|
|
60
54
|
//# sourceMappingURL=LegendREPLDataCubeEngine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLDataCubeEngine.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"LegendREPLDataCubeEngine.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAIL,cAAc,EAEd,KAAK,cAAc,E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C,MAAM,EAAE,OAAO,CAAC,EAAE;IAmB9D,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAI3C,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAI9C,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAI5C,iBAAiB,CAAC,KAAK,EAAE,KAAK;IAI9B,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;IAQnD,qBAAqB,CAAC,GAAG,EAAE,MAAM;IAIjC,QAAQ,CAAC,GAAG,EAAE,MAAM;IAIpB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW;CAGxD"}
|
|
@@ -13,90 +13,78 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { _elementPtr, _function, _lambda, DataCubeEngine, DataCubeFunction,
|
|
18
|
-
import { TDSExecutionResult, V1_buildExecutionResult,
|
|
19
|
-
import { assertErrorThrown, guaranteeType, HttpStatus, isNonNullable, LogEvent, NetworkClientError, } from '@finos/legend-shared';
|
|
20
|
-
import { LegendREPLDataCubeSource } from './LegendREPLDataCubeSource.js';
|
|
21
|
-
import { APPLICATION_EVENT
|
|
16
|
+
import {} from './LegendREPLServerClient.js';
|
|
17
|
+
import { _elementPtr, _function, _lambda, DataCubeEngine, DataCubeFunction, _deserializeValueSpecification, _serializeValueSpecification, } from '@finos/legend-data-cube';
|
|
18
|
+
import { TDSExecutionResult, V1_buildExecutionResult, V1_deserializeExecutionResult, V1_buildEngineError, V1_EngineError, V1_getGenericTypeFullPath, V1_relationTypeModelSchema, } from '@finos/legend-graph';
|
|
19
|
+
import { assertErrorThrown, guaranteeType, HttpStatus, isNonNullable, LogEvent, NetworkClientError, UnsupportedOperationError, } from '@finos/legend-shared';
|
|
20
|
+
import { LegendREPLDataCubeSource, RawLegendREPLDataCubeSource, REPL_DATA_CUBE_SOURCE_TYPE, } from './LegendREPLDataCubeSource.js';
|
|
21
|
+
import { APPLICATION_EVENT } from '@finos/legend-application';
|
|
22
|
+
import { deserialize } from 'serializr';
|
|
22
23
|
export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
client
|
|
26
|
-
constructor(baseStore) {
|
|
24
|
+
_application;
|
|
25
|
+
_client;
|
|
26
|
+
constructor(application, client) {
|
|
27
27
|
super();
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
30
|
-
this.client = baseStore.client;
|
|
31
|
-
}
|
|
32
|
-
blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock) {
|
|
33
|
-
this.application.navigationService.navigator.blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock);
|
|
34
|
-
}
|
|
35
|
-
unblockNavigation() {
|
|
36
|
-
this.application.navigationService.navigator.unblockNavigation();
|
|
37
|
-
}
|
|
38
|
-
persistSettingValue(key, value) {
|
|
39
|
-
this.application.settingService.persistValue(key, value);
|
|
28
|
+
this._application = application;
|
|
29
|
+
this._client = client;
|
|
40
30
|
}
|
|
41
31
|
// ---------------------------------- IMPLEMENTATION ----------------------------------
|
|
42
|
-
async fetchConfiguration() {
|
|
43
|
-
const info = await this.client.getInfrastructureInfo();
|
|
44
|
-
this.baseStore.currentUser = info.currentUser;
|
|
45
|
-
this.baseStore.queryServerBaseUrl = info.queryServerBaseUrl;
|
|
46
|
-
this.baseStore.hostedApplicationBaseUrl = info.hostedApplicationBaseUrl;
|
|
47
|
-
return {
|
|
48
|
-
gridClientLicense: info.gridClientLicense,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
async getBaseQuery() {
|
|
52
|
-
return DataCubeQuery.serialization.fromJson(await this.client.getBaseQuery());
|
|
53
|
-
}
|
|
54
32
|
async processQuerySource(value) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
33
|
+
switch (value._type) {
|
|
34
|
+
case REPL_DATA_CUBE_SOURCE_TYPE: {
|
|
35
|
+
const rawSource = RawLegendREPLDataCubeSource.serialization.fromJson(value);
|
|
36
|
+
const source = new LegendREPLDataCubeSource();
|
|
37
|
+
source.query = await this.parseValueSpecification(rawSource.query, false);
|
|
38
|
+
try {
|
|
39
|
+
source.columns = (await this._getQueryRelationType(_lambda([], [source.query]))).columns;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
assertErrorThrown(error);
|
|
43
|
+
throw new Error(`Can't get query result columns. Make sure the source query return a relation (i.e. typed TDS). Error: ${error.message}`);
|
|
44
|
+
}
|
|
45
|
+
source.runtime = rawSource.runtime;
|
|
46
|
+
source.mapping = rawSource.mapping;
|
|
47
|
+
source.timestamp = rawSource.timestamp;
|
|
48
|
+
source.model = rawSource.model;
|
|
49
|
+
source.isLocal = rawSource.isLocal;
|
|
50
|
+
source.isPersistenceSupported = rawSource.isPersistenceSupported;
|
|
51
|
+
return source;
|
|
52
|
+
}
|
|
53
|
+
default: {
|
|
54
|
+
throw new UnsupportedOperationError(`Can't process query source of type '${value._type}'.`);
|
|
55
|
+
}
|
|
59
56
|
}
|
|
60
|
-
const source = new LegendREPLDataCubeSource();
|
|
61
|
-
source.query = await this.parseValueSpecification(_source.query, false);
|
|
62
|
-
source.sourceColumns = (await this.getQueryRelationType(_lambda([], [source.query]), source)).columns;
|
|
63
|
-
source.runtime = _source.runtime;
|
|
64
|
-
source.mapping = _source.mapping;
|
|
65
|
-
source.timestamp = _source.timestamp;
|
|
66
|
-
source.model = _source.model;
|
|
67
|
-
source.isLocal = _source.isLocal;
|
|
68
|
-
source.isPersistenceSupported = _source.isPersistenceSupported;
|
|
69
|
-
return source;
|
|
70
57
|
}
|
|
71
58
|
async parseValueSpecification(code, returnSourceInformation) {
|
|
72
|
-
return
|
|
59
|
+
return _deserializeValueSpecification(await this._client.parseValueSpecification({
|
|
73
60
|
code,
|
|
74
61
|
returnSourceInformation,
|
|
75
|
-
})
|
|
62
|
+
}));
|
|
76
63
|
}
|
|
77
|
-
getValueSpecificationCode(value, pretty) {
|
|
78
|
-
return this.
|
|
79
|
-
value:
|
|
64
|
+
async getValueSpecificationCode(value, pretty) {
|
|
65
|
+
return this._client.getValueSpecificationCode({
|
|
66
|
+
value: _serializeValueSpecification(value),
|
|
80
67
|
pretty,
|
|
81
68
|
});
|
|
82
69
|
}
|
|
83
70
|
async getQueryTypeahead(code, baseQuery, source) {
|
|
84
|
-
return this.
|
|
71
|
+
return this._client.getQueryTypeahead({
|
|
85
72
|
code,
|
|
86
|
-
baseQuery:
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
async getQueryRelationType(query, source) {
|
|
90
|
-
return this.client.getQueryRelationReturnType({
|
|
91
|
-
query: V1_serializeValueSpecification(query, []),
|
|
73
|
+
baseQuery: _serializeValueSpecification(baseQuery),
|
|
92
74
|
});
|
|
93
75
|
}
|
|
94
76
|
async getQueryCodeRelationReturnType(code, baseQuery, source) {
|
|
95
77
|
try {
|
|
96
|
-
|
|
78
|
+
const relationType = deserialize(V1_relationTypeModelSchema, await this._client.getQueryCodeRelationReturnType({
|
|
97
79
|
code,
|
|
98
|
-
baseQuery:
|
|
99
|
-
});
|
|
80
|
+
baseQuery: _serializeValueSpecification(baseQuery),
|
|
81
|
+
}));
|
|
82
|
+
return {
|
|
83
|
+
columns: relationType.columns.map((column) => ({
|
|
84
|
+
name: column.name,
|
|
85
|
+
type: V1_getGenericTypeFullPath(column.genericType),
|
|
86
|
+
})),
|
|
87
|
+
};
|
|
100
88
|
}
|
|
101
89
|
catch (error) {
|
|
102
90
|
assertErrorThrown(error);
|
|
@@ -107,13 +95,13 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
107
95
|
throw error;
|
|
108
96
|
}
|
|
109
97
|
}
|
|
110
|
-
async executeQuery(query, source,
|
|
111
|
-
const result = await this.
|
|
112
|
-
query:
|
|
113
|
-
debug:
|
|
98
|
+
async executeQuery(query, source, options) {
|
|
99
|
+
const result = await this._client.executeQuery({
|
|
100
|
+
query: _serializeValueSpecification(query),
|
|
101
|
+
debug: options?.debug,
|
|
114
102
|
});
|
|
115
103
|
return {
|
|
116
|
-
result: guaranteeType(V1_buildExecutionResult(
|
|
104
|
+
result: guaranteeType(V1_buildExecutionResult(V1_deserializeExecutionResult(JSON.parse(result.result))), TDSExecutionResult),
|
|
117
105
|
executedQuery: result.executedQuery,
|
|
118
106
|
executedSQL: result.executedSQL,
|
|
119
107
|
};
|
|
@@ -127,41 +115,54 @@ export class LegendREPLDataCubeEngine extends DataCubeEngine {
|
|
|
127
115
|
}
|
|
128
116
|
return undefined;
|
|
129
117
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
sendTelemetry(event, data) {
|
|
143
|
-
this.application.telemetryService.logEvent(event, data);
|
|
118
|
+
// ---------------------------------- UTILITIES ----------------------------------
|
|
119
|
+
async _getQueryRelationType(query) {
|
|
120
|
+
const relationType = deserialize(V1_relationTypeModelSchema, await this._client.getQueryRelationReturnType({
|
|
121
|
+
query: _serializeValueSpecification(query),
|
|
122
|
+
}));
|
|
123
|
+
return {
|
|
124
|
+
columns: relationType.columns.map((column) => ({
|
|
125
|
+
name: column.name,
|
|
126
|
+
type: V1_getGenericTypeFullPath(column.genericType),
|
|
127
|
+
})),
|
|
128
|
+
};
|
|
144
129
|
}
|
|
130
|
+
// ---------------------------------- APPLICATION ----------------------------------
|
|
145
131
|
logDebug(message, ...data) {
|
|
146
|
-
this.
|
|
132
|
+
this._application.logService.debug(LogEvent.create(APPLICATION_EVENT.DEBUG), message, ...data);
|
|
147
133
|
}
|
|
148
134
|
debugProcess(processName, ...data) {
|
|
149
|
-
|
|
135
|
+
// eslint-disable-next-line no-process-env
|
|
136
|
+
if (process.env.NODE_ENV === 'development') {
|
|
137
|
+
this._application.logService.info(LogEvent.create(APPLICATION_EVENT.DEBUG), `\n------ START DEBUG PROCESS: ${processName} ------`, ...data.flatMap(([key, value]) => [`\n[${key.toUpperCase()}]:`, value]), `\n------- END DEBUG PROCESS: ${processName} -------\n\n`);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
this._application.logService.debug(LogEvent.create(APPLICATION_EVENT.DEBUG), `\n------ START DEBUG PROCESS: ${processName} ------`, ...data.flatMap(([key, value]) => [`\n[${key.toUpperCase()}]:`, value]), `\n------- END DEBUG PROCESS: ${processName} -------\n\n`);
|
|
141
|
+
}
|
|
150
142
|
}
|
|
151
143
|
logInfo(event, ...data) {
|
|
152
|
-
this.
|
|
144
|
+
this._application.logService.info(event, ...data);
|
|
153
145
|
}
|
|
154
146
|
logWarning(event, ...data) {
|
|
155
|
-
this.
|
|
147
|
+
this._application.logService.warn(event, ...data);
|
|
156
148
|
}
|
|
157
149
|
logError(event, ...data) {
|
|
158
|
-
this.
|
|
150
|
+
this._application.logService.error(event, ...data);
|
|
159
151
|
}
|
|
160
152
|
logUnhandledError(error) {
|
|
161
|
-
this.
|
|
153
|
+
this._application.logUnhandledError(error);
|
|
162
154
|
}
|
|
163
155
|
logIllegalStateError(message, error) {
|
|
164
156
|
this.logError(LogEvent.create(APPLICATION_EVENT.ILLEGAL_APPLICATION_STATE_OCCURRED), message, error);
|
|
165
157
|
}
|
|
158
|
+
getDocumentationEntry(key) {
|
|
159
|
+
return this._application.documentationService.getDocEntry(key);
|
|
160
|
+
}
|
|
161
|
+
openLink(url) {
|
|
162
|
+
this._application.navigationService.navigator.visitAddress(url);
|
|
163
|
+
}
|
|
164
|
+
sendTelemetry(event, data) {
|
|
165
|
+
this._application.telemetryService.logEvent(event, data);
|
|
166
|
+
}
|
|
166
167
|
}
|
|
167
168
|
//# sourceMappingURL=LegendREPLDataCubeEngine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLDataCubeEngine.js","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"LegendREPLDataCubeEngine.js","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAA+B,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,cAAc,EACd,gBAAgB,EAGhB,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAElB,uBAAuB,EACvB,6BAA6B,EAG7B,mBAAmB,EACnB,cAAc,EACd,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,aAAa,EACb,QAAQ,EACR,kBAAkB,EAElB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,OAAO,wBAAyB,SAAQ,cAAc;IACzC,YAAY,CAA6B;IACzC,OAAO,CAAyB;IAEjD,YACE,WAAuC,EACvC,MAA8B;QAE9B,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,uFAAuF;IAE9E,KAAK,CAAC,kBAAkB,CAAC,KAA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
|
*/
|
|
16
|
-
import { DataCubeSource } from '@finos/legend-data-cube';
|
|
17
|
-
import type
|
|
16
|
+
import { DataCubeSource, type DataCubeColumn } from '@finos/legend-data-cube';
|
|
17
|
+
import { SerializationFactory, type PlainObject } from '@finos/legend-shared';
|
|
18
18
|
export declare class LegendREPLDataCubeSource extends DataCubeSource {
|
|
19
19
|
runtime: string;
|
|
20
20
|
mapping?: string | undefined;
|
|
@@ -23,4 +23,16 @@ export declare class LegendREPLDataCubeSource extends DataCubeSource {
|
|
|
23
23
|
isLocal: boolean;
|
|
24
24
|
isPersistenceSupported: boolean;
|
|
25
25
|
}
|
|
26
|
+
export declare const REPL_DATA_CUBE_SOURCE_TYPE = "repl";
|
|
27
|
+
export declare class RawLegendREPLDataCubeSource {
|
|
28
|
+
query: string;
|
|
29
|
+
runtime: string;
|
|
30
|
+
model?: PlainObject | undefined;
|
|
31
|
+
mapping?: string | undefined;
|
|
32
|
+
timestamp: number;
|
|
33
|
+
isLocal: boolean;
|
|
34
|
+
isPersistenceSupported: boolean;
|
|
35
|
+
columns: DataCubeColumn[];
|
|
36
|
+
static readonly serialization: SerializationFactory<RawLegendREPLDataCubeSource>;
|
|
37
|
+
}
|
|
26
38
|
//# sourceMappingURL=LegendREPLDataCubeSource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLDataCubeSource.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"LegendREPLDataCubeSource.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EACL,oBAAoB,EAEpB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAG9B,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,OAAO,EAAG,MAAM,CAAC;IAEjB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,SAAS,EAAG,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAChC,OAAO,EAAG,OAAO,CAAC;IAClB,sBAAsB,EAAG,OAAO,CAAC;CAClC;AAED,eAAO,MAAM,0BAA0B,SAAS,CAAC;AAEjD,qBAAa,2BAA2B;IACtC,KAAK,EAAG,MAAM,CAAC;IACf,OAAO,EAAG,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAEhC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,SAAS,EAAG,MAAM,CAAC;IACnB,OAAO,EAAG,OAAO,CAAC;IAClB,sBAAsB,EAAG,OAAO,CAAC;IACjC,OAAO,EAAE,cAAc,EAAE,CAAM;IAE/B,MAAM,CAAC,QAAQ,CAAC,aAAa,oDAY3B;CACH"}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { DataCubeSource } from '@finos/legend-data-cube';
|
|
17
|
+
import { SerializationFactory, usingConstantValueSchema, } from '@finos/legend-shared';
|
|
18
|
+
import { createModelSchema, list, optional, primitive, raw } from 'serializr';
|
|
17
19
|
export class LegendREPLDataCubeSource extends DataCubeSource {
|
|
18
20
|
runtime;
|
|
19
21
|
mapping;
|
|
@@ -22,4 +24,26 @@ export class LegendREPLDataCubeSource extends DataCubeSource {
|
|
|
22
24
|
isLocal;
|
|
23
25
|
isPersistenceSupported;
|
|
24
26
|
}
|
|
27
|
+
export const REPL_DATA_CUBE_SOURCE_TYPE = 'repl';
|
|
28
|
+
export class RawLegendREPLDataCubeSource {
|
|
29
|
+
query;
|
|
30
|
+
runtime;
|
|
31
|
+
model;
|
|
32
|
+
mapping;
|
|
33
|
+
timestamp;
|
|
34
|
+
isLocal;
|
|
35
|
+
isPersistenceSupported;
|
|
36
|
+
columns = [];
|
|
37
|
+
static serialization = new SerializationFactory(createModelSchema(RawLegendREPLDataCubeSource, {
|
|
38
|
+
_type: usingConstantValueSchema(REPL_DATA_CUBE_SOURCE_TYPE),
|
|
39
|
+
columns: list(raw()),
|
|
40
|
+
isLocal: primitive(),
|
|
41
|
+
isPersistenceSupported: primitive(),
|
|
42
|
+
mapping: optional(primitive()),
|
|
43
|
+
model: optional(raw()),
|
|
44
|
+
query: primitive(),
|
|
45
|
+
runtime: primitive(),
|
|
46
|
+
timestamp: primitive(),
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
25
49
|
//# sourceMappingURL=LegendREPLDataCubeSource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLDataCubeSource.js","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"LegendREPLDataCubeSource.js","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAuB,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EACL,oBAAoB,EACpB,wBAAwB,GAEzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAE9E,MAAM,OAAO,wBAAyB,SAAQ,cAAc;IAC1D,OAAO,CAAU;IAEjB,OAAO,CAAsB;IAC7B,SAAS,CAAU;IACnB,KAAK,CAA2B;IAChC,OAAO,CAAW;IAClB,sBAAsB,CAAW;CAClC;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAEjD,MAAM,OAAO,2BAA2B;IACtC,KAAK,CAAU;IACf,OAAO,CAAU;IACjB,KAAK,CAA2B;IAEhC,OAAO,CAAsB;IAC7B,SAAS,CAAU;IACnB,OAAO,CAAW;IAClB,sBAAsB,CAAW;IACjC,OAAO,GAAqB,EAAE,CAAC;IAE/B,MAAM,CAAU,aAAa,GAAG,IAAI,oBAAoB,CACtD,iBAAiB,CAAC,2BAA2B,EAAE;QAC7C,KAAK,EAAE,wBAAwB,CAAC,0BAA0B,CAAC;QAC3D,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;QACpB,OAAO,EAAE,SAAS,EAAE;QACpB,sBAAsB,EAAE,SAAS,EAAE;QACnC,OAAO,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;QAC9B,KAAK,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC;QACtB,KAAK,EAAE,SAAS,EAAE;QAClB,OAAO,EAAE,SAAS,EAAE;QACpB,SAAS,EAAE,SAAS,EAAE;KACvB,CAAC,CACH,CAAC"}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { type DataCubeQuery, type CompletionItem
|
|
18
|
-
import { type PersistentDataCubeQuery, type V1_Lambda, type V1_ValueSpecification } from '@finos/legend-graph';
|
|
16
|
+
import { type NetworkClient, type PlainObject } from '@finos/legend-shared';
|
|
17
|
+
import { type DataCubeQuery, type CompletionItem } from '@finos/legend-data-cube';
|
|
18
|
+
import { type V1_RelationType, type PersistentDataCubeQuery, type V1_Lambda, type V1_ValueSpecification } from '@finos/legend-graph';
|
|
19
19
|
type GetValueSpecificationCodeInput = {
|
|
20
20
|
value: PlainObject<V1_ValueSpecification>;
|
|
21
21
|
pretty?: boolean | undefined;
|
|
@@ -50,18 +50,6 @@ type InfrastructureInfo = {
|
|
|
50
50
|
queryServerBaseUrl?: string | undefined;
|
|
51
51
|
hostedApplicationBaseUrl?: string | undefined;
|
|
52
52
|
};
|
|
53
|
-
export declare const REPL_DATA_CUBE_SOURCE_TYPE = "repl";
|
|
54
|
-
declare class REPLBaseDataCubeQuerySource {
|
|
55
|
-
query: string;
|
|
56
|
-
runtime: string;
|
|
57
|
-
model?: PlainObject | undefined;
|
|
58
|
-
mapping?: string | undefined;
|
|
59
|
-
timestamp: number;
|
|
60
|
-
isLocal: boolean;
|
|
61
|
-
isPersistenceSupported: boolean;
|
|
62
|
-
static readonly serialization: SerializationFactory<REPLBaseDataCubeQuerySource>;
|
|
63
|
-
}
|
|
64
|
-
export declare function deserializeREPLQuerySource(value: PlainObject<REPLBaseDataCubeQuerySource>): REPLBaseDataCubeQuerySource;
|
|
65
53
|
export declare class LegendREPLServerClient {
|
|
66
54
|
private readonly networkClient;
|
|
67
55
|
constructor(networkClient: NetworkClient);
|
|
@@ -72,8 +60,8 @@ export declare class LegendREPLServerClient {
|
|
|
72
60
|
parseValueSpecification(input: ParseValueSpecificationInput): Promise<PlainObject<V1_ValueSpecification>>;
|
|
73
61
|
getValueSpecificationCode(input: GetValueSpecificationCodeInput): Promise<string>;
|
|
74
62
|
getBaseQuery(): Promise<PlainObject<DataCubeQuery>>;
|
|
75
|
-
getQueryRelationReturnType(input: GetQueryRelationReturnTypeInput): Promise<
|
|
76
|
-
getQueryCodeRelationReturnType(input: GetQueryCodeRelationReturnTypeInput): Promise<
|
|
63
|
+
getQueryRelationReturnType(input: GetQueryRelationReturnTypeInput): Promise<PlainObject<V1_RelationType>>;
|
|
64
|
+
getQueryCodeRelationReturnType(input: GetQueryCodeRelationReturnTypeInput): Promise<PlainObject<V1_RelationType>>;
|
|
77
65
|
executeQuery(input: PlainObject<ExecutionInput>): Promise<ExecutionResult>;
|
|
78
66
|
publishQuery(query: PlainObject<PersistentDataCubeQuery>, queryStoreBaseUrl: string): Promise<PlainObject<PersistentDataCubeQuery>>;
|
|
79
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLServerClient.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLServerClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,
|
|
1
|
+
{"version":3,"file":"LegendREPLServerClient.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLServerClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AAE7B,KAAK,8BAA8B,GAAG;IACpC,KAAK,EAAE,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAC1C,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/C,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;CACpC,CAAC;AAEF,KAAK,+BAA+B,GAAG;IACrC,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;CAC/B,CAAC;AAEF,KAAK,mCAAmC,GAAG;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,WAAW,CAAC,qBAAqB,CAAC,CAAC;CAChD,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAC9B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AAW,CAAC,uBAAuB,CAAC,EAC3C,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC;CAGjD"}
|
|
@@ -13,34 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ContentType, guaranteeNonNullable, HttpHeader,
|
|
16
|
+
import { ContentType, guaranteeNonNullable, HttpHeader, } from '@finos/legend-shared';
|
|
17
17
|
import {} from '@finos/legend-data-cube';
|
|
18
18
|
import {} from '@finos/legend-graph';
|
|
19
|
-
import { createModelSchema, optional, primitive, raw } from 'serializr';
|
|
20
|
-
export const REPL_DATA_CUBE_SOURCE_TYPE = 'repl';
|
|
21
|
-
class REPLBaseDataCubeQuerySource {
|
|
22
|
-
query;
|
|
23
|
-
runtime;
|
|
24
|
-
model;
|
|
25
|
-
mapping;
|
|
26
|
-
timestamp;
|
|
27
|
-
isLocal;
|
|
28
|
-
isPersistenceSupported;
|
|
29
|
-
// columns // we don't need this analytics, we will get this from the query directly
|
|
30
|
-
static serialization = new SerializationFactory(createModelSchema(REPLBaseDataCubeQuerySource, {
|
|
31
|
-
_type: usingConstantValueSchema(REPL_DATA_CUBE_SOURCE_TYPE),
|
|
32
|
-
isLocal: primitive(),
|
|
33
|
-
isPersistenceSupported: primitive(),
|
|
34
|
-
mapping: optional(primitive()),
|
|
35
|
-
model: optional(raw()),
|
|
36
|
-
query: primitive(),
|
|
37
|
-
runtime: primitive(),
|
|
38
|
-
timestamp: primitive(),
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
export function deserializeREPLQuerySource(value) {
|
|
42
|
-
return REPLBaseDataCubeQuerySource.serialization.fromJson(value);
|
|
43
|
-
}
|
|
44
19
|
export class LegendREPLServerClient {
|
|
45
20
|
networkClient;
|
|
46
21
|
constructor(networkClient) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLServerClient.js","sourceRoot":"","sources":["../../src/stores/LegendREPLServerClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,UAAU,
|
|
1
|
+
{"version":3,"file":"LegendREPLServerClient.js","sourceRoot":"","sources":["../../src/stores/LegendREPLServerClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,UAAU,GAGX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGN,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAKN,MAAM,qBAAqB,CAAC;AA4C7B,MAAM,OAAO,sBAAsB;IAChB,aAAa,CAAgB;IAE9C,YAAY,aAA4B;QACtC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,IAAI,OAAO;QACT,OAAO,oBAAoB,CACzB,IAAI,CAAC,aAAa,CAAC,OAAO,EAC1B,qDAAqD,CACtD,CAAC;IACJ,CAAC;IAED,IAAY,QAAQ;QAClB,OAAO,GAAG,IAAI,CAAC,OAAO,eAAe,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,qBAAqB;QACzB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,qBAAqB,CAAC,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,KAA0B;QAE1B,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,YAAY,EAAE,KAAK,CAAC,CAAC;IACtE,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,KAAmC;QAEnC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAC5B,GAAG,IAAI,CAAC,QAAQ,0BAA0B,EAC1C,KAAK,CACN,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,yBAAyB,CAC7B,KAAqC;QAErC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAC5B,GAAG,IAAI,CAAC,QAAQ,4BAA4B,EAC5C,KAAK,EACL,EAAE,EACF,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,UAAU,EAAE,CAChD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,eAAe,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,0BAA0B,CAC9B,KAAsC;QAEtC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAC5B,GAAG,IAAI,CAAC,QAAQ,wBAAwB,EACxC,KAAK,CACN,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,8BAA8B,CAClC,KAA0C;QAE1C,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAC5B,GAAG,IAAI,CAAC,QAAQ,6BAA6B,EAC7C,KAAK,CACN,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,KAAkC;QAElC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,eAAe,EAAE,KAAK,CAAC,CAAC;IACzE,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,KAA2C,EAC3C,iBAAyB;QAEzB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,iBAAiB,EAAE,EAAE,KAAK,CAAC,CAAC;IAChE,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application-repl",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.36",
|
|
4
4
|
"description": "Legend REPL Grid client application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"test:watch": "jest --watch"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@finos/legend-application": "16.0.
|
|
47
|
-
"@finos/legend-art": "7.1.
|
|
48
|
-
"@finos/legend-data-cube": "0.0.
|
|
49
|
-
"@finos/legend-graph": "
|
|
50
|
-
"@finos/legend-shared": "10.0.
|
|
46
|
+
"@finos/legend-application": "16.0.16",
|
|
47
|
+
"@finos/legend-art": "7.1.73",
|
|
48
|
+
"@finos/legend-data-cube": "0.0.38",
|
|
49
|
+
"@finos/legend-graph": "32.0.0",
|
|
50
|
+
"@finos/legend-shared": "10.0.65",
|
|
51
51
|
"@types/react": "19.0.2",
|
|
52
52
|
"@types/react-dom": "19.0.2",
|
|
53
53
|
"mobx": "6.13.5",
|
|
@@ -14,9 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export enum
|
|
18
|
-
|
|
19
|
-
GRID_CLIENT_ROW_BUFFER = 'legend-repl.engine.grid-client.rowBuffer',
|
|
20
|
-
GRID_CLIENT_PURGE_CLOSED_ROW_NODES = 'legend-repl.engine.grid-client.purgeClosedRowNodes',
|
|
21
|
-
GRID_CLIENT_SUPPRESS_LARGE_DATASET_WARNING = 'legend-repl.engine.grid-client.suppressLargeDatasetWarning',
|
|
17
|
+
export enum LegendREPLSettingStorageKey {
|
|
18
|
+
DATA_CUBE = 'data-cube',
|
|
22
19
|
}
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
LegendREPLApplicationConfig,
|
|
29
29
|
type LegendREPLApplicationConfigData,
|
|
30
30
|
} from './LegendREPLApplicationConfig.js';
|
|
31
|
-
import { LegendREPLWebApplication } from '../components/
|
|
31
|
+
import { LegendREPLWebApplication } from '../components/LegendREPLWebApplication.js';
|
|
32
32
|
import type { LegendREPLApplicationStore } from './LegendREPLApplicationStore.js';
|
|
33
33
|
|
|
34
34
|
export class LegendREPL extends LegendApplication {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @external_application_navigation This depends on Legend
|
|
18
|
+
* @external_application_navigation This depends on Legend DataCube routing and is hardcoded so it's potentially brittle
|
|
19
19
|
*/
|
|
20
20
|
export const EXTERNAL_APPLICATION_NAVIGATION__generateDataCubeViewUrl = (
|
|
21
21
|
hostedApplicationBaseUrl: string,
|