@finos/legend-extension-dsl-data-space-studio 0.2.1 → 0.2.2
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/DataSpaceEditor.d.ts.map +1 -1
- package/lib/components/DataSpaceEditor.js +34 -3
- package/lib/components/DataSpaceEditor.js.map +1 -1
- package/lib/components/DataSpaceExecutionContextEditor.d.ts.map +1 -1
- package/lib/components/DataSpaceExecutionContextEditor.js +50 -6
- package/lib/components/DataSpaceExecutionContextEditor.js.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceDiagramsSection.d.ts.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceDiagramsSection.js +26 -35
- package/lib/components/DataSpaceGeneralEditor/DataSpaceDiagramsSection.js.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceElementsSection.d.ts.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceElementsSection.js +23 -29
- package/lib/components/DataSpaceGeneralEditor/DataSpaceElementsSection.js.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceExecutablesSection.d.ts.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceExecutablesSection.js +16 -5
- package/lib/components/DataSpaceGeneralEditor/DataSpaceExecutablesSection.js.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.d.ts.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.js +13 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.js.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceHomeTab.d.ts.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceHomeTab.js +6 -6
- package/lib/components/DataSpaceGeneralEditor/DataSpaceHomeTab.js.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceInfoTab.d.ts.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceInfoTab.js +7 -3
- package/lib/components/DataSpaceGeneralEditor/DataSpaceInfoTab.js.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.d.ts.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.js +14 -24
- package/lib/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.js.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.d.ts +4 -0
- package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.d.ts.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.js +4 -2
- package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.js.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceSupportInfoSection.d.ts.map +1 -1
- package/lib/components/DataSpaceGeneralEditor/DataSpaceSupportInfoSection.js +49 -83
- package/lib/components/DataSpaceGeneralEditor/DataSpaceSupportInfoSection.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +4 -1
- package/lib/stores/DataSpaceEditorState.d.ts.map +1 -1
- package/lib/stores/DataSpaceEditorState.js +3 -4
- package/lib/stores/DataSpaceEditorState.js.map +1 -1
- package/lib/stores/studio/DSL_DataSpace_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/studio/DSL_DataSpace_GraphModifierHelper.js +6 -2
- package/lib/stores/studio/DSL_DataSpace_GraphModifierHelper.js.map +1 -1
- package/package.json +12 -9
- package/src/components/DataSpaceEditor.tsx +109 -23
- package/src/components/DataSpaceExecutionContextEditor.tsx +123 -57
- package/src/components/DataSpaceGeneralEditor/DataSpaceDiagramsSection.tsx +129 -100
- package/src/components/DataSpaceGeneralEditor/DataSpaceElementsSection.tsx +135 -78
- package/src/components/DataSpaceGeneralEditor/DataSpaceExecutablesSection.tsx +58 -31
- package/src/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.tsx +17 -0
- package/src/components/DataSpaceGeneralEditor/DataSpaceHomeTab.tsx +52 -51
- package/src/components/DataSpaceGeneralEditor/DataSpaceInfoTab.tsx +91 -36
- package/src/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.tsx +67 -58
- package/src/components/DataSpaceGeneralEditor/DataSpaceSidebar.tsx +24 -2
- package/src/components/DataSpaceGeneralEditor/DataSpaceSupportInfoSection.tsx +204 -214
- package/src/stores/DataSpaceEditorState.ts +3 -4
- package/src/stores/studio/DSL_DataSpace_GraphModifierHelper.ts +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-extension-dsl-data-space-studio",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Legend extension for Data Space DSL - Studio",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -42,15 +42,16 @@
|
|
|
42
42
|
"test:watch": "jest --watch"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@finos/legend-application": "16.1.
|
|
46
|
-
"@finos/legend-application-studio": "28.22.
|
|
47
|
-
"@finos/legend-art": "7.1.
|
|
48
|
-
"@finos/legend-code-editor": "2.0.
|
|
49
|
-
"@finos/legend-extension-dsl-data-space": "10.4.
|
|
50
|
-
"@finos/legend-
|
|
51
|
-
"@finos/legend-
|
|
45
|
+
"@finos/legend-application": "16.1.2",
|
|
46
|
+
"@finos/legend-application-studio": "28.22.2",
|
|
47
|
+
"@finos/legend-art": "7.1.173",
|
|
48
|
+
"@finos/legend-code-editor": "2.0.216",
|
|
49
|
+
"@finos/legend-extension-dsl-data-space": "10.4.270",
|
|
50
|
+
"@finos/legend-extension-dsl-diagram": "8.1.280",
|
|
51
|
+
"@finos/legend-graph": "32.9.3",
|
|
52
|
+
"@finos/legend-query-builder": "4.19.25",
|
|
52
53
|
"@finos/legend-server-depot": "6.1.25",
|
|
53
|
-
"@finos/legend-server-sdlc": "5.5.
|
|
54
|
+
"@finos/legend-server-sdlc": "5.5.4",
|
|
54
55
|
"@finos/legend-shared": "11.0.33",
|
|
55
56
|
"@types/react": "19.0.10",
|
|
56
57
|
"mobx": "6.13.6",
|
|
@@ -61,6 +62,8 @@
|
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@finos/legend-dev-utils": "2.2.13",
|
|
63
64
|
"@jest/globals": "29.7.0",
|
|
65
|
+
"@testing-library/dom": "10.4.0",
|
|
66
|
+
"@testing-library/react": "16.2.0",
|
|
64
67
|
"cross-env": "7.0.3",
|
|
65
68
|
"eslint": "9.22.0",
|
|
66
69
|
"jest": "29.7.0",
|
|
@@ -15,8 +15,18 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
|
18
|
-
import {
|
|
19
|
-
|
|
18
|
+
import {
|
|
19
|
+
getElementIcon,
|
|
20
|
+
useEditorStore,
|
|
21
|
+
} from '@finos/legend-application-studio';
|
|
22
|
+
import {
|
|
23
|
+
clsx,
|
|
24
|
+
CheckCircleIcon,
|
|
25
|
+
EyeIcon,
|
|
26
|
+
LockIcon,
|
|
27
|
+
Panel,
|
|
28
|
+
PanelContent,
|
|
29
|
+
} from '@finos/legend-art';
|
|
20
30
|
import { DataSpaceEditorState } from '../stores/DataSpaceEditorState.js';
|
|
21
31
|
import { DataSpaceGeneralEditor } from './DataSpaceGeneralEditor/DataSpaceGeneralEditor.js';
|
|
22
32
|
import { DataSpacePreviewState } from '../stores/DataSpacePreviewState.js';
|
|
@@ -27,6 +37,93 @@ import { resolveExecutionContextMapping } from '@finos/legend-extension-dsl-data
|
|
|
27
37
|
import { DSL_DATA_SPACE_LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../__lib__/DSL_DataSpace_LegendStudioDocumentation.js';
|
|
28
38
|
import { useApplicationNavigationContext } from '@finos/legend-application';
|
|
29
39
|
|
|
40
|
+
const DataSpaceEditorHeader = observer(
|
|
41
|
+
(props: {
|
|
42
|
+
dataSpaceState: DataSpaceEditorState;
|
|
43
|
+
canPreview: boolean;
|
|
44
|
+
onPreview: () => void;
|
|
45
|
+
}) => {
|
|
46
|
+
const { dataSpaceState, canPreview, onPreview } = props;
|
|
47
|
+
const editorStore = useEditorStore();
|
|
48
|
+
const dataSpace = dataSpaceState.dataSpace;
|
|
49
|
+
const statuses = [
|
|
50
|
+
dataSpaceState.isVerified && {
|
|
51
|
+
label: 'Verified',
|
|
52
|
+
kind: 'verified',
|
|
53
|
+
title: 'Marked as verified',
|
|
54
|
+
},
|
|
55
|
+
dataSpaceState.isInDevelopment && {
|
|
56
|
+
label: 'In development',
|
|
57
|
+
kind: 'development',
|
|
58
|
+
title: 'Marked as still in development',
|
|
59
|
+
},
|
|
60
|
+
dataSpaceState.isExternal && {
|
|
61
|
+
label: 'External',
|
|
62
|
+
kind: 'external',
|
|
63
|
+
title: 'Marked as externally sourced',
|
|
64
|
+
},
|
|
65
|
+
dataSpaceState.deprecationNotice && {
|
|
66
|
+
label: 'Deprecated',
|
|
67
|
+
kind: 'deprecated',
|
|
68
|
+
title: dataSpaceState.deprecationNotice,
|
|
69
|
+
},
|
|
70
|
+
].filter(
|
|
71
|
+
(status): status is { label: string; kind: string; title: string } =>
|
|
72
|
+
Boolean(status),
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<div className="dataSpace-editor-header">
|
|
77
|
+
<div className="dataSpace-editor-header__icon">
|
|
78
|
+
{getElementIcon(dataSpace, editorStore)}
|
|
79
|
+
</div>
|
|
80
|
+
<div className="dataSpace-editor-header__title">
|
|
81
|
+
<div className="dataSpace-editor-header__name">
|
|
82
|
+
<span>
|
|
83
|
+
{dataSpace.title?.trim() ? dataSpace.title : dataSpace.name}
|
|
84
|
+
</span>
|
|
85
|
+
{statuses.map((status) => (
|
|
86
|
+
<span
|
|
87
|
+
key={status.kind}
|
|
88
|
+
className={clsx(
|
|
89
|
+
'dataSpace-editor-header__status',
|
|
90
|
+
`dataSpace-editor-header__status--${status.kind}`,
|
|
91
|
+
)}
|
|
92
|
+
title={status.title}
|
|
93
|
+
>
|
|
94
|
+
{status.kind === 'verified' && <CheckCircleIcon />}
|
|
95
|
+
{status.label}
|
|
96
|
+
</span>
|
|
97
|
+
))}
|
|
98
|
+
{dataSpaceState.isReadOnly && (
|
|
99
|
+
<span
|
|
100
|
+
className="dataSpace-editor-header__status"
|
|
101
|
+
title="This data space is read-only"
|
|
102
|
+
>
|
|
103
|
+
<LockIcon />
|
|
104
|
+
Read-only
|
|
105
|
+
</span>
|
|
106
|
+
)}
|
|
107
|
+
</div>
|
|
108
|
+
<div className="dataSpace-editor-header__path" title={dataSpace.path}>
|
|
109
|
+
Data space · {dataSpace.path}
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
<button
|
|
113
|
+
className="dataSpace-editor-header__preview-btn"
|
|
114
|
+
onClick={onPreview}
|
|
115
|
+
title="Preview the data space as people will see it"
|
|
116
|
+
tabIndex={-1}
|
|
117
|
+
disabled={!canPreview}
|
|
118
|
+
>
|
|
119
|
+
<EyeIcon />
|
|
120
|
+
Preview
|
|
121
|
+
</button>
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
124
|
+
},
|
|
125
|
+
);
|
|
126
|
+
|
|
30
127
|
export const DataSpaceEditor = observer(() => {
|
|
31
128
|
const editorStore = useEditorStore();
|
|
32
129
|
|
|
@@ -77,30 +174,19 @@ export const DataSpaceEditor = observer(() => {
|
|
|
77
174
|
);
|
|
78
175
|
}, [dataSpaceState, editorStore]);
|
|
79
176
|
|
|
177
|
+
// Studio observes the graph in the background after loading it. Remount the header once that
|
|
178
|
+
// is done, so it reads, and tracks, the statuses from the observed data space
|
|
179
|
+
const isGraphObserved =
|
|
180
|
+
editorStore.changeDetectionState.graphObserveState.hasSucceeded;
|
|
181
|
+
|
|
80
182
|
return (
|
|
81
183
|
<Panel className="dataSpace-editor">
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
184
|
+
<DataSpaceEditorHeader
|
|
185
|
+
key={isGraphObserved ? 'observed' : 'not-observed'}
|
|
186
|
+
dataSpaceState={dataSpaceState}
|
|
187
|
+
canPreview={validPreviewState()}
|
|
188
|
+
onPreview={previewDataSpace}
|
|
87
189
|
/>
|
|
88
|
-
<PanelHeader darkMode={true}>
|
|
89
|
-
<div className="panel__header__actions">
|
|
90
|
-
<div className="btn__dropdown-combo btn__dropdown-combo--primary">
|
|
91
|
-
<button
|
|
92
|
-
className="btn__dropdown-combo__label"
|
|
93
|
-
onClick={previewDataSpace}
|
|
94
|
-
title="Preview Data Space"
|
|
95
|
-
tabIndex={-1}
|
|
96
|
-
disabled={!validPreviewState()}
|
|
97
|
-
>
|
|
98
|
-
<EyeIcon className="btn__dropdown-combo__label__icon" />
|
|
99
|
-
<div className="btn__dropdown-combo__label__title">Preview</div>
|
|
100
|
-
</button>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</PanelHeader>
|
|
104
190
|
|
|
105
191
|
<PanelContent>
|
|
106
192
|
<DataSpaceGeneralEditor />
|
|
@@ -22,9 +22,15 @@ import {
|
|
|
22
22
|
} from '@finos/legend-application-studio';
|
|
23
23
|
import { observer } from 'mobx-react-lite';
|
|
24
24
|
import { DataSpaceEditorState } from '../stores/DataSpaceEditorState.js';
|
|
25
|
+
import {
|
|
26
|
+
ActionAlertActionType,
|
|
27
|
+
ActionAlertType,
|
|
28
|
+
} from '@finos/legend-application';
|
|
25
29
|
import {
|
|
26
30
|
BlankPanelPlaceholder,
|
|
27
31
|
clsx,
|
|
32
|
+
CheckCircleIcon,
|
|
33
|
+
EmptyCircleIcon,
|
|
28
34
|
CustomSelectorInput,
|
|
29
35
|
Dialog,
|
|
30
36
|
LongArrowRightIcon,
|
|
@@ -254,6 +260,56 @@ const MappingSourceEditor = observer(
|
|
|
254
260
|
dataSpace_setExecutionContextMappingProvider(executionContext, provider);
|
|
255
261
|
};
|
|
256
262
|
|
|
263
|
+
// The two sources are exclusive, so choosing one drops the other; ask first
|
|
264
|
+
// if that throws away something the user set.
|
|
265
|
+
const selectSourceKind = (kind: MappingSourceKind): void => {
|
|
266
|
+
const otherSourcePath =
|
|
267
|
+
kind === 'mapping'
|
|
268
|
+
? mappingProvider?.element.value.path
|
|
269
|
+
: executionContext.mapping?.value.path;
|
|
270
|
+
if (otherSourcePath === undefined) {
|
|
271
|
+
setSourceKind(kind);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
const kindLabel = kind === 'mapping' ? 'mapping' : 'mapping provider';
|
|
275
|
+
const otherSourceLabel =
|
|
276
|
+
kind === 'mapping' ? 'mapping provider' : 'mapping';
|
|
277
|
+
applicationStore.alertService.setActionAlertInfo({
|
|
278
|
+
// both are set (e.g. from grammar) when the clicked kind is already shown
|
|
279
|
+
message:
|
|
280
|
+
kind === sourceKind
|
|
281
|
+
? `Keep only the ${kindLabel}?`
|
|
282
|
+
: `Switch to a ${kindLabel}?`,
|
|
283
|
+
prompt: `An execution context takes either a mapping or a mapping provider. This removes ${otherSourceLabel} '${otherSourcePath}' from '${executionContext.name}'.`,
|
|
284
|
+
type: ActionAlertType.CAUTION,
|
|
285
|
+
actions: [
|
|
286
|
+
{
|
|
287
|
+
label: `Remove ${otherSourceLabel}`,
|
|
288
|
+
type: ActionAlertActionType.PROCEED_WITH_CAUTION,
|
|
289
|
+
handler: (): void => {
|
|
290
|
+
if (kind === 'mapping') {
|
|
291
|
+
dataSpace_setExecutionContextMappingProvider(
|
|
292
|
+
executionContext,
|
|
293
|
+
undefined,
|
|
294
|
+
);
|
|
295
|
+
} else {
|
|
296
|
+
dataSpace_setExecutionContextMapping(
|
|
297
|
+
executionContext,
|
|
298
|
+
undefined,
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
setSourceKind(kind);
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
label: 'Cancel',
|
|
306
|
+
type: ActionAlertActionType.PROCEED,
|
|
307
|
+
default: true,
|
|
308
|
+
},
|
|
309
|
+
],
|
|
310
|
+
});
|
|
311
|
+
};
|
|
312
|
+
|
|
257
313
|
const accessPointGroupIds = providerDataProduct
|
|
258
314
|
? getModelAccessPointGroupIds(providerDataProduct)
|
|
259
315
|
: [];
|
|
@@ -339,7 +395,7 @@ const MappingSourceEditor = observer(
|
|
|
339
395
|
sourceKind === 'mapping',
|
|
340
396
|
})}
|
|
341
397
|
disabled={isReadOnly}
|
|
342
|
-
onClick={(): void =>
|
|
398
|
+
onClick={(): void => selectSourceKind('mapping')}
|
|
343
399
|
>
|
|
344
400
|
Mapping
|
|
345
401
|
</button>
|
|
@@ -350,7 +406,7 @@ const MappingSourceEditor = observer(
|
|
|
350
406
|
sourceKind === 'mappingProvider',
|
|
351
407
|
})}
|
|
352
408
|
disabled={isReadOnly}
|
|
353
|
-
onClick={(): void =>
|
|
409
|
+
onClick={(): void => selectSourceKind('mappingProvider')}
|
|
354
410
|
>
|
|
355
411
|
Mapping Provider
|
|
356
412
|
</button>
|
|
@@ -637,52 +693,74 @@ const ExecutionContextConfigurationEditor = observer(
|
|
|
637
693
|
|
|
638
694
|
return (
|
|
639
695
|
<div className="dataSpace-editor__configuration">
|
|
640
|
-
<
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
Description
|
|
667
|
-
</div>
|
|
668
|
-
<div className="panel__content__form__section__header__prompt">
|
|
669
|
-
Provide a description for this execution context.
|
|
696
|
+
<div className="dataSpace-editor__configuration__section">
|
|
697
|
+
<div className="dataSpace-editor__configuration__section__heading">
|
|
698
|
+
<div className="dataSpace-editor__configuration__section__header">
|
|
699
|
+
<div className="dataSpace-editor__configuration__section__title">
|
|
700
|
+
General
|
|
701
|
+
</div>
|
|
702
|
+
<div className="dataSpace-editor__configuration__section__hint">
|
|
703
|
+
How this execution context is named and described.
|
|
704
|
+
</div>
|
|
705
|
+
</div>
|
|
706
|
+
<button
|
|
707
|
+
className={clsx('dataSpace-editor-default-toggle', {
|
|
708
|
+
'dataSpace-editor-default-toggle--active': isDefault,
|
|
709
|
+
})}
|
|
710
|
+
onClick={toggleDefault}
|
|
711
|
+
disabled={isReadOnly}
|
|
712
|
+
aria-pressed={isDefault}
|
|
713
|
+
title={
|
|
714
|
+
isDefault
|
|
715
|
+
? 'Queries use this context unless they pick another. Click to unset.'
|
|
716
|
+
: 'Make this the context queries use unless they pick another'
|
|
717
|
+
}
|
|
718
|
+
>
|
|
719
|
+
{isDefault ? <CheckCircleIcon /> : <EmptyCircleIcon />}
|
|
720
|
+
{isDefault ? 'Default context' : 'Make default'}
|
|
721
|
+
</button>
|
|
670
722
|
</div>
|
|
671
|
-
<
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
723
|
+
<PanelFormTextField
|
|
724
|
+
name="Name"
|
|
725
|
+
value={executionContext.name}
|
|
726
|
+
update={(value): void =>
|
|
727
|
+
dataSpace_setExecutionContextName(executionContext, value ?? '')
|
|
728
|
+
}
|
|
729
|
+
isReadOnly={isReadOnly}
|
|
730
|
+
placeholder="Enter a unique name"
|
|
731
|
+
fullWidth={true}
|
|
732
|
+
hasError={Boolean(nameError)}
|
|
733
|
+
errorMessage={nameError}
|
|
734
|
+
errorClassName="dataSpace-editor__field--error"
|
|
735
|
+
/>
|
|
736
|
+
<PanelFormTextField
|
|
737
|
+
name="Title"
|
|
738
|
+
value={executionContext.title ?? ''}
|
|
739
|
+
update={(value): void =>
|
|
740
|
+
dataSpace_setExecutionContextTitle(executionContext, value)
|
|
681
741
|
}
|
|
682
|
-
|
|
683
|
-
placeholder="Enter
|
|
742
|
+
isReadOnly={isReadOnly}
|
|
743
|
+
placeholder="Enter title"
|
|
744
|
+
fullWidth={true}
|
|
684
745
|
/>
|
|
685
|
-
|
|
746
|
+
<label className="dataSpace-editor-field">
|
|
747
|
+
<span className="dataSpace-editor-field__label">Description</span>
|
|
748
|
+
<textarea
|
|
749
|
+
className="input input--dark dataSpace-editor-field__textarea"
|
|
750
|
+
spellCheck={false}
|
|
751
|
+
disabled={isReadOnly}
|
|
752
|
+
value={executionContext.description ?? ''}
|
|
753
|
+
onChange={(event): void =>
|
|
754
|
+
dataSpace_setExecutionContextDescription(
|
|
755
|
+
executionContext,
|
|
756
|
+
event.target.value || undefined,
|
|
757
|
+
)
|
|
758
|
+
}
|
|
759
|
+
rows={3}
|
|
760
|
+
placeholder="What this context is for, e.g. which environment it queries"
|
|
761
|
+
/>
|
|
762
|
+
</label>
|
|
763
|
+
</div>
|
|
686
764
|
<MappingSourceEditor
|
|
687
765
|
executionContextState={executionContextState}
|
|
688
766
|
executionContext={executionContext}
|
|
@@ -695,18 +773,6 @@ const ExecutionContextConfigurationEditor = observer(
|
|
|
695
773
|
executionContext={executionContext}
|
|
696
774
|
isReadOnly={isReadOnly}
|
|
697
775
|
/>
|
|
698
|
-
<PanelFormSection>
|
|
699
|
-
<button
|
|
700
|
-
className="btn btn--dark"
|
|
701
|
-
onClick={toggleDefault}
|
|
702
|
-
disabled={isReadOnly}
|
|
703
|
-
tabIndex={-1}
|
|
704
|
-
>
|
|
705
|
-
{isDefault
|
|
706
|
-
? 'Unset as default execution context'
|
|
707
|
-
: 'Set as default execution context'}
|
|
708
|
-
</button>
|
|
709
|
-
</PanelFormSection>
|
|
710
776
|
{issues.length > 0 && (
|
|
711
777
|
<div className="dataSpace-editor__configuration__issues">
|
|
712
778
|
{issues.map((issue) => (
|