@finos/legend-application-studio 28.14.1 → 28.14.3
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/application/LegendStudioApplicationConfig.d.ts +5 -0
- package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.js +6 -0
- package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
- package/lib/components/editor/editor-group/function-activator/testable/FunctionTestableEditor.d.ts +1 -1
- package/lib/components/editor/editor-group/function-activator/testable/FunctionTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/function-activator/testable/FunctionTestableEditor.js +93 -14
- package/lib/components/editor/editor-group/function-activator/testable/FunctionTestableEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceRegistrationEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceRegistrationEditor.js +7 -1
- package/lib/components/editor/editor-group/service-editor/ServiceRegistrationEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.d.ts +1 -13
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.js +7 -21
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.js.map +1 -1
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.d.ts +12 -1
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.d.ts.map +1 -1
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.js +13 -3
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.js.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceReview.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkspaceReview.js +12 -7
- package/lib/components/editor/side-bar/WorkspaceReview.js.map +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.d.ts.map +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.js +9 -2
- package/lib/components/workspace-setup/WorkspaceSetup.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/EditorSDLCState.d.ts +1 -0
- package/lib/stores/editor/EditorSDLCState.d.ts.map +1 -1
- package/lib/stores/editor/EditorSDLCState.js +5 -1
- package/lib/stores/editor/EditorSDLCState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.d.ts +34 -10
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.js +174 -95
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts +1 -8
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js +1 -70
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.d.ts +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js +2 -4
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts +2 -0
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.js +6 -0
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts +0 -8
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +3 -73
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts +12 -2
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js +120 -16
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js.map +1 -1
- package/lib/stores/editor/sidebar-state/WorkspaceReviewState.d.ts.map +1 -1
- package/lib/stores/editor/sidebar-state/WorkspaceReviewState.js +5 -1
- package/lib/stores/editor/sidebar-state/WorkspaceReviewState.js.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.d.ts +7 -1
- package/lib/stores/editor/utils/TestableUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.js +71 -2
- package/lib/stores/editor/utils/TestableUtils.js.map +1 -1
- package/lib/stores/graph-modifier/DomainGraphModifierHelper.d.ts +6 -1
- package/lib/stores/graph-modifier/DomainGraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graph-modifier/DomainGraphModifierHelper.js +16 -1
- package/lib/stores/graph-modifier/DomainGraphModifierHelper.js.map +1 -1
- package/lib/stores/workspace-setup/WorkspaceSetupStore.d.ts +8 -1
- package/lib/stores/workspace-setup/WorkspaceSetupStore.d.ts.map +1 -1
- package/lib/stores/workspace-setup/WorkspaceSetupStore.js +97 -8
- package/lib/stores/workspace-setup/WorkspaceSetupStore.js.map +1 -1
- package/package.json +5 -5
- package/src/application/LegendStudioApplicationConfig.ts +7 -0
- package/src/components/editor/editor-group/function-activator/testable/FunctionTestableEditor.tsx +376 -61
- package/src/components/editor/editor-group/service-editor/ServiceRegistrationEditor.tsx +38 -1
- package/src/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.tsx +18 -92
- package/src/components/editor/editor-group/testable/TestableSharedComponents.tsx +74 -1
- package/src/components/editor/side-bar/WorkspaceReview.tsx +6 -1
- package/src/components/workspace-setup/WorkspaceSetup.tsx +22 -1
- package/src/stores/editor/EditorSDLCState.ts +7 -0
- package/src/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.ts +280 -131
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +2 -94
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.ts +5 -5
- package/src/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.ts +7 -0
- package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +1 -143
- package/src/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.ts +159 -19
- package/src/stores/editor/sidebar-state/WorkspaceReviewState.ts +7 -1
- package/src/stores/editor/utils/TestableUtils.ts +144 -4
- package/src/stores/graph-modifier/DomainGraphModifierHelper.ts +33 -0
- package/src/stores/workspace-setup/WorkspaceSetupStore.ts +152 -21
@@ -35,11 +35,6 @@ import {
|
|
35
35
|
RefreshIcon,
|
36
36
|
TimesIcon,
|
37
37
|
FilledWindowMaximizeIcon,
|
38
|
-
Modal,
|
39
|
-
ModalHeader,
|
40
|
-
ModalFooter,
|
41
|
-
ModalBody,
|
42
|
-
ModalTitle,
|
43
38
|
PlayIcon,
|
44
39
|
} from '@finos/legend-art';
|
45
40
|
import {
|
@@ -47,13 +42,13 @@ import {
|
|
47
42
|
PrimitiveInstanceValue,
|
48
43
|
PrimitiveType,
|
49
44
|
PureMultiExecution,
|
45
|
+
resolveServiceQueryRawLambda,
|
50
46
|
} from '@finos/legend-graph';
|
51
47
|
import {
|
52
48
|
BasicValueSpecificationEditor,
|
53
49
|
instanceValue_setValue,
|
54
50
|
} from '@finos/legend-query-builder';
|
55
51
|
import {
|
56
|
-
ContentType,
|
57
52
|
filterByType,
|
58
53
|
guaranteeNonNullable,
|
59
54
|
prettyCONSTName,
|
@@ -79,15 +74,16 @@ import {
|
|
79
74
|
} from '../../../../../stores/editor/sidebar-state/testable/GlobalTestRunnerState.js';
|
80
75
|
import { getTestableResultIcon } from '../../../side-bar/testable/GlobalTestRunner.js';
|
81
76
|
import {
|
77
|
+
ExternalFormatParameterEditorModal,
|
82
78
|
RenameModal,
|
83
79
|
TestAssertionEditor,
|
84
80
|
TestAssertionItem,
|
85
81
|
} from '../../testable/TestableSharedComponents.js';
|
86
|
-
import {
|
87
|
-
CODE_EDITOR_LANGUAGE,
|
88
|
-
CodeEditor,
|
89
|
-
} from '@finos/legend-lego/code-editor';
|
90
82
|
import { LEGEND_STUDIO_TEST_ID } from '../../../../../__lib__/LegendStudioTesting.js';
|
83
|
+
import {
|
84
|
+
getContentTypeWithParamFromQuery,
|
85
|
+
type TestParamContentType,
|
86
|
+
} from '../../../../../stores/editor/utils/TestableUtils.js';
|
91
87
|
|
92
88
|
export const NewParameterModal = observer(
|
93
89
|
(props: { setupState: ServiceTestSetupState; isReadOnly: boolean }) => {
|
@@ -140,86 +136,12 @@ export const NewParameterModal = observer(
|
|
140
136
|
},
|
141
137
|
);
|
142
138
|
|
143
|
-
export const ExternalFormatParameterEditorModal = observer(
|
144
|
-
(props: {
|
145
|
-
paramState: ServiceValueSpecificationTestParameterState;
|
146
|
-
isReadOnly: boolean;
|
147
|
-
onClose: () => void;
|
148
|
-
updateParamValue: (val: string) => void;
|
149
|
-
contentTypeParamPair: {
|
150
|
-
contentType: string;
|
151
|
-
param: string;
|
152
|
-
};
|
153
|
-
}) => {
|
154
|
-
const {
|
155
|
-
paramState,
|
156
|
-
isReadOnly,
|
157
|
-
onClose,
|
158
|
-
updateParamValue,
|
159
|
-
contentTypeParamPair,
|
160
|
-
} = props;
|
161
|
-
const paramValue =
|
162
|
-
paramState.varExpression.genericType?.value.rawType === PrimitiveType.BYTE
|
163
|
-
? atob(
|
164
|
-
(paramState.valueSpec as PrimitiveInstanceValue)
|
165
|
-
.values[0] as string,
|
166
|
-
)
|
167
|
-
: ((paramState.valueSpec as PrimitiveInstanceValue)
|
168
|
-
.values[0] as string);
|
169
|
-
return (
|
170
|
-
<Dialog
|
171
|
-
open={true}
|
172
|
-
onClose={onClose}
|
173
|
-
classes={{ container: 'search-modal__container' }}
|
174
|
-
PaperProps={{ classes: { root: 'search-modal__inner-container' } }}
|
175
|
-
>
|
176
|
-
<Modal
|
177
|
-
darkMode={true}
|
178
|
-
className={clsx('editor-modal lambda-editor__popup__modal')}
|
179
|
-
>
|
180
|
-
<ModalHeader>
|
181
|
-
<ModalTitle title="Edit Parameter Value" />
|
182
|
-
</ModalHeader>
|
183
|
-
<ModalBody>
|
184
|
-
<div className="service-test-editor__setup__parameter__code-editor__container">
|
185
|
-
<div className="service-test-editor__setup__parameter__code-editor__container__content">
|
186
|
-
<CodeEditor
|
187
|
-
key={paramState.uuid}
|
188
|
-
inputValue={paramValue}
|
189
|
-
updateInput={updateParamValue}
|
190
|
-
isReadOnly={isReadOnly}
|
191
|
-
language={
|
192
|
-
contentTypeParamPair.contentType ===
|
193
|
-
ContentType.APPLICATION_JSON.toString()
|
194
|
-
? CODE_EDITOR_LANGUAGE.JSON
|
195
|
-
: CODE_EDITOR_LANGUAGE.TEXT
|
196
|
-
}
|
197
|
-
/>
|
198
|
-
</div>
|
199
|
-
</div>
|
200
|
-
</ModalBody>
|
201
|
-
<ModalFooter>
|
202
|
-
<button className="btn btn--dark" onClick={onClose}>
|
203
|
-
Close
|
204
|
-
</button>
|
205
|
-
</ModalFooter>
|
206
|
-
</Modal>
|
207
|
-
</Dialog>
|
208
|
-
);
|
209
|
-
},
|
210
|
-
);
|
211
|
-
|
212
139
|
const ServiceTestParameterEditor = observer(
|
213
140
|
(props: {
|
214
141
|
isReadOnly: boolean;
|
215
142
|
paramState: ServiceValueSpecificationTestParameterState;
|
216
143
|
serviceTestState: ServiceTestState;
|
217
|
-
contentTypeParamPair:
|
218
|
-
| {
|
219
|
-
contentType: string;
|
220
|
-
param: string;
|
221
|
-
}
|
222
|
-
| undefined;
|
144
|
+
contentTypeParamPair: TestParamContentType | undefined;
|
223
145
|
}) => {
|
224
146
|
const { serviceTestState, paramState, isReadOnly, contentTypeParamPair } =
|
225
147
|
props;
|
@@ -290,7 +212,8 @@ const ServiceTestParameterEditor = observer(
|
|
290
212
|
/>
|
291
213
|
{showPopUp && (
|
292
214
|
<ExternalFormatParameterEditorModal
|
293
|
-
|
215
|
+
valueSpec={paramState.valueSpec}
|
216
|
+
varExpression={paramState.varExpression}
|
294
217
|
isReadOnly={isReadOnly}
|
295
218
|
onClose={closePopUp}
|
296
219
|
updateParamValue={updateParamValue}
|
@@ -525,12 +448,15 @@ const ServiceTestSetupEditor = observer(
|
|
525
448
|
isReadOnly={isReadOnly}
|
526
449
|
paramState={paramState}
|
527
450
|
serviceTestState={serviceTestState}
|
528
|
-
contentTypeParamPair={
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
451
|
+
contentTypeParamPair={getContentTypeWithParamFromQuery(
|
452
|
+
resolveServiceQueryRawLambda(
|
453
|
+
serviceTestState.service,
|
454
|
+
),
|
455
|
+
serviceTestState.editorStore,
|
456
|
+
).find(
|
457
|
+
(pair) =>
|
458
|
+
pair.param === paramState.parameterValue.name,
|
459
|
+
)}
|
534
460
|
/>
|
535
461
|
))}
|
536
462
|
</div>
|
@@ -27,6 +27,7 @@ import {
|
|
27
27
|
ModalFooter,
|
28
28
|
ModalFooterButton,
|
29
29
|
ModalHeader,
|
30
|
+
ModalTitle,
|
30
31
|
PanelContent,
|
31
32
|
PanelFormTextField,
|
32
33
|
PanelHeader,
|
@@ -35,8 +36,16 @@ import {
|
|
35
36
|
RefreshIcon,
|
36
37
|
WrenchIcon,
|
37
38
|
} from '@finos/legend-art';
|
38
|
-
import { type DataElement, TestError } from '@finos/legend-graph';
|
39
39
|
import {
|
40
|
+
type DataElement,
|
41
|
+
type ValueSpecification,
|
42
|
+
type VariableExpression,
|
43
|
+
type PrimitiveInstanceValue,
|
44
|
+
TestError,
|
45
|
+
PrimitiveType,
|
46
|
+
} from '@finos/legend-graph';
|
47
|
+
import {
|
48
|
+
ContentType,
|
40
49
|
prettyCONSTName,
|
41
50
|
tryToFormatLosslessJSONString,
|
42
51
|
} from '@finos/legend-shared';
|
@@ -67,6 +76,7 @@ import {
|
|
67
76
|
buildElementOption,
|
68
77
|
getPackageableElementOptionFormatter,
|
69
78
|
} from '@finos/legend-lego/graph-editor';
|
79
|
+
import type { TestParamContentType } from '../../../../stores/editor/utils/TestableUtils.js';
|
70
80
|
|
71
81
|
export const SharedDataElementModal = observer(
|
72
82
|
(props: {
|
@@ -597,3 +607,66 @@ export const TestAssertionEditor = observer(
|
|
597
607
|
);
|
598
608
|
},
|
599
609
|
);
|
610
|
+
|
611
|
+
export const ExternalFormatParameterEditorModal = observer(
|
612
|
+
(props: {
|
613
|
+
valueSpec: ValueSpecification;
|
614
|
+
varExpression: VariableExpression;
|
615
|
+
isReadOnly: boolean;
|
616
|
+
onClose: () => void;
|
617
|
+
updateParamValue: (val: string) => void;
|
618
|
+
contentTypeParamPair: TestParamContentType;
|
619
|
+
}) => {
|
620
|
+
const {
|
621
|
+
valueSpec,
|
622
|
+
varExpression,
|
623
|
+
isReadOnly,
|
624
|
+
onClose,
|
625
|
+
updateParamValue,
|
626
|
+
contentTypeParamPair,
|
627
|
+
} = props;
|
628
|
+
const paramValue =
|
629
|
+
varExpression.genericType?.value.rawType === PrimitiveType.BYTE
|
630
|
+
? atob((valueSpec as PrimitiveInstanceValue).values[0] as string)
|
631
|
+
: ((valueSpec as PrimitiveInstanceValue).values[0] as string);
|
632
|
+
return (
|
633
|
+
<Dialog
|
634
|
+
open={true}
|
635
|
+
onClose={onClose}
|
636
|
+
classes={{ container: 'search-modal__container' }}
|
637
|
+
PaperProps={{ classes: { root: 'search-modal__inner-container' } }}
|
638
|
+
>
|
639
|
+
<Modal
|
640
|
+
darkMode={true}
|
641
|
+
className={clsx('editor-modal lambda-editor__popup__modal')}
|
642
|
+
>
|
643
|
+
<ModalHeader>
|
644
|
+
<ModalTitle title="Edit Parameter Value" />
|
645
|
+
</ModalHeader>
|
646
|
+
<ModalBody>
|
647
|
+
<div className="service-test-editor__setup__parameter__code-editor__container">
|
648
|
+
<div className="service-test-editor__setup__parameter__code-editor__container__content">
|
649
|
+
<CodeEditor
|
650
|
+
inputValue={paramValue}
|
651
|
+
updateInput={updateParamValue}
|
652
|
+
isReadOnly={isReadOnly}
|
653
|
+
language={
|
654
|
+
contentTypeParamPair.contentType ===
|
655
|
+
ContentType.APPLICATION_JSON.toString()
|
656
|
+
? CODE_EDITOR_LANGUAGE.JSON
|
657
|
+
: CODE_EDITOR_LANGUAGE.TEXT
|
658
|
+
}
|
659
|
+
/>
|
660
|
+
</div>
|
661
|
+
</div>
|
662
|
+
</ModalBody>
|
663
|
+
<ModalFooter>
|
664
|
+
<button className="btn btn--dark" onClick={onClose}>
|
665
|
+
Close
|
666
|
+
</button>
|
667
|
+
</ModalFooter>
|
668
|
+
</Modal>
|
669
|
+
</Dialog>
|
670
|
+
);
|
671
|
+
},
|
672
|
+
);
|
@@ -139,6 +139,8 @@ export const WorkspaceReview = observer(() => {
|
|
139
139
|
!workspaceReviewState.canMergeReview;
|
140
140
|
const commitReviewTitle = workspaceContainsSnapshotDependencies
|
141
141
|
? `Can't commit review: workspace has snapshot dependencies`
|
142
|
+
: workspaceReviewState.sdlcState.isActiveProjectSandbox
|
143
|
+
? `Can't commit review: reviews are not allowed on sandbox projects`
|
142
144
|
: !workspaceReviewState.canMergeReview
|
143
145
|
? workspaceReviewState.sdlcState.unAuthorizedActionMessage(
|
144
146
|
AuthorizableProjectAction.COMMIT_REVIEW,
|
@@ -160,9 +162,12 @@ export const WorkspaceReview = observer(() => {
|
|
160
162
|
Boolean(workspaceReview) ||
|
161
163
|
!workspaceReviewState.reviewTitle ||
|
162
164
|
workspaceContainsSnapshotDependencies ||
|
163
|
-
!workspaceReviewState.canCreateReview
|
165
|
+
!workspaceReviewState.canCreateReview ||
|
166
|
+
workspaceReviewState.sdlcState.isActiveProjectSandbox;
|
164
167
|
const createReviewTitle = workspaceContainsSnapshotDependencies
|
165
168
|
? `Can't create review: workspace has snapshot dependencies`
|
169
|
+
: workspaceReviewState.sdlcState.isActiveProjectSandbox
|
170
|
+
? `Can't create review: reviews are not allowed on sandbox projects`
|
166
171
|
: !workspaceReviewState.canCreateReview
|
167
172
|
? workspaceReviewState.sdlcState.unAuthorizedActionMessage(
|
168
173
|
AuthorizableProjectAction.SUBMIT_REVIEW,
|
@@ -338,6 +338,12 @@ export const WorkspaceSetup = withWorkspaceSetupStore(
|
|
338
338
|
const showCreateProjectModal = (): void =>
|
339
339
|
setupStore.setShowCreateProjectModal(true);
|
340
340
|
|
341
|
+
const createSandboxProject = (): void => {
|
342
|
+
flowResult(setupStore.createSandboxProject()).catch(
|
343
|
+
applicationStore.alertUnhandledError,
|
344
|
+
);
|
345
|
+
};
|
346
|
+
|
341
347
|
// project search text
|
342
348
|
const debouncedLoadProjects = useMemo(
|
343
349
|
() =>
|
@@ -409,6 +415,9 @@ export const WorkspaceSetup = withWorkspaceSetupStore(
|
|
409
415
|
flowResult(setupStore.loadProjects('')).catch(
|
410
416
|
applicationStore.alertUnhandledError,
|
411
417
|
);
|
418
|
+
flowResult(setupStore.loadSandboxProject()).catch(
|
419
|
+
applicationStore.alertUnhandledError,
|
420
|
+
);
|
412
421
|
}, [setupStore, applicationStore]);
|
413
422
|
|
414
423
|
useApplicationNavigationContext(
|
@@ -456,7 +465,8 @@ export const WorkspaceSetup = withWorkspaceSetupStore(
|
|
456
465
|
className="workspace-setup__selector__content__input"
|
457
466
|
options={projectOptions}
|
458
467
|
isLoading={
|
459
|
-
setupStore.loadProjectsState.isInProgress
|
468
|
+
setupStore.loadProjectsState.isInProgress ||
|
469
|
+
setupStore.loadSandboxState.isInProgress
|
460
470
|
}
|
461
471
|
onInputChange={onProjectSearchTextChange}
|
462
472
|
inputValue={projectSearchText}
|
@@ -579,6 +589,17 @@ export const WorkspaceSetup = withWorkspaceSetupStore(
|
|
579
589
|
>
|
580
590
|
Create New Project
|
581
591
|
</button>
|
592
|
+
{setupStore.sandboxProject === true &&
|
593
|
+
setupStore.applicationStore.config.options
|
594
|
+
.TEMPORARY__enableCreationOfSandboxProjects && (
|
595
|
+
<button
|
596
|
+
className="workspace-setup__new-btn btn--dark"
|
597
|
+
onClick={createSandboxProject}
|
598
|
+
title="Create Sandbox Project"
|
599
|
+
>
|
600
|
+
Create Sandbox Project
|
601
|
+
</button>
|
602
|
+
)}
|
582
603
|
</div>
|
583
604
|
</div>
|
584
605
|
</div>
|
@@ -49,6 +49,7 @@ import {
|
|
49
49
|
WorkspaceAccessType,
|
50
50
|
Patch,
|
51
51
|
AuthorizableProjectAction,
|
52
|
+
isProjectSandbox,
|
52
53
|
} from '@finos/legend-server-sdlc';
|
53
54
|
import { LEGEND_STUDIO_APP_EVENT } from '../../__lib__/LegendStudioEvent.js';
|
54
55
|
|
@@ -100,6 +101,7 @@ export class EditorSDLCState {
|
|
100
101
|
canCreateWorkspace: computed,
|
101
102
|
canCreateVersion: computed,
|
102
103
|
isWorkspaceOutOfSync: computed,
|
104
|
+
isActiveProjectSandbox: computed,
|
103
105
|
setCurrentProject: action,
|
104
106
|
setCurrentPatch: action,
|
105
107
|
setCurrentWorkspace: action,
|
@@ -130,6 +132,11 @@ export class EditorSDLCState {
|
|
130
132
|
`Active project has not been properly set`,
|
131
133
|
);
|
132
134
|
}
|
135
|
+
get isActiveProjectSandbox(): boolean {
|
136
|
+
return Boolean(
|
137
|
+
this.currentProject && isProjectSandbox(this.currentProject),
|
138
|
+
);
|
139
|
+
}
|
133
140
|
|
134
141
|
get activeWorkspace(): Workspace {
|
135
142
|
return guaranteeNonNullable(
|