@finos/legend-query-builder 4.15.3 → 4.15.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/lib/__lib__/QueryBuilderTesting.d.ts +1 -0
- package/lib/__lib__/QueryBuilderTesting.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderTesting.js +2 -0
- package/lib/__lib__/QueryBuilderTesting.js.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +38 -33
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +12 -5
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/index.css +16 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderState.d.ts +6 -1
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +3 -0
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/explorer/QueryFunctionsExplorerState.d.ts +17 -6
- package/lib/stores/explorer/QueryFunctionsExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryFunctionsExplorerState.js +142 -59
- package/lib/stores/explorer/QueryFunctionsExplorerState.js.map +1 -1
- package/package.json +6 -6
- package/src/__lib__/QueryBuilderTesting.ts +2 -0
- package/src/components/explorer/QueryBuilderFunctionsExplorerPanel.tsx +63 -70
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +23 -11
- package/src/index.ts +1 -0
- package/src/stores/QueryBuilderState.ts +12 -0
- package/src/stores/explorer/QueryFunctionsExplorerState.ts +227 -94
@@ -16,12 +16,16 @@
|
|
16
16
|
|
17
17
|
import {
|
18
18
|
type PackageableElement,
|
19
|
-
|
19
|
+
type FunctionAnalysisInfo,
|
20
|
+
type PureModel,
|
20
21
|
Package,
|
21
22
|
Unit,
|
22
23
|
ROOT_PACKAGE_NAME,
|
24
|
+
buildFunctionAnalysisInfoFromConcreteFunctionDefinition,
|
25
|
+
getOrCreateGraphPackage,
|
23
26
|
} from '@finos/legend-graph';
|
24
27
|
import {
|
28
|
+
ActionState,
|
25
29
|
addUniqueEntry,
|
26
30
|
guaranteeNonNullable,
|
27
31
|
isNonNullable,
|
@@ -47,16 +51,12 @@ export class QueryBuilderFunctionsExplorerTreeNodeData implements TreeNodeData {
|
|
47
51
|
label: string;
|
48
52
|
childrenIds: string[] = [];
|
49
53
|
isOpen?: boolean | undefined;
|
50
|
-
|
54
|
+
package?: PackageableElement;
|
55
|
+
functionAnalysisInfo?: FunctionAnalysisInfo | undefined;
|
51
56
|
|
52
|
-
constructor(
|
53
|
-
id: string,
|
54
|
-
label: string,
|
55
|
-
packageableElement: PackageableElement,
|
56
|
-
) {
|
57
|
+
constructor(id: string, label: string) {
|
57
58
|
this.id = id;
|
58
59
|
this.label = label;
|
59
|
-
this.packageableElement = packageableElement;
|
60
60
|
}
|
61
61
|
}
|
62
62
|
|
@@ -73,29 +73,38 @@ const getValidDisplayablePackageSet = (
|
|
73
73
|
}
|
74
74
|
};
|
75
75
|
|
76
|
-
|
76
|
+
const generateFunctionsExplorerTreeNodeDataFromPackage = (
|
77
77
|
queryBuilderState: QueryBuilderState,
|
78
|
-
element:
|
78
|
+
element: Package,
|
79
79
|
rootPackageName: ROOT_PACKAGE_NAME,
|
80
80
|
): QueryBuilderFunctionsExplorerTreeNodeData => ({
|
81
81
|
id: element.path,
|
82
82
|
label: element.name,
|
83
|
-
childrenIds:
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
83
|
+
childrenIds: element.children
|
84
|
+
.filter((child) => !(child instanceof Unit))
|
85
|
+
.filter(
|
86
|
+
(child) =>
|
87
|
+
child instanceof Package &&
|
88
|
+
getValidDisplayablePackageSet(queryBuilderState, rootPackageName).has(
|
89
|
+
child,
|
90
|
+
),
|
91
|
+
)
|
92
|
+
.map((child) => child.path)
|
93
|
+
.concat(
|
94
|
+
queryBuilderState.functionsExplorerState.packagePathToFunctionInfoMap
|
95
|
+
?.get(element.path)
|
96
|
+
?.map((info) => info.functionPath) ?? [],
|
97
|
+
),
|
98
|
+
package: element,
|
99
|
+
});
|
100
|
+
|
101
|
+
export const generateFunctionsExplorerTreeNodeDataFromFunctionAnalysisInfo = (
|
102
|
+
functionAnalysisInfo: FunctionAnalysisInfo,
|
103
|
+
): QueryBuilderFunctionsExplorerTreeNodeData => ({
|
104
|
+
id: functionAnalysisInfo.functionPath,
|
105
|
+
label: functionAnalysisInfo.name,
|
106
|
+
childrenIds: [],
|
107
|
+
functionAnalysisInfo: functionAnalysisInfo,
|
99
108
|
});
|
100
109
|
|
101
110
|
const generateFunctionsExplorerTreeNodeChilrdren = (
|
@@ -104,34 +113,48 @@ const generateFunctionsExplorerTreeNodeChilrdren = (
|
|
104
113
|
data: TreeData<QueryBuilderFunctionsExplorerTreeNodeData>,
|
105
114
|
rootPackageName = ROOT_PACKAGE_NAME.MAIN,
|
106
115
|
): void => {
|
116
|
+
const functionInfoMap =
|
117
|
+
rootPackageName === ROOT_PACKAGE_NAME.MAIN
|
118
|
+
? queryBuilderState.functionsExplorerState.functionInfoMap
|
119
|
+
: queryBuilderState.functionsExplorerState.dependencyFunctionInfoMap;
|
107
120
|
const validDisplayablePackageSet = getValidDisplayablePackageSet(
|
108
121
|
queryBuilderState,
|
109
122
|
rootPackageName,
|
110
123
|
);
|
111
|
-
|
112
|
-
.
|
113
|
-
|
114
|
-
(
|
115
|
-
|
116
|
-
|
117
|
-
child instanceof ConcreteFunctionDefinition,
|
118
|
-
)
|
119
|
-
.map((child) => child.path);
|
120
|
-
(node.packageableElement as Package).children
|
121
|
-
.filter((child) => !(child instanceof Unit))
|
124
|
+
const qualifiedExtraFunctionPaths =
|
125
|
+
queryBuilderState.functionsExplorerState.packagePathToFunctionInfoMap
|
126
|
+
?.get(node.id)
|
127
|
+
?.map((info) => info.functionPath);
|
128
|
+
|
129
|
+
const childrenPackages = (node.package as Package).children
|
122
130
|
.filter(
|
123
131
|
(child) =>
|
124
132
|
// avoid displaying empty packages
|
125
|
-
|
126
|
-
child instanceof ConcreteFunctionDefinition,
|
127
|
-
)
|
128
|
-
.map((child) =>
|
129
|
-
generateFunctionsExplorerTreeNodeData(
|
130
|
-
queryBuilderState,
|
131
|
-
child,
|
132
|
-
rootPackageName,
|
133
|
-
),
|
133
|
+
child instanceof Package && validDisplayablePackageSet.has(child),
|
134
134
|
)
|
135
|
+
.map((child) => child as Package);
|
136
|
+
|
137
|
+
node.childrenIds = childrenPackages
|
138
|
+
.map((child) => child.path)
|
139
|
+
.concat(qualifiedExtraFunctionPaths ?? []);
|
140
|
+
|
141
|
+
const childNodesFromPackage = childrenPackages.map((child) =>
|
142
|
+
generateFunctionsExplorerTreeNodeDataFromPackage(
|
143
|
+
queryBuilderState,
|
144
|
+
child,
|
145
|
+
rootPackageName,
|
146
|
+
),
|
147
|
+
);
|
148
|
+
|
149
|
+
const childNodesFromFunction = qualifiedExtraFunctionPaths
|
150
|
+
?.map((path) => functionInfoMap?.get(path))
|
151
|
+
.filter(isNonNullable)
|
152
|
+
.map((info) =>
|
153
|
+
generateFunctionsExplorerTreeNodeDataFromFunctionAnalysisInfo(info),
|
154
|
+
);
|
155
|
+
|
156
|
+
childNodesFromPackage
|
157
|
+
.concat(childNodesFromFunction ?? [])
|
135
158
|
.forEach((childNode) => {
|
136
159
|
const currentNode = data.nodes.get(childNode.id);
|
137
160
|
if (currentNode) {
|
@@ -157,14 +180,20 @@ export const getFunctionsExplorerTreeData = (
|
|
157
180
|
switch (rootPackageName) {
|
158
181
|
case ROOT_PACKAGE_NAME.PROJECT_DEPENDENCY_ROOT:
|
159
182
|
if (
|
160
|
-
queryBuilderState.
|
161
|
-
|
183
|
+
!queryBuilderState.functionsExplorerState.dependencyFunctionInfoMap ||
|
184
|
+
Array.from(
|
185
|
+
queryBuilderState.functionsExplorerState.dependencyFunctionInfoMap,
|
186
|
+
).length === 0
|
162
187
|
) {
|
163
188
|
return { rootIds, nodes };
|
164
189
|
}
|
165
190
|
break;
|
166
191
|
default:
|
167
|
-
if (
|
192
|
+
if (
|
193
|
+
!queryBuilderState.functionsExplorerState.functionInfoMap ||
|
194
|
+
Array.from(queryBuilderState.functionsExplorerState.functionInfoMap)
|
195
|
+
.length === 0
|
196
|
+
) {
|
168
197
|
return { rootIds, nodes };
|
169
198
|
}
|
170
199
|
}
|
@@ -172,22 +201,19 @@ export const getFunctionsExplorerTreeData = (
|
|
172
201
|
roots.forEach((root) => {
|
173
202
|
root.children
|
174
203
|
.slice()
|
175
|
-
.filter((child) => !(child instanceof Unit))
|
176
204
|
.filter(
|
177
205
|
(child) =>
|
178
206
|
child instanceof Package && validDisplayablePackageSet.has(child),
|
179
207
|
)
|
208
|
+
.map((child) => child as Package)
|
180
209
|
.sort((a, b) => a.name.localeCompare(b.name))
|
181
|
-
.sort(
|
182
|
-
(a, b) =>
|
183
|
-
(b instanceof Package ? 1 : 0) - (a instanceof Package ? 1 : 0),
|
184
|
-
)
|
185
210
|
.forEach((childPackage) => {
|
186
|
-
const childTreeNodeData =
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
211
|
+
const childTreeNodeData =
|
212
|
+
generateFunctionsExplorerTreeNodeDataFromPackage(
|
213
|
+
queryBuilderState,
|
214
|
+
childPackage,
|
215
|
+
rootPackageName,
|
216
|
+
);
|
191
217
|
addUniqueEntry(rootIds, childTreeNodeData.id);
|
192
218
|
nodes.set(childTreeNodeData.id, childTreeNodeData);
|
193
219
|
});
|
@@ -211,16 +237,14 @@ export const getFunctionsExplorerTreeNodeChildren = (
|
|
211
237
|
.map((id) => data.nodes.get(id))
|
212
238
|
.filter(isNonNullable)
|
213
239
|
.sort(compareLabelFn)
|
214
|
-
.sort(
|
215
|
-
(a, b) =>
|
216
|
-
(b.packageableElement instanceof Package ? 1 : 0) -
|
217
|
-
(a.packageableElement instanceof Package ? 1 : 0),
|
218
|
-
);
|
240
|
+
.sort((a, b) => (b.package ? 1 : 0) - (a.package ? 1 : 0));
|
219
241
|
};
|
220
242
|
|
221
243
|
const getAllPackagesFromElement = (element: PackageableElement): Package[] => {
|
222
244
|
if (element.package) {
|
223
|
-
return [element
|
245
|
+
return (element instanceof Package ? [element] : []).concat(
|
246
|
+
[element.package].concat(getAllPackagesFromElement(element.package)),
|
247
|
+
);
|
224
248
|
}
|
225
249
|
return [];
|
226
250
|
};
|
@@ -228,30 +252,36 @@ const getAllPackagesFromElement = (element: PackageableElement): Package[] => {
|
|
228
252
|
export class QueryFunctionExplorerState {
|
229
253
|
readonly uuid = uuid();
|
230
254
|
queryFunctionsState: QueryFunctionsExplorerState;
|
231
|
-
|
255
|
+
functionAnalysisInfo: FunctionAnalysisInfo;
|
232
256
|
|
233
257
|
constructor(
|
234
258
|
queryFunctionsState: QueryFunctionsExplorerState,
|
235
|
-
|
259
|
+
functionAnalysisInfo: FunctionAnalysisInfo,
|
236
260
|
) {
|
237
261
|
makeObservable(this, {
|
238
|
-
|
262
|
+
functionAnalysisInfo: observable,
|
239
263
|
});
|
240
264
|
this.queryFunctionsState = queryFunctionsState;
|
241
|
-
this.
|
265
|
+
this.functionAnalysisInfo = functionAnalysisInfo;
|
242
266
|
}
|
243
267
|
}
|
244
268
|
|
245
269
|
export class QueryFunctionsExplorerState {
|
270
|
+
readonly initState = ActionState.create();
|
271
|
+
|
246
272
|
queryBuilderState: QueryBuilderState;
|
247
273
|
treeData?: TreeData<QueryBuilderFunctionsExplorerTreeNodeData> | undefined;
|
248
274
|
dependencyTreeData?:
|
249
275
|
| TreeData<QueryBuilderFunctionsExplorerTreeNodeData>
|
250
276
|
| undefined;
|
277
|
+
_functionGraph: PureModel;
|
251
278
|
functionExplorerStates: QueryFunctionExplorerState[] = [];
|
252
279
|
dependencyFunctionExplorerStates: QueryFunctionExplorerState[] = [];
|
253
280
|
displayablePackagesSet: Set<Package> = new Set<Package>();
|
254
281
|
dependencyDisplayablePackagesSet: Set<Package> = new Set<Package>();
|
282
|
+
functionInfoMap?: Map<string, FunctionAnalysisInfo>;
|
283
|
+
dependencyFunctionInfoMap?: Map<string, FunctionAnalysisInfo>;
|
284
|
+
packagePathToFunctionInfoMap?: Map<string, FunctionAnalysisInfo[]>;
|
255
285
|
|
256
286
|
constructor(queryBuilderState: QueryBuilderState) {
|
257
287
|
makeObservable(this, {
|
@@ -259,13 +289,22 @@ export class QueryFunctionsExplorerState {
|
|
259
289
|
dependencyFunctionExplorerStates: observable.ref,
|
260
290
|
treeData: observable.ref,
|
261
291
|
dependencyTreeData: observable.ref,
|
292
|
+
_functionGraph: observable,
|
293
|
+
functionInfoMap: observable,
|
294
|
+
dependencyFunctionInfoMap: observable,
|
295
|
+
packagePathToFunctionInfoMap: observable,
|
296
|
+
setFunctionInfoMap: action,
|
297
|
+
setDependencyFunctionInfoMap: action,
|
262
298
|
setTreeData: action,
|
299
|
+
setPackagePathToFunctionInfoMap: action,
|
263
300
|
setDependencyTreeData: action,
|
264
301
|
refreshTree: action,
|
265
302
|
onTreeNodeSelect: action,
|
303
|
+
initializeTreeData: action,
|
266
304
|
});
|
267
305
|
this.queryBuilderState = queryBuilderState;
|
268
|
-
this.
|
306
|
+
this._functionGraph =
|
307
|
+
this.queryBuilderState.graphManagerState.createNewGraph();
|
269
308
|
}
|
270
309
|
|
271
310
|
getTreeData(
|
@@ -279,18 +318,48 @@ export class QueryFunctionsExplorerState {
|
|
279
318
|
}
|
280
319
|
}
|
281
320
|
|
321
|
+
setFunctionInfoMap(info: Map<string, FunctionAnalysisInfo>) {
|
322
|
+
this.functionInfoMap = info;
|
323
|
+
}
|
324
|
+
|
325
|
+
setDependencyFunctionInfoMap(info: Map<string, FunctionAnalysisInfo>) {
|
326
|
+
this.dependencyFunctionInfoMap = info;
|
327
|
+
}
|
328
|
+
|
329
|
+
setPackagePathToFunctionInfoMap(map: Map<string, FunctionAnalysisInfo[]>) {
|
330
|
+
this.packagePathToFunctionInfoMap = map;
|
331
|
+
}
|
332
|
+
|
282
333
|
async initializeDisplayablePackagesSet(): Promise<void> {
|
283
|
-
this.
|
284
|
-
.
|
285
|
-
|
286
|
-
|
334
|
+
if (this.functionInfoMap) {
|
335
|
+
Array.from(this.functionInfoMap.values())
|
336
|
+
.map((info) =>
|
337
|
+
getOrCreateGraphPackage(
|
338
|
+
this._functionGraph,
|
339
|
+
info.packagePath,
|
340
|
+
undefined,
|
341
|
+
),
|
342
|
+
)
|
343
|
+
.map((f) => getAllPackagesFromElement(f))
|
344
|
+
.flat()
|
345
|
+
.forEach((pkg) => this.displayablePackagesSet.add(pkg));
|
346
|
+
}
|
287
347
|
}
|
288
348
|
|
289
349
|
async initializeDependencyDisplayablePackagesSet(): Promise<void> {
|
290
|
-
this.
|
291
|
-
.
|
292
|
-
|
293
|
-
|
350
|
+
if (this.dependencyFunctionInfoMap) {
|
351
|
+
Array.from(this.dependencyFunctionInfoMap.values())
|
352
|
+
.map((info) =>
|
353
|
+
getOrCreateGraphPackage(
|
354
|
+
this._functionGraph,
|
355
|
+
info.packagePath,
|
356
|
+
undefined,
|
357
|
+
),
|
358
|
+
)
|
359
|
+
.map((f) => getAllPackagesFromElement(f))
|
360
|
+
.flat()
|
361
|
+
.forEach((pkg) => this.dependencyDisplayablePackagesSet.add(pkg));
|
362
|
+
}
|
294
363
|
}
|
295
364
|
|
296
365
|
setTreeData(
|
@@ -327,7 +396,7 @@ export class QueryFunctionsExplorerState {
|
|
327
396
|
data: TreeData<QueryBuilderFunctionsExplorerTreeNodeData>,
|
328
397
|
rootPackageName = ROOT_PACKAGE_NAME.MAIN,
|
329
398
|
): void => {
|
330
|
-
if (node.
|
399
|
+
if (node.package) {
|
331
400
|
if (node.childrenIds.length) {
|
332
401
|
node.isOpen = !node.isOpen;
|
333
402
|
generateFunctionsExplorerTreeNodeChilrdren(
|
@@ -347,41 +416,105 @@ export class QueryFunctionsExplorerState {
|
|
347
416
|
}
|
348
417
|
};
|
349
418
|
|
419
|
+
initializeFunctionInfoMap(): void {
|
420
|
+
const functionInfoMap = new Map<string, FunctionAnalysisInfo>();
|
421
|
+
const dependencyFunctionInfoMap = new Map<string, FunctionAnalysisInfo>();
|
422
|
+
const functionInfos =
|
423
|
+
buildFunctionAnalysisInfoFromConcreteFunctionDefinition(
|
424
|
+
this.queryBuilderState.graphManagerState.graph.ownFunctions,
|
425
|
+
this._functionGraph,
|
426
|
+
);
|
427
|
+
functionInfos.forEach((info) =>
|
428
|
+
functionInfoMap.set(info.functionPath, info),
|
429
|
+
);
|
430
|
+
if (
|
431
|
+
this.queryBuilderState.graphManagerState.graph.dependencyManager
|
432
|
+
.hasDependencies
|
433
|
+
) {
|
434
|
+
const dependencyFunctions =
|
435
|
+
this.queryBuilderState.graphManagerState.graph.dependencyManager
|
436
|
+
.functions;
|
437
|
+
const dependencyFunctionInfos =
|
438
|
+
buildFunctionAnalysisInfoFromConcreteFunctionDefinition(
|
439
|
+
dependencyFunctions,
|
440
|
+
this._functionGraph,
|
441
|
+
);
|
442
|
+
dependencyFunctionInfos.forEach((info) =>
|
443
|
+
dependencyFunctionInfoMap.set(info.functionPath, info),
|
444
|
+
);
|
445
|
+
}
|
446
|
+
const queryBuilderFunctionAnalysisInfo =
|
447
|
+
this.queryBuilderState.buildFunctionAnalysisInfo();
|
448
|
+
if (queryBuilderFunctionAnalysisInfo) {
|
449
|
+
Array.from(
|
450
|
+
queryBuilderFunctionAnalysisInfo.functionInfoMap.entries(),
|
451
|
+
).forEach(([path, info]) => functionInfoMap.set(path, info));
|
452
|
+
Array.from(
|
453
|
+
queryBuilderFunctionAnalysisInfo.dependencyFunctionInfoMap.entries(),
|
454
|
+
).forEach(([path, info]) => {
|
455
|
+
dependencyFunctionInfoMap.set(path, info);
|
456
|
+
});
|
457
|
+
}
|
458
|
+
const packagePathToFunctionInfoMap = new Map<
|
459
|
+
string,
|
460
|
+
FunctionAnalysisInfo[]
|
461
|
+
>();
|
462
|
+
Array.from(functionInfoMap.values())
|
463
|
+
.concat(Array.from(dependencyFunctionInfoMap.values()))
|
464
|
+
.forEach((info) => {
|
465
|
+
const curr = packagePathToFunctionInfoMap.get(info.packagePath);
|
466
|
+
if (curr) {
|
467
|
+
packagePathToFunctionInfoMap.set(info.packagePath, [...curr, info]);
|
468
|
+
} else {
|
469
|
+
packagePathToFunctionInfoMap.set(info.packagePath, [info]);
|
470
|
+
}
|
471
|
+
});
|
472
|
+
this.setPackagePathToFunctionInfoMap(packagePathToFunctionInfoMap);
|
473
|
+
this.setFunctionInfoMap(functionInfoMap);
|
474
|
+
this.setDependencyFunctionInfoMap(dependencyFunctionInfoMap);
|
475
|
+
}
|
476
|
+
|
350
477
|
initializeTreeData(): void {
|
478
|
+
if (!this.initState.isInInitialState) {
|
479
|
+
return;
|
480
|
+
}
|
481
|
+
|
482
|
+
this.initState.inProgress();
|
483
|
+
this.initializeFunctionInfoMap();
|
351
484
|
this.initializeDisplayablePackagesSet()
|
352
485
|
.catch(noop())
|
353
486
|
.finally(() => {
|
354
487
|
this.setTreeData(
|
355
488
|
getFunctionsExplorerTreeData(
|
356
|
-
[this.
|
489
|
+
[this._functionGraph.root],
|
357
490
|
this.queryBuilderState,
|
491
|
+
ROOT_PACKAGE_NAME.MAIN,
|
358
492
|
),
|
359
493
|
);
|
360
|
-
this.functionExplorerStates =
|
361
|
-
this.
|
362
|
-
|
363
|
-
|
494
|
+
this.functionExplorerStates = this.functionInfoMap
|
495
|
+
? Array.from(this.functionInfoMap.values()).map(
|
496
|
+
(info) => new QueryFunctionExplorerState(this, info),
|
497
|
+
)
|
498
|
+
: [];
|
364
499
|
});
|
365
|
-
if (
|
366
|
-
this.queryBuilderState.graphManagerState.graph.dependencyManager
|
367
|
-
.hasDependencies
|
368
|
-
) {
|
500
|
+
if (this.dependencyFunctionInfoMap) {
|
369
501
|
this.initializeDependencyDisplayablePackagesSet()
|
370
502
|
.catch(noop())
|
371
503
|
.finally(() => {
|
372
504
|
this.setDependencyTreeData(
|
373
505
|
getFunctionsExplorerTreeData(
|
374
|
-
this.
|
375
|
-
.roots,
|
506
|
+
[this._functionGraph.root],
|
376
507
|
this.queryBuilderState,
|
377
508
|
ROOT_PACKAGE_NAME.PROJECT_DEPENDENCY_ROOT,
|
378
509
|
),
|
379
510
|
);
|
380
|
-
this.dependencyFunctionExplorerStates =
|
381
|
-
this.
|
382
|
-
|
383
|
-
|
511
|
+
this.dependencyFunctionExplorerStates = this.dependencyFunctionInfoMap
|
512
|
+
? Array.from(this.dependencyFunctionInfoMap.values()).map(
|
513
|
+
(info) => new QueryFunctionExplorerState(this, info),
|
514
|
+
)
|
515
|
+
: [];
|
384
516
|
});
|
385
517
|
}
|
518
|
+
this.initState.pass();
|
386
519
|
}
|
387
520
|
}
|