@finos/legend-application-studio 28.21.27 → 28.21.29
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__/LegendStudioDocumentation.d.ts +1 -0
- package/lib/__lib__/LegendStudioDocumentation.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioDocumentation.js +2 -0
- package/lib/__lib__/LegendStudioDocumentation.js.map +1 -1
- package/lib/__lib__/LegendStudioEvent.d.ts +6 -0
- package/lib/__lib__/LegendStudioEvent.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioEvent.js +7 -0
- package/lib/__lib__/LegendStudioEvent.js.map +1 -1
- package/lib/__lib__/LegendStudioTelemetryHelper.d.ts +6 -0
- package/lib/__lib__/LegendStudioTelemetryHelper.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioTelemetryHelper.js +19 -0
- package/lib/__lib__/LegendStudioTelemetryHelper.js.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js +15 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/testable/DataProductTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/testable/DataProductTestableEditor.js +100 -6
- package/lib/components/editor/editor-group/dataProduct/testable/DataProductTestableEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceEditor.js +16 -3
- package/lib/components/editor/editor-group/service-editor/ServiceEditor.js.map +1 -1
- package/lib/components/editor/editor-group/testable/LakehouseTestableEditor.d.ts +4 -0
- package/lib/components/editor/editor-group/testable/LakehouseTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/testable/LakehouseTestableEditor.js +10 -6
- package/lib/components/editor/editor-group/testable/LakehouseTestableEditor.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.d.ts +6 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.js +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.js.map +1 -1
- package/lib/stores/extensions/DSL_DataSpace_LegendStudioApplicationPlugin_Extension.d.ts +41 -0
- package/lib/stores/extensions/DSL_DataSpace_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -0
- package/lib/stores/extensions/DSL_DataSpace_LegendStudioApplicationPlugin_Extension.js +17 -0
- package/lib/stores/extensions/DSL_DataSpace_LegendStudioApplicationPlugin_Extension.js.map +1 -0
- package/package.json +16 -16
- package/src/__lib__/LegendStudioDocumentation.ts +3 -0
- package/src/__lib__/LegendStudioEvent.ts +8 -0
- package/src/__lib__/LegendStudioTelemetryHelper.ts +64 -0
- package/src/components/editor/editor-group/dataProduct/DataProductEditor.tsx +24 -0
- package/src/components/editor/editor-group/dataProduct/testable/DataProductTestableEditor.tsx +373 -4
- package/src/components/editor/editor-group/service-editor/ServiceEditor.tsx +29 -3
- package/src/components/editor/editor-group/testable/LakehouseTestableEditor.tsx +26 -5
- package/src/index.ts +3 -0
- package/src/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.ts +1 -1
- package/src/stores/extensions/DSL_DataSpace_LegendStudioApplicationPlugin_Extension.ts +54 -0
- package/tsconfig.json +1 -0
|
@@ -37,7 +37,13 @@ import {
|
|
|
37
37
|
PanelContentLists,
|
|
38
38
|
SparkleIcon,
|
|
39
39
|
} from '@finos/legend-art';
|
|
40
|
-
import {
|
|
40
|
+
import {
|
|
41
|
+
assertErrorThrown,
|
|
42
|
+
debounce,
|
|
43
|
+
HttpStatus,
|
|
44
|
+
NetworkClientError,
|
|
45
|
+
prettyCONSTName,
|
|
46
|
+
} from '@finos/legend-shared';
|
|
41
47
|
import { ServiceExecutionEditor } from './ServiceExecutionEditor.js';
|
|
42
48
|
import { LEGEND_STUDIO_TEST_ID } from '../../../../__lib__/LegendStudioTesting.js';
|
|
43
49
|
import { ServiceRegistrationEditor } from './ServiceRegistrationEditor.js';
|
|
@@ -70,11 +76,11 @@ import {
|
|
|
70
76
|
import { LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../../../../__lib__/LegendStudioApplicationNavigationContext.js';
|
|
71
77
|
import { ServiceTestableEditor } from './testable/ServiceTestableEditor.js';
|
|
72
78
|
import { flowResult } from 'mobx';
|
|
73
|
-
import { LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../../../__lib__/LegendStudioDocumentation.js';
|
|
74
|
-
import { DocumentationLink } from '@finos/legend-lego/application';
|
|
75
79
|
import { ServicePostValidationsEditor } from './ServicePostValidationEditor.js';
|
|
76
80
|
import type { DSL_Service_LegendStudioApplicationPlugin_Extension } from '../../../../stores/extensions/DSL_Service_LegendStudioApplicationPlugin_Extension.js';
|
|
77
81
|
import { LegendStudioTelemetryHelper } from '../../../../__lib__/LegendStudioTelemetryHelper.js';
|
|
82
|
+
import { LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../../../__lib__/LegendStudioDocumentation.js';
|
|
83
|
+
import { DocumentationLink } from '@finos/legend-lego/application';
|
|
78
84
|
|
|
79
85
|
type UserOption = { label: string; value: string };
|
|
80
86
|
|
|
@@ -278,6 +284,26 @@ const ServiceGeneralEditor = observer(() => {
|
|
|
278
284
|
]);
|
|
279
285
|
const suggestion = await aiDocSuggester(serviceGrammar, legendAIUrl);
|
|
280
286
|
setAIDocSuggestion(suggestion);
|
|
287
|
+
} catch (error) {
|
|
288
|
+
assertErrorThrown(error);
|
|
289
|
+
LegendStudioTelemetryHelper.logEvent_ServiceLegendAISuggestFailure(
|
|
290
|
+
applicationStore.telemetryService,
|
|
291
|
+
service.path,
|
|
292
|
+
error.message,
|
|
293
|
+
);
|
|
294
|
+
if (
|
|
295
|
+
error instanceof NetworkClientError &&
|
|
296
|
+
(error.response.status === HttpStatus.UNAUTHORIZED ||
|
|
297
|
+
error.response.status === HttpStatus.FORBIDDEN)
|
|
298
|
+
) {
|
|
299
|
+
const docEntry = applicationStore.documentationService.getDocEntry(
|
|
300
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.LEGENDAI_HOW_TO_GET_ENTITLEMENTS,
|
|
301
|
+
);
|
|
302
|
+
if (docEntry?.url) {
|
|
303
|
+
error.message = `${error.message}. Please check how to get entitlements: ${docEntry.url}`;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
throw error;
|
|
281
307
|
} finally {
|
|
282
308
|
setIsSuggestingWithAI(false);
|
|
283
309
|
}
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
} from '@finos/legend-art';
|
|
56
56
|
import type { AtomicTest, TestSuite } from '@finos/legend-graph';
|
|
57
57
|
import type { ActionState, GeneratorFn } from '@finos/legend-shared';
|
|
58
|
-
import { useState } from 'react';
|
|
58
|
+
import { useState, type ReactNode } from 'react';
|
|
59
59
|
import type { TestableTestEditorState } from '../../../../stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js';
|
|
60
60
|
import {
|
|
61
61
|
TESTABLE_RESULT,
|
|
@@ -341,8 +341,14 @@ export const LakehouseTestDataEditor = observer(
|
|
|
341
341
|
// ─── Test editor: assertion viewer ────────────────────────────────────────────
|
|
342
342
|
|
|
343
343
|
export const LakehouseTestEditor = observer(
|
|
344
|
-
(props: {
|
|
345
|
-
|
|
344
|
+
(props: {
|
|
345
|
+
testState: TestableTestEditorState;
|
|
346
|
+
isReadOnly: boolean;
|
|
347
|
+
renderTestStateExtension?: (
|
|
348
|
+
testState: TestableTestEditorState,
|
|
349
|
+
) => ReactNode;
|
|
350
|
+
}) => {
|
|
351
|
+
const { testState, renderTestStateExtension } = props;
|
|
346
352
|
const selectedAssertion = testState.selectedAsertionState;
|
|
347
353
|
|
|
348
354
|
return (
|
|
@@ -353,6 +359,7 @@ export const LakehouseTestEditor = observer(
|
|
|
353
359
|
</div>
|
|
354
360
|
</div>
|
|
355
361
|
<div className="panel">
|
|
362
|
+
{renderTestStateExtension?.(testState)}
|
|
356
363
|
{selectedAssertion && (
|
|
357
364
|
<TestAssertionEditor testAssertionState={selectedAssertion} />
|
|
358
365
|
)}
|
|
@@ -449,8 +456,12 @@ export const LakehouseTestsEditor = observer(
|
|
|
449
456
|
suiteState: LakehouseSuiteStateForEditor;
|
|
450
457
|
testableState: LakehouseTestableStateForEditor;
|
|
451
458
|
isReadOnly: boolean;
|
|
459
|
+
renderTestStateExtension?: (
|
|
460
|
+
testState: TestableTestEditorState,
|
|
461
|
+
) => ReactNode;
|
|
452
462
|
}) => {
|
|
453
|
-
const { suiteState, testableState, isReadOnly } =
|
|
463
|
+
const { suiteState, testableState, isReadOnly, renderTestStateExtension } =
|
|
464
|
+
props;
|
|
454
465
|
const selectedTest = suiteState.selectTestState;
|
|
455
466
|
|
|
456
467
|
return (
|
|
@@ -513,6 +524,9 @@ export const LakehouseTestsEditor = observer(
|
|
|
513
524
|
<LakehouseTestEditor
|
|
514
525
|
testState={selectedTest}
|
|
515
526
|
isReadOnly={isReadOnly}
|
|
527
|
+
{...(renderTestStateExtension
|
|
528
|
+
? { renderTestStateExtension }
|
|
529
|
+
: {})}
|
|
516
530
|
/>
|
|
517
531
|
) : (
|
|
518
532
|
<BlankPanelPlaceholder
|
|
@@ -535,8 +549,12 @@ export const LakehouseTestSuiteEditor = observer(
|
|
|
535
549
|
suiteState: LakehouseSuiteStateForEditor;
|
|
536
550
|
testableState: LakehouseTestableStateForEditor;
|
|
537
551
|
isReadOnly: boolean;
|
|
552
|
+
renderTestStateExtension?: (
|
|
553
|
+
testState: TestableTestEditorState,
|
|
554
|
+
) => ReactNode;
|
|
538
555
|
}) => {
|
|
539
|
-
const { suiteState, testableState, isReadOnly } =
|
|
556
|
+
const { suiteState, testableState, isReadOnly, renderTestStateExtension } =
|
|
557
|
+
props;
|
|
540
558
|
|
|
541
559
|
return (
|
|
542
560
|
<div className="service-test-suite-editor">
|
|
@@ -555,6 +573,9 @@ export const LakehouseTestSuiteEditor = observer(
|
|
|
555
573
|
suiteState={suiteState}
|
|
556
574
|
testableState={testableState}
|
|
557
575
|
isReadOnly={isReadOnly}
|
|
576
|
+
{...(renderTestStateExtension
|
|
577
|
+
? { renderTestStateExtension }
|
|
578
|
+
: {})}
|
|
558
579
|
/>
|
|
559
580
|
</ResizablePanel>
|
|
560
581
|
</ResizablePanelGroup>
|
package/src/index.ts
CHANGED
|
@@ -65,8 +65,11 @@ export * from './stores/graph-modifier/RawValueSpecificationGraphModifierHelper.
|
|
|
65
65
|
export * from './stores/extensions/DSL_Mapping_LegendStudioApplicationPlugin_Extension.js';
|
|
66
66
|
export * from './stores/extensions/DSL_Service_LegendStudioApplicationPlugin_Extension.js';
|
|
67
67
|
export * from './stores/extensions/DSL_DataProduct_LegendStudioApplicationPlugin_Extension.js';
|
|
68
|
+
export * from './stores/extensions/DSL_DataSpace_LegendStudioApplicationPlugin_Extension.js';
|
|
68
69
|
export * from './stores/extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.js';
|
|
69
70
|
export { DataProductEditorState } from './stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js';
|
|
71
|
+
export { LEGEND_STUDIO_DOCUMENTATION_KEY } from './__lib__/LegendStudioDocumentation.js';
|
|
72
|
+
export { LegendStudioTelemetryHelper } from './__lib__/LegendStudioTelemetryHelper.js';
|
|
70
73
|
|
|
71
74
|
// components
|
|
72
75
|
export { queryClass } from './components/editor/editor-group/uml-editor/ClassQueryBuilder.js';
|
|
@@ -93,7 +93,7 @@ export type { LakehouseElementTestDataState as DataProductElementTestDataState }
|
|
|
93
93
|
* Returns the lambda for an access point (handles both LakehouseAccessPoint
|
|
94
94
|
* and FunctionAccessPoint).
|
|
95
95
|
*/
|
|
96
|
-
const getAccessPointLambda = (
|
|
96
|
+
export const getAccessPointLambda = (
|
|
97
97
|
accessPoint: AccessPoint,
|
|
98
98
|
): RawLambda | undefined =>
|
|
99
99
|
accessPoint instanceof LakehouseAccessPoint
|
|
@@ -0,0 +1,54 @@
|
|
|
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 type { DSL_LegendStudioApplicationPlugin_Extension } from '../LegendStudioApplicationPlugin.js';
|
|
18
|
+
|
|
19
|
+
// ── Response type ─────────────────────────────────────────────────────────────
|
|
20
|
+
|
|
21
|
+
export type DataSpaceDocResponse = {
|
|
22
|
+
description: string;
|
|
23
|
+
confidence: number;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// ── Request type ──────────────────────────────────────────────────────────────
|
|
27
|
+
|
|
28
|
+
export type DataSpaceDocRequest = {
|
|
29
|
+
/**
|
|
30
|
+
* Raw Pure grammar text containing the data space definitions.
|
|
31
|
+
*/
|
|
32
|
+
definitions: string;
|
|
33
|
+
/**
|
|
34
|
+
* Fully-qualified name of the data space (e.g. dataSpace::MY_SPACE).
|
|
35
|
+
*/
|
|
36
|
+
data_space_name: string;
|
|
37
|
+
/**
|
|
38
|
+
* LLM model override (uses server default if omitted).
|
|
39
|
+
*/
|
|
40
|
+
model?: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// ── Plugin extension interface ────────────────────────────────────────────────
|
|
44
|
+
|
|
45
|
+
export interface DSL_DataSpace_LegendStudioApplicationPlugin_Extension
|
|
46
|
+
extends DSL_LegendStudioApplicationPlugin_Extension {
|
|
47
|
+
/**
|
|
48
|
+
* Generate AI-suggested description for a data space.
|
|
49
|
+
*/
|
|
50
|
+
getExtraDataSpaceDocumentationAISuggester?(
|
|
51
|
+
request: DataSpaceDocRequest,
|
|
52
|
+
legendAIUrl: string,
|
|
53
|
+
): Promise<DataSpaceDocResponse>;
|
|
54
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -200,6 +200,7 @@
|
|
|
200
200
|
"./src/stores/editor/utils/TestableUtils.ts",
|
|
201
201
|
"./src/stores/editor/utils/TreeUtils.ts",
|
|
202
202
|
"./src/stores/extensions/DSL_DataProduct_LegendStudioApplicationPlugin_Extension.ts",
|
|
203
|
+
"./src/stores/extensions/DSL_DataSpace_LegendStudioApplicationPlugin_Extension.ts",
|
|
203
204
|
"./src/stores/extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.ts",
|
|
204
205
|
"./src/stores/extensions/DSL_Generation_LegendStudioApplicationPlugin_Extension.ts",
|
|
205
206
|
"./src/stores/extensions/DSL_Mapping_LegendStudioApplicationPlugin_Extension.ts",
|