@finos/legend-query-builder 4.14.28 → 4.14.30
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/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +22 -14
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +6 -2
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +2 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +10 -2
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.d.ts.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js +1 -0
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js.map +1 -1
- package/lib/index.css +1 -17
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderState.d.ts +7 -1
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +10 -2
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/__test-utils__/QueryBuilderStateTestUtils.d.ts.map +1 -1
- package/lib/stores/__test-utils__/QueryBuilderStateTestUtils.js +2 -1
- package/lib/stores/__test-utils__/QueryBuilderStateTestUtils.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +4 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/workflow/QueryBuilderWorkFlowState.d.ts +23 -0
- package/lib/stores/workflow/QueryBuilderWorkFlowState.d.ts.map +1 -0
- package/lib/stores/workflow/QueryBuilderWorkFlowState.js +24 -0
- package/lib/stores/workflow/QueryBuilderWorkFlowState.js.map +1 -0
- package/lib/stores/workflows/FunctionQueryBuilderState.d.ts +2 -1
- package/lib/stores/workflows/FunctionQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/FunctionQueryBuilderState.js +2 -2
- package/lib/stores/workflows/FunctionQueryBuilderState.js.map +1 -1
- package/lib/stores/workflows/MappingQueryBuilderState.d.ts +2 -1
- package/lib/stores/workflows/MappingQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/MappingQueryBuilderState.js +2 -2
- package/lib/stores/workflows/MappingQueryBuilderState.js.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.d.ts +2 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js +2 -2
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
- package/package.json +1 -1
- package/src/components/QueryBuilder.tsx +106 -24
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +6 -2
- package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +2 -0
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +10 -2
- package/src/components/result/tds/QueryBuilderTDSGridResult.tsx +1 -0
- package/src/index.ts +1 -0
- package/src/stores/QueryBuilderState.ts +11 -0
- package/src/stores/__test-utils__/QueryBuilderStateTestUtils.ts +2 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +7 -0
- package/src/stores/workflow/QueryBuilderWorkFlowState.ts +27 -0
- package/src/stores/workflows/FunctionQueryBuilderState.ts +3 -1
- package/src/stores/workflows/MappingQueryBuilderState.ts +9 -1
- package/src/stores/workflows/ServiceQueryBuilderState.ts +9 -1
- package/tsconfig.json +1 -0
|
@@ -17,8 +17,9 @@ import type { GenericLegendApplicationStore } from '@finos/legend-application';
|
|
|
17
17
|
import type { ConcreteFunctionDefinition, GraphManagerState } from '@finos/legend-graph';
|
|
18
18
|
import { ClassQueryBuilderState } from './ClassQueryBuilderState.js';
|
|
19
19
|
import type { QueryBuilderConfig } from '../../graph-manager/QueryBuilderConfig.js';
|
|
20
|
+
import type { QueryBuilderWorkflowState } from '../workflow/QueryBuilderWorkFlowState.js';
|
|
20
21
|
export declare class FunctionQueryBuilderState extends ClassQueryBuilderState {
|
|
21
22
|
readonly functionElement: ConcreteFunctionDefinition;
|
|
22
|
-
constructor(applicationStore: GenericLegendApplicationStore, graphManagerState: GraphManagerState, functionElemenet: ConcreteFunctionDefinition, config: QueryBuilderConfig | undefined);
|
|
23
|
+
constructor(applicationStore: GenericLegendApplicationStore, graphManagerState: GraphManagerState, workflowState: QueryBuilderWorkflowState, functionElemenet: ConcreteFunctionDefinition, config: QueryBuilderConfig | undefined);
|
|
23
24
|
}
|
|
24
25
|
//# sourceMappingURL=FunctionQueryBuilderState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../src/stores/workflows/FunctionQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,EACV,0BAA0B,EAC1B,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"FunctionQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../src/stores/workflows/FunctionQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,EACV,0BAA0B,EAC1B,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAI1F,qBAAa,yBAA0B,SAAQ,sBAAsB;IACnE,QAAQ,CAAC,eAAe,EAAE,0BAA0B,CAAC;gBAGnD,gBAAgB,EAAE,6BAA6B,EAC/C,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,yBAAyB,EACxC,gBAAgB,EAAE,0BAA0B,EAC5C,MAAM,EAAE,kBAAkB,GAAG,SAAS;CAMzC"}
|
|
@@ -18,8 +18,8 @@ import { ClassQueryBuilderState } from './ClassQueryBuilderState.js';
|
|
|
18
18
|
// but for now we will use the same setup as class as class, mapping, runtime are editable
|
|
19
19
|
export class FunctionQueryBuilderState extends ClassQueryBuilderState {
|
|
20
20
|
functionElement;
|
|
21
|
-
constructor(applicationStore, graphManagerState, functionElemenet, config) {
|
|
22
|
-
super(applicationStore, graphManagerState, config);
|
|
21
|
+
constructor(applicationStore, graphManagerState, workflowState, functionElemenet, config) {
|
|
22
|
+
super(applicationStore, graphManagerState, workflowState, config);
|
|
23
23
|
this.functionElement = functionElemenet;
|
|
24
24
|
this.showParametersPanel = true;
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/FunctionQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"FunctionQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/FunctionQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAIrE,oEAAoE;AACpE,0FAA0F;AAC1F,MAAM,OAAO,yBAA0B,SAAQ,sBAAsB;IAC1D,eAAe,CAA6B;IAErD,YACE,gBAA+C,EAC/C,iBAAoC,EACpC,aAAwC,EACxC,gBAA4C,EAC5C,MAAsC;QAEtC,KAAK,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QAClE,IAAI,CAAC,eAAe,GAAG,gBAAgB,CAAC;QACxC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;IAClC,CAAC;CACF"}
|
|
@@ -17,11 +17,12 @@ import type { GenericLegendApplicationStore } from '@finos/legend-application';
|
|
|
17
17
|
import { type Mapping, type Runtime, type GraphManagerState } from '@finos/legend-graph';
|
|
18
18
|
import { QueryBuilderState } from '../QueryBuilderState.js';
|
|
19
19
|
import type { QueryBuilderConfig } from '../../graph-manager/QueryBuilderConfig.js';
|
|
20
|
+
import type { QueryBuilderWorkflowState } from '../workflow/QueryBuilderWorkFlowState.js';
|
|
20
21
|
export declare class MappingQueryBuilderState extends QueryBuilderState {
|
|
21
22
|
readonly onMappingChange?: ((val: Mapping) => void) | undefined;
|
|
22
23
|
readonly onRuntimeChange?: ((val: Runtime) => void) | undefined;
|
|
23
24
|
TEMPORARY__setupPanelContentRenderer: () => React.ReactNode;
|
|
24
|
-
constructor(applicationStore: GenericLegendApplicationStore, graphManagerState: GraphManagerState, onMappingChange?: ((val: Mapping) => void) | undefined, onRuntimeChange?: ((val: Runtime) => void) | undefined, config?: QueryBuilderConfig | undefined, sourceInfo?: object | undefined);
|
|
25
|
+
constructor(applicationStore: GenericLegendApplicationStore, graphManagerState: GraphManagerState, workflowState: QueryBuilderWorkflowState, onMappingChange?: ((val: Mapping) => void) | undefined, onRuntimeChange?: ((val: Runtime) => void) | undefined, config?: QueryBuilderConfig | undefined, sourceInfo?: object | undefined);
|
|
25
26
|
/**
|
|
26
27
|
* Propagation after changing the mapping:
|
|
27
28
|
* - If no runtime is chosen, try to choose a compatible runtime
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MappingQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../src/stores/workflows/MappingQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"MappingQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../src/stores/workflows/MappingQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAKvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAE1F,qBAAa,wBAAyB,SAAQ,iBAAiB;IAC7D,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAChE,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAEvD,oCAAoC,QAAO,MAAM,SAAS,CAChB;gBAGjD,gBAAgB,EAAE,6BAA6B,EAC/C,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,yBAAyB,EACxC,eAAe,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,EACtD,eAAe,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,EACtD,MAAM,CAAC,EAAE,kBAAkB,GAAG,SAAS,EACvC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS;IAcjC;;;;;;OAMG;IACH,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;CA6B/C"}
|
|
@@ -21,8 +21,8 @@ export class MappingQueryBuilderState extends QueryBuilderState {
|
|
|
21
21
|
onMappingChange;
|
|
22
22
|
onRuntimeChange;
|
|
23
23
|
TEMPORARY__setupPanelContentRenderer = () => renderMappingQueryBuilderSetupPanelContent(this);
|
|
24
|
-
constructor(applicationStore, graphManagerState, onMappingChange, onRuntimeChange, config, sourceInfo) {
|
|
25
|
-
super(applicationStore, graphManagerState, config, sourceInfo);
|
|
24
|
+
constructor(applicationStore, graphManagerState, workflowState, onMappingChange, onRuntimeChange, config, sourceInfo) {
|
|
25
|
+
super(applicationStore, graphManagerState, workflowState, config, sourceInfo);
|
|
26
26
|
this.onMappingChange = onMappingChange;
|
|
27
27
|
this.onRuntimeChange = onRuntimeChange;
|
|
28
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MappingQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/MappingQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAIL,4BAA4B,EAC5B,cAAc,EACd,mCAAmC,EACnC,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,0CAA0C,EAAE,MAAM,mDAAmD,CAAC;AAC/G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"MappingQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/MappingQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAIL,4BAA4B,EAC5B,cAAc,EACd,mCAAmC,EACnC,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,0CAA0C,EAAE,MAAM,mDAAmD,CAAC;AAC/G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAI5D,MAAM,OAAO,wBAAyB,SAAQ,iBAAiB;IACpD,eAAe,CAAwC;IACvD,eAAe,CAAwC;IAEvD,oCAAoC,GAAG,GAAoB,EAAE,CACpE,0CAA0C,CAAC,IAAI,CAAC,CAAC;IAEnD,YACE,gBAA+C,EAC/C,iBAAoC,EACpC,aAAwC,EACxC,eAAsD,EACtD,eAAsD,EACtD,MAAuC,EACvC,UAA+B;QAE/B,KAAK,CACH,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,MAAM,EACN,UAAU,CACX,CAAC;QAEF,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAED;;;;;;OAMG;IACH,sBAAsB,CAAC,OAAgB;QACrC,8CAA8C;QAC9C,sDAAsD;QACtD,MAAM,kBAAkB,GAAG,4BAA4B,CACrD,OAAO,EACP,IAAI,CAAC,iBAAiB,CAAC,cAAc,CACtC,CAAC;QACF,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;QACrE,IAAI,kBAAkB,EAAE;YACtB,IAAI,CAAC,aAAa,CAChB,IAAI,cAAc,CAChB,mCAAmC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAC/D,CACF,CAAC;SACH;QAED,MAAM,iBAAiB,GAAG,2BAA2B,CACnD,OAAO,EACP,IAAI,CAAC,iBAAiB,CAAC,aAAa,CACrC,CAAC;QACF,kEAAkE;QAClE,4DAA4D;QAC5D,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAC1D,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;YAClE,IAAI,gBAAgB,EAAE;gBACpB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;aACpC;SACF;IACH,CAAC;CACF"}
|
|
@@ -17,6 +17,7 @@ import type { GenericLegendApplicationStore } from '@finos/legend-application';
|
|
|
17
17
|
import { type Mapping, type Runtime, type GraphManagerState, type Service } from '@finos/legend-graph';
|
|
18
18
|
import { QueryBuilderState } from '../QueryBuilderState.js';
|
|
19
19
|
import type { QueryBuilderConfig } from '../../graph-manager/QueryBuilderConfig.js';
|
|
20
|
+
import type { QueryBuilderWorkflowState } from '../workflow/QueryBuilderWorkFlowState.js';
|
|
20
21
|
export type ServiceExecutionContext = {
|
|
21
22
|
key: string;
|
|
22
23
|
mapping: Mapping;
|
|
@@ -30,7 +31,7 @@ export declare class ServiceQueryBuilderState extends QueryBuilderState {
|
|
|
30
31
|
readonly onExecutionContextChange?: ((val: ServiceExecutionContext) => void) | undefined;
|
|
31
32
|
TEMPORARY__setupPanelContentRenderer: () => React.ReactNode;
|
|
32
33
|
selectedExecutionContext?: ServiceExecutionContext | undefined;
|
|
33
|
-
constructor(applicationStore: GenericLegendApplicationStore, graphManagerState: GraphManagerState, service: Service, usableServices: Service[] | undefined, executionContextKey?: string | undefined, onServiceChange?: ((val: Service) => void) | undefined, onExecutionContextChange?: ((val: ServiceExecutionContext) => void) | undefined, config?: QueryBuilderConfig | undefined, sourceInfo?: object | undefined);
|
|
34
|
+
constructor(applicationStore: GenericLegendApplicationStore, graphManagerState: GraphManagerState, workflowState: QueryBuilderWorkflowState, service: Service, usableServices: Service[] | undefined, executionContextKey?: string | undefined, onServiceChange?: ((val: Service) => void) | undefined, onExecutionContextChange?: ((val: ServiceExecutionContext) => void) | undefined, config?: QueryBuilderConfig | undefined, sourceInfo?: object | undefined);
|
|
34
35
|
setSelectedExecutionContext(val: ServiceExecutionContext): void;
|
|
35
36
|
get sideBarClassName(): string | undefined;
|
|
36
37
|
get isMappingReadOnly(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../src/stores/workflows/ServiceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,OAAO,EAIb,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"ServiceQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../src/stores/workflows/ServiceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,OAAO,EAIb,M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AAkB,GAAG,SAAS,EACvC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS;IA0DjC,2BAA2B,CAAC,GAAG,EAAE,uBAAuB,GAAG,IAAI;IAI/D,IAAa,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAIlD;IAED,IAAa,iBAAiB,IAAI,OAAO,CAExC;IAED,IAAa,iBAAiB,IAAI,OAAO,CAExC;IAED;;;;;;OAMG;IACH,+BAA+B,CAC7B,gBAAgB,EAAE,uBAAuB,GACxC,IAAI;CAkBR"}
|
|
@@ -26,8 +26,8 @@ export class ServiceQueryBuilderState extends QueryBuilderState {
|
|
|
26
26
|
onExecutionContextChange;
|
|
27
27
|
TEMPORARY__setupPanelContentRenderer = () => renderServiceQueryBuilderSetupPanelContent(this);
|
|
28
28
|
selectedExecutionContext;
|
|
29
|
-
constructor(applicationStore, graphManagerState, service, usableServices, executionContextKey, onServiceChange, onExecutionContextChange, config, sourceInfo) {
|
|
30
|
-
super(applicationStore, graphManagerState, config, sourceInfo);
|
|
29
|
+
constructor(applicationStore, graphManagerState, workflowState, service, usableServices, executionContextKey, onServiceChange, onExecutionContextChange, config, sourceInfo) {
|
|
30
|
+
super(applicationStore, graphManagerState, workflowState, config, sourceInfo);
|
|
31
31
|
makeObservable(this, {
|
|
32
32
|
selectedExecutionContext: observable,
|
|
33
33
|
setSelectedExecutionContext: action,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/ServiceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAKL,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,0CAA0C,EAAE,MAAM,mDAAmD,CAAC;AAC/G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"ServiceQueryBuilderState.js","sourceRoot":"","sources":["../../../src/stores/workflows/ServiceQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAKL,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,0CAA0C,EAAE,MAAM,mDAAmD,CAAC;AAC/G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAU5D,MAAM,OAAO,wBAAyB,SAAQ,iBAAiB;IACpD,OAAO,CAAU;IACjB,cAAc,CAAwB;IACtC,iBAAiB,GAA8B,EAAE,CAAC;IAClD,eAAe,CAAwC;IACvD,wBAAwB,CAEnB;IAEL,oCAAoC,GAAG,GAAoB,EAAE,CACpE,0CAA0C,CAAC,IAAI,CAAC,CAAC;IAEnD,wBAAwB,CAAuC;IAE/D,YACE,gBAA+C,EAC/C,iBAAoC,EACpC,aAAwC,EACxC,OAAgB,EAChB,cAAqC,EACrC,mBAAwC,EACxC,eAAsD,EACtD,wBAEa,EACb,MAAuC,EACvC,UAA+B;QAE/B,KAAK,CACH,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,MAAM,EACN,UAAU,CACX,CAAC;QAEF,cAAc,CAAC,IAAI,EAAE;YACnB,wBAAwB,EAAE,UAAU;YACpC,2BAA2B,EAAE,MAAM;SACpC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,GAAG,OAAO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C;aACpC;SACF;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
|
18
18
|
import {
|
|
19
|
-
clsx,
|
|
20
19
|
HammerIcon,
|
|
21
20
|
ResizablePanelGroup,
|
|
22
21
|
ResizablePanel,
|
|
@@ -31,7 +30,6 @@ import {
|
|
|
31
30
|
CaretDownIcon,
|
|
32
31
|
DiffIcon,
|
|
33
32
|
WaterDropIcon,
|
|
34
|
-
AssistantIcon,
|
|
35
33
|
MenuContentDivider,
|
|
36
34
|
Dialog,
|
|
37
35
|
Modal,
|
|
@@ -43,6 +41,10 @@ import {
|
|
|
43
41
|
CalendarClockIcon,
|
|
44
42
|
ChatIcon,
|
|
45
43
|
PanelLoadingIndicator,
|
|
44
|
+
SerializeIcon,
|
|
45
|
+
DataAccessIcon,
|
|
46
|
+
AssistantIcon,
|
|
47
|
+
clsx,
|
|
46
48
|
} from '@finos/legend-art';
|
|
47
49
|
import { QueryBuilderFilterPanel } from './filter/QueryBuilderFilterPanel.js';
|
|
48
50
|
import { QueryBuilderExplorerPanel } from './explorer/QueryBuilderExplorerPanel.js';
|
|
@@ -57,10 +59,10 @@ import { flowResult } from 'mobx';
|
|
|
57
59
|
import { QueryBuilderUnsupportedQueryEditor } from './QueryBuilderUnsupportedQueryEditor.js';
|
|
58
60
|
import {
|
|
59
61
|
BackdropContainer,
|
|
60
|
-
useApplicationStore,
|
|
61
62
|
useCommands,
|
|
62
63
|
ActionAlertActionType,
|
|
63
64
|
ActionAlertType,
|
|
65
|
+
useApplicationStore,
|
|
64
66
|
} from '@finos/legend-application';
|
|
65
67
|
import { QueryBuilderParametersPanel } from './QueryBuilderParametersPanel.js';
|
|
66
68
|
import { QueryBuilderFunctionsExplorerPanel } from './explorer/QueryBuilderFunctionsExplorerPanel.js';
|
|
@@ -78,6 +80,21 @@ import { QueryChat } from './QueryChat.js';
|
|
|
78
80
|
import { useEffect, useRef } from 'react';
|
|
79
81
|
import { RedoButton, UndoButton } from '@finos/legend-lego/application';
|
|
80
82
|
|
|
83
|
+
const QueryBuilderPostGraphFetchPanel = observer(
|
|
84
|
+
(props: { graphFetchState: QueryBuilderGraphFetchTreeState }) => {
|
|
85
|
+
const { graphFetchState } = props;
|
|
86
|
+
|
|
87
|
+
if (!graphFetchState.TEMPORARY__showPostFetchStructurePanel) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return (
|
|
91
|
+
<QueryBuilderFilterPanel
|
|
92
|
+
queryBuilderState={graphFetchState.queryBuilderState}
|
|
93
|
+
/>
|
|
94
|
+
);
|
|
95
|
+
},
|
|
96
|
+
);
|
|
97
|
+
|
|
81
98
|
const QueryBuilderStatusBar = observer(
|
|
82
99
|
(props: { queryBuilderState: QueryBuilderState }) => {
|
|
83
100
|
const { queryBuilderState } = props;
|
|
@@ -210,21 +227,6 @@ const QueryBuilderStatusBar = observer(
|
|
|
210
227
|
},
|
|
211
228
|
);
|
|
212
229
|
|
|
213
|
-
const QueryBuilderPostGraphFetchPanel = observer(
|
|
214
|
-
(props: { graphFetchState: QueryBuilderGraphFetchTreeState }) => {
|
|
215
|
-
const { graphFetchState } = props;
|
|
216
|
-
|
|
217
|
-
if (!graphFetchState.TEMPORARY__showPostFetchStructurePanel) {
|
|
218
|
-
return null;
|
|
219
|
-
}
|
|
220
|
-
return (
|
|
221
|
-
<QueryBuilderFilterPanel
|
|
222
|
-
queryBuilderState={graphFetchState.queryBuilderState}
|
|
223
|
-
/>
|
|
224
|
-
);
|
|
225
|
-
},
|
|
226
|
-
);
|
|
227
|
-
|
|
228
230
|
export const QueryBuilder = observer(
|
|
229
231
|
(props: { queryBuilderState: QueryBuilderState }) => {
|
|
230
232
|
const { queryBuilderState } = props;
|
|
@@ -381,6 +383,16 @@ export const QueryBuilder = observer(
|
|
|
381
383
|
queryBuilderState.changeHistoryState.redo();
|
|
382
384
|
};
|
|
383
385
|
|
|
386
|
+
const toggleAssistant = (): void =>
|
|
387
|
+
applicationStore.assistantService.toggleAssistant();
|
|
388
|
+
const compileQuery = applicationStore.guardUnhandledError(() =>
|
|
389
|
+
flowResult(queryBuilderState.compileQuery()),
|
|
390
|
+
);
|
|
391
|
+
const showDiff = (): void =>
|
|
392
|
+
queryBuilderState.changeDetectionState.showDiffViewPanel();
|
|
393
|
+
const openQueryChat = (): void =>
|
|
394
|
+
queryBuilderState.setIsQueryChatOpened(true);
|
|
395
|
+
|
|
384
396
|
useEffect(() => {
|
|
385
397
|
// this condition is for passing all exisitng tests because when we initialize a queryBuilderState for a test,
|
|
386
398
|
// we use an empty RawLambda with an empty class and this useEffect is called earlier than initializeWithQuery()
|
|
@@ -576,7 +588,9 @@ export const QueryBuilder = observer(
|
|
|
576
588
|
</MenuContentItemLabel>
|
|
577
589
|
</MenuContentItem>
|
|
578
590
|
<MenuContentItem onClick={openWatermark}>
|
|
579
|
-
<MenuContentItemIcon>
|
|
591
|
+
<MenuContentItemIcon>
|
|
592
|
+
<WaterDropIcon />
|
|
593
|
+
</MenuContentItemIcon>
|
|
580
594
|
<MenuContentItemLabel>
|
|
581
595
|
Show Watermark
|
|
582
596
|
</MenuContentItemLabel>
|
|
@@ -594,7 +608,9 @@ export const QueryBuilder = observer(
|
|
|
594
608
|
<MenuContentItemIcon>
|
|
595
609
|
{queryBuilderState.isCalendarEnabled ? (
|
|
596
610
|
<CheckIcon />
|
|
597
|
-
) :
|
|
611
|
+
) : (
|
|
612
|
+
<CalendarClockIcon />
|
|
613
|
+
)}
|
|
598
614
|
</MenuContentItemIcon>
|
|
599
615
|
<MenuContentItemLabel>
|
|
600
616
|
Enable Calendar
|
|
@@ -611,23 +627,77 @@ export const QueryBuilder = observer(
|
|
|
611
627
|
.projectionColumns.length === 0
|
|
612
628
|
}
|
|
613
629
|
>
|
|
614
|
-
<MenuContentItemIcon
|
|
630
|
+
<MenuContentItemIcon>
|
|
631
|
+
<DataAccessIcon />
|
|
632
|
+
</MenuContentItemIcon>
|
|
615
633
|
<MenuContentItemLabel>
|
|
616
634
|
Check Entitlements
|
|
617
635
|
</MenuContentItemLabel>
|
|
618
636
|
</MenuContentItem>
|
|
619
637
|
<MenuContentItem onClick={editQueryInPure}>
|
|
620
|
-
<MenuContentItemIcon
|
|
638
|
+
<MenuContentItemIcon>
|
|
639
|
+
<HackerIcon />
|
|
640
|
+
</MenuContentItemIcon>
|
|
621
641
|
<MenuContentItemLabel>
|
|
622
642
|
Edit Query in Pure
|
|
623
643
|
</MenuContentItemLabel>
|
|
624
644
|
</MenuContentItem>
|
|
625
645
|
<MenuContentItem onClick={showQueryProtocol}>
|
|
626
|
-
<MenuContentItemIcon
|
|
646
|
+
<MenuContentItemIcon>
|
|
647
|
+
<SerializeIcon />
|
|
648
|
+
</MenuContentItemIcon>
|
|
627
649
|
<MenuContentItemLabel>
|
|
628
650
|
Show Query Protocol
|
|
629
651
|
</MenuContentItemLabel>
|
|
630
652
|
</MenuContentItem>
|
|
653
|
+
<MenuContentItem onClick={compileQuery}>
|
|
654
|
+
<MenuContentItemIcon>
|
|
655
|
+
<HammerIcon />
|
|
656
|
+
</MenuContentItemIcon>
|
|
657
|
+
<MenuContentItemLabel>
|
|
658
|
+
Compile Query (F9)
|
|
659
|
+
</MenuContentItemLabel>
|
|
660
|
+
</MenuContentItem>
|
|
661
|
+
{queryBuilderState.changeDetectionState.initState
|
|
662
|
+
.hasCompleted && (
|
|
663
|
+
<MenuContentItem
|
|
664
|
+
disabled={
|
|
665
|
+
!queryBuilderState.changeDetectionState.hasChanged
|
|
666
|
+
}
|
|
667
|
+
onClick={showDiff}
|
|
668
|
+
title={
|
|
669
|
+
queryBuilderState.changeDetectionState.hasChanged
|
|
670
|
+
? 'Show changes'
|
|
671
|
+
: 'Query has not been changed'
|
|
672
|
+
}
|
|
673
|
+
>
|
|
674
|
+
<MenuContentItemIcon>
|
|
675
|
+
<DiffIcon />
|
|
676
|
+
</MenuContentItemIcon>
|
|
677
|
+
<MenuContentItemLabel>
|
|
678
|
+
Show Query Diff
|
|
679
|
+
</MenuContentItemLabel>
|
|
680
|
+
</MenuContentItem>
|
|
681
|
+
)}
|
|
682
|
+
{!queryBuilderState.config
|
|
683
|
+
?.TEMPORARY__disableQueryBuilderChat && (
|
|
684
|
+
<MenuContentItem onClick={openQueryChat}>
|
|
685
|
+
<MenuContentItemIcon>
|
|
686
|
+
<ChatIcon />
|
|
687
|
+
</MenuContentItemIcon>
|
|
688
|
+
<MenuContentItemLabel>
|
|
689
|
+
Open Query Chat
|
|
690
|
+
</MenuContentItemLabel>
|
|
691
|
+
</MenuContentItem>
|
|
692
|
+
)}
|
|
693
|
+
<MenuContentItem onClick={toggleAssistant}>
|
|
694
|
+
<MenuContentItemIcon>
|
|
695
|
+
<AssistantIcon />
|
|
696
|
+
</MenuContentItemIcon>
|
|
697
|
+
<MenuContentItemLabel>
|
|
698
|
+
Open Assistant
|
|
699
|
+
</MenuContentItemLabel>
|
|
700
|
+
</MenuContentItem>
|
|
631
701
|
</MenuContent>
|
|
632
702
|
}
|
|
633
703
|
menuProps={{
|
|
@@ -736,9 +806,19 @@ export const QueryBuilder = observer(
|
|
|
736
806
|
</ResizablePanelGroup>
|
|
737
807
|
</div>
|
|
738
808
|
</div>
|
|
809
|
+
{queryBuilderState.isQueryChatOpened && (
|
|
810
|
+
<QueryChat queryBuilderState={queryBuilderState} />
|
|
811
|
+
)}
|
|
739
812
|
{queryBuilderState.textEditorState.mode && (
|
|
740
813
|
<QueryBuilderTextEditor queryBuilderState={queryBuilderState} />
|
|
741
814
|
)}
|
|
815
|
+
{queryBuilderState.changeDetectionState.diffViewState && (
|
|
816
|
+
<QueryBuilderDiffViewPanelDiaglog
|
|
817
|
+
diffViewState={
|
|
818
|
+
queryBuilderState.changeDetectionState.diffViewState
|
|
819
|
+
}
|
|
820
|
+
/>
|
|
821
|
+
)}
|
|
742
822
|
{queryBuilderState.checkEntitlementsState
|
|
743
823
|
.showCheckEntitlementsViewer && (
|
|
744
824
|
<Dialog
|
|
@@ -789,7 +869,9 @@ export const QueryBuilder = observer(
|
|
|
789
869
|
</Dialog>
|
|
790
870
|
)}
|
|
791
871
|
</div>
|
|
792
|
-
|
|
872
|
+
{queryBuilderState.workflowState.showStatusBar ? (
|
|
873
|
+
<QueryBuilderStatusBar queryBuilderState={queryBuilderState} />
|
|
874
|
+
) : null}
|
|
793
875
|
</div>
|
|
794
876
|
);
|
|
795
877
|
},
|
|
@@ -408,11 +408,15 @@ export const QueryBuilderEditablePropertyName = observer(
|
|
|
408
408
|
onChange={changeColumnName}
|
|
409
409
|
onKeyDown={(event: React.KeyboardEvent<HTMLInputElement>) => {
|
|
410
410
|
if (event.key === 'Enter') {
|
|
411
|
-
|
|
411
|
+
if (columnName.length > 0) {
|
|
412
|
+
setIsEditingColumnName(false);
|
|
413
|
+
}
|
|
412
414
|
}
|
|
413
415
|
}}
|
|
414
416
|
onBlur={() => {
|
|
415
|
-
|
|
417
|
+
if (columnName.length > 0) {
|
|
418
|
+
setIsEditingColumnName(false);
|
|
419
|
+
}
|
|
416
420
|
}}
|
|
417
421
|
error={error}
|
|
418
422
|
ref={columnNameInputRef}
|
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
} from '../../stores/__test-utils__/QueryBuilderStateTestUtils.js';
|
|
52
52
|
import { STYLE_PREFIX, STYLE_PREFIX__DARK } from '@finos/legend-art';
|
|
53
53
|
import { expect } from '@jest/globals';
|
|
54
|
+
import { QueryBuilderAdvancedWorkflowState } from '../../stores/workflow/QueryBuilderWorkFlowState.js';
|
|
54
55
|
|
|
55
56
|
const getSelectorContainerClassName = (lightMode?: boolean): string =>
|
|
56
57
|
'.' + `${lightMode ? STYLE_PREFIX : STYLE_PREFIX__DARK}__value-container`;
|
|
@@ -198,6 +199,7 @@ export const TEST__setUpQueryBuilder = async (
|
|
|
198
199
|
const queryBuilderState = new INTERNAL__BasicQueryBuilderState(
|
|
199
200
|
MOCK__applicationStore,
|
|
200
201
|
graphManagerState,
|
|
202
|
+
QueryBuilderAdvancedWorkflowState.INSTANCE,
|
|
201
203
|
undefined,
|
|
202
204
|
);
|
|
203
205
|
const mapping = graphManagerState.graph.getMapping(mappingPath);
|
|
@@ -789,7 +789,11 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
|
789
789
|
projectionColumnState={projectionColumnState}
|
|
790
790
|
changeColumnName={changeColumnName}
|
|
791
791
|
error={
|
|
792
|
-
isDuplicatedColumnName
|
|
792
|
+
isDuplicatedColumnName
|
|
793
|
+
? 'Duplicated column'
|
|
794
|
+
: projectionColumnState.columnName.length === 0
|
|
795
|
+
? 'Empty column name'
|
|
796
|
+
: undefined
|
|
793
797
|
}
|
|
794
798
|
/>
|
|
795
799
|
</div>
|
|
@@ -812,7 +816,11 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
|
812
816
|
columnName={projectionColumnState.columnName}
|
|
813
817
|
changeColumnName={changeColumnName}
|
|
814
818
|
error={
|
|
815
|
-
isDuplicatedColumnName
|
|
819
|
+
isDuplicatedColumnName
|
|
820
|
+
? 'Duplicated column'
|
|
821
|
+
: projectionColumnState.columnName.length === 0
|
|
822
|
+
? 'Empty column name'
|
|
823
|
+
: undefined
|
|
816
824
|
}
|
|
817
825
|
title={projectionColumnState.columnName}
|
|
818
826
|
/>
|
package/src/index.ts
CHANGED
|
@@ -93,3 +93,4 @@ export * from './stores/QueryBuilder_LegendApplicationPlugin_Extension.js';
|
|
|
93
93
|
|
|
94
94
|
export * from './stores/data-access/DataAccessState.js';
|
|
95
95
|
export * from './components/data-access/DataAccessOverview.js';
|
|
96
|
+
export * from './stores/workflow/QueryBuilderWorkFlowState.js';
|
|
@@ -109,6 +109,7 @@ import {
|
|
|
109
109
|
import type { QueryBuilderConfig } from '../graph-manager/QueryBuilderConfig.js';
|
|
110
110
|
import { QUERY_BUILDER_EVENT } from '../__lib__/QueryBuilderEvent.js';
|
|
111
111
|
import { QueryBuilderChangeHistoryState } from './QueryBuilderChangeHistoryState.js';
|
|
112
|
+
import { type QueryBuilderWorkflowState } from './workflow/QueryBuilderWorkFlowState.js';
|
|
112
113
|
|
|
113
114
|
export interface QuerySDLC {}
|
|
114
115
|
|
|
@@ -118,6 +119,11 @@ export type QueryStateInfo = QuerySDLC & {
|
|
|
118
119
|
runtime: string;
|
|
119
120
|
};
|
|
120
121
|
|
|
122
|
+
export enum QUERY_BUILDER_LAMBDA_WRITER_MODE {
|
|
123
|
+
STANDARD = 'STANDARD',
|
|
124
|
+
TYPED_FETCH_STRUCTURE = 'TYPED_FETCH_STRUCTURE',
|
|
125
|
+
}
|
|
126
|
+
|
|
121
127
|
export abstract class QueryBuilderState implements CommandRegistrar {
|
|
122
128
|
readonly applicationStore: GenericLegendApplicationStore;
|
|
123
129
|
readonly graphManagerState: GraphManagerState;
|
|
@@ -126,6 +132,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
|
126
132
|
readonly queryCompileState = ActionState.create();
|
|
127
133
|
readonly observerContext: ObserverContext;
|
|
128
134
|
readonly config: QueryBuilderConfig | undefined;
|
|
135
|
+
readonly workflowState: QueryBuilderWorkflowState;
|
|
129
136
|
|
|
130
137
|
explorerState: QueryBuilderExplorerState;
|
|
131
138
|
functionsExplorerState: QueryFunctionsExplorerState;
|
|
@@ -168,6 +175,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
|
168
175
|
constructor(
|
|
169
176
|
applicationStore: GenericLegendApplicationStore,
|
|
170
177
|
graphManagerState: GraphManagerState,
|
|
178
|
+
workflowState: QueryBuilderWorkflowState,
|
|
171
179
|
config: QueryBuilderConfig | undefined,
|
|
172
180
|
sourceInfo?: QuerySDLC | undefined,
|
|
173
181
|
) {
|
|
@@ -245,6 +253,8 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
|
245
253
|
this.changeDetectionState = new QueryBuilderChangeDetectionState(this);
|
|
246
254
|
this.changeHistoryState = new QueryBuilderChangeHistoryState(this);
|
|
247
255
|
this.config = config;
|
|
256
|
+
|
|
257
|
+
this.workflowState = workflowState;
|
|
248
258
|
this.sourceInfo = sourceInfo;
|
|
249
259
|
}
|
|
250
260
|
|
|
@@ -789,6 +799,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
|
|
|
789
799
|
const basicState = new INTERNAL__BasicQueryBuilderState(
|
|
790
800
|
this.applicationStore,
|
|
791
801
|
this.graphManagerState,
|
|
802
|
+
this.workflowState,
|
|
792
803
|
undefined,
|
|
793
804
|
);
|
|
794
805
|
basicState.class = this.class;
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
INTERNAL__BasicQueryBuilderState,
|
|
42
42
|
type QueryBuilderState,
|
|
43
43
|
} from '../QueryBuilderState.js';
|
|
44
|
+
import { QueryBuilderAdvancedWorkflowState } from '../workflow/QueryBuilderWorkFlowState.js';
|
|
44
45
|
|
|
45
46
|
export class TEST__LegendApplicationPluginManager
|
|
46
47
|
extends LegendApplicationPluginManager<LegendApplicationPlugin>
|
|
@@ -131,6 +132,7 @@ export const TEST__setUpQueryBuilderState = async (
|
|
|
131
132
|
const queryBuilderState = new INTERNAL__BasicQueryBuilderState(
|
|
132
133
|
applicationStore,
|
|
133
134
|
graphManagerState,
|
|
135
|
+
QueryBuilderAdvancedWorkflowState.INSTANCE,
|
|
134
136
|
undefined,
|
|
135
137
|
);
|
|
136
138
|
if (rawLambda) {
|
|
@@ -279,6 +279,13 @@ export class QueryBuilderTDSState
|
|
|
279
279
|
get fetchStructureValidationIssues(): string[] {
|
|
280
280
|
const validationIssues: string[] = [];
|
|
281
281
|
|
|
282
|
+
const hasEmptyProjectionColumnName = this.projectionColumns.some(
|
|
283
|
+
(column) => column.columnName.length === 0,
|
|
284
|
+
);
|
|
285
|
+
if (hasEmptyProjectionColumnName) {
|
|
286
|
+
validationIssues.push('Query has projection column with no name');
|
|
287
|
+
}
|
|
288
|
+
|
|
282
289
|
const hasInValidCalendarAggregateColumns =
|
|
283
290
|
this.aggregationState.columns.some(
|
|
284
291
|
(column) =>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-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
|
+
export abstract class QueryBuilderWorkflowState {
|
|
18
|
+
abstract get showStatusBar(): boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class QueryBuilderAdvancedWorkflowState extends QueryBuilderWorkflowState {
|
|
22
|
+
get showStatusBar(): boolean {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static INSTANCE = new QueryBuilderAdvancedWorkflowState();
|
|
27
|
+
}
|
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
} from '@finos/legend-graph';
|
|
22
22
|
import { ClassQueryBuilderState } from './ClassQueryBuilderState.js';
|
|
23
23
|
import type { QueryBuilderConfig } from '../../graph-manager/QueryBuilderConfig.js';
|
|
24
|
+
import type { QueryBuilderWorkflowState } from '../workflow/QueryBuilderWorkFlowState.js';
|
|
24
25
|
|
|
25
26
|
// Note: We may want to move it to extend QueryBuilderState directly
|
|
26
27
|
// but for now we will use the same setup as class as class, mapping, runtime are editable
|
|
@@ -30,10 +31,11 @@ export class FunctionQueryBuilderState extends ClassQueryBuilderState {
|
|
|
30
31
|
constructor(
|
|
31
32
|
applicationStore: GenericLegendApplicationStore,
|
|
32
33
|
graphManagerState: GraphManagerState,
|
|
34
|
+
workflowState: QueryBuilderWorkflowState,
|
|
33
35
|
functionElemenet: ConcreteFunctionDefinition,
|
|
34
36
|
config: QueryBuilderConfig | undefined,
|
|
35
37
|
) {
|
|
36
|
-
super(applicationStore, graphManagerState, config);
|
|
38
|
+
super(applicationStore, graphManagerState, workflowState, config);
|
|
37
39
|
this.functionElement = functionElemenet;
|
|
38
40
|
this.showParametersPanel = true;
|
|
39
41
|
}
|
|
@@ -28,6 +28,7 @@ import { getNullableFirstEntry } from '@finos/legend-shared';
|
|
|
28
28
|
import { renderMappingQueryBuilderSetupPanelContent } from '../../components/workflows/MappingQueryBuilder.js';
|
|
29
29
|
import { QueryBuilderState } from '../QueryBuilderState.js';
|
|
30
30
|
import type { QueryBuilderConfig } from '../../graph-manager/QueryBuilderConfig.js';
|
|
31
|
+
import type { QueryBuilderWorkflowState } from '../workflow/QueryBuilderWorkFlowState.js';
|
|
31
32
|
|
|
32
33
|
export class MappingQueryBuilderState extends QueryBuilderState {
|
|
33
34
|
readonly onMappingChange?: ((val: Mapping) => void) | undefined;
|
|
@@ -39,12 +40,19 @@ export class MappingQueryBuilderState extends QueryBuilderState {
|
|
|
39
40
|
constructor(
|
|
40
41
|
applicationStore: GenericLegendApplicationStore,
|
|
41
42
|
graphManagerState: GraphManagerState,
|
|
43
|
+
workflowState: QueryBuilderWorkflowState,
|
|
42
44
|
onMappingChange?: ((val: Mapping) => void) | undefined,
|
|
43
45
|
onRuntimeChange?: ((val: Runtime) => void) | undefined,
|
|
44
46
|
config?: QueryBuilderConfig | undefined,
|
|
45
47
|
sourceInfo?: object | undefined,
|
|
46
48
|
) {
|
|
47
|
-
super(
|
|
49
|
+
super(
|
|
50
|
+
applicationStore,
|
|
51
|
+
graphManagerState,
|
|
52
|
+
workflowState,
|
|
53
|
+
config,
|
|
54
|
+
sourceInfo,
|
|
55
|
+
);
|
|
48
56
|
|
|
49
57
|
this.onMappingChange = onMappingChange;
|
|
50
58
|
this.onRuntimeChange = onRuntimeChange;
|