@finos/legend-extension-dsl-data-space 0.2.0 → 1.0.4
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/CHANGELOG.md +20 -0
- package/lib/DSLDataSpace_Extension.d.ts +0 -10
- package/lib/DSLDataSpace_Extension.d.ts.map +1 -1
- package/lib/DSLDataSpace_Extension.js +0 -24
- package/lib/DSLDataSpace_Extension.js.map +1 -1
- package/lib/components/DataSpaceViewer.js +17 -17
- package/lib/components/DataSpaceViewer.js.map +1 -1
- package/lib/components/query/{DSLDataSpace_QueryPlugin.d.ts → DSLDataSpace_LegendQueryPlugin.d.ts} +4 -5
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.d.ts.map +1 -0
- package/lib/components/query/{DSLDataSpace_QueryPlugin.js → DSLDataSpace_LegendQueryPlugin.js} +4 -7
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.js.map +1 -0
- package/lib/components/query/DataSpaceQuerySetup.js +7 -7
- package/lib/components/query/DataSpaceQuerySetup.js.map +1 -1
- package/lib/components/studio/{DSLDataSpace_StudioPlugin.d.ts → DSLDataSpace_LegendStudioPlugin.d.ts} +4 -6
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.d.ts.map +1 -0
- package/lib/components/studio/{DSLDataSpace_StudioPlugin.js → DSLDataSpace_LegendStudioPlugin.js} +4 -22
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.js.map +1 -0
- package/lib/graph/DSLDataSpace_PureGraphPlugin.d.ts +1 -2
- package/lib/graph/DSLDataSpace_PureGraphPlugin.d.ts.map +1 -1
- package/lib/graph/DSLDataSpace_PureGraphPlugin.js +0 -3
- package/lib/graph/DSLDataSpace_PureGraphPlugin.js.map +1 -1
- package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.d.ts +1 -2
- package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.d.ts.map +1 -1
- package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.js +0 -3
- package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts +2 -3
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js +5 -8
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts +2 -0
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts.map +1 -1
- package/lib/stores/query/DataSpaceQuerySetupState.js +15 -1
- package/lib/stores/query/DataSpaceQuerySetupState.js.map +1 -1
- package/package.json +19 -20
- package/src/DSLDataSpace_Extension.ts +0 -30
- package/src/components/query/{DSLDataSpace_QueryPlugin.tsx → DSLDataSpace_LegendQueryPlugin.tsx} +2 -7
- package/src/components/query/DataSpaceQuerySetup.tsx +2 -2
- package/src/components/studio/{DSLDataSpace_StudioPlugin.tsx → DSLDataSpace_LegendStudioPlugin.tsx} +5 -27
- package/src/graph/DSLDataSpace_PureGraphPlugin.ts +1 -8
- package/src/graphManager/DSLDataSpace_PureGraphManagerPlugin.ts +0 -5
- package/src/index.ts +12 -0
- package/src/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.ts +5 -10
- package/src/stores/query/DataSpaceQuerySetupState.ts +31 -0
- package/tsconfig.json +2 -7
- package/lib/components/query/DSLDataSpace_QueryPlugin.d.ts.map +0 -1
- package/lib/components/query/DSLDataSpace_QueryPlugin.js.map +0 -1
- package/lib/components/studio/DSLDataSpace_StudioPlugin.d.ts.map +0 -1
- package/lib/components/studio/DSLDataSpace_StudioPlugin.js.map +0 -1
- package/lib/components/studio/EnterpriseModelExplorer.d.ts +0 -21
- package/lib/components/studio/EnterpriseModelExplorer.d.ts.map +0 -1
- package/lib/components/studio/EnterpriseModelExplorer.js +0 -70
- package/lib/components/studio/EnterpriseModelExplorer.js.map +0 -1
- package/lib/components/studio/EnterpriseModelExplorerStoreProvider.d.ts +0 -21
- package/lib/components/studio/EnterpriseModelExplorerStoreProvider.d.ts.map +0 -1
- package/lib/components/studio/EnterpriseModelExplorerStoreProvider.js +0 -35
- package/lib/components/studio/EnterpriseModelExplorerStoreProvider.js.map +0 -1
- package/lib/components/studio/TaxonomyTree.d.ts +0 -23
- package/lib/components/studio/TaxonomyTree.d.ts.map +0 -1
- package/lib/components/studio/TaxonomyTree.js +0 -78
- package/lib/components/studio/TaxonomyTree.js.map +0 -1
- package/lib/components/studio/TaxonomyViewer.d.ts +0 -22
- package/lib/components/studio/TaxonomyViewer.d.ts.map +0 -1
- package/lib/components/studio/TaxonomyViewer.js +0 -59
- package/lib/components/studio/TaxonomyViewer.js.map +0 -1
- package/lib/stores/studio/EnterpriseModelExplorerStore.d.ts +0 -93
- package/lib/stores/studio/EnterpriseModelExplorerStore.d.ts.map +0 -1
- package/lib/stores/studio/EnterpriseModelExplorerStore.js +0 -300
- package/lib/stores/studio/EnterpriseModelExplorerStore.js.map +0 -1
- package/src/components/studio/EnterpriseModelExplorer.tsx +0 -229
- package/src/components/studio/EnterpriseModelExplorerStoreProvider.tsx +0 -61
- package/src/components/studio/TaxonomyTree.tsx +0 -179
- package/src/components/studio/TaxonomyViewer.tsx +0 -187
- package/src/stores/studio/EnterpriseModelExplorerStore.tsx +0 -514
|
@@ -1,93 +0,0 @@
|
|
|
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
|
-
import type { ApplicationStore } from '@finos/legend-application';
|
|
17
|
-
import type { TreeData, TreeNodeData } from '@finos/legend-art';
|
|
18
|
-
import { PanelDisplayState } from '@finos/legend-art';
|
|
19
|
-
import type { GraphManagerState } from '@finos/legend-graph';
|
|
20
|
-
import type { DepotServerClient } from '@finos/legend-server-depot';
|
|
21
|
-
import type { GeneratorFn } from '@finos/legend-shared';
|
|
22
|
-
import { ActionState } from '@finos/legend-shared';
|
|
23
|
-
import type { StudioConfig, StudioPluginManager } from '@finos/legend-studio';
|
|
24
|
-
import { DataSpaceViewerState } from '../DataSpaceViewerState';
|
|
25
|
-
export declare enum ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN {
|
|
26
|
-
TAXONOMY_PATH = "taxonomyPath",
|
|
27
|
-
GAV = "gav",
|
|
28
|
-
DATA_SPACE_PATH = "dataSpacePath"
|
|
29
|
-
}
|
|
30
|
-
export declare const ENTERPRISE_MODEL_EXPLORER_ROUTE_PATTERN: Readonly<{
|
|
31
|
-
ENTERPRISE_VIEW: string;
|
|
32
|
-
ENTERPRISE_VIEW_BY_TAXONOMY_NODE: string;
|
|
33
|
-
ENTERPRISE_VIEW_BY_DATA_SPACE: string;
|
|
34
|
-
}>;
|
|
35
|
-
export interface EnterpriseModelExplorerPathParams {
|
|
36
|
-
[ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN.TAXONOMY_PATH]?: string;
|
|
37
|
-
[ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN.GAV]?: string;
|
|
38
|
-
[ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN.DATA_SPACE_PATH]?: string;
|
|
39
|
-
}
|
|
40
|
-
export declare const generateTaxonomyNodeRoute: (taxonomyNodePath: string) => string;
|
|
41
|
-
export declare const generateDataSpaceRoute: (taxonomyNodePath: string, GAVCoordinates: string, dataSpacePath: string) => string;
|
|
42
|
-
export declare class RawDataSpace {
|
|
43
|
-
groupId: string;
|
|
44
|
-
artifactId: string;
|
|
45
|
-
versionId: string;
|
|
46
|
-
path: string;
|
|
47
|
-
json: Record<PropertyKey, unknown>;
|
|
48
|
-
taxonomyNodePaths: string[];
|
|
49
|
-
taxonomyNodes: TaxonomyTreeNodeData[];
|
|
50
|
-
constructor(groupId: string, artifactId: string, versionId: string, path: string, json: Record<PropertyKey, unknown>);
|
|
51
|
-
get id(): string;
|
|
52
|
-
}
|
|
53
|
-
export declare class TaxonomyTreeNodeData implements TreeNodeData {
|
|
54
|
-
isSelected?: boolean | undefined;
|
|
55
|
-
isOpen?: boolean | undefined;
|
|
56
|
-
id: string;
|
|
57
|
-
label: string;
|
|
58
|
-
childrenIds: string[];
|
|
59
|
-
rawDataSpaces: RawDataSpace[];
|
|
60
|
-
constructor(id: string, label: string);
|
|
61
|
-
}
|
|
62
|
-
export declare class TaxonomyViewerState {
|
|
63
|
-
enterpriseModelExplorerStore: EnterpriseModelExplorerStore;
|
|
64
|
-
taxonomyNode: TaxonomyTreeNodeData;
|
|
65
|
-
dataSpaceViewerState?: DataSpaceViewerState | undefined;
|
|
66
|
-
currentDataSpace?: RawDataSpace | undefined;
|
|
67
|
-
initDataSpaceViewerState: ActionState;
|
|
68
|
-
constructor(enterpriseModelExplorerStore: EnterpriseModelExplorerStore, taxonomyNode: TaxonomyTreeNodeData);
|
|
69
|
-
clearDataSpaceViewerState(): void;
|
|
70
|
-
initializeDataSpaceViewer(rawDataSpace: RawDataSpace): GeneratorFn<void>;
|
|
71
|
-
}
|
|
72
|
-
export declare class EnterpriseModelExplorerStore {
|
|
73
|
-
applicationStore: ApplicationStore<StudioConfig>;
|
|
74
|
-
depotServerClient: DepotServerClient;
|
|
75
|
-
graphManagerState: GraphManagerState;
|
|
76
|
-
pluginManager: StudioPluginManager;
|
|
77
|
-
sideBarDisplayState: PanelDisplayState;
|
|
78
|
-
isInExpandedMode: boolean;
|
|
79
|
-
initState: ActionState;
|
|
80
|
-
dataSpaceIndex: Map<string, RawDataSpace>;
|
|
81
|
-
treeData?: TreeData<TaxonomyTreeNodeData> | undefined;
|
|
82
|
-
initialDataSpaceId?: string | undefined;
|
|
83
|
-
currentTaxonomyViewerState?: TaxonomyViewerState | undefined;
|
|
84
|
-
constructor(applicationStore: ApplicationStore<StudioConfig>, depotServerClient: DepotServerClient, graphManagerState: GraphManagerState, pluginManager: StudioPluginManager);
|
|
85
|
-
setExpandedMode(val: boolean): void;
|
|
86
|
-
setTreeData(val: TreeData<TaxonomyTreeNodeData>): void;
|
|
87
|
-
setCurrentTaxonomyViewerState(val: TaxonomyViewerState | undefined): void;
|
|
88
|
-
internalizeDataSpacePath(params: EnterpriseModelExplorerPathParams): void;
|
|
89
|
-
private processTaxonomyTreeNodeData;
|
|
90
|
-
private initializeTaxonomyTreeData;
|
|
91
|
-
initialize(params: EnterpriseModelExplorerPathParams): GeneratorFn<void>;
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=EnterpriseModelExplorerStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnterpriseModelExplorerStore.d.ts","sourceRoot":"","sources":["../../../src/stores/studio/EnterpriseModelExplorerStore.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;A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,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,EACpC,aAAa,EAAE,mBAAmB;IAiBpC,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAInC,WAAW,CAAC,GAAG,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAAG,IAAI;IAItD,6BAA6B,CAAC,GAAG,EAAE,mBAAmB,GAAG,SAAS,GAAG,IAAI;IAIzE,wBAAwB,CAAC,MAAM,EAAE,iCAAiC,GAAG,IAAI;IAUzE,OAAO,CAAC,2BAA2B;IAwCnC,OAAO,CAAC,0BAA0B;IAmBjC,UAAU,CAAC,MAAM,EAAE,iCAAiC,GAAG,WAAW,CAAC,IAAI,CAAC;CA8G1E"}
|
|
@@ -1,300 +0,0 @@
|
|
|
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
|
-
import { TAB_SIZE } from '@finos/legend-application';
|
|
17
|
-
import { PanelDisplayState } from '@finos/legend-art';
|
|
18
|
-
import { LATEST_VERSION_ALIAS, ProjectVersionEntities, ProjectData, generateGAVCoordinates, } from '@finos/legend-server-depot';
|
|
19
|
-
import { AssertionError, assertNonNullable, addUniqueEntry, guaranteeNonNullable, ActionState, assertErrorThrown, } from '@finos/legend-shared';
|
|
20
|
-
import { makeObservable, flow, observable, action, flowResult } from 'mobx';
|
|
21
|
-
import { generatePath } from 'react-router';
|
|
22
|
-
import { DATA_SPACE_ELEMENT_CLASSIFIER_PATH, extractDataSpaceTaxonomyNodePaths, getResolvedDataSpace, } from '../../models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin';
|
|
23
|
-
import { DataSpaceViewerState } from '../DataSpaceViewerState';
|
|
24
|
-
export var ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN;
|
|
25
|
-
(function (ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN) {
|
|
26
|
-
ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN["TAXONOMY_PATH"] = "taxonomyPath";
|
|
27
|
-
ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN["GAV"] = "gav";
|
|
28
|
-
ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN["DATA_SPACE_PATH"] = "dataSpacePath";
|
|
29
|
-
})(ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN || (ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN = {}));
|
|
30
|
-
export const ENTERPRISE_MODEL_EXPLORER_ROUTE_PATTERN = Object.freeze({
|
|
31
|
-
ENTERPRISE_VIEW: `/enterprise/`,
|
|
32
|
-
ENTERPRISE_VIEW_BY_TAXONOMY_NODE: `/enterprise/:${ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN.TAXONOMY_PATH}`,
|
|
33
|
-
ENTERPRISE_VIEW_BY_DATA_SPACE: `/enterprise/:${ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN.TAXONOMY_PATH}/:${ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN.GAV}/:${ENTERPRISE_MODEL_EXPLORER_PARAM_TOKEN.DATA_SPACE_PATH}`,
|
|
34
|
-
});
|
|
35
|
-
export const generateTaxonomyNodeRoute = (taxonomyNodePath) => generatePath(ENTERPRISE_MODEL_EXPLORER_ROUTE_PATTERN.ENTERPRISE_VIEW_BY_TAXONOMY_NODE, {
|
|
36
|
-
taxonomyPath: taxonomyNodePath,
|
|
37
|
-
});
|
|
38
|
-
export const generateDataSpaceRoute = (taxonomyNodePath, GAVCoordinates, dataSpacePath) => generatePath(ENTERPRISE_MODEL_EXPLORER_ROUTE_PATTERN.ENTERPRISE_VIEW_BY_DATA_SPACE, {
|
|
39
|
-
taxonomyPath: taxonomyNodePath,
|
|
40
|
-
gav: GAVCoordinates,
|
|
41
|
-
dataSpacePath,
|
|
42
|
-
});
|
|
43
|
-
const DATA_SPACE_ID_DELIMITER = '@';
|
|
44
|
-
const TAXONOMY_NODE_PATH_DELIMITER = '::';
|
|
45
|
-
export class RawDataSpace {
|
|
46
|
-
groupId;
|
|
47
|
-
artifactId;
|
|
48
|
-
versionId;
|
|
49
|
-
path;
|
|
50
|
-
json;
|
|
51
|
-
taxonomyNodePaths = [];
|
|
52
|
-
taxonomyNodes = [];
|
|
53
|
-
constructor(groupId, artifactId, versionId, path, json) {
|
|
54
|
-
this.groupId = groupId;
|
|
55
|
-
this.artifactId = artifactId;
|
|
56
|
-
this.versionId = versionId;
|
|
57
|
-
this.path = path;
|
|
58
|
-
this.json = json;
|
|
59
|
-
this.taxonomyNodePaths = extractDataSpaceTaxonomyNodePaths(this.json);
|
|
60
|
-
}
|
|
61
|
-
get id() {
|
|
62
|
-
return `${generateGAVCoordinates(this.groupId, this.artifactId, this.versionId)}${DATA_SPACE_ID_DELIMITER}${this.path}`;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
export class TaxonomyTreeNodeData {
|
|
66
|
-
isSelected;
|
|
67
|
-
isOpen;
|
|
68
|
-
id;
|
|
69
|
-
label;
|
|
70
|
-
childrenIds = [];
|
|
71
|
-
rawDataSpaces = [];
|
|
72
|
-
constructor(id, label) {
|
|
73
|
-
this.id = id;
|
|
74
|
-
this.label = label;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
export class TaxonomyViewerState {
|
|
78
|
-
enterpriseModelExplorerStore;
|
|
79
|
-
taxonomyNode;
|
|
80
|
-
dataSpaceViewerState;
|
|
81
|
-
currentDataSpace;
|
|
82
|
-
initDataSpaceViewerState = ActionState.create();
|
|
83
|
-
constructor(enterpriseModelExplorerStore, taxonomyNode) {
|
|
84
|
-
makeObservable(this, {
|
|
85
|
-
dataSpaceViewerState: observable,
|
|
86
|
-
currentDataSpace: observable,
|
|
87
|
-
clearDataSpaceViewerState: action,
|
|
88
|
-
initializeDataSpaceViewer: flow,
|
|
89
|
-
});
|
|
90
|
-
this.enterpriseModelExplorerStore = enterpriseModelExplorerStore;
|
|
91
|
-
this.taxonomyNode = taxonomyNode;
|
|
92
|
-
}
|
|
93
|
-
clearDataSpaceViewerState() {
|
|
94
|
-
this.dataSpaceViewerState = undefined;
|
|
95
|
-
this.currentDataSpace = undefined;
|
|
96
|
-
}
|
|
97
|
-
*initializeDataSpaceViewer(rawDataSpace) {
|
|
98
|
-
try {
|
|
99
|
-
this.initDataSpaceViewerState.inProgress();
|
|
100
|
-
const groupId = guaranteeNonNullable(rawDataSpace.json.groupId, `Data space 'groupId' field is missing`);
|
|
101
|
-
const artifactId = guaranteeNonNullable(rawDataSpace.json.artifactId, `Data space 'artifactId' field is missing`);
|
|
102
|
-
const versionId = guaranteeNonNullable(rawDataSpace.json.versionId, `Data space 'versionId' field is missing`);
|
|
103
|
-
// build graph
|
|
104
|
-
const projectData = ProjectData.serialization.fromJson((yield flowResult(this.enterpriseModelExplorerStore.depotServerClient.getProject(groupId, artifactId))));
|
|
105
|
-
const resolvedVersionId = versionId === LATEST_VERSION_ALIAS
|
|
106
|
-
? projectData.latestVersion
|
|
107
|
-
: versionId;
|
|
108
|
-
const entities = (yield this.enterpriseModelExplorerStore.depotServerClient.getVersionEntities(groupId, artifactId, resolvedVersionId));
|
|
109
|
-
this.enterpriseModelExplorerStore.graphManagerState.resetGraph();
|
|
110
|
-
// build dependencies
|
|
111
|
-
const dependencyManager = this.enterpriseModelExplorerStore.graphManagerState.createEmptyDependencyManager();
|
|
112
|
-
const dependencyEntitiesMap = new Map();
|
|
113
|
-
(yield this.enterpriseModelExplorerStore.depotServerClient.getDependencyEntities(groupId, artifactId, resolvedVersionId, true, false))
|
|
114
|
-
.map((e) => ProjectVersionEntities.serialization.fromJson(e))
|
|
115
|
-
.forEach((dependencyInfo) => {
|
|
116
|
-
dependencyEntitiesMap.set(dependencyInfo.id, dependencyInfo.entities);
|
|
117
|
-
});
|
|
118
|
-
yield flowResult(this.enterpriseModelExplorerStore.graphManagerState.graphManager.buildDependencies(this.enterpriseModelExplorerStore.graphManagerState.coreModel, this.enterpriseModelExplorerStore.graphManagerState.systemModel, dependencyManager, dependencyEntitiesMap));
|
|
119
|
-
this.enterpriseModelExplorerStore.graphManagerState.graph.setDependencyManager(dependencyManager);
|
|
120
|
-
yield flowResult(this.enterpriseModelExplorerStore.graphManagerState.graphManager.buildGraph(this.enterpriseModelExplorerStore.graphManagerState.graph, entities));
|
|
121
|
-
// resolve data space
|
|
122
|
-
const resolvedDataSpace = getResolvedDataSpace(rawDataSpace.json, this.enterpriseModelExplorerStore.graphManagerState.graph);
|
|
123
|
-
const dataSpaceViewerState = new DataSpaceViewerState(this.enterpriseModelExplorerStore.graphManagerState, rawDataSpace.groupId, rawDataSpace.artifactId, rawDataSpace.versionId, resolvedDataSpace, {
|
|
124
|
-
viewProject: (groupId, artifactId, versionId, entityPath) => {
|
|
125
|
-
this.enterpriseModelExplorerStore.applicationStore.navigator.openNewWindow(this.enterpriseModelExplorerStore.applicationStore.navigator.generateLocation(`/view/${generateGAVCoordinates(groupId, artifactId, versionId)}${entityPath ? `/entity/${entityPath}` : ''}`));
|
|
126
|
-
},
|
|
127
|
-
});
|
|
128
|
-
this.dataSpaceViewerState = dataSpaceViewerState;
|
|
129
|
-
this.currentDataSpace = rawDataSpace;
|
|
130
|
-
}
|
|
131
|
-
catch (error) {
|
|
132
|
-
assertErrorThrown(error);
|
|
133
|
-
this.enterpriseModelExplorerStore.applicationStore.notifyError(error);
|
|
134
|
-
this.clearDataSpaceViewerState();
|
|
135
|
-
}
|
|
136
|
-
finally {
|
|
137
|
-
this.initDataSpaceViewerState.complete();
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
export class EnterpriseModelExplorerStore {
|
|
142
|
-
applicationStore;
|
|
143
|
-
depotServerClient;
|
|
144
|
-
graphManagerState;
|
|
145
|
-
pluginManager;
|
|
146
|
-
sideBarDisplayState = new PanelDisplayState({
|
|
147
|
-
initial: 300,
|
|
148
|
-
default: 300,
|
|
149
|
-
snap: 150,
|
|
150
|
-
});
|
|
151
|
-
isInExpandedMode = true;
|
|
152
|
-
initState = ActionState.create();
|
|
153
|
-
dataSpaceIndex = new Map();
|
|
154
|
-
treeData;
|
|
155
|
-
initialDataSpaceId;
|
|
156
|
-
currentTaxonomyViewerState;
|
|
157
|
-
constructor(applicationStore, depotServerClient, graphManagerState, pluginManager) {
|
|
158
|
-
makeObservable(this, {
|
|
159
|
-
isInExpandedMode: observable,
|
|
160
|
-
treeData: observable.ref,
|
|
161
|
-
currentTaxonomyViewerState: observable,
|
|
162
|
-
initialize: flow,
|
|
163
|
-
setExpandedMode: action,
|
|
164
|
-
setTreeData: action,
|
|
165
|
-
setCurrentTaxonomyViewerState: action,
|
|
166
|
-
});
|
|
167
|
-
this.applicationStore = applicationStore;
|
|
168
|
-
this.depotServerClient = depotServerClient;
|
|
169
|
-
this.graphManagerState = graphManagerState;
|
|
170
|
-
this.pluginManager = pluginManager;
|
|
171
|
-
}
|
|
172
|
-
setExpandedMode(val) {
|
|
173
|
-
this.isInExpandedMode = val;
|
|
174
|
-
}
|
|
175
|
-
setTreeData(val) {
|
|
176
|
-
this.treeData = val;
|
|
177
|
-
}
|
|
178
|
-
setCurrentTaxonomyViewerState(val) {
|
|
179
|
-
this.currentTaxonomyViewerState = val;
|
|
180
|
-
}
|
|
181
|
-
internalizeDataSpacePath(params) {
|
|
182
|
-
const { gav, dataSpacePath } = params;
|
|
183
|
-
if (gav && dataSpacePath) {
|
|
184
|
-
this.initialDataSpaceId = `${gav}${DATA_SPACE_ID_DELIMITER}${dataSpacePath}`;
|
|
185
|
-
this.applicationStore.navigator.goTo(ENTERPRISE_MODEL_EXPLORER_ROUTE_PATTERN.ENTERPRISE_VIEW);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
processTaxonomyTreeNodeData(treeData, rawDataSpace, taxonomyPath, parentNode) {
|
|
189
|
-
const idx = taxonomyPath.indexOf(TAXONOMY_NODE_PATH_DELIMITER);
|
|
190
|
-
let taxonomy;
|
|
191
|
-
let remainingTaxonomyNodePath = undefined;
|
|
192
|
-
if (idx === -1) {
|
|
193
|
-
taxonomy = taxonomyPath;
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
taxonomy = taxonomyPath.substring(0, idx);
|
|
197
|
-
remainingTaxonomyNodePath = taxonomyPath.substring(idx + TAXONOMY_NODE_PATH_DELIMITER.length);
|
|
198
|
-
}
|
|
199
|
-
const nodeId = parentNode
|
|
200
|
-
? `${parentNode.id}${TAXONOMY_NODE_PATH_DELIMITER}${taxonomy}`
|
|
201
|
-
: taxonomy;
|
|
202
|
-
if (!treeData.nodes.has(nodeId)) {
|
|
203
|
-
const newNode = new TaxonomyTreeNodeData(nodeId, taxonomy);
|
|
204
|
-
treeData.nodes.set(nodeId, newNode);
|
|
205
|
-
}
|
|
206
|
-
const node = guaranteeNonNullable(treeData.nodes.get(nodeId));
|
|
207
|
-
addUniqueEntry(node.rawDataSpaces, rawDataSpace);
|
|
208
|
-
addUniqueEntry(rawDataSpace.taxonomyNodes, node);
|
|
209
|
-
if (remainingTaxonomyNodePath) {
|
|
210
|
-
const childNode = this.processTaxonomyTreeNodeData(treeData, rawDataSpace, remainingTaxonomyNodePath, node);
|
|
211
|
-
addUniqueEntry(node.childrenIds, childNode.id);
|
|
212
|
-
}
|
|
213
|
-
return node;
|
|
214
|
-
}
|
|
215
|
-
initializeTaxonomyTreeData() {
|
|
216
|
-
const rootIds = [];
|
|
217
|
-
const nodes = new Map();
|
|
218
|
-
const treeData = { rootIds, nodes };
|
|
219
|
-
Array.from(this.dataSpaceIndex.values()).forEach((rawDataSpace) => {
|
|
220
|
-
const taxonomyNodes = rawDataSpace.taxonomyNodePaths;
|
|
221
|
-
taxonomyNodes.forEach((taxonomyPath) => {
|
|
222
|
-
const rootNode = this.processTaxonomyTreeNodeData(treeData, rawDataSpace, taxonomyPath, undefined);
|
|
223
|
-
addUniqueEntry(rootIds, rootNode.id);
|
|
224
|
-
});
|
|
225
|
-
});
|
|
226
|
-
this.setTreeData({ rootIds, nodes });
|
|
227
|
-
}
|
|
228
|
-
*initialize(params) {
|
|
229
|
-
if (!this.initState.isInInitialState) {
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
this.initState.inProgress();
|
|
233
|
-
try {
|
|
234
|
-
(yield this.depotServerClient.getEntitiesByClassifierPath(DATA_SPACE_ELEMENT_CLASSIFIER_PATH))
|
|
235
|
-
.map((storedEntity) => new RawDataSpace(storedEntity.groupId, storedEntity.artifactId, storedEntity.versionId, storedEntity.entity.path, storedEntity.entity.content))
|
|
236
|
-
// NOTE: only care about data space tagged with taxonomy information
|
|
237
|
-
.filter((rawDataSpace) => rawDataSpace.taxonomyNodePaths.length)
|
|
238
|
-
.forEach((rawDataSpace) => {
|
|
239
|
-
this.dataSpaceIndex.set(rawDataSpace.id, rawDataSpace);
|
|
240
|
-
});
|
|
241
|
-
yield flowResult(this.graphManagerState.graphManager.initialize({
|
|
242
|
-
env: this.applicationStore.config.env,
|
|
243
|
-
tabSize: TAB_SIZE,
|
|
244
|
-
clientConfig: {
|
|
245
|
-
baseUrl: this.applicationStore.config.engineServerUrl,
|
|
246
|
-
queryBaseUrl: this.applicationStore.config.engineQueryServerUrl,
|
|
247
|
-
enableCompression: true,
|
|
248
|
-
},
|
|
249
|
-
}, {
|
|
250
|
-
tracerServicePlugins: this.pluginManager.getTracerServicePlugins(),
|
|
251
|
-
}));
|
|
252
|
-
yield flowResult(this.graphManagerState.initializeSystem());
|
|
253
|
-
// NOTE: here we build the full tree, which might be expensive when we have a big
|
|
254
|
-
// tree in the future, we might have to come up with a better algorithm then
|
|
255
|
-
// to incrementally build the tree
|
|
256
|
-
this.initializeTaxonomyTreeData();
|
|
257
|
-
if (this.treeData) {
|
|
258
|
-
const taxonomyPath = params.taxonomyPath;
|
|
259
|
-
if (taxonomyPath) {
|
|
260
|
-
const node = this.treeData.nodes.get(taxonomyPath);
|
|
261
|
-
if (node) {
|
|
262
|
-
node.isOpen = true;
|
|
263
|
-
const taxonomyPathParts = taxonomyPath.split(TAXONOMY_NODE_PATH_DELIMITER);
|
|
264
|
-
let currentTaxonomyPath = '';
|
|
265
|
-
for (let i = 0; i < taxonomyPathParts.length; ++i) {
|
|
266
|
-
currentTaxonomyPath += `${i !== 0 ? TAXONOMY_NODE_PATH_DELIMITER : ''}${taxonomyPathParts[i]}`;
|
|
267
|
-
const nodeToOpen = guaranteeNonNullable(this.treeData.nodes.get(currentTaxonomyPath));
|
|
268
|
-
nodeToOpen.isOpen = true;
|
|
269
|
-
this.setTreeData({ ...this.treeData });
|
|
270
|
-
}
|
|
271
|
-
this.setCurrentTaxonomyViewerState(new TaxonomyViewerState(this, node));
|
|
272
|
-
// open data space if specified
|
|
273
|
-
if (this.initialDataSpaceId) {
|
|
274
|
-
const dataSpaceToOpen = node.rawDataSpaces.find((rawDataSpace) => rawDataSpace.id === this.initialDataSpaceId);
|
|
275
|
-
const initialDataSpaceId = this.initialDataSpaceId;
|
|
276
|
-
this.initialDataSpaceId = undefined;
|
|
277
|
-
if (dataSpaceToOpen) {
|
|
278
|
-
assertNonNullable(this.currentTaxonomyViewerState);
|
|
279
|
-
yield flowResult(this.currentTaxonomyViewerState.initializeDataSpaceViewer(dataSpaceToOpen));
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
throw new AssertionError(`Can't find data space with ID '${initialDataSpaceId}' in taxonomy node with path '${taxonomyPath}'`);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
throw new AssertionError(`Can't find taxonomy node with path '${taxonomyPath}'`);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
this.initState.pass();
|
|
292
|
-
}
|
|
293
|
-
catch (error) {
|
|
294
|
-
assertErrorThrown(error);
|
|
295
|
-
this.initState.fail();
|
|
296
|
-
this.applicationStore.notifyError(error);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
//# sourceMappingURL=EnterpriseModelExplorerStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnterpriseModelExplorerStore.js","sourceRoot":"","sources":["../../../src/stores/studio/EnterpriseModelExplorerStore.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAOtD,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,WAAW,EACX,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,WAAW,EACX,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EACL,kCAAkC,EAClC,iCAAiC,EACjC,oBAAoB,GACrB,MAAM,sEAAsE,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,MAAM,CAAN,IAAY,qCAIX;AAJD,WAAY,qCAAqC;IAC/C,uEAA8B,CAAA;IAC9B,oDAAW,CAAA;IACX,0EAAiC,CAAA;AACnC,CAAC,E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I,CAAC,CACpC,CAAC;wBAEF,+BAA+B;wBAC/B,IAAI,IAAI,CAAC,kBAAkB,EAAE;4BAC3B,MAAM,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAC7C,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,CAAC,kBAAkB,CAC9D,CAAC;4BACF,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;4BACnD,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;4BACpC,IAAI,eAAe,EAAE;gCACnB,iBAAiB,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;gCACnD,MAAM,UAAU,CACd,IAAI,CAAC,0BAA0B,CAAC,yBAAyB,CACvD,eAAe,CAChB,CACF,CAAC;6BACH;iCAAM;gCACL,MAAM,IAAI,cAAc,CACtB,kCAAkC,kBAAkB,iCAAiC,YAAY,GAAG,CACrG,CAAC;6BACH;yBACF;qBACF;yBAAM;wBACL,MAAM,IAAI,cAAc,CACtB,uCAAuC,YAAY,GAAG,CACvD,CAAC;qBACH;iBACF;aACF;YAED,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;SACvB;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;YACtB,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SAC1C;IACH,CAAC;CACF"}
|
|
@@ -1,229 +0,0 @@
|
|
|
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
|
-
import { useEffect } from 'react';
|
|
18
|
-
import {
|
|
19
|
-
NotificationSnackbar,
|
|
20
|
-
useApplicationStore,
|
|
21
|
-
} from '@finos/legend-application';
|
|
22
|
-
import { AppHeader, AppHeaderMenu } from '@finos/legend-studio';
|
|
23
|
-
import { observer } from 'mobx-react-lite';
|
|
24
|
-
import { useParams } from 'react-router-dom';
|
|
25
|
-
import type { EnterpriseModelExplorerPathParams } from '../../stores/studio/EnterpriseModelExplorerStore';
|
|
26
|
-
import {
|
|
27
|
-
EnterpriseModelExplorerStoreProvider,
|
|
28
|
-
useEnterpriseModelExplorerStore,
|
|
29
|
-
} from './EnterpriseModelExplorerStoreProvider';
|
|
30
|
-
import { flowResult } from 'mobx';
|
|
31
|
-
import type { ResizablePanelHandlerProps } from '@finos/legend-art';
|
|
32
|
-
import {
|
|
33
|
-
CompressIcon,
|
|
34
|
-
PanelLoadingIndicator,
|
|
35
|
-
WindowMaximizeIcon,
|
|
36
|
-
clsx,
|
|
37
|
-
getControlledResizablePanelProps,
|
|
38
|
-
ListIcon,
|
|
39
|
-
ResizablePanel,
|
|
40
|
-
ResizablePanelGroup,
|
|
41
|
-
ResizablePanelSplitter,
|
|
42
|
-
} from '@finos/legend-art';
|
|
43
|
-
import { TaxonomyTree } from './TaxonomyTree';
|
|
44
|
-
import { TaxonomyViewer } from './TaxonomyViewer';
|
|
45
|
-
|
|
46
|
-
const EnterpriseModelExplorerStatusBar = observer(() => {
|
|
47
|
-
const enterpriseModelExplorerStore = useEnterpriseModelExplorerStore();
|
|
48
|
-
const toggleExpandMode = (): void =>
|
|
49
|
-
enterpriseModelExplorerStore.setExpandedMode(
|
|
50
|
-
!enterpriseModelExplorerStore.isInExpandedMode,
|
|
51
|
-
);
|
|
52
|
-
return (
|
|
53
|
-
<div className="editor__status-bar ">
|
|
54
|
-
<div className="editor__status-bar__left"></div>
|
|
55
|
-
<div className="editor__status-bar__right">
|
|
56
|
-
<button
|
|
57
|
-
className={clsx(
|
|
58
|
-
'editor__status-bar__action editor__status-bar__action__toggler',
|
|
59
|
-
{
|
|
60
|
-
'editor__status-bar__action__toggler--active':
|
|
61
|
-
enterpriseModelExplorerStore.isInExpandedMode,
|
|
62
|
-
},
|
|
63
|
-
)}
|
|
64
|
-
onClick={toggleExpandMode}
|
|
65
|
-
tabIndex={-1}
|
|
66
|
-
title={'Maximize/Minimize'}
|
|
67
|
-
>
|
|
68
|
-
<WindowMaximizeIcon />
|
|
69
|
-
</button>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
);
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
const EnterpriseModelExplorerActivityBar = observer(() => (
|
|
76
|
-
<div className="activity-bar">
|
|
77
|
-
<div className="activity-bar__items">
|
|
78
|
-
<button
|
|
79
|
-
className={clsx('activity-bar__item', 'activity-bar__item--active')}
|
|
80
|
-
tabIndex={-1}
|
|
81
|
-
title="Explorer"
|
|
82
|
-
>
|
|
83
|
-
<ListIcon />
|
|
84
|
-
</button>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
));
|
|
88
|
-
|
|
89
|
-
const EnterpriseModelExplorerSideBar = observer(() => {
|
|
90
|
-
const enterpriseModelExplorerStore = useEnterpriseModelExplorerStore();
|
|
91
|
-
const collapseTree = (): void => {
|
|
92
|
-
if (enterpriseModelExplorerStore.treeData) {
|
|
93
|
-
enterpriseModelExplorerStore.treeData.nodes.forEach((node) => {
|
|
94
|
-
node.isOpen = false;
|
|
95
|
-
});
|
|
96
|
-
enterpriseModelExplorerStore.setTreeData({
|
|
97
|
-
...enterpriseModelExplorerStore.treeData,
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
return (
|
|
102
|
-
<div className="side-bar">
|
|
103
|
-
<div className="side-bar__view">
|
|
104
|
-
<div className="panel">
|
|
105
|
-
<div className="panel__header side-bar__header">
|
|
106
|
-
<div className="panel__header__title">
|
|
107
|
-
<div className="panel__header__title__content side-bar__header__title__content">
|
|
108
|
-
EXPLORER
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
<div className="panel__content side-bar__content">
|
|
113
|
-
<div className="panel">
|
|
114
|
-
<div className="panel__header enterprise-model-explorer__side-bar__header">
|
|
115
|
-
<div className="panel__header__title">
|
|
116
|
-
<div className="panel__header__title__content">
|
|
117
|
-
Enterprise Taxonomy
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
<div className="panel__header__actions">
|
|
121
|
-
<button
|
|
122
|
-
className="panel__header__action enterprise-model-explorer__side-bar__header__action"
|
|
123
|
-
onClick={collapseTree}
|
|
124
|
-
tabIndex={-1}
|
|
125
|
-
title="Collapse All"
|
|
126
|
-
>
|
|
127
|
-
<CompressIcon />
|
|
128
|
-
</button>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
<PanelLoadingIndicator
|
|
132
|
-
isLoading={enterpriseModelExplorerStore.initState.isInProgress}
|
|
133
|
-
/>
|
|
134
|
-
<div className="panel__content enterprise-model-explorer__taxonomy-tree-container">
|
|
135
|
-
{enterpriseModelExplorerStore.treeData && (
|
|
136
|
-
<TaxonomyTree
|
|
137
|
-
treeData={enterpriseModelExplorerStore.treeData}
|
|
138
|
-
/>
|
|
139
|
-
)}
|
|
140
|
-
</div>
|
|
141
|
-
</div>
|
|
142
|
-
</div>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
);
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
export const EnterpriseModelExplorerInner = observer(() => {
|
|
150
|
-
const params = useParams<EnterpriseModelExplorerPathParams>();
|
|
151
|
-
const applicationStore = useApplicationStore();
|
|
152
|
-
const enterpriseModelExplorerStore = useEnterpriseModelExplorerStore();
|
|
153
|
-
|
|
154
|
-
const resizeSideBar = (handleProps: ResizablePanelHandlerProps): void =>
|
|
155
|
-
enterpriseModelExplorerStore.sideBarDisplayState.setSize(
|
|
156
|
-
(handleProps.domElement as HTMLDivElement).getBoundingClientRect().width,
|
|
157
|
-
);
|
|
158
|
-
|
|
159
|
-
useEffect(() => {
|
|
160
|
-
enterpriseModelExplorerStore.internalizeDataSpacePath(params);
|
|
161
|
-
}, [enterpriseModelExplorerStore, params]);
|
|
162
|
-
|
|
163
|
-
// NOTE: since we internalize the data space path in the route, we should not re-initialize the graph
|
|
164
|
-
// on the second call when we remove path from the route
|
|
165
|
-
useEffect(() => {
|
|
166
|
-
flowResult(enterpriseModelExplorerStore.initialize(params)).catch(
|
|
167
|
-
applicationStore.alertIllegalUnhandledError,
|
|
168
|
-
);
|
|
169
|
-
}, [applicationStore, enterpriseModelExplorerStore, params]);
|
|
170
|
-
|
|
171
|
-
return (
|
|
172
|
-
<div className="app__page">
|
|
173
|
-
<AppHeader>
|
|
174
|
-
<AppHeaderMenu />
|
|
175
|
-
</AppHeader>
|
|
176
|
-
<div className="app__content">
|
|
177
|
-
<div className="editor">
|
|
178
|
-
<div className="editor__body">
|
|
179
|
-
<EnterpriseModelExplorerActivityBar />
|
|
180
|
-
<NotificationSnackbar />
|
|
181
|
-
<div className="editor__content-container">
|
|
182
|
-
<div
|
|
183
|
-
className={clsx('editor__content', {
|
|
184
|
-
'editor__content--expanded':
|
|
185
|
-
enterpriseModelExplorerStore.isInExpandedMode,
|
|
186
|
-
})}
|
|
187
|
-
>
|
|
188
|
-
<ResizablePanelGroup orientation="vertical">
|
|
189
|
-
<ResizablePanel
|
|
190
|
-
{...getControlledResizablePanelProps(
|
|
191
|
-
enterpriseModelExplorerStore.sideBarDisplayState.size ===
|
|
192
|
-
0,
|
|
193
|
-
{
|
|
194
|
-
onStopResize: resizeSideBar,
|
|
195
|
-
},
|
|
196
|
-
)}
|
|
197
|
-
direction={1}
|
|
198
|
-
size={enterpriseModelExplorerStore.sideBarDisplayState.size}
|
|
199
|
-
>
|
|
200
|
-
<EnterpriseModelExplorerSideBar />
|
|
201
|
-
</ResizablePanel>
|
|
202
|
-
<ResizablePanelSplitter />
|
|
203
|
-
<ResizablePanel minSize={300}>
|
|
204
|
-
{enterpriseModelExplorerStore.currentTaxonomyViewerState ? (
|
|
205
|
-
<TaxonomyViewer
|
|
206
|
-
taxonomyViewerState={
|
|
207
|
-
enterpriseModelExplorerStore.currentTaxonomyViewerState
|
|
208
|
-
}
|
|
209
|
-
/>
|
|
210
|
-
) : (
|
|
211
|
-
<div />
|
|
212
|
-
)}
|
|
213
|
-
</ResizablePanel>
|
|
214
|
-
</ResizablePanelGroup>
|
|
215
|
-
</div>
|
|
216
|
-
</div>
|
|
217
|
-
</div>
|
|
218
|
-
<EnterpriseModelExplorerStatusBar />
|
|
219
|
-
</div>
|
|
220
|
-
</div>
|
|
221
|
-
</div>
|
|
222
|
-
);
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
export const EnterpriseModelExplorer: React.FC = () => (
|
|
226
|
-
<EnterpriseModelExplorerStoreProvider>
|
|
227
|
-
<EnterpriseModelExplorerInner />
|
|
228
|
-
</EnterpriseModelExplorerStoreProvider>
|
|
229
|
-
);
|