@finos/legend-application-query 13.6.1 → 13.6.3

Sign up to get free protection for your applications and to get access to all the features.
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /** @license @finos/legend-application-query v13.6.1
1
+ /** @license @finos/legend-application-query v13.6.3
2
2
  * Copyright (c) 2020-present, Goldman Sachs
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-application-query",
3
- "version": "13.6.1",
3
+ "version": "13.6.3",
4
4
  "description": "Legend Query application core",
5
5
  "keywords": [
6
6
  "legend",
@@ -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 type { DepotServerClient } from '@finos/legend-server-depot';
16
+ import { type DepotServerClient } from '@finos/legend-server-depot';
17
17
  import type { LegendQueryApplicationStore } from '../LegendQueryBaseStore.js';
18
18
  import { GraphManagerState } from '@finos/legend-graph';
19
19
  import { type GeneratorFn } from '@finos/legend-shared';
@@ -1 +1 @@
1
- {"version":3,"file":"ExistingQueryDataCubeViewer.d.ts","sourceRoot":"","sources":["../../../src/stores/data-cube/ExistingQueryDataCubeViewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EACL,iBAAiB,EAGlB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEzE,qBAAa,gCAAgC;IAC3C,QAAQ,CAAC,gBAAgB,EAAE,2BAA2B,CAAC;IACvD,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,0BAA0B,GAAG,SAAS,CAAC;gBAG7C,gBAAgB,EAAE,2BAA2B,EAC7C,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,MAAM;IAWhB,UAAU,IAAI,WAAW,CAAC,IAAI,CAAC;CAiDjC"}
1
+ {"version":3,"file":"ExistingQueryDataCubeViewer.d.ts","sourceRoot":"","sources":["../../../src/stores/data-cube/ExistingQueryDataCubeViewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EACL,iBAAiB,EAIlB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAGzE,qBAAa,gCAAgC;IAC3C,QAAQ,CAAC,gBAAgB,EAAE,2BAA2B,CAAC;IACvD,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,0BAA0B,GAAG,SAAS,CAAC;gBAG7C,gBAAgB,EAAE,2BAA2B,EAC7C,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,MAAM;IAehB,UAAU,IAAI,WAAW,CAAC,IAAI,CAAC;CA0DjC"}
@@ -13,10 +13,12 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { GraphManagerState, } from '@finos/legend-graph';
16
+ import { resolveVersion, } from '@finos/legend-server-depot';
17
+ import { GraphManagerState, LegendSDLC, } from '@finos/legend-graph';
17
18
  import { DEFAULT_TAB_SIZE } from '@finos/legend-application';
18
19
  import { assertErrorThrown } from '@finos/legend-shared';
19
20
  import { QueryBuilderDataCubeEngine } from '@finos/legend-query-builder';
21
+ import { flow, makeObservable, observable } from 'mobx';
20
22
  export class ExistingQueryDataCubeEditorStore {
21
23
  applicationStore;
22
24
  depotServerClient;
@@ -24,6 +26,10 @@ export class ExistingQueryDataCubeEditorStore {
24
26
  queryId;
25
27
  engine;
26
28
  constructor(applicationStore, depotServerClient, queryId) {
29
+ makeObservable(this, {
30
+ initialize: flow,
31
+ engine: observable,
32
+ });
27
33
  this.applicationStore = applicationStore;
28
34
  this.depotServerClient = depotServerClient;
29
35
  this.graphManagerState = new GraphManagerState(applicationStore.pluginManager, applicationStore.logService);
@@ -47,7 +53,9 @@ export class ExistingQueryDataCubeEditorStore {
47
53
  const content = queryInfo.content;
48
54
  const execConext = (yield this.graphManagerState.graphManager.resolveQueryInfoExecutionContext(queryInfo, () => this.depotServerClient.getVersionEntities(queryInfo.groupId, queryInfo.artifactId, queryInfo.versionId)));
49
55
  const lambda = (yield this.graphManagerState.graphManager.pureCodeToLambda(content));
50
- const engine = new QueryBuilderDataCubeEngine(lambda, execConext.mapping, execConext.runtime, this.graphManagerState);
56
+ this.graphManagerState.graph.setOrigin(new LegendSDLC(queryInfo.groupId, queryInfo.artifactId, resolveVersion(queryInfo.versionId)));
57
+ // TODO: we should be able to call engine and convert lambda to relation if not one.
58
+ const engine = new QueryBuilderDataCubeEngine(lambda, undefined, execConext.mapping, execConext.runtime, this.graphManagerState);
51
59
  this.engine = engine;
52
60
  }
53
61
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"ExistingQueryDataCubeViewer.js","sourceRoot":"","sources":["../../../src/stores/data-cube/ExistingQueryDataCubeViewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,iBAAiB,GAGlB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,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,MAAM,UAAU,GACd,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,gCAAgC,CACzE,SAAS,EACT,GAAG,EAAE,CACH,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CACvC,SAAS,CAAC,OAAO,EACjB,SAAS,CAAC,UAAU,EACpB,SAAS,CAAC,SAAS,CACpB,CACJ,CAAqD,CAAC;YACzD,MAAM,MAAM,GACV,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,gBAAgB,CACzD,OAAO,CACR,CAAyB,CAAC;YAC7B,MAAM,MAAM,GAAG,IAAI,0BAA0B,CAC3C,MAAM,EACN,UAAU,CAAC,OAAO,EAClB,UAAU,CAAC,OAAO,EAClB,IAAI,CAAC,iBAAiB,CACvB,CAAC;YACF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CACnD,wCAAwC,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,CACzE,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"ExistingQueryDataCubeViewer.js","sourceRoot":"","sources":["../../../src/stores/data-cube/ExistingQueryDataCubeViewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,cAAc,GAEf,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,iBAAiB,EAGjB,UAAU,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAoB,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,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AI,CAAC,iBAAiB,CAAC,YAAY,CAAC,gCAAgC,CACzE,SAAS,EACT,GAAG,EAAE,CACH,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CACvC,SAAS,CAAC,OAAO,EACjB,SAAS,CAAC,UAAU,EACpB,SAAS,CAAC,SAAS,CACpB,CACJ,CAAqD,CAAC;YACzD,MAAM,MAAM,GACV,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,gBAAgB,CACzD,OAAO,CACR,CAAyB,CAAC;YAC7B,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,SAAS,CACpC,IAAI,UAAU,CACZ,SAAS,CAAC,OAAO,EACjB,SAAS,CAAC,UAAU,EACpB,cAAc,CAAC,SAAS,CAAC,SAAS,CAAC,CACpC,CACF,CAAC;YACF,oFAAoF;YACpF,MAAM,MAAM,GAAG,IAAI,0BAA0B,CAC3C,MAAM,EACN,SAAS,EACT,UAAU,CAAC,OAAO,EAClB,UAAU,CAAC,OAAO,EAClB,IAAI,CAAC,iBAAiB,CACvB,CAAC;YACF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CACnD,wCAAwC,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,CACzE,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-application-query",
3
- "version": "13.6.1",
3
+ "version": "13.6.3",
4
4
  "description": "Legend Query application core",
5
5
  "keywords": [
6
6
  "legend",
@@ -43,14 +43,14 @@
43
43
  "test:watch": "jest --watch"
44
44
  },
45
45
  "dependencies": {
46
- "@finos/legend-application": "16.0.2",
47
- "@finos/legend-art": "7.1.61",
46
+ "@finos/legend-application": "16.0.3",
47
+ "@finos/legend-art": "7.1.62",
48
48
  "@finos/legend-code-editor": "2.0.3",
49
- "@finos/legend-data-cube": "0.0.7",
50
- "@finos/legend-extension-dsl-data-space": "10.3.79",
49
+ "@finos/legend-data-cube": "0.0.8",
50
+ "@finos/legend-extension-dsl-data-space": "10.3.80",
51
51
  "@finos/legend-graph": "31.10.37",
52
- "@finos/legend-lego": "2.0.4",
53
- "@finos/legend-query-builder": "4.15.1",
52
+ "@finos/legend-lego": "2.0.5",
53
+ "@finos/legend-query-builder": "4.15.2",
54
54
  "@finos/legend-server-depot": "6.0.62",
55
55
  "@finos/legend-shared": "10.0.57",
56
56
  "@finos/legend-storage": "3.0.107",
@@ -65,7 +65,7 @@
65
65
  "serializr": "3.0.2"
66
66
  },
67
67
  "devDependencies": {
68
- "@finos/legend-dev-utils": "2.1.24",
68
+ "@finos/legend-dev-utils": "2.1.25",
69
69
  "@jest/globals": "29.7.0",
70
70
  "cross-env": "7.0.3",
71
71
  "eslint": "9.12.0",
@@ -14,16 +14,21 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import type { DepotServerClient } from '@finos/legend-server-depot';
17
+ import {
18
+ resolveVersion,
19
+ type DepotServerClient,
20
+ } from '@finos/legend-server-depot';
18
21
  import type { LegendQueryApplicationStore } from '../LegendQueryBaseStore.js';
19
22
  import {
20
23
  GraphManagerState,
21
24
  type RawLambda,
22
25
  type QueryInfo,
26
+ LegendSDLC,
23
27
  } from '@finos/legend-graph';
24
28
  import { DEFAULT_TAB_SIZE } from '@finos/legend-application';
25
29
  import { assertErrorThrown, type GeneratorFn } from '@finos/legend-shared';
26
30
  import { QueryBuilderDataCubeEngine } from '@finos/legend-query-builder';
31
+ import { flow, makeObservable, observable } from 'mobx';
27
32
 
28
33
  export class ExistingQueryDataCubeEditorStore {
29
34
  readonly applicationStore: LegendQueryApplicationStore;
@@ -37,6 +42,10 @@ export class ExistingQueryDataCubeEditorStore {
37
42
  depotServerClient: DepotServerClient,
38
43
  queryId: string,
39
44
  ) {
45
+ makeObservable(this, {
46
+ initialize: flow,
47
+ engine: observable,
48
+ });
40
49
  this.applicationStore = applicationStore;
41
50
  this.depotServerClient = depotServerClient;
42
51
  this.graphManagerState = new GraphManagerState(
@@ -81,8 +90,17 @@ export class ExistingQueryDataCubeEditorStore {
81
90
  (yield this.graphManagerState.graphManager.pureCodeToLambda(
82
91
  content,
83
92
  )) as unknown as RawLambda;
93
+ this.graphManagerState.graph.setOrigin(
94
+ new LegendSDLC(
95
+ queryInfo.groupId,
96
+ queryInfo.artifactId,
97
+ resolveVersion(queryInfo.versionId),
98
+ ),
99
+ );
100
+ // TODO: we should be able to call engine and convert lambda to relation if not one.
84
101
  const engine = new QueryBuilderDataCubeEngine(
85
102
  lambda,
103
+ undefined,
86
104
  execConext.mapping,
87
105
  execConext.runtime,
88
106
  this.graphManagerState,