@finos/legend-extension-dsl-data-space-studio 0.2.1 → 0.2.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.
Files changed (57) hide show
  1. package/lib/components/DataSpaceEditor.d.ts.map +1 -1
  2. package/lib/components/DataSpaceEditor.js +34 -3
  3. package/lib/components/DataSpaceEditor.js.map +1 -1
  4. package/lib/components/DataSpaceExecutionContextEditor.d.ts.map +1 -1
  5. package/lib/components/DataSpaceExecutionContextEditor.js +50 -6
  6. package/lib/components/DataSpaceExecutionContextEditor.js.map +1 -1
  7. package/lib/components/DataSpaceGeneralEditor/DataSpaceDiagramsSection.d.ts.map +1 -1
  8. package/lib/components/DataSpaceGeneralEditor/DataSpaceDiagramsSection.js +26 -35
  9. package/lib/components/DataSpaceGeneralEditor/DataSpaceDiagramsSection.js.map +1 -1
  10. package/lib/components/DataSpaceGeneralEditor/DataSpaceElementsSection.d.ts.map +1 -1
  11. package/lib/components/DataSpaceGeneralEditor/DataSpaceElementsSection.js +23 -29
  12. package/lib/components/DataSpaceGeneralEditor/DataSpaceElementsSection.js.map +1 -1
  13. package/lib/components/DataSpaceGeneralEditor/DataSpaceExecutablesSection.d.ts.map +1 -1
  14. package/lib/components/DataSpaceGeneralEditor/DataSpaceExecutablesSection.js +16 -5
  15. package/lib/components/DataSpaceGeneralEditor/DataSpaceExecutablesSection.js.map +1 -1
  16. package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.d.ts.map +1 -1
  17. package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.js +13 -1
  18. package/lib/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.js.map +1 -1
  19. package/lib/components/DataSpaceGeneralEditor/DataSpaceHomeTab.d.ts.map +1 -1
  20. package/lib/components/DataSpaceGeneralEditor/DataSpaceHomeTab.js +6 -6
  21. package/lib/components/DataSpaceGeneralEditor/DataSpaceHomeTab.js.map +1 -1
  22. package/lib/components/DataSpaceGeneralEditor/DataSpaceInfoTab.d.ts.map +1 -1
  23. package/lib/components/DataSpaceGeneralEditor/DataSpaceInfoTab.js +7 -3
  24. package/lib/components/DataSpaceGeneralEditor/DataSpaceInfoTab.js.map +1 -1
  25. package/lib/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.d.ts.map +1 -1
  26. package/lib/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.js +14 -24
  27. package/lib/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.js.map +1 -1
  28. package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.d.ts +4 -0
  29. package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.d.ts.map +1 -1
  30. package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.js +4 -2
  31. package/lib/components/DataSpaceGeneralEditor/DataSpaceSidebar.js.map +1 -1
  32. package/lib/components/DataSpaceGeneralEditor/DataSpaceSupportInfoSection.d.ts.map +1 -1
  33. package/lib/components/DataSpaceGeneralEditor/DataSpaceSupportInfoSection.js +49 -83
  34. package/lib/components/DataSpaceGeneralEditor/DataSpaceSupportInfoSection.js.map +1 -1
  35. package/lib/index.css +2 -2
  36. package/lib/index.css.map +1 -1
  37. package/lib/package.json +4 -1
  38. package/lib/stores/DataSpaceEditorState.d.ts.map +1 -1
  39. package/lib/stores/DataSpaceEditorState.js +3 -4
  40. package/lib/stores/DataSpaceEditorState.js.map +1 -1
  41. package/lib/stores/studio/DSL_DataSpace_GraphModifierHelper.d.ts.map +1 -1
  42. package/lib/stores/studio/DSL_DataSpace_GraphModifierHelper.js +6 -2
  43. package/lib/stores/studio/DSL_DataSpace_GraphModifierHelper.js.map +1 -1
  44. package/package.json +12 -9
  45. package/src/components/DataSpaceEditor.tsx +109 -23
  46. package/src/components/DataSpaceExecutionContextEditor.tsx +123 -57
  47. package/src/components/DataSpaceGeneralEditor/DataSpaceDiagramsSection.tsx +129 -100
  48. package/src/components/DataSpaceGeneralEditor/DataSpaceElementsSection.tsx +135 -78
  49. package/src/components/DataSpaceGeneralEditor/DataSpaceExecutablesSection.tsx +58 -31
  50. package/src/components/DataSpaceGeneralEditor/DataSpaceGeneralEditor.tsx +17 -0
  51. package/src/components/DataSpaceGeneralEditor/DataSpaceHomeTab.tsx +52 -51
  52. package/src/components/DataSpaceGeneralEditor/DataSpaceInfoTab.tsx +91 -36
  53. package/src/components/DataSpaceGeneralEditor/DataSpaceRelatedDataSpacesSection.tsx +67 -58
  54. package/src/components/DataSpaceGeneralEditor/DataSpaceSidebar.tsx +24 -2
  55. package/src/components/DataSpaceGeneralEditor/DataSpaceSupportInfoSection.tsx +204 -214
  56. package/src/stores/DataSpaceEditorState.ts +3 -4
  57. package/src/stores/studio/DSL_DataSpace_GraphModifierHelper.ts +6 -2
@@ -14,13 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import {
18
- PanelFormSection,
19
- CustomSelectorInput,
20
- PanelFormTextField,
21
- ListEditor,
22
- WarningIcon,
23
- } from '@finos/legend-art';
17
+ import { clsx, PlusIcon, TimesIcon, WarningIcon } from '@finos/legend-art';
24
18
  import {
25
19
  DataSpaceSupportEmail,
26
20
  DataSpaceSupportCombinedInfo,
@@ -31,246 +25,242 @@ import {
31
25
  dataSpace_setDocumentationUrl,
32
26
  dataSpace_combined_setWebsite,
33
27
  dataSpace_combined_setFaqUrl,
28
+ dataSpace_combined_setSupportUrl,
34
29
  dataSpace_combined_addEmail,
35
30
  dataSpace_combined_deleteEmail,
36
31
  dataSpace_setSupportInfo,
37
32
  } from '../../stores/studio/DSL_DataSpace_GraphModifierHelper.js';
38
- import { useEditorStore } from '@finos/legend-application-studio';
33
+ import {
34
+ EditorFormSection,
35
+ useEditorStore,
36
+ } from '@finos/legend-application-studio';
39
37
  import { DataSpaceEditorState } from '../../stores/DataSpaceEditorState.js';
40
38
  import { useState } from 'react';
41
39
 
40
+ type SupportInfoKind = 'none' | 'email' | 'combined';
41
+
42
+ const SupportLinkField = (props: {
43
+ label: string;
44
+ value: string | undefined;
45
+ placeholder: string;
46
+ isReadOnly: boolean;
47
+ onChange: (value: string) => void;
48
+ }): React.ReactNode => (
49
+ <label className="dataSpace-editor-field">
50
+ <span className="dataSpace-editor-field__label">{props.label}</span>
51
+ <input
52
+ className="input input--dark dataSpace-editor-field__input"
53
+ spellCheck={false}
54
+ disabled={props.isReadOnly}
55
+ value={props.value ?? ''}
56
+ onChange={(event): void => props.onChange(event.target.value)}
57
+ placeholder={props.placeholder}
58
+ />
59
+ </label>
60
+ );
61
+
42
62
  export const DataSpaceSupportInfoSection = observer(() => {
43
63
  const editorStore = useEditorStore();
44
-
45
64
  const dataSpaceState =
46
65
  editorStore.tabManagerState.getCurrentEditorState(DataSpaceEditorState);
47
66
  const dataSpace = dataSpaceState.dataSpace;
67
+ const isReadOnly = dataSpaceState.isReadOnly;
68
+ const supportInfo = dataSpace.supportInfo;
69
+ const [newEmail, setNewEmail] = useState('');
48
70
 
49
- // Event handlers
50
- const handleSupportInfoTypeChange = (option: { value: string }): void => {
51
- if (typeof option !== 'object' || !('value' in option)) {
71
+ const kind: SupportInfoKind =
72
+ supportInfo instanceof DataSpaceSupportCombinedInfo
73
+ ? 'combined'
74
+ : supportInfo instanceof DataSpaceSupportEmail
75
+ ? 'email'
76
+ : 'none';
77
+
78
+ const changeKind = (type: SupportInfoKind): void => {
79
+ if (type === kind) {
52
80
  return;
53
81
  }
54
- const type = option.value;
55
- if (
56
- type === 'email' &&
57
- !(dataSpace.supportInfo instanceof DataSpaceSupportEmail)
58
- ) {
59
- const supportInfo = new DataSpaceSupportEmail();
60
- if (dataSpace.supportInfo instanceof DataSpaceSupportCombinedInfo) {
61
- supportInfo.address = dataSpace.supportInfo.emails?.[0] ?? '';
62
- supportInfo.documentationUrl = dataSpace.supportInfo.documentationUrl;
82
+ if (type === 'combined') {
83
+ const combined = new DataSpaceSupportCombinedInfo();
84
+ if (supportInfo instanceof DataSpaceSupportEmail) {
85
+ combined.emails = supportInfo.address ? [supportInfo.address] : [];
86
+ combined.documentationUrl = supportInfo.documentationUrl;
63
87
  }
64
- dataSpace_setSupportInfo(dataSpace, supportInfo);
65
- } else if (
66
- type === 'combined' &&
67
- !(dataSpace.supportInfo instanceof DataSpaceSupportCombinedInfo)
68
- ) {
69
- const supportInfo = new DataSpaceSupportCombinedInfo();
70
- if (
71
- dataSpace.supportInfo instanceof DataSpaceSupportEmail &&
72
- dataSpace.supportInfo.address
73
- ) {
74
- supportInfo.emails = [dataSpace.supportInfo.address];
75
- supportInfo.documentationUrl = dataSpace.supportInfo.documentationUrl;
88
+ dataSpace_setSupportInfo(dataSpace, combined);
89
+ } else if (type === 'email') {
90
+ const email = new DataSpaceSupportEmail();
91
+ if (supportInfo instanceof DataSpaceSupportCombinedInfo) {
92
+ email.address = supportInfo.emails?.[0] ?? '';
93
+ email.documentationUrl = supportInfo.documentationUrl;
76
94
  }
77
- dataSpace_setSupportInfo(dataSpace, supportInfo);
95
+ dataSpace_setSupportInfo(dataSpace, email);
78
96
  } else {
79
97
  dataSpace_setSupportInfo(dataSpace, undefined);
80
98
  }
81
99
  };
82
-
83
- const handleSupportInfoEmailAdd = (email: string): void => {
84
- if (dataSpace.supportInfo instanceof DataSpaceSupportCombinedInfo) {
85
- dataSpace_combined_addEmail(dataSpace.supportInfo, email);
86
- }
87
- };
88
-
89
- const handleSupportInfoEmailRemove = (email: string): void => {
90
- if (dataSpace.supportInfo instanceof DataSpaceSupportCombinedInfo) {
91
- dataSpace_combined_deleteEmail(dataSpace.supportInfo, email);
100
+ const addEmail = (): void => {
101
+ const email = newEmail.trim();
102
+ if (
103
+ email &&
104
+ supportInfo instanceof DataSpaceSupportCombinedInfo &&
105
+ !supportInfo.emails?.includes(email)
106
+ ) {
107
+ dataSpace_combined_addEmail(supportInfo, email);
92
108
  }
109
+ setNewEmail('');
93
110
  };
111
+ // the single-email form is kept for data spaces that already use it
112
+ const kinds: { kind: SupportInfoKind; label: string }[] = [
113
+ { kind: 'none', label: 'None' },
114
+ ...(kind === 'email'
115
+ ? [{ kind: 'email' as const, label: 'Email only' }]
116
+ : []),
117
+ { kind: 'combined', label: 'Contacts and links' },
118
+ ];
94
119
 
95
- // ListEditor component renderers
96
- const SupportEmailComponent = observer(
97
- (props: { item: string }): React.ReactElement => {
98
- const { item } = props;
99
-
100
- return (
101
- <div className="panel__content__form__section__list__item__content">
102
- <div className="panel__content__form__section__header__label">
103
- {item}
104
- </div>
105
- </div>
106
- );
107
- },
108
- );
109
-
110
- const NewSupportEmailComponent = observer(
111
- (props: { onFinishEditing: () => void }) => {
112
- const { onFinishEditing } = props;
113
- const [email, setEmail] = useState('');
114
-
115
- return (
116
- <div className="dataSpace-editor__general__support-info__new-email">
117
- <div className="panel__content__form__section__list__new-item__input">
118
- <input
119
- className="input input-group__input panel__content__form__section__input input--dark"
120
- type="email"
121
- placeholder="Enter email"
122
- value={email}
123
- onChange={(event) => {
124
- setEmail(event.target.value);
125
- }}
126
- />
127
- </div>
120
+ return (
121
+ <EditorFormSection
122
+ title="Support"
123
+ description="Who to contact about this data space, and where to read more."
124
+ >
125
+ <div className="dataSpace-editor-segmented dataSpace-editor-segmented--large">
126
+ {kinds.map((option) => (
128
127
  <button
129
- className="panel__content__form__section__list__new-item__add-btn btn btn--dark"
130
- onClick={() => {
131
- handleSupportInfoEmailAdd(email);
132
- setEmail('');
133
- onFinishEditing();
134
- }}
128
+ key={option.kind}
129
+ className={clsx('dataSpace-editor-segmented__option', {
130
+ 'dataSpace-editor-segmented__option--active':
131
+ kind === option.kind,
132
+ })}
133
+ disabled={isReadOnly}
134
+ aria-pressed={kind === option.kind}
135
+ onClick={(): void => changeKind(option.kind)}
135
136
  >
136
- Save
137
+ {option.label}
137
138
  </button>
138
- </div>
139
- );
140
- },
141
- );
142
-
143
- return (
144
- <PanelFormSection className="dataSpace-editor__general__support-info">
145
- <div className="panel__content__form__section__header__label">
146
- Support Information
139
+ ))}
147
140
  </div>
148
- <div className="panel__content__form__section__header__prompt">
149
- Configure support information for this Data Space.
150
- </div>
151
- {!(dataSpace.supportInfo instanceof DataSpaceSupportCombinedInfo) && (
152
- <CustomSelectorInput
153
- options={[
154
- { label: 'None', value: 'none' },
155
- { label: 'Combined', value: 'combined' },
156
- ]}
157
- onChange={(option: { label: string; value: string }) =>
158
- handleSupportInfoTypeChange(option)
159
- }
160
- value={{
161
- label: dataSpace.supportInfo
162
- ? dataSpace.supportInfo instanceof DataSpaceSupportEmail
163
- ? 'Email'
164
- : 'Combined'
165
- : 'None',
166
- value: dataSpace.supportInfo
167
- ? dataSpace.supportInfo instanceof DataSpaceSupportEmail
168
- ? 'email'
169
- : 'combined'
170
- : 'none',
171
- }}
172
- darkMode={true}
173
- />
174
- )}
175
- {dataSpace.supportInfo ? (
176
- dataSpace.supportInfo instanceof DataSpaceSupportEmail ? (
177
- <PanelFormSection className="dataSpace-editor__general__support-info__content">
178
- <PanelFormTextField
179
- name="Email Address"
180
- value={dataSpace.supportInfo.address}
181
- update={(value) => {
182
- if (dataSpace.supportInfo instanceof DataSpaceSupportEmail) {
183
- dataSpace_email_setSupportInfoEmail(
184
- dataSpace.supportInfo,
185
- value ?? '',
186
- );
187
- }
188
- }}
189
- placeholder="Enter email address"
190
- />
191
- <PanelFormTextField
192
- name="Documentation URL"
193
- value={dataSpace.supportInfo.documentationUrl}
194
- update={(value) => {
195
- if (dataSpace.supportInfo) {
196
- dataSpace_setDocumentationUrl(
197
- dataSpace.supportInfo,
198
- value ?? '',
199
- );
200
- }
201
- }}
202
- placeholder="Enter documentation URL"
203
- />
204
- </PanelFormSection>
205
- ) : dataSpace.supportInfo instanceof DataSpaceSupportCombinedInfo ? (
206
- <div>
207
- <ListEditor
208
- title="Emails"
209
- items={dataSpace.supportInfo.emails}
210
- keySelector={(element: string) => element}
211
- ItemComponent={SupportEmailComponent}
212
- NewItemComponent={NewSupportEmailComponent}
213
- handleRemoveItem={handleSupportInfoEmailRemove}
214
- isReadOnly={dataSpaceState.isReadOnly}
215
- emptyMessage="No emails specified"
216
- />
217
- {(dataSpace.supportInfo.emails === undefined ||
218
- dataSpace.supportInfo.emails.length === 0) && (
219
- <div className="service-editor__owner__validation">
141
+ {supportInfo instanceof DataSpaceSupportCombinedInfo && (
142
+ <>
143
+ <div className="dataSpace-editor-field">
144
+ <span className="dataSpace-editor-field__label">Contacts</span>
145
+ <div className="dataSpace-editor-chips">
146
+ {(supportInfo.emails ?? []).map((email) => (
147
+ <span key={email} className="dataSpace-editor-chips__chip">
148
+ {email}
149
+ {!isReadOnly && (
150
+ <button
151
+ className="dataSpace-editor-chips__remove"
152
+ onClick={(): void =>
153
+ dataSpace_combined_deleteEmail(supportInfo, email)
154
+ }
155
+ title={`Remove ${email}`}
156
+ >
157
+ <TimesIcon />
158
+ </button>
159
+ )}
160
+ </span>
161
+ ))}
162
+ {!isReadOnly && (
163
+ <span className="dataSpace-editor-chips__new">
164
+ <input
165
+ className="dataSpace-editor-chips__input"
166
+ type="email"
167
+ spellCheck={false}
168
+ value={newEmail}
169
+ onChange={(event): void => setNewEmail(event.target.value)}
170
+ onKeyDown={(event): void => {
171
+ if (event.key === 'Enter') {
172
+ addEmail();
173
+ }
174
+ }}
175
+ placeholder="Add an email, then Enter"
176
+ />
177
+ {newEmail && (
178
+ <button
179
+ className="dataSpace-editor-chips__add"
180
+ onClick={addEmail}
181
+ title="Add this email"
182
+ >
183
+ <PlusIcon />
184
+ </button>
185
+ )}
186
+ </span>
187
+ )}
188
+ </div>
189
+ {!supportInfo.emails?.length && (
190
+ <span className="dataSpace-editor-field__error">
220
191
  <WarningIcon />
221
- <div className="service-editor__owner__validation-label">
222
- At least one email is required
223
- </div>
224
- </div>
192
+ At least one email is required
193
+ </span>
225
194
  )}
226
- <PanelFormTextField
227
- name="Documentation URL"
228
- value={dataSpace.supportInfo.documentationUrl}
229
- update={(value) => {
230
- if (dataSpace.supportInfo) {
231
- dataSpace_setDocumentationUrl(
232
- dataSpace.supportInfo,
233
- value ?? '',
234
- );
235
- }
236
- }}
237
- placeholder="Enter documentation URL"
195
+ </div>
196
+ <div className="dataSpace-editor-grid">
197
+ <SupportLinkField
198
+ label="Documentation"
199
+ value={supportInfo.documentationUrl}
200
+ placeholder="https://"
201
+ isReadOnly={isReadOnly}
202
+ onChange={(value): void =>
203
+ dataSpace_setDocumentationUrl(supportInfo, value)
204
+ }
205
+ />
206
+ <SupportLinkField
207
+ label="Website"
208
+ value={supportInfo.website}
209
+ placeholder="https://"
210
+ isReadOnly={isReadOnly}
211
+ onChange={(value): void =>
212
+ dataSpace_combined_setWebsite(supportInfo, value)
213
+ }
238
214
  />
239
- <PanelFormTextField
240
- name="Website"
241
- value={dataSpace.supportInfo.website}
242
- update={(value) => {
243
- if (
244
- dataSpace.supportInfo instanceof DataSpaceSupportCombinedInfo
245
- ) {
246
- dataSpace_combined_setWebsite(
247
- dataSpace.supportInfo,
248
- value ?? '',
249
- );
250
- }
251
- }}
252
- placeholder="Enter website URL"
215
+ <SupportLinkField
216
+ label="FAQ"
217
+ value={supportInfo.faqUrl}
218
+ placeholder="https://"
219
+ isReadOnly={isReadOnly}
220
+ onChange={(value): void =>
221
+ dataSpace_combined_setFaqUrl(supportInfo, value)
222
+ }
253
223
  />
254
- <PanelFormTextField
255
- name="FAQ URL"
256
- value={dataSpace.supportInfo.faqUrl}
257
- update={(value) => {
258
- if (
259
- dataSpace.supportInfo instanceof DataSpaceSupportCombinedInfo
260
- ) {
261
- dataSpace_combined_setFaqUrl(
262
- dataSpace.supportInfo,
263
- value ?? '',
264
- );
265
- }
266
- }}
267
- placeholder="Enter FAQ URL"
224
+ <SupportLinkField
225
+ label="Support page"
226
+ value={supportInfo.supportUrl}
227
+ placeholder="https://"
228
+ isReadOnly={isReadOnly}
229
+ onChange={(value): void =>
230
+ dataSpace_combined_setSupportUrl(supportInfo, value)
231
+ }
268
232
  />
269
233
  </div>
270
- ) : (
271
- <div>Unknown support info type</div>
272
- )
273
- ) : null}
274
- </PanelFormSection>
234
+ </>
235
+ )}
236
+ {supportInfo instanceof DataSpaceSupportEmail && (
237
+ <div className="dataSpace-editor-grid">
238
+ <SupportLinkField
239
+ label="Email"
240
+ value={supportInfo.address}
241
+ placeholder="team@example.com"
242
+ isReadOnly={isReadOnly}
243
+ onChange={(value): void =>
244
+ dataSpace_email_setSupportInfoEmail(supportInfo, value)
245
+ }
246
+ />
247
+ <SupportLinkField
248
+ label="Documentation"
249
+ value={supportInfo.documentationUrl}
250
+ placeholder="https://"
251
+ isReadOnly={isReadOnly}
252
+ onChange={(value): void =>
253
+ dataSpace_setDocumentationUrl(supportInfo, value)
254
+ }
255
+ />
256
+ </div>
257
+ )}
258
+ {!supportInfo && (
259
+ <div className="dataSpace-editor-table__empty">
260
+ No support information: people who open this data space won&apos;t see
261
+ who to contact.
262
+ </div>
263
+ )}
264
+ </EditorFormSection>
275
265
  );
276
266
  });
@@ -112,10 +112,9 @@ export class DataSpaceEditorState extends ElementEditorState {
112
112
  availableRelatedDataSpaces: observable,
113
113
  dataSpace: computed,
114
114
  relatedDataSpaceTaggedValues: computed,
115
- isVerified: computed,
116
- isInDevelopment: computed,
117
- isExternal: computed,
118
- deprecationNotice: computed,
115
+ // NOTE: the statuses (verified, in development, external, deprecation notice) are plain
116
+ // getters, not computed: the editor's header stays mounted across tabs, and a computed
117
+ // first read before the graph is observed would keep its stale value
119
118
  reprocess: action,
120
119
  isValidDataSpaceElement: action,
121
120
  getDataSpaceElementOptions: action,
@@ -170,7 +170,9 @@ export const dataSpace_removeElement = action(
170
170
  (dataSpace: DataSpace, element: DataSpaceElementPointer): void => {
171
171
  if (dataSpace.elements) {
172
172
  const index = dataSpace.elements.indexOf(element);
173
- dataSpace.elements.splice(index, 1);
173
+ if (index !== -1) {
174
+ dataSpace.elements.splice(index, 1);
175
+ }
174
176
  }
175
177
  },
176
178
  );
@@ -194,7 +196,9 @@ export const dataSpace_removeExecutable = action(
194
196
  (dataSpace: DataSpace, executable: DataSpaceExecutable): void => {
195
197
  if (dataSpace.executables) {
196
198
  const index = dataSpace.executables.indexOf(executable);
197
- dataSpace.executables.splice(index, 1);
199
+ if (index !== -1) {
200
+ dataSpace.executables.splice(index, 1);
201
+ }
198
202
  }
199
203
  },
200
204
  );