@finos/legend-application-studio 28.18.115 → 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/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +2 -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 +21 -7
- 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/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +26 -7
- package/src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts +20 -3
package/lib/index.css
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';
|
@@ -49,6 +49,7 @@ export declare class DataProductEditorState extends ElementEditorState {
|
|
49
49
|
setAccessPointModal(val: boolean): void;
|
50
50
|
deleteAccessPoint(val: AccessPointState): void;
|
51
51
|
addAccessPoint(id: string): void;
|
52
|
+
createBareGroupAndAdd(): AccessPointGroup;
|
52
53
|
get product(): DataProduct;
|
53
54
|
get accessPoints(): AccessPoint[];
|
54
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
18
|
import { action, computed, flow, makeObservable, observable } from 'mobx';
|
19
19
|
import { guaranteeType, addUniqueEntry, assertErrorThrown, LogEvent, deleteEntry, filterByType, } from '@finos/legend-shared';
|
20
|
-
import { dataProduct_addAccessPoint, dataProduct_deleteAccessPoint, } from '../../../../graph-modifier/DSL_DataProduct_GraphModifierHelper.js';
|
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;
|
@@ -112,7 +112,10 @@ export class DataProductEditorState extends ElementEditorState {
|
|
112
112
|
addAccessPoint: action,
|
113
113
|
convertAccessPointsFuncObjects: flow,
|
114
114
|
});
|
115
|
-
this.accessPointStates = this.product.
|
115
|
+
this.accessPointStates = this.product.accessPointGroups
|
116
|
+
.map((e) => e.accessPoints)
|
117
|
+
.flat()
|
118
|
+
.map((e) => this.buildAccessPointState(e));
|
116
119
|
}
|
117
120
|
*convertAccessPointsFuncObjects() {
|
118
121
|
const lambdas = new Map();
|
@@ -153,19 +156,30 @@ export class DataProductEditorState extends ElementEditorState {
|
|
153
156
|
}
|
154
157
|
deleteAccessPoint(val) {
|
155
158
|
const ap = val.accessPoint;
|
156
|
-
|
157
|
-
|
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
|
+
}
|
158
165
|
}
|
159
166
|
addAccessPoint(id) {
|
160
167
|
const accesspoint = new LakehouseAccessPoint(id, LakehouseTargetEnv.Snowflake, stub_RawLambda());
|
161
|
-
|
168
|
+
const group = this.product.accessPointGroups[0] ?? this.createBareGroupAndAdd();
|
169
|
+
dataProduct_addAccessPoint(group, accesspoint);
|
162
170
|
addUniqueEntry(this.accessPointStates, this.buildAccessPointState(accesspoint));
|
163
171
|
}
|
172
|
+
createBareGroupAndAdd() {
|
173
|
+
const group = new AccessPointGroup();
|
174
|
+
group.id = 'default';
|
175
|
+
dataProduct_addAccessPointGroup(this.product, group);
|
176
|
+
return group;
|
177
|
+
}
|
164
178
|
get product() {
|
165
179
|
return guaranteeType(this.element, DataProduct, 'Element inside data product editor state must be a data product');
|
166
180
|
}
|
167
181
|
get accessPoints() {
|
168
|
-
return this.product.accessPoints;
|
182
|
+
return this.product.accessPointGroups.map((e) => e.accessPoints).flat();
|
169
183
|
}
|
170
184
|
reprocess(newElement, editorStore) {
|
171
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,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,UAA8B,EAC9B,WAAwB;QAExB,MAAM,WAAW,GAAG,IAAI,sBAAsB,CAAC,WAAW,EAAE,UAAU,CAAC,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",
|
package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts
CHANGED
@@ -26,6 +26,7 @@ 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';
|
@@ -41,6 +42,7 @@ import {
|
|
41
42
|
} from '@finos/legend-shared';
|
42
43
|
import {
|
43
44
|
dataProduct_addAccessPoint,
|
45
|
+
dataProduct_addAccessPointGroup,
|
44
46
|
dataProduct_deleteAccessPoint,
|
45
47
|
} from '../../../../graph-modifier/DSL_DataProduct_GraphModifierHelper.js';
|
46
48
|
import { LambdaEditorState } from '@finos/legend-query-builder';
|
@@ -166,9 +168,10 @@ export class DataProductEditorState extends ElementEditorState {
|
|
166
168
|
addAccessPoint: action,
|
167
169
|
convertAccessPointsFuncObjects: flow,
|
168
170
|
});
|
169
|
-
this.accessPointStates = this.product.
|
170
|
-
|
171
|
-
|
171
|
+
this.accessPointStates = this.product.accessPointGroups
|
172
|
+
.map((e) => e.accessPoints)
|
173
|
+
.flat()
|
174
|
+
.map((e) => this.buildAccessPointState(e));
|
172
175
|
}
|
173
176
|
|
174
177
|
*convertAccessPointsFuncObjects(): GeneratorFn<void> {
|
@@ -221,8 +224,14 @@ export class DataProductEditorState extends ElementEditorState {
|
|
221
224
|
|
222
225
|
deleteAccessPoint(val: AccessPointState): void {
|
223
226
|
const ap = val.accessPoint;
|
224
|
-
|
225
|
-
|
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
|
+
}
|
226
235
|
}
|
227
236
|
|
228
237
|
addAccessPoint(id: string): void {
|
@@ -231,13 +240,23 @@ export class DataProductEditorState extends ElementEditorState {
|
|
231
240
|
LakehouseTargetEnv.Snowflake,
|
232
241
|
stub_RawLambda(),
|
233
242
|
);
|
234
|
-
|
243
|
+
|
244
|
+
const group =
|
245
|
+
this.product.accessPointGroups[0] ?? this.createBareGroupAndAdd();
|
246
|
+
dataProduct_addAccessPoint(group, accesspoint);
|
235
247
|
addUniqueEntry(
|
236
248
|
this.accessPointStates,
|
237
249
|
this.buildAccessPointState(accesspoint),
|
238
250
|
);
|
239
251
|
}
|
240
252
|
|
253
|
+
createBareGroupAndAdd(): AccessPointGroup {
|
254
|
+
const group = new AccessPointGroup();
|
255
|
+
group.id = 'default';
|
256
|
+
dataProduct_addAccessPointGroup(this.product, group);
|
257
|
+
return group;
|
258
|
+
}
|
259
|
+
|
241
260
|
get product(): DataProduct {
|
242
261
|
return guaranteeType(
|
243
262
|
this.element,
|
@@ -247,7 +266,7 @@ export class DataProductEditorState extends ElementEditorState {
|
|
247
266
|
}
|
248
267
|
|
249
268
|
get accessPoints(): AccessPoint[] {
|
250
|
-
return this.product.accessPoints;
|
269
|
+
return this.product.accessPointGroups.map((e) => e.accessPoints).flat();
|
251
270
|
}
|
252
271
|
|
253
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
|
+
);
|