@finos/legend-application-studio 28.18.114 → 28.18.116
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/editor/editor-group/dataProduct/DataPoductEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js +9 -5
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +4 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js +56 -10
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -1
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts +5 -3
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js +9 -3
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js.map +1 -1
- package/package.json +6 -6
- package/src/components/editor/editor-group/dataProduct/DataPoductEditor.tsx +21 -11
- package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +71 -8
- package/src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts +20 -3
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataPoductEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/dataProduct/DataPoductEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAEL,yBAAyB,EAC1B,MAAM,mGAAmG,CAAC;
|
1
|
+
{"version":3,"file":"DataPoductEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/dataProduct/DataPoductEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAEL,yBAAyB,EAC1B,MAAM,mGAAmG,CAAC;AA+G3G,eAAO,MAAM,sCAAsC,WACzC;IACN,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,UAAU,EAAE,OAAO,CAAC;CACrB;;CA6DF,CAAC;AAqCF,eAAO,MAAM,iBAAiB;;CAwE5B,CAAC"}
|
@@ -21,6 +21,7 @@ import { clsx, LockIcon, PanelContent, PanelHeader, PanelHeaderActions, Dialog,
|
|
21
21
|
import { useRef, useState, useEffect } from 'react';
|
22
22
|
import { filterByType } from '@finos/legend-shared';
|
23
23
|
import { InlineLambdaEditor } from '@finos/legend-query-builder';
|
24
|
+
import { flowResult } from 'mobx';
|
24
25
|
const NewAccessPointAccessPOint = observer((props) => {
|
25
26
|
const { dataProductEditorState: dataProductEditorState } = props;
|
26
27
|
const accessPointInputRef = useRef(null);
|
@@ -79,7 +80,8 @@ export const LakehouseDataProductAcccessPointEditor = observer((props) => {
|
|
79
80
|
.find((pm) => pm.lambdaState.parserError);
|
80
81
|
return (_jsxs("div", { className: clsx('access-point-editor', {
|
81
82
|
backdrop__element: propertyHasParserError,
|
82
|
-
}), children: [_jsxs("div", { className: "access-point-editor__metadata", children: [_jsx("div", { className: clsx('access-point-editor__name', {}), children: _jsx("div", { className: "access-point-editor__name__label", children: accessPoint.id }) }), _jsx("div", { className: "access-point-editor__info", children: _jsx("div", { className: clsx('access-point-editor__type'), title: accessPoint.targetEnvironment, children: _jsx("div", { className: "access-point-editor__type__label", children: accessPoint.targetEnvironment }) }) })] }), _jsx("div", { className: "access-point-editor__content", children: _jsxs("div", { className: "access-point-editor__generic-entry", children: [_jsx("div", { className: "access-point-editor__entry__container", children: _jsx("div", { className: "access-point-editor__entry", children: _jsx(InlineLambdaEditor, { className: 'access-point-editor__lambda-editor', disabled:
|
83
|
+
}), children: [_jsxs("div", { className: "access-point-editor__metadata", children: [_jsx("div", { className: clsx('access-point-editor__name', {}), children: _jsx("div", { className: "access-point-editor__name__label", children: accessPoint.id }) }), _jsx("div", { className: "access-point-editor__info", children: _jsx("div", { className: clsx('access-point-editor__type'), title: accessPoint.targetEnvironment, children: _jsx("div", { className: "access-point-editor__type__label", children: accessPoint.targetEnvironment }) }) })] }), _jsx("div", { className: "access-point-editor__content", children: _jsxs("div", { className: "access-point-editor__generic-entry", children: [_jsx("div", { className: "access-point-editor__entry__container", children: _jsx("div", { className: "access-point-editor__entry", children: _jsx(InlineLambdaEditor, { className: 'access-point-editor__lambda-editor', disabled: lambdaEditorState.val.state
|
84
|
+
.isConvertingTransformLambdaObjects, lambdaEditorState: lambdaEditorState, forceBackdrop: Boolean(lambdaEditorState.parserError) }) }) }), _jsx("button", { className: "access-point-editor__generic-entry__remove-btn", onClick: () => {
|
83
85
|
productEditorState.deleteAccessPoint(accessPointState);
|
84
86
|
}, tabIndex: -1, title: "Remove", children: _jsx(TimesIcon, {}) })] }) })] }));
|
85
87
|
});
|
@@ -105,9 +107,11 @@ export const DataProductEditor = observer(() => {
|
|
105
107
|
const openNewModal = () => {
|
106
108
|
dataProductEditorState.setAccessPointModal(true);
|
107
109
|
};
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
110
|
+
useEffect(() => {
|
111
|
+
flowResult(dataProductEditorState.convertAccessPointsFuncObjects()).catch(dataProductEditorState.editorStore.applicationStore.alertUnhandledError);
|
112
|
+
}, [dataProductEditorState]);
|
113
|
+
return (_jsx("div", { className: "data-product-editor", children: _jsxs("div", { className: "panel", children: [_jsx("div", { className: "panel__header", children: _jsxs("div", { className: "panel__header__title", children: [isReadOnly && (_jsx("div", { className: "uml-element-editor__header__lock", children: _jsx(LockIcon, {}) })), _jsx("div", { className: "panel__header__title__label", children: "data product" }), _jsx("div", { className: "panel__header__title__content", children: product.name })] }) }), _jsxs("div", { className: "panel", children: [_jsxs(PanelHeader, { children: [_jsx("div", { className: "panel__header__title", children: _jsx("div", { className: "panel__header__title__content", children: "ACCESS POINTS" }) }), _jsx(PanelHeaderActions, { children: _jsx(PanelHeaderActionItem, { className: "panel__header__action", onClick: openNewModal, disabled: isReadOnly, title: "Create new access point", children: _jsx(PlusIcon, {}) }) })] }), _jsxs(PanelContent, { children: [accessPointStates
|
114
|
+
.filter(filterByType(LakehouseAccessPointState))
|
115
|
+
.map((apState) => (_jsx(LakehouseDataProductAcccessPointEditor, { isReadOnly: isReadOnly, accessPointState: apState }, apState.accessPoint.id))), !accessPointStates.length && (_jsx(DataProductEditorSplashScreen, { dataProductEditorState: dataProductEditorState }))] }), dataProductEditorState.accessPointModal && (_jsx(NewAccessPointAccessPOint, { dataProductEditorState: dataProductEditorState }))] })] }) }));
|
112
116
|
});
|
113
117
|
//# sourceMappingURL=DataPoductEditor.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataPoductEditor.js","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/dataProduct/DataPoductEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,mGAAmG,CAAC;AAC3G,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,MAAM,EACN,YAAY,EACZ,yBAAyB,EACzB,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,QAAQ,EACR,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;
|
1
|
+
{"version":3,"file":"DataPoductEditor.js","sourceRoot":"","sources":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CHANGED
package/lib/package.json
CHANGED
package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts
CHANGED
@@ -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 { DataProduct, LakehouseAccessPoint, type PackageableElement, type AccessPoint } from '@finos/legend-graph';
|
16
|
+
import { DataProduct, LakehouseAccessPoint, type PackageableElement, type AccessPoint, AccessPointGroup } from '@finos/legend-graph';
|
17
17
|
import type { EditorStore } from '../../../EditorStore.js';
|
18
18
|
import { ElementEditorState } from '../ElementEditorState.js';
|
19
19
|
import { type GeneratorFn } from '@finos/legend-shared';
|
@@ -42,11 +42,14 @@ export declare class LakehouseAccessPointState extends AccessPointState {
|
|
42
42
|
export declare class DataProductEditorState extends ElementEditorState {
|
43
43
|
accessPointModal: boolean;
|
44
44
|
accessPointStates: AccessPointState[];
|
45
|
+
isConvertingTransformLambdaObjects: boolean;
|
45
46
|
constructor(editorStore: EditorStore, element: PackageableElement);
|
47
|
+
convertAccessPointsFuncObjects(): GeneratorFn<void>;
|
46
48
|
buildAccessPointState(val: AccessPoint): AccessPointState;
|
47
49
|
setAccessPointModal(val: boolean): void;
|
48
50
|
deleteAccessPoint(val: AccessPointState): void;
|
49
51
|
addAccessPoint(id: string): void;
|
52
|
+
createBareGroupAndAdd(): AccessPointGroup;
|
50
53
|
get product(): DataProduct;
|
51
54
|
get accessPoints(): AccessPoint[];
|
52
55
|
reprocess(newElement: PackageableElement, editorStore: EditorStore): DataProductEditorState;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataProductEditorState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,KAAK,WAAW,
|
1
|
+
{"version":3,"file":"DataProductEditorState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAQhB,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAGL,KAAK,WAAW,EAKjB,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,qBAAa,gBAAgB;IAC3B,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CAAC;IACvC,WAAW,EAAE,WAAW,CAAC;gBAEb,GAAG,EAAE,WAAW,EAAE,WAAW,EAAE,sBAAsB;CAIlE;AAED,qBAAa,4BAA6B,SAAQ,iBAAiB;IACjE,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,GAAG,EAAE,yBAAyB,CAAC;gBAE5B,GAAG,EAAE,yBAAyB;IAM1C,IAAa,QAAQ,IAAI,MAAM,CAE9B;IAEA,kCAAkC,IAAI,WAAW,CAAC,IAAI,CAAC;IA2BvD,kCAAkC,CAAC,OAAO,CAAC,EAAE;QAC5C,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC7B,wBAAwB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KAChD,GAAG,WAAW,CAAC,IAAI,CAAC;CAkCtB;AACD,qBAAa,yBAA0B,SAAQ,gBAAgB;IACrD,WAAW,EAAE,oBAAoB,CAAC;IAC1C,WAAW,EAAE,4BAA4B,CAAC;gBAE9B,GAAG,EAAE,oBAAoB,EAAE,WAAW,EAAE,sBAAsB;CAQ3E;AAED,qBAAa,sBAAuB,SAAQ,kBAAkB;IAC5D,gBAAgB,UAAS;IACzB,iBAAiB,EAAE,gBAAgB,EAAE,CAAM;IAC3C,kCAAkC,UAAS;gBAE/B,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB;IAmBhE,8BAA8B,IAAI,WAAW,CAAC,IAAI,CAAC;IAqCpD,qBAAqB,CAAC,GAAG,EAAE,WAAW,GAAG,gBAAgB;IAOzD,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAIvC,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI;IAY9C,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAgBhC,qBAAqB,IAAI,gBAAgB;IAOzC,IAAI,OAAO,IAAI,WAAW,CAMzB;IAED,IAAI,YAAY,IAAI,WAAW,EAAE,CAEhC;IAEQ,SAAS,CAChB,UAAU,EAAE,kBAAkB,EAC9B,WAAW,EAAE,WAAW,GACvB,sBAAsB;CAI1B"}
|
package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js
CHANGED
@@ -13,11 +13,11 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { DataProduct, LakehouseAccessPoint, stub_RawLambda, LakehouseTargetEnv, LAMBDA_PIPE, ParserError, GRAPH_MANAGER_EVENT, isStubbed_RawLambda, } from '@finos/legend-graph';
|
16
|
+
import { DataProduct, LakehouseAccessPoint, stub_RawLambda, LakehouseTargetEnv, LAMBDA_PIPE, ParserError, GRAPH_MANAGER_EVENT, isStubbed_RawLambda, AccessPointGroup, } from '@finos/legend-graph';
|
17
17
|
import { ElementEditorState } from '../ElementEditorState.js';
|
18
|
-
import { action, computed, makeObservable, observable } from 'mobx';
|
19
|
-
import { guaranteeType, addUniqueEntry, assertErrorThrown, LogEvent, deleteEntry, } from '@finos/legend-shared';
|
20
|
-
import { dataProduct_addAccessPoint, dataProduct_deleteAccessPoint, } from '../../../../graph-modifier/DSL_DataProduct_GraphModifierHelper.js';
|
18
|
+
import { action, computed, flow, makeObservable, observable } from 'mobx';
|
19
|
+
import { guaranteeType, addUniqueEntry, assertErrorThrown, LogEvent, deleteEntry, filterByType, } from '@finos/legend-shared';
|
20
|
+
import { dataProduct_addAccessPoint, dataProduct_addAccessPointGroup, dataProduct_deleteAccessPoint, } from '../../../../graph-modifier/DSL_DataProduct_GraphModifierHelper.js';
|
21
21
|
import { LambdaEditorState } from '@finos/legend-query-builder';
|
22
22
|
export class AccessPointState {
|
23
23
|
state;
|
@@ -60,7 +60,8 @@ export class AccessPointLambdaEditorState extends LambdaEditorState {
|
|
60
60
|
}
|
61
61
|
}
|
62
62
|
*convertLambdaObjectToGrammarString(options) {
|
63
|
-
if (!isStubbed_RawLambda(this.val.accessPoint.func)
|
63
|
+
if (!isStubbed_RawLambda(this.val.accessPoint.func) &&
|
64
|
+
!this.val.state.isConvertingTransformLambdaObjects) {
|
64
65
|
try {
|
65
66
|
const lambdas = new Map();
|
66
67
|
lambdas.set(this.lambdaId, this.val.accessPoint.func);
|
@@ -98,6 +99,7 @@ export class LakehouseAccessPointState extends AccessPointState {
|
|
98
99
|
export class DataProductEditorState extends ElementEditorState {
|
99
100
|
accessPointModal = false;
|
100
101
|
accessPointStates = [];
|
102
|
+
isConvertingTransformLambdaObjects = false;
|
101
103
|
constructor(editorStore, element) {
|
102
104
|
super(editorStore, element);
|
103
105
|
makeObservable(this, {
|
@@ -105,10 +107,43 @@ export class DataProductEditorState extends ElementEditorState {
|
|
105
107
|
accessPointModal: observable,
|
106
108
|
accessPointStates: observable,
|
107
109
|
deleteAccessPoint: observable,
|
110
|
+
isConvertingTransformLambdaObjects: observable,
|
108
111
|
setAccessPointModal: action,
|
109
112
|
addAccessPoint: action,
|
113
|
+
convertAccessPointsFuncObjects: flow,
|
110
114
|
});
|
111
|
-
this.accessPointStates = this.product.
|
115
|
+
this.accessPointStates = this.product.accessPointGroups
|
116
|
+
.map((e) => e.accessPoints)
|
117
|
+
.flat()
|
118
|
+
.map((e) => this.buildAccessPointState(e));
|
119
|
+
}
|
120
|
+
*convertAccessPointsFuncObjects() {
|
121
|
+
const lambdas = new Map();
|
122
|
+
const index = new Map();
|
123
|
+
const states = this.accessPointStates.filter(filterByType(LakehouseAccessPointState));
|
124
|
+
states.forEach((pm) => {
|
125
|
+
if (!isStubbed_RawLambda(pm.accessPoint.func)) {
|
126
|
+
lambdas.set(pm.lambdaState.lambdaId, pm.accessPoint.func);
|
127
|
+
index.set(pm.lambdaState.lambdaId, pm);
|
128
|
+
}
|
129
|
+
});
|
130
|
+
if (lambdas.size) {
|
131
|
+
this.isConvertingTransformLambdaObjects = true;
|
132
|
+
try {
|
133
|
+
const isolatedLambdas = (yield this.editorStore.graphManagerState.graphManager.lambdasToPureCode(lambdas));
|
134
|
+
isolatedLambdas.forEach((grammarText, key) => {
|
135
|
+
const purePropertyMapping = index.get(key);
|
136
|
+
purePropertyMapping?.lambdaState.setLambdaString(purePropertyMapping.lambdaState.extractLambdaString(grammarText));
|
137
|
+
});
|
138
|
+
}
|
139
|
+
catch (error) {
|
140
|
+
assertErrorThrown(error);
|
141
|
+
this.editorStore.applicationStore.logService.error(LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE), error);
|
142
|
+
}
|
143
|
+
finally {
|
144
|
+
this.isConvertingTransformLambdaObjects = false;
|
145
|
+
}
|
146
|
+
}
|
112
147
|
}
|
113
148
|
buildAccessPointState(val) {
|
114
149
|
if (val instanceof LakehouseAccessPoint) {
|
@@ -121,19 +156,30 @@ export class DataProductEditorState extends ElementEditorState {
|
|
121
156
|
}
|
122
157
|
deleteAccessPoint(val) {
|
123
158
|
const ap = val.accessPoint;
|
124
|
-
|
125
|
-
|
159
|
+
// find group
|
160
|
+
const group = this.product.accessPointGroups.find((g) => Boolean(g.accessPoints.find((v) => v === ap)));
|
161
|
+
if (group) {
|
162
|
+
dataProduct_deleteAccessPoint(group, ap);
|
163
|
+
deleteEntry(this.accessPointStates, val);
|
164
|
+
}
|
126
165
|
}
|
127
166
|
addAccessPoint(id) {
|
128
167
|
const accesspoint = new LakehouseAccessPoint(id, LakehouseTargetEnv.Snowflake, stub_RawLambda());
|
129
|
-
|
168
|
+
const group = this.product.accessPointGroups[0] ?? this.createBareGroupAndAdd();
|
169
|
+
dataProduct_addAccessPoint(group, accesspoint);
|
130
170
|
addUniqueEntry(this.accessPointStates, this.buildAccessPointState(accesspoint));
|
131
171
|
}
|
172
|
+
createBareGroupAndAdd() {
|
173
|
+
const group = new AccessPointGroup();
|
174
|
+
group.id = 'default';
|
175
|
+
dataProduct_addAccessPointGroup(this.product, group);
|
176
|
+
return group;
|
177
|
+
}
|
132
178
|
get product() {
|
133
179
|
return guaranteeType(this.element, DataProduct, 'Element inside data product editor state must be a data product');
|
134
180
|
}
|
135
181
|
get accessPoints() {
|
136
|
-
return this.product.accessPoints;
|
182
|
+
return this.product.accessPointGroups.map((e) => e.accessPoints).flat();
|
137
183
|
}
|
138
184
|
reprocess(newElement, editorStore) {
|
139
185
|
const editorState = new DataProductEditorState(editorStore, newElement);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DataProductEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,oBAAoB,EAGpB,cAAc,EACd,kBAAkB,EAClB,WAAW,EAEX,WAAW,EACX,mBAAmB,EACnB,mBAAmB,
|
1
|
+
{"version":3,"file":"DataProductEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EACX,oBAAoB,EAGpB,cAAc,EACd,kBAAkB,EAClB,WAAW,EAEX,WAAW,EACX,mBAAmB,EACnB,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C,CAAC;QACxE,OAAO,WAAW,CAAC;IACrB,CAAC;CACF"}
|
@@ -13,7 +13,9 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { type AccessPoint, type DataProduct } from '@finos/legend-graph';
|
17
|
-
export declare const dataProduct_deleteAccessPoint: (
|
18
|
-
export declare const dataProduct_addAccessPoint: (product:
|
16
|
+
import { type AccessPoint, type AccessPointGroup, type DataProduct } from '@finos/legend-graph';
|
17
|
+
export declare const dataProduct_deleteAccessPoint: (group: AccessPointGroup, accessPoint: AccessPoint) => void;
|
18
|
+
export declare const dataProduct_addAccessPoint: (product: AccessPointGroup, accessPoint: AccessPoint) => void;
|
19
|
+
export declare const dataProduct_addAccessPointGroup: (product: DataProduct, accessPointGroup: AccessPointGroup) => void;
|
20
|
+
export declare const dataProduct_deleteAccessPointGroup: (product: DataProduct, accessPointGroup: AccessPointGroup) => void;
|
19
21
|
//# sourceMappingURL=DSL_DataProduct_GraphModifierHelper.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DSL_DataProduct_GraphModifierHelper.d.ts","sourceRoot":"","sources":["../../../src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,WAAW,
|
1
|
+
{"version":3,"file":"DSL_DataProduct_GraphModifierHelper.d.ts","sourceRoot":"","sources":["../../../src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAGjB,MAAM,qBAAqB,CAAC;AAK7B,eAAO,MAAM,6BAA6B,UAChC,gBAAgB,eAAe,WAAW,SAGnD,CAAC;AAEF,eAAO,MAAM,0BAA0B,YAC3B,gBAAgB,eAAe,WAAW,SAGrD,CAAC;AAEF,eAAO,MAAM,+BAA+B,YAChC,WAAW,oBAAoB,gBAAgB,SAM1D,CAAC;AAEF,eAAO,MAAM,kCAAkC,YACnC,WAAW,oBAAoB,gBAAgB,SAG1D,CAAC"}
|
@@ -13,13 +13,19 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { observe_AccessPoint, } from '@finos/legend-graph';
|
16
|
+
import { observe_AccessPoint, observe_AccessPointGroup, } from '@finos/legend-graph';
|
17
17
|
import { addUniqueEntry, deleteEntry } from '@finos/legend-shared';
|
18
18
|
import { action } from 'mobx';
|
19
|
-
export const dataProduct_deleteAccessPoint = action((
|
20
|
-
deleteEntry(
|
19
|
+
export const dataProduct_deleteAccessPoint = action((group, accessPoint) => {
|
20
|
+
deleteEntry(group.accessPoints, accessPoint);
|
21
21
|
});
|
22
22
|
export const dataProduct_addAccessPoint = action((product, accessPoint) => {
|
23
23
|
addUniqueEntry(product.accessPoints, observe_AccessPoint(accessPoint));
|
24
24
|
});
|
25
|
+
export const dataProduct_addAccessPointGroup = action((product, accessPointGroup) => {
|
26
|
+
addUniqueEntry(product.accessPointGroups, observe_AccessPointGroup(accessPointGroup));
|
27
|
+
});
|
28
|
+
export const dataProduct_deleteAccessPointGroup = action((product, accessPointGroup) => {
|
29
|
+
deleteEntry(product.accessPointGroups, accessPointGroup);
|
30
|
+
});
|
25
31
|
//# sourceMappingURL=DSL_DataProduct_GraphModifierHelper.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DSL_DataProduct_GraphModifierHelper.js","sourceRoot":"","sources":["../../../src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"DSL_DataProduct_GraphModifierHelper.js","sourceRoot":"","sources":["../../../src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CACjD,CAAC,KAAuB,EAAE,WAAwB,EAAE,EAAE;IACpD,WAAW,CAAC,KAAK,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;AAC/C,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAC9C,CAAC,OAAyB,EAAE,WAAwB,EAAE,EAAE;IACtD,cAAc,CAAC,OAAO,CAAC,YAAY,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC;AACzE,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CACnD,CAAC,OAAoB,EAAE,gBAAkC,EAAE,EAAE;IAC3D,cAAc,CACZ,OAAO,CAAC,iBAAiB,EACzB,wBAAwB,CAAC,gBAAgB,CAAC,CAC3C,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,MAAM,CACtD,CAAC,OAAoB,EAAE,gBAAkC,EAAE,EAAE;IAC3D,WAAW,CAAC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;AAC3D,CAAC,CACF,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-application-studio",
|
3
|
-
"version": "28.18.
|
3
|
+
"version": "28.18.116",
|
4
4
|
"description": "Legend Studio application core",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -47,11 +47,11 @@
|
|
47
47
|
"dependencies": {
|
48
48
|
"@finos/legend-application": "16.0.36",
|
49
49
|
"@finos/legend-art": "7.1.93",
|
50
|
-
"@finos/legend-code-editor": "2.0.
|
51
|
-
"@finos/legend-data-cube": "0.1.
|
52
|
-
"@finos/legend-graph": "32.1.
|
53
|
-
"@finos/legend-lego": "2.0.
|
54
|
-
"@finos/legend-query-builder": "4.16.
|
50
|
+
"@finos/legend-code-editor": "2.0.63",
|
51
|
+
"@finos/legend-data-cube": "0.1.26",
|
52
|
+
"@finos/legend-graph": "32.1.21",
|
53
|
+
"@finos/legend-lego": "2.0.67",
|
54
|
+
"@finos/legend-query-builder": "4.16.27",
|
55
55
|
"@finos/legend-server-depot": "6.0.88",
|
56
56
|
"@finos/legend-server-sdlc": "5.3.56",
|
57
57
|
"@finos/legend-server-showcase": "0.2.52",
|
@@ -38,6 +38,7 @@ import {
|
|
38
38
|
import { useRef, useState, useEffect } from 'react';
|
39
39
|
import { filterByType } from '@finos/legend-shared';
|
40
40
|
import { InlineLambdaEditor } from '@finos/legend-query-builder';
|
41
|
+
import { flowResult } from 'mobx';
|
41
42
|
|
42
43
|
const NewAccessPointAccessPOint = observer(
|
43
44
|
(props: { dataProductEditorState: DataProductEditorState }) => {
|
@@ -170,7 +171,10 @@ export const LakehouseDataProductAcccessPointEditor = observer(
|
|
170
171
|
<div className="access-point-editor__entry">
|
171
172
|
<InlineLambdaEditor
|
172
173
|
className={'access-point-editor__lambda-editor'}
|
173
|
-
disabled={
|
174
|
+
disabled={
|
175
|
+
lambdaEditorState.val.state
|
176
|
+
.isConvertingTransformLambdaObjects
|
177
|
+
}
|
174
178
|
lambdaEditorState={lambdaEditorState}
|
175
179
|
forceBackdrop={Boolean(lambdaEditorState.parserError)}
|
176
180
|
/>
|
@@ -238,6 +242,13 @@ export const DataProductEditor = observer(() => {
|
|
238
242
|
const openNewModal = () => {
|
239
243
|
dataProductEditorState.setAccessPointModal(true);
|
240
244
|
};
|
245
|
+
|
246
|
+
useEffect(() => {
|
247
|
+
flowResult(dataProductEditorState.convertAccessPointsFuncObjects()).catch(
|
248
|
+
dataProductEditorState.editorStore.applicationStore.alertUnhandledError,
|
249
|
+
);
|
250
|
+
}, [dataProductEditorState]);
|
251
|
+
|
241
252
|
return (
|
242
253
|
<div className="data-product-editor">
|
243
254
|
<div className="panel">
|
@@ -269,16 +280,15 @@ export const DataProductEditor = observer(() => {
|
|
269
280
|
</PanelHeaderActions>
|
270
281
|
</PanelHeader>
|
271
282
|
<PanelContent>
|
272
|
-
{
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
))}
|
283
|
+
{accessPointStates
|
284
|
+
.filter(filterByType(LakehouseAccessPointState))
|
285
|
+
.map((apState) => (
|
286
|
+
<LakehouseDataProductAcccessPointEditor
|
287
|
+
key={apState.accessPoint.id}
|
288
|
+
isReadOnly={isReadOnly}
|
289
|
+
accessPointState={apState}
|
290
|
+
/>
|
291
|
+
))}
|
282
292
|
{!accessPointStates.length && (
|
283
293
|
<DataProductEditorSplashScreen
|
284
294
|
dataProductEditorState={dataProductEditorState}
|
package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts
CHANGED
@@ -26,10 +26,11 @@ import {
|
|
26
26
|
ParserError,
|
27
27
|
GRAPH_MANAGER_EVENT,
|
28
28
|
isStubbed_RawLambda,
|
29
|
+
AccessPointGroup,
|
29
30
|
} from '@finos/legend-graph';
|
30
31
|
import type { EditorStore } from '../../../EditorStore.js';
|
31
32
|
import { ElementEditorState } from '../ElementEditorState.js';
|
32
|
-
import { action, computed, makeObservable, observable } from 'mobx';
|
33
|
+
import { action, computed, flow, makeObservable, observable } from 'mobx';
|
33
34
|
import {
|
34
35
|
guaranteeType,
|
35
36
|
addUniqueEntry,
|
@@ -37,9 +38,11 @@ import {
|
|
37
38
|
assertErrorThrown,
|
38
39
|
LogEvent,
|
39
40
|
deleteEntry,
|
41
|
+
filterByType,
|
40
42
|
} from '@finos/legend-shared';
|
41
43
|
import {
|
42
44
|
dataProduct_addAccessPoint,
|
45
|
+
dataProduct_addAccessPointGroup,
|
43
46
|
dataProduct_deleteAccessPoint,
|
44
47
|
} from '../../../../graph-modifier/DSL_DataProduct_GraphModifierHelper.js';
|
45
48
|
import { LambdaEditorState } from '@finos/legend-query-builder';
|
@@ -99,7 +102,10 @@ export class AccessPointLambdaEditorState extends LambdaEditorState {
|
|
99
102
|
pretty?: boolean | undefined;
|
100
103
|
preserveCompilationError?: boolean | undefined;
|
101
104
|
}): GeneratorFn<void> {
|
102
|
-
if (
|
105
|
+
if (
|
106
|
+
!isStubbed_RawLambda(this.val.accessPoint.func) &&
|
107
|
+
!this.val.state.isConvertingTransformLambdaObjects
|
108
|
+
) {
|
103
109
|
try {
|
104
110
|
const lambdas = new Map<string, RawLambda>();
|
105
111
|
lambdas.set(this.lambdaId, this.val.accessPoint.func);
|
@@ -147,6 +153,7 @@ export class LakehouseAccessPointState extends AccessPointState {
|
|
147
153
|
export class DataProductEditorState extends ElementEditorState {
|
148
154
|
accessPointModal = false;
|
149
155
|
accessPointStates: AccessPointState[] = [];
|
156
|
+
isConvertingTransformLambdaObjects = false;
|
150
157
|
|
151
158
|
constructor(editorStore: EditorStore, element: PackageableElement) {
|
152
159
|
super(editorStore, element);
|
@@ -156,12 +163,52 @@ export class DataProductEditorState extends ElementEditorState {
|
|
156
163
|
accessPointModal: observable,
|
157
164
|
accessPointStates: observable,
|
158
165
|
deleteAccessPoint: observable,
|
166
|
+
isConvertingTransformLambdaObjects: observable,
|
159
167
|
setAccessPointModal: action,
|
160
168
|
addAccessPoint: action,
|
169
|
+
convertAccessPointsFuncObjects: flow,
|
161
170
|
});
|
162
|
-
this.accessPointStates = this.product.
|
163
|
-
|
171
|
+
this.accessPointStates = this.product.accessPointGroups
|
172
|
+
.map((e) => e.accessPoints)
|
173
|
+
.flat()
|
174
|
+
.map((e) => this.buildAccessPointState(e));
|
175
|
+
}
|
176
|
+
|
177
|
+
*convertAccessPointsFuncObjects(): GeneratorFn<void> {
|
178
|
+
const lambdas = new Map<string, RawLambda>();
|
179
|
+
const index = new Map<string, LakehouseAccessPointState>();
|
180
|
+
const states = this.accessPointStates.filter(
|
181
|
+
filterByType(LakehouseAccessPointState),
|
164
182
|
);
|
183
|
+
states.forEach((pm) => {
|
184
|
+
if (!isStubbed_RawLambda(pm.accessPoint.func)) {
|
185
|
+
lambdas.set(pm.lambdaState.lambdaId, pm.accessPoint.func);
|
186
|
+
index.set(pm.lambdaState.lambdaId, pm);
|
187
|
+
}
|
188
|
+
});
|
189
|
+
if (lambdas.size) {
|
190
|
+
this.isConvertingTransformLambdaObjects = true;
|
191
|
+
try {
|
192
|
+
const isolatedLambdas =
|
193
|
+
(yield this.editorStore.graphManagerState.graphManager.lambdasToPureCode(
|
194
|
+
lambdas,
|
195
|
+
)) as Map<string, string>;
|
196
|
+
isolatedLambdas.forEach((grammarText, key) => {
|
197
|
+
const purePropertyMapping = index.get(key);
|
198
|
+
purePropertyMapping?.lambdaState.setLambdaString(
|
199
|
+
purePropertyMapping.lambdaState.extractLambdaString(grammarText),
|
200
|
+
);
|
201
|
+
});
|
202
|
+
} catch (error) {
|
203
|
+
assertErrorThrown(error);
|
204
|
+
this.editorStore.applicationStore.logService.error(
|
205
|
+
LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE),
|
206
|
+
error,
|
207
|
+
);
|
208
|
+
} finally {
|
209
|
+
this.isConvertingTransformLambdaObjects = false;
|
210
|
+
}
|
211
|
+
}
|
165
212
|
}
|
166
213
|
|
167
214
|
buildAccessPointState(val: AccessPoint): AccessPointState {
|
@@ -177,8 +224,14 @@ export class DataProductEditorState extends ElementEditorState {
|
|
177
224
|
|
178
225
|
deleteAccessPoint(val: AccessPointState): void {
|
179
226
|
const ap = val.accessPoint;
|
180
|
-
|
181
|
-
|
227
|
+
// find group
|
228
|
+
const group = this.product.accessPointGroups.find((g) =>
|
229
|
+
Boolean(g.accessPoints.find((v) => v === ap)),
|
230
|
+
);
|
231
|
+
if (group) {
|
232
|
+
dataProduct_deleteAccessPoint(group, ap);
|
233
|
+
deleteEntry(this.accessPointStates, val);
|
234
|
+
}
|
182
235
|
}
|
183
236
|
|
184
237
|
addAccessPoint(id: string): void {
|
@@ -187,13 +240,23 @@ export class DataProductEditorState extends ElementEditorState {
|
|
187
240
|
LakehouseTargetEnv.Snowflake,
|
188
241
|
stub_RawLambda(),
|
189
242
|
);
|
190
|
-
|
243
|
+
|
244
|
+
const group =
|
245
|
+
this.product.accessPointGroups[0] ?? this.createBareGroupAndAdd();
|
246
|
+
dataProduct_addAccessPoint(group, accesspoint);
|
191
247
|
addUniqueEntry(
|
192
248
|
this.accessPointStates,
|
193
249
|
this.buildAccessPointState(accesspoint),
|
194
250
|
);
|
195
251
|
}
|
196
252
|
|
253
|
+
createBareGroupAndAdd(): AccessPointGroup {
|
254
|
+
const group = new AccessPointGroup();
|
255
|
+
group.id = 'default';
|
256
|
+
dataProduct_addAccessPointGroup(this.product, group);
|
257
|
+
return group;
|
258
|
+
}
|
259
|
+
|
197
260
|
get product(): DataProduct {
|
198
261
|
return guaranteeType(
|
199
262
|
this.element,
|
@@ -203,7 +266,7 @@ export class DataProductEditorState extends ElementEditorState {
|
|
203
266
|
}
|
204
267
|
|
205
268
|
get accessPoints(): AccessPoint[] {
|
206
|
-
return this.product.accessPoints;
|
269
|
+
return this.product.accessPointGroups.map((e) => e.accessPoints).flat();
|
207
270
|
}
|
208
271
|
|
209
272
|
override reprocess(
|
@@ -16,21 +16,38 @@
|
|
16
16
|
|
17
17
|
import {
|
18
18
|
type AccessPoint,
|
19
|
+
type AccessPointGroup,
|
19
20
|
type DataProduct,
|
20
21
|
observe_AccessPoint,
|
22
|
+
observe_AccessPointGroup,
|
21
23
|
} from '@finos/legend-graph';
|
22
24
|
import { addUniqueEntry, deleteEntry } from '@finos/legend-shared';
|
23
25
|
|
24
26
|
import { action } from 'mobx';
|
25
27
|
|
26
28
|
export const dataProduct_deleteAccessPoint = action(
|
27
|
-
(
|
28
|
-
deleteEntry(
|
29
|
+
(group: AccessPointGroup, accessPoint: AccessPoint) => {
|
30
|
+
deleteEntry(group.accessPoints, accessPoint);
|
29
31
|
},
|
30
32
|
);
|
31
33
|
|
32
34
|
export const dataProduct_addAccessPoint = action(
|
33
|
-
(product:
|
35
|
+
(product: AccessPointGroup, accessPoint: AccessPoint) => {
|
34
36
|
addUniqueEntry(product.accessPoints, observe_AccessPoint(accessPoint));
|
35
37
|
},
|
36
38
|
);
|
39
|
+
|
40
|
+
export const dataProduct_addAccessPointGroup = action(
|
41
|
+
(product: DataProduct, accessPointGroup: AccessPointGroup) => {
|
42
|
+
addUniqueEntry(
|
43
|
+
product.accessPointGroups,
|
44
|
+
observe_AccessPointGroup(accessPointGroup),
|
45
|
+
);
|
46
|
+
},
|
47
|
+
);
|
48
|
+
|
49
|
+
export const dataProduct_deleteAccessPointGroup = action(
|
50
|
+
(product: DataProduct, accessPointGroup: AccessPointGroup) => {
|
51
|
+
deleteEntry(product.accessPointGroups, accessPointGroup);
|
52
|
+
},
|
53
|
+
);
|