@finos/legend-extension-dsl-data-space-studio 0.1.340 → 0.1.342

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.
Files changed (73) hide show
  1. package/lib/components/DSL_DataProduct_ElementDriver.d.ts.map +1 -1
  2. package/lib/components/DSL_DataProduct_ElementDriver.js +1 -10
  3. package/lib/components/DSL_DataProduct_ElementDriver.js.map +1 -1
  4. package/lib/components/DataSpaceEditor.js +9 -4
  5. package/lib/components/DataSpaceEditor.js.map +1 -1
  6. package/lib/components/DataSpaceExecutableQueryAction.d.ts +20 -0
  7. package/lib/components/DataSpaceExecutableQueryAction.d.ts.map +1 -0
  8. package/lib/components/DataSpaceExecutableQueryAction.js +85 -0
  9. package/lib/components/DataSpaceExecutableQueryAction.js.map +1 -0
  10. package/lib/components/DataSpaceExecutionContextEditor.d.ts +1 -12
  11. package/lib/components/DataSpaceExecutionContextEditor.d.ts.map +1 -1
  12. package/lib/components/DataSpaceExecutionContextEditor.js +206 -134
  13. package/lib/components/DataSpaceExecutionContextEditor.js.map +1 -1
  14. package/lib/components/DataSpaceGeneralEditor/DataSpaceExecutablesSection.d.ts.map +1 -1
  15. package/lib/components/DataSpaceGeneralEditor/DataSpaceExecutablesSection.js +130 -26
  16. package/lib/components/DataSpaceGeneralEditor/DataSpaceExecutablesSection.js.map +1 -1
  17. package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.d.ts.map +1 -1
  18. package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.js +16 -75
  19. package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.js.map +1 -1
  20. package/lib/components/DataSpaceGeneralEditor/{DataSpaceDefaultExecutionContextSection.d.ts → DataSpaceHomeTab.d.ts} +3 -3
  21. package/lib/components/DataSpaceGeneralEditor/DataSpaceHomeTab.d.ts.map +1 -0
  22. package/lib/components/DataSpaceGeneralEditor/DataSpaceHomeTab.js +100 -0
  23. package/lib/components/DataSpaceGeneralEditor/DataSpaceHomeTab.js.map +1 -0
  24. package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.d.ts +23 -0
  25. package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.d.ts.map +1 -0
  26. package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.js +31 -0
  27. package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.js.map +1 -0
  28. package/lib/components/DataSpaceGeneralEditor/DataSpaceValidation.d.ts +28 -0
  29. package/lib/components/DataSpaceGeneralEditor/DataSpaceValidation.d.ts.map +1 -0
  30. package/lib/components/DataSpaceGeneralEditor/DataSpaceValidation.js +45 -0
  31. package/lib/components/DataSpaceGeneralEditor/DataSpaceValidation.js.map +1 -0
  32. package/lib/components/DataSpaceQueryAction.d.ts.map +1 -1
  33. package/lib/components/DataSpaceQueryAction.js +11 -8
  34. package/lib/components/DataSpaceQueryAction.js.map +1 -1
  35. package/lib/index.css +2 -2
  36. package/lib/index.css.map +1 -1
  37. package/lib/package.json +1 -1
  38. package/lib/stores/DataSpaceEditorState.d.ts +9 -0
  39. package/lib/stores/DataSpaceEditorState.d.ts.map +1 -1
  40. package/lib/stores/DataSpaceEditorState.js +15 -0
  41. package/lib/stores/DataSpaceEditorState.js.map +1 -1
  42. package/lib/stores/DataSpaceExecutableTemplateState.d.ts +48 -0
  43. package/lib/stores/DataSpaceExecutableTemplateState.d.ts.map +1 -0
  44. package/lib/stores/DataSpaceExecutableTemplateState.js +105 -0
  45. package/lib/stores/DataSpaceExecutableTemplateState.js.map +1 -0
  46. package/lib/stores/DataSpaceExecutionContextState.d.ts +4 -9
  47. package/lib/stores/DataSpaceExecutionContextState.d.ts.map +1 -1
  48. package/lib/stores/DataSpaceExecutionContextState.js +13 -39
  49. package/lib/stores/DataSpaceExecutionContextState.js.map +1 -1
  50. package/lib/stores/studio/DSL_DataSpace_GraphModifierHelper.d.ts +12 -6
  51. package/lib/stores/studio/DSL_DataSpace_GraphModifierHelper.d.ts.map +1 -1
  52. package/lib/stores/studio/DSL_DataSpace_GraphModifierHelper.js +45 -3
  53. package/lib/stores/studio/DSL_DataSpace_GraphModifierHelper.js.map +1 -1
  54. package/package.json +9 -9
  55. package/src/components/DSL_DataProduct_ElementDriver.tsx +0 -14
  56. package/src/components/DataSpaceEditor.tsx +10 -10
  57. package/src/components/DataSpaceExecutableQueryAction.tsx +159 -0
  58. package/src/components/DataSpaceExecutionContextEditor.tsx +699 -558
  59. package/src/components/DataSpaceGeneralEditor/DataSpaceExecutablesSection.tsx +517 -60
  60. package/src/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.tsx +22 -198
  61. package/src/components/DataSpaceGeneralEditor/DataSpaceHomeTab.tsx +235 -0
  62. package/src/components/DataSpaceGeneralEditor/DataSpaceSidebar.tsx +60 -0
  63. package/src/components/DataSpaceGeneralEditor/DataSpaceValidation.tsx +83 -0
  64. package/src/components/DataSpaceQueryAction.tsx +19 -12
  65. package/src/stores/DataSpaceEditorState.ts +18 -0
  66. package/src/stores/DataSpaceExecutableTemplateState.ts +152 -0
  67. package/src/stores/DataSpaceExecutionContextState.ts +17 -70
  68. package/src/stores/studio/DSL_DataSpace_GraphModifierHelper.ts +79 -6
  69. package/tsconfig.json +6 -2
  70. package/lib/components/DataSpaceGeneralEditor/DataSpaceDefaultExecutionContextSection.d.ts.map +0 -1
  71. package/lib/components/DataSpaceGeneralEditor/DataSpaceDefaultExecutionContextSection.js +0 -138
  72. package/lib/components/DataSpaceGeneralEditor/DataSpaceDefaultExecutionContextSection.js.map +0 -1
  73. package/src/components/DataSpaceGeneralEditor/DataSpaceDefaultExecutionContextSection.tsx +0 -393
@@ -1,138 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * Copyright (c) 2020-present, Goldman Sachs
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { clsx, CustomSelectorInput, ErrorIcon, ExclamationTriangleIcon, LongArrowRightIcon, PanelDropZone, PanelFormSection, PencilIcon, PURE_MappingIcon, PURE_RuntimeIcon, XIcon, } from '@finos/legend-art';
18
- import { observer } from 'mobx-react-lite';
19
- import { dataSpace_setDefaultExecutionContext, dataSpace_setExecutionContextDefaultRuntime, dataSpace_setExecutionContextMapping, } from '../../stores/studio/DSL_DataSpace_GraphModifierHelper.js';
20
- import { CORE_DND_TYPE, useEditorStore, } from '@finos/legend-application-studio';
21
- import { DataSpaceEditorState } from '../../stores/DataSpaceEditorState.js';
22
- import { validate_PureExecutionMapping, Mapping, PackageableElementExplicitReference, PackageableRuntime, } from '@finos/legend-graph';
23
- import { useCallback } from 'react';
24
- import { useDrop } from 'react-dnd';
25
- import { buildElementOption, } from '@finos/legend-lego/graph-editor';
26
- import { guaranteeNonNullable } from '@finos/legend-shared';
27
- import { RenameModal, NewExecutionContextModal, } from '../DataSpaceExecutionContextEditor.js';
28
- export const DataSpaceDefaultExecutionContextSection = observer(() => {
29
- const editorStore = useEditorStore();
30
- const applicationStore = editorStore.applicationStore;
31
- const dataSpaceState = editorStore.tabManagerState.getCurrentEditorState(DataSpaceEditorState);
32
- const dataSpace = dataSpaceState.dataSpace;
33
- const executionContext = dataSpace.defaultExecutionContext;
34
- const executionContextState = dataSpaceState.executionContextState;
35
- // Mapping
36
- // TODO: this is not generic error handling, as there could be other problems
37
- // with mapping, we need to genericize this
38
- const isMappingEmpty = validate_PureExecutionMapping(executionContext.mapping.value);
39
- const mapping = executionContext.mapping.value;
40
- const mappingOptions = editorStore.graphManagerState.usableMappings.map(buildElementOption);
41
- const noMappingLabel = (_jsxs("div", { className: "service-execution-editor__configuration__mapping-option--empty", title: isMappingEmpty?.messages.join('\n') ?? '', children: [_jsx("div", { className: "service-execution-editor__configuration__mapping-option--empty__label", children: "(none)" }), _jsx(ErrorIcon, {})] }));
42
- const selectedMappingOption = {
43
- value: mapping,
44
- label: isMappingEmpty ? noMappingLabel : mapping.path,
45
- };
46
- const onMappingSelectionChange = (val) => {
47
- if (val.value !== mapping) {
48
- dataSpace_setExecutionContextMapping(executionContext, PackageableElementExplicitReference.create(val.value));
49
- executionContextState.autoSelectRuntimeOnMappingChange(val.value);
50
- }
51
- };
52
- const visitMapping = () => editorStore.graphEditorMode.openElement(mapping);
53
- // Runtime
54
- const defaultRuntime = executionContext.defaultRuntime;
55
- // NOTE: for now, only include runtime associated with the mapping
56
- // TODO?: Should we bring the runtime compatibility check from query to here?
57
- const runtimes = editorStore.graphManagerState.graph.runtimes.filter((rt) => rt.runtimeValue.mappings.map((m) => m.value).includes(mapping));
58
- const runtimeOptions = runtimes.map((rt) => ({
59
- label: rt.path,
60
- value: PackageableElementExplicitReference.create(rt),
61
- }));
62
- const runtimePointerWarning = !runtimes.includes(defaultRuntime.value) // if the runtime does not belong to the chosen mapping
63
- ? `runtime is not associated with specified mapping '${mapping.path}'`
64
- : undefined;
65
- const selectedRuntimeOption = {
66
- value: defaultRuntime,
67
- label: (_jsxs("div", { className: "service-execution-editor__configuration__runtime-option__pointer", title: undefined, children: [_jsx("div", { className: clsx('service-execution-editor__configuration__runtime-option__pointer__label', {
68
- 'service-execution-editor__configuration__runtime-option__pointer__label--with-warning': Boolean(runtimePointerWarning),
69
- }), children: defaultRuntime.value.path }), runtimePointerWarning && (_jsx("div", { className: "service-execution-editor__configuration__runtime-option__pointer__warning", title: runtimePointerWarning, children: _jsx(ExclamationTriangleIcon, {}) }))] })),
70
- };
71
- const onRuntimeSelectionChange = (val) => {
72
- if (val.value?.value !== defaultRuntime.value && val.value !== undefined) {
73
- dataSpace_setExecutionContextDefaultRuntime(executionContext, val.value);
74
- }
75
- };
76
- const visitRuntime = () => {
77
- editorStore.graphEditorMode.openElement(defaultRuntime.value);
78
- };
79
- // DnD
80
- const handleMappingOrRuntimeDrop = useCallback((item) => {
81
- const element = item.data.packageableElement;
82
- if (!dataSpaceState.isReadOnly) {
83
- if (element instanceof Mapping) {
84
- dataSpace_setExecutionContextMapping(executionContext, PackageableElementExplicitReference.create(element));
85
- executionContextState.autoSelectRuntimeOnMappingChange(element);
86
- }
87
- else if (element instanceof PackageableRuntime &&
88
- element.runtimeValue.mappings.map((m) => m.value).includes(mapping)) {
89
- dataSpace_setExecutionContextDefaultRuntime(executionContext, PackageableElementExplicitReference.create(element));
90
- }
91
- }
92
- }, [
93
- dataSpaceState.isReadOnly,
94
- mapping,
95
- executionContextState,
96
- executionContext,
97
- ]);
98
- const [{ isMappingOrRuntimeDragOver }, dropConnector] = useDrop(() => ({
99
- accept: [
100
- CORE_DND_TYPE.PROJECT_EXPLORER_MAPPING,
101
- CORE_DND_TYPE.PROJECT_EXPLORER_RUNTIME,
102
- ],
103
- drop: (item) => handleMappingOrRuntimeDrop(item),
104
- collect: (monitor) => ({
105
- isMappingOrRuntimeDragOver: monitor.isOver({ shallow: true }),
106
- }),
107
- }), [handleMappingOrRuntimeDrop]);
108
- //multiple execution contexts
109
- const addExecutionKey = () => {
110
- executionContextState.setNewExecutionContextModal(true);
111
- };
112
- const buildExecutionContextOption = (context) => ({
113
- label: context.name,
114
- value: context,
115
- });
116
- const executionContextOptions = dataSpace.executionContexts.map(buildExecutionContextOption);
117
- const onExecutionContextChange = (option) => {
118
- if (option.value !== executionContext) {
119
- dataSpace_setDefaultExecutionContext(dataSpace, option.value);
120
- executionContextState.setSelectedExecutionContext(option.value);
121
- }
122
- };
123
- const activeExecutionContext = buildExecutionContextOption(executionContext);
124
- const deleteExecutionContext = () => {
125
- executionContextState.removeExecutionContext(executionContext);
126
- if (dataSpace.executionContexts.length > 0 &&
127
- dataSpace.executionContexts[0]) {
128
- dataSpace_setDefaultExecutionContext(dataSpace, dataSpace.executionContexts[0]);
129
- }
130
- };
131
- return (_jsxs(PanelFormSection, { children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Execution Context" }), _jsx("div", { className: "panel__content__form__section__header__prompt", children: "Define the mapping and runtime for this Data Product." }), dataSpace.executionContexts.length > 1 && (_jsxs("div", { className: "service-execution-editor__configuration__item", children: [_jsx(CustomSelectorInput, { className: "panel__content__form__section__dropdown service-execution-editor__configuration__item__dropdown", disabled: dataSpaceState.isReadOnly, options: executionContextOptions, onChange: onExecutionContextChange, value: activeExecutionContext, darkMode: !applicationStore.layoutService
132
- .TEMPORARY__isLightColorThemeEnabled }), _jsx("button", { className: "btn--dark btn--sm service-execution-editor__configuration__item__btn", onClick: () => executionContextState.setExecutionContextToRename(activeExecutionContext.value), tabIndex: -1, title: "Edit Execution Context", children: _jsx(PencilIcon, {}) }), _jsx("button", { className: "btn--dark btn--sm service-execution-editor__configuration__item__btn", onClick: deleteExecutionContext, tabIndex: -1, title: "Delete Execution Context", children: _jsx(XIcon, {}) })] })), executionContextState.newExecutionContextModal && (_jsx(NewExecutionContextModal, { executionState: executionContextState, isReadOnly: dataSpaceState.isReadOnly })), executionContextState.executionContextToRename && (_jsx(RenameModal, { val: executionContextState.executionContextToRename.name, isReadOnly: dataSpaceState.isReadOnly, showModal: true, closeModal: () => executionContextState.setExecutionContextToRename(undefined), setValue: (val) => executionContextState.renameExecutionContext(guaranteeNonNullable(executionContextState.executionContextToRename), val), executionContext: executionContextState.executionContextToRename })), _jsx(PanelDropZone, { dropTargetConnector: dropConnector, isDragOver: isMappingOrRuntimeDragOver && !dataSpaceState.isReadOnly, children: _jsxs("div", { className: "service-execution-editor__configuration__items", children: [_jsxs("div", { className: "service-execution-editor__configuration__item", children: [_jsx("div", { className: "btn--sm service-execution-editor__configuration__item__label", children: _jsx(PURE_MappingIcon, {}) }), _jsx(CustomSelectorInput, { className: "panel__content__form__section__dropdown service-execution-editor__configuration__item__dropdown", disabled: dataSpaceState.isReadOnly, options: mappingOptions, onChange: onMappingSelectionChange, value: selectedMappingOption, darkMode: !applicationStore.layoutService
133
- .TEMPORARY__isLightColorThemeEnabled, hasError: Boolean(isMappingEmpty) }), _jsx("button", { className: "btn--dark btn--sm service-execution-editor__configuration__item__btn", onClick: visitMapping, tabIndex: -1, title: "See mapping", disabled: Boolean(isMappingEmpty), children: _jsx(LongArrowRightIcon, {}) })] }), _jsxs("div", { className: "service-execution-editor__configuration__item", children: [_jsx("div", { className: "btn--sm service-execution-editor__configuration__item__label", children: _jsx(PURE_RuntimeIcon, {}) }), _jsx(CustomSelectorInput, { className: "panel__content__form__section__dropdown service-execution-editor__configuration__item__dropdown", disabled: dataSpaceState.isReadOnly, options: runtimeOptions, onChange: onRuntimeSelectionChange, value: selectedRuntimeOption, darkMode: !applicationStore.layoutService
134
- .TEMPORARY__isLightColorThemeEnabled }), _jsx("button", { className: "btn--sm btn--dark service-execution-editor__configuration__item__btn", onClick: visitRuntime, tabIndex: -1, title: "See runtime", disabled: Boolean(runtimePointerWarning), children: _jsx(LongArrowRightIcon, {}) })] })] }) }), _jsx("div", { className: "panel__content__form__section__list__new-item__add", children: _jsx("button", { className: "panel__content__form__section__list__new-item__add-btn btn btn--dark",
135
- // disabled={isReadOnly}
136
- onClick: addExecutionKey, tabIndex: -1, children: "Add Value" }) })] }));
137
- });
138
- //# sourceMappingURL=DataSpaceDefaultExecutionContextSection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DataSpaceDefaultExecutionContextSection.js","sourceRoot":"","sources":["../../../src/components/DataSpaceGeneralEditor/DataSpaceDefaultExecutionContextSection.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,IAAI,EACJ,mBAAmB,EACnB,SAAS,EACT,uBAAuB,EACvB,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,GACN,MAAM,mBAAmB,CAAC;AAE3B,OA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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 {
18
- clsx,
19
- CustomSelectorInput,
20
- ErrorIcon,
21
- ExclamationTriangleIcon,
22
- LongArrowRightIcon,
23
- PanelDropZone,
24
- PanelFormSection,
25
- PencilIcon,
26
- PURE_MappingIcon,
27
- PURE_RuntimeIcon,
28
- XIcon,
29
- } from '@finos/legend-art';
30
- import type { DataSpaceExecutionContext } from '@finos/legend-extension-dsl-data-space/graph';
31
- import { observer } from 'mobx-react-lite';
32
- import {
33
- dataSpace_setDefaultExecutionContext,
34
- dataSpace_setExecutionContextDefaultRuntime,
35
- dataSpace_setExecutionContextMapping,
36
- } from '../../stores/studio/DSL_DataSpace_GraphModifierHelper.js';
37
- import {
38
- CORE_DND_TYPE,
39
- type ElementDragSource,
40
- useEditorStore,
41
- type UMLEditorElementDropTarget,
42
- } from '@finos/legend-application-studio';
43
- import { DataSpaceEditorState } from '../../stores/DataSpaceEditorState.js';
44
- import {
45
- validate_PureExecutionMapping,
46
- Mapping,
47
- PackageableElementExplicitReference,
48
- PackageableRuntime,
49
- } from '@finos/legend-graph';
50
- import { useCallback } from 'react';
51
- import { useDrop } from 'react-dnd';
52
- import {
53
- buildElementOption,
54
- type PackageableElementOption,
55
- } from '@finos/legend-lego/graph-editor';
56
- import { guaranteeNonNullable } from '@finos/legend-shared';
57
- import {
58
- RenameModal,
59
- NewExecutionContextModal,
60
- } from '../DataSpaceExecutionContextEditor.js';
61
- import type { PropsValue } from 'react-select';
62
-
63
- export const DataSpaceDefaultExecutionContextSection = observer(() => {
64
- const editorStore = useEditorStore();
65
- const applicationStore = editorStore.applicationStore;
66
-
67
- const dataSpaceState =
68
- editorStore.tabManagerState.getCurrentEditorState(DataSpaceEditorState);
69
- const dataSpace = dataSpaceState.dataSpace;
70
- const executionContext = dataSpace.defaultExecutionContext;
71
-
72
- const executionContextState = dataSpaceState.executionContextState;
73
-
74
- // Mapping
75
- // TODO: this is not generic error handling, as there could be other problems
76
- // with mapping, we need to genericize this
77
- const isMappingEmpty = validate_PureExecutionMapping(
78
- executionContext.mapping.value,
79
- );
80
- const mapping = executionContext.mapping.value;
81
- const mappingOptions =
82
- editorStore.graphManagerState.usableMappings.map(buildElementOption);
83
- const noMappingLabel = (
84
- <div
85
- className="service-execution-editor__configuration__mapping-option--empty"
86
- title={isMappingEmpty?.messages.join('\n') ?? ''}
87
- >
88
- <div className="service-execution-editor__configuration__mapping-option--empty__label">
89
- (none)
90
- </div>
91
- <ErrorIcon />
92
- </div>
93
- );
94
- const selectedMappingOption = {
95
- value: mapping,
96
- label: isMappingEmpty ? noMappingLabel : mapping.path,
97
- } as PackageableElementOption<Mapping>;
98
- const onMappingSelectionChange = (
99
- val: PackageableElementOption<Mapping>,
100
- ): void => {
101
- if (val.value !== mapping) {
102
- dataSpace_setExecutionContextMapping(
103
- executionContext,
104
- PackageableElementExplicitReference.create(val.value),
105
- );
106
- executionContextState.autoSelectRuntimeOnMappingChange(val.value);
107
- }
108
- };
109
- const visitMapping = (): void =>
110
- editorStore.graphEditorMode.openElement(mapping);
111
-
112
- // Runtime
113
- const defaultRuntime = executionContext.defaultRuntime;
114
- // NOTE: for now, only include runtime associated with the mapping
115
- // TODO?: Should we bring the runtime compatibility check from query to here?
116
- const runtimes = editorStore.graphManagerState.graph.runtimes.filter((rt) =>
117
- rt.runtimeValue.mappings.map((m) => m.value).includes(mapping),
118
- );
119
- const runtimeOptions = runtimes.map((rt) => ({
120
- label: rt.path,
121
- value: PackageableElementExplicitReference.create(rt),
122
- }));
123
- const runtimePointerWarning = !runtimes.includes(defaultRuntime.value) // if the runtime does not belong to the chosen mapping
124
- ? `runtime is not associated with specified mapping '${mapping.path}'`
125
- : undefined;
126
- const selectedRuntimeOption = {
127
- value: defaultRuntime,
128
- label: (
129
- <div
130
- className="service-execution-editor__configuration__runtime-option__pointer"
131
- title={undefined}
132
- >
133
- <div
134
- className={clsx(
135
- 'service-execution-editor__configuration__runtime-option__pointer__label',
136
- {
137
- 'service-execution-editor__configuration__runtime-option__pointer__label--with-warning':
138
- Boolean(runtimePointerWarning),
139
- },
140
- )}
141
- >
142
- {defaultRuntime.value.path}
143
- </div>
144
- {runtimePointerWarning && (
145
- <div
146
- className="service-execution-editor__configuration__runtime-option__pointer__warning"
147
- title={runtimePointerWarning}
148
- >
149
- <ExclamationTriangleIcon />
150
- </div>
151
- )}
152
- </div>
153
- ),
154
- } as unknown as PropsValue<{
155
- label: string;
156
- value: PackageableElementExplicitReference<PackageableRuntime>;
157
- }>;
158
- const onRuntimeSelectionChange = (val: {
159
- label: string | React.ReactNode;
160
- value: PackageableElementExplicitReference<PackageableRuntime> | undefined;
161
- }): void => {
162
- if (val.value?.value !== defaultRuntime.value && val.value !== undefined) {
163
- dataSpace_setExecutionContextDefaultRuntime(executionContext, val.value);
164
- }
165
- };
166
- const visitRuntime = (): void => {
167
- editorStore.graphEditorMode.openElement(defaultRuntime.value);
168
- };
169
-
170
- // DnD
171
- const handleMappingOrRuntimeDrop = useCallback(
172
- (item: UMLEditorElementDropTarget): void => {
173
- const element = item.data.packageableElement;
174
- if (!dataSpaceState.isReadOnly) {
175
- if (element instanceof Mapping) {
176
- dataSpace_setExecutionContextMapping(
177
- executionContext,
178
- PackageableElementExplicitReference.create(element),
179
- );
180
- executionContextState.autoSelectRuntimeOnMappingChange(element);
181
- } else if (
182
- element instanceof PackageableRuntime &&
183
- element.runtimeValue.mappings.map((m) => m.value).includes(mapping)
184
- ) {
185
- dataSpace_setExecutionContextDefaultRuntime(
186
- executionContext,
187
- PackageableElementExplicitReference.create(element),
188
- );
189
- }
190
- }
191
- },
192
- [
193
- dataSpaceState.isReadOnly,
194
- mapping,
195
- executionContextState,
196
- executionContext,
197
- ],
198
- );
199
- const [{ isMappingOrRuntimeDragOver }, dropConnector] = useDrop<
200
- ElementDragSource,
201
- void,
202
- { isMappingOrRuntimeDragOver: boolean }
203
- >(
204
- () => ({
205
- accept: [
206
- CORE_DND_TYPE.PROJECT_EXPLORER_MAPPING,
207
- CORE_DND_TYPE.PROJECT_EXPLORER_RUNTIME,
208
- ],
209
- drop: (item) => handleMappingOrRuntimeDrop(item),
210
- collect: (monitor) => ({
211
- isMappingOrRuntimeDragOver: monitor.isOver({ shallow: true }),
212
- }),
213
- }),
214
- [handleMappingOrRuntimeDrop],
215
- );
216
-
217
- //multiple execution contexts
218
- const addExecutionKey = (): void => {
219
- executionContextState.setNewExecutionContextModal(true);
220
- };
221
- type ExecutionContextOption = {
222
- label: string;
223
- value: DataSpaceExecutionContext;
224
- };
225
- const buildExecutionContextOption = (
226
- context: DataSpaceExecutionContext,
227
- ): ExecutionContextOption => ({
228
- label: context.name,
229
- value: context,
230
- });
231
- const executionContextOptions = dataSpace.executionContexts.map(
232
- buildExecutionContextOption,
233
- );
234
- const onExecutionContextChange = (option: ExecutionContextOption) => {
235
- if (option.value !== executionContext) {
236
- dataSpace_setDefaultExecutionContext(dataSpace, option.value);
237
- executionContextState.setSelectedExecutionContext(option.value);
238
- }
239
- };
240
- const activeExecutionContext = buildExecutionContextOption(executionContext);
241
- const deleteExecutionContext = (): void => {
242
- executionContextState.removeExecutionContext(executionContext);
243
- if (
244
- dataSpace.executionContexts.length > 0 &&
245
- dataSpace.executionContexts[0]
246
- ) {
247
- dataSpace_setDefaultExecutionContext(
248
- dataSpace,
249
- dataSpace.executionContexts[0],
250
- );
251
- }
252
- };
253
-
254
- return (
255
- <PanelFormSection>
256
- <div className="panel__content__form__section__header__label">
257
- Execution Context
258
- </div>
259
- <div className="panel__content__form__section__header__prompt">
260
- Define the mapping and runtime for this Data Product.
261
- </div>
262
- {dataSpace.executionContexts.length > 1 && (
263
- <div className="service-execution-editor__configuration__item">
264
- <CustomSelectorInput
265
- className="panel__content__form__section__dropdown service-execution-editor__configuration__item__dropdown"
266
- disabled={dataSpaceState.isReadOnly}
267
- options={executionContextOptions}
268
- onChange={onExecutionContextChange}
269
- value={activeExecutionContext}
270
- darkMode={
271
- !applicationStore.layoutService
272
- .TEMPORARY__isLightColorThemeEnabled
273
- }
274
- />
275
- <button
276
- className="btn--dark btn--sm service-execution-editor__configuration__item__btn"
277
- onClick={() =>
278
- executionContextState.setExecutionContextToRename(
279
- activeExecutionContext.value,
280
- )
281
- }
282
- tabIndex={-1}
283
- title="Edit Execution Context"
284
- >
285
- <PencilIcon />
286
- </button>
287
- <button
288
- className="btn--dark btn--sm service-execution-editor__configuration__item__btn"
289
- onClick={deleteExecutionContext}
290
- tabIndex={-1}
291
- title="Delete Execution Context"
292
- >
293
- <XIcon />
294
- </button>
295
- </div>
296
- )}
297
- {executionContextState.newExecutionContextModal && (
298
- <NewExecutionContextModal
299
- executionState={executionContextState}
300
- isReadOnly={dataSpaceState.isReadOnly}
301
- />
302
- )}
303
- {executionContextState.executionContextToRename && (
304
- <RenameModal
305
- val={executionContextState.executionContextToRename.name}
306
- isReadOnly={dataSpaceState.isReadOnly}
307
- showModal={true}
308
- closeModal={(): void =>
309
- executionContextState.setExecutionContextToRename(undefined)
310
- }
311
- setValue={(val: string): void =>
312
- executionContextState.renameExecutionContext(
313
- guaranteeNonNullable(
314
- executionContextState.executionContextToRename,
315
- ),
316
- val,
317
- )
318
- }
319
- executionContext={executionContextState.executionContextToRename}
320
- />
321
- )}
322
-
323
- <PanelDropZone
324
- dropTargetConnector={dropConnector}
325
- isDragOver={isMappingOrRuntimeDragOver && !dataSpaceState.isReadOnly}
326
- >
327
- <div className="service-execution-editor__configuration__items">
328
- <div className="service-execution-editor__configuration__item">
329
- <div className="btn--sm service-execution-editor__configuration__item__label">
330
- <PURE_MappingIcon />
331
- </div>
332
- <CustomSelectorInput
333
- className="panel__content__form__section__dropdown service-execution-editor__configuration__item__dropdown"
334
- disabled={dataSpaceState.isReadOnly}
335
- options={mappingOptions}
336
- onChange={onMappingSelectionChange}
337
- value={selectedMappingOption}
338
- darkMode={
339
- !applicationStore.layoutService
340
- .TEMPORARY__isLightColorThemeEnabled
341
- }
342
- hasError={Boolean(isMappingEmpty)}
343
- />
344
- <button
345
- className="btn--dark btn--sm service-execution-editor__configuration__item__btn"
346
- onClick={visitMapping}
347
- tabIndex={-1}
348
- title="See mapping"
349
- disabled={Boolean(isMappingEmpty)}
350
- >
351
- <LongArrowRightIcon />
352
- </button>
353
- </div>
354
- <div className="service-execution-editor__configuration__item">
355
- <div className="btn--sm service-execution-editor__configuration__item__label">
356
- <PURE_RuntimeIcon />
357
- </div>
358
- <CustomSelectorInput
359
- className="panel__content__form__section__dropdown service-execution-editor__configuration__item__dropdown"
360
- disabled={dataSpaceState.isReadOnly}
361
- options={runtimeOptions}
362
- onChange={onRuntimeSelectionChange}
363
- value={selectedRuntimeOption}
364
- darkMode={
365
- !applicationStore.layoutService
366
- .TEMPORARY__isLightColorThemeEnabled
367
- }
368
- />
369
- <button
370
- className="btn--sm btn--dark service-execution-editor__configuration__item__btn"
371
- onClick={visitRuntime}
372
- tabIndex={-1}
373
- title="See runtime"
374
- disabled={Boolean(runtimePointerWarning)}
375
- >
376
- <LongArrowRightIcon />
377
- </button>
378
- </div>
379
- </div>
380
- </PanelDropZone>
381
- <div className="panel__content__form__section__list__new-item__add">
382
- <button
383
- className="panel__content__form__section__list__new-item__add-btn btn btn--dark"
384
- // disabled={isReadOnly}
385
- onClick={addExecutionKey}
386
- tabIndex={-1}
387
- >
388
- Add Value
389
- </button>
390
- </div>
391
- </PanelFormSection>
392
- );
393
- });