@finos/legend-extension-dsl-data-space 0.1.1 → 1.0.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/CHANGELOG.md +32 -0
- package/lib/DSLDataSpace_Extension.d.ts +0 -10
- package/lib/DSLDataSpace_Extension.d.ts.map +1 -1
- package/lib/DSLDataSpace_Extension.js +0 -24
- package/lib/DSLDataSpace_Extension.js.map +1 -1
- package/lib/components/{query/DataSpaceViewer.d.ts → DataSpaceViewer.d.ts} +1 -1
- package/lib/components/DataSpaceViewer.d.ts.map +1 -0
- package/lib/components/DataSpaceViewer.js +186 -0
- package/lib/components/DataSpaceViewer.js.map +1 -0
- package/lib/components/query/{DSLDataSpace_QueryPlugin.d.ts → DSLDataSpace_LegendQueryPlugin.d.ts} +4 -5
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.d.ts.map +1 -0
- package/lib/components/query/{DSLDataSpace_QueryPlugin.js → DSLDataSpace_LegendQueryPlugin.js} +4 -7
- package/lib/components/query/DSLDataSpace_LegendQueryPlugin.js.map +1 -0
- package/lib/components/query/DataSpaceQuerySetup.d.ts.map +1 -1
- package/lib/components/query/DataSpaceQuerySetup.js +15 -8
- package/lib/components/query/DataSpaceQuerySetup.js.map +1 -1
- package/lib/components/studio/{DSLDataSpace_StudioPlugin.d.ts → DSLDataSpace_LegendStudioPlugin.d.ts} +4 -5
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.d.ts.map +1 -0
- package/lib/components/studio/{DSLDataSpace_StudioPlugin.js → DSLDataSpace_LegendStudioPlugin.js} +6 -8
- package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.js.map +1 -0
- package/lib/graph/DSLDataSpace_PureGraphPlugin.d.ts +1 -2
- package/lib/graph/DSLDataSpace_PureGraphPlugin.d.ts.map +1 -1
- package/lib/graph/DSLDataSpace_PureGraphPlugin.js +0 -3
- package/lib/graph/DSLDataSpace_PureGraphPlugin.js.map +1 -1
- package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.d.ts +1 -2
- package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.d.ts.map +1 -1
- package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.js +0 -3
- package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts +13 -2
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js +45 -5
- package/lib/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/stores/DataSpaceViewerState.d.ts +59 -0
- package/lib/stores/DataSpaceViewerState.d.ts.map +1 -0
- package/lib/stores/DataSpaceViewerState.js +137 -0
- package/lib/stores/DataSpaceViewerState.js.map +1 -0
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts +9 -34
- package/lib/stores/query/DataSpaceQuerySetupState.d.ts.map +1 -1
- package/lib/stores/query/DataSpaceQuerySetupState.js +44 -136
- package/lib/stores/query/DataSpaceQuerySetupState.js.map +1 -1
- package/package.json +24 -22
- package/src/DSLDataSpace_Extension.ts +0 -30
- package/src/components/{query/DataSpaceViewer.tsx → DataSpaceViewer.tsx} +216 -121
- package/src/components/query/{DSLDataSpace_QueryPlugin.tsx → DSLDataSpace_LegendQueryPlugin.tsx} +2 -7
- package/src/components/query/DataSpaceQuerySetup.tsx +30 -5
- package/src/components/studio/{DSLDataSpace_StudioPlugin.tsx → DSLDataSpace_LegendStudioPlugin.tsx} +8 -12
- package/src/graph/DSLDataSpace_PureGraphPlugin.ts +1 -8
- package/src/graphManager/DSLDataSpace_PureGraphManagerPlugin.ts +0 -5
- package/src/index.ts +12 -0
- package/src/models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin.ts +71 -5
- package/src/stores/DataSpaceViewerState.ts +202 -0
- package/src/stores/query/DataSpaceQuerySetupState.ts +99 -200
- package/tsconfig.json +5 -3
- package/tsconfig.package.json +1 -0
- package/lib/components/query/DSLDataSpace_QueryPlugin.d.ts.map +0 -1
- package/lib/components/query/DSLDataSpace_QueryPlugin.js.map +0 -1
- package/lib/components/query/DataSpaceViewer.d.ts.map +0 -1
- package/lib/components/query/DataSpaceViewer.js +0 -163
- package/lib/components/query/DataSpaceViewer.js.map +0 -1
- package/lib/components/studio/DSLDataSpace_StudioPlugin.d.ts.map +0 -1
- package/lib/components/studio/DSLDataSpace_StudioPlugin.js.map +0 -1
|
@@ -28,17 +28,21 @@ import {
|
|
|
28
28
|
MappingIcon,
|
|
29
29
|
RuntimeIcon,
|
|
30
30
|
CogIcon,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
KeyIcon,
|
|
32
|
+
FlaskIcon,
|
|
33
|
+
ExternalLinkSquareIcon,
|
|
34
|
+
ExternalLinkIcon,
|
|
35
|
+
ShieldIcon,
|
|
36
|
+
TagsIcon,
|
|
33
37
|
} from '@finos/legend-art';
|
|
34
38
|
import type { Diagram } from '@finos/legend-extension-dsl-diagram';
|
|
35
39
|
import { DiagramRenderer } from '@finos/legend-extension-dsl-diagram';
|
|
36
|
-
import {
|
|
37
|
-
import type {
|
|
38
|
-
import {
|
|
39
|
-
import type { DataSpaceSupportInfo } from '../../models/metamodels/pure/model/packageableElements/dataSpace/DataSpace';
|
|
40
|
-
import type { ResolvedDataSpaceExecutionContext } from '../../models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin';
|
|
40
|
+
import { DataSpaceSupportEmail } from '../models/metamodels/pure/model/packageableElements/dataSpace/DataSpace';
|
|
41
|
+
import type { DataSpaceSupportInfo } from '../models/metamodels/pure/model/packageableElements/dataSpace/DataSpace';
|
|
42
|
+
import type { ResolvedDataSpaceExecutionContext } from '../models/protocols/pure/DSLDataSpace_PureProtocolProcessorPlugin';
|
|
41
43
|
import type { PackageableRuntime } from '@finos/legend-graph';
|
|
44
|
+
import type { DataSpaceViewerState } from '../stores/DataSpaceViewerState';
|
|
45
|
+
import { DATA_SPACE_VIEWER_ACTIVITY_MODE } from '../stores/DataSpaceViewerState';
|
|
42
46
|
|
|
43
47
|
interface DataSpaceViewerActivityConfig {
|
|
44
48
|
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE;
|
|
@@ -107,11 +111,13 @@ const DataSpaceModelsOverview = observer(
|
|
|
107
111
|
|
|
108
112
|
// diagram selector
|
|
109
113
|
const diagramCanvasRef = useRef<HTMLDivElement>(null);
|
|
110
|
-
const diagramOptions =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
const diagramOptions = dataSpaceViewerState.featuredDiagrams
|
|
115
|
+
.concat(
|
|
116
|
+
dataSpaceViewerState.diagrams.filter(
|
|
117
|
+
(diagram) => !dataSpaceViewerState.featuredDiagrams.includes(diagram),
|
|
118
|
+
),
|
|
119
|
+
)
|
|
120
|
+
.map(buildDiagramOption);
|
|
115
121
|
const selectedDiagramOption = dataSpaceViewerState.currentDiagram
|
|
116
122
|
? buildDiagramOption(dataSpaceViewerState.currentDiagram)
|
|
117
123
|
: null;
|
|
@@ -123,32 +129,26 @@ const DataSpaceModelsOverview = observer(
|
|
|
123
129
|
const formatDiagramOptionLabel = (
|
|
124
130
|
option: DiagramOption,
|
|
125
131
|
): React.ReactNode => (
|
|
126
|
-
<div className="
|
|
127
|
-
<div className="
|
|
132
|
+
<div className="data-space__viewer__diagrams__dropdown__option">
|
|
133
|
+
<div className="data-space__viewer__diagrams__dropdown__option__label">
|
|
128
134
|
{option.label}
|
|
129
135
|
</div>
|
|
130
136
|
{dataSpaceViewerState.featuredDiagrams.includes(option.value) && (
|
|
131
|
-
<div className="
|
|
137
|
+
<div className="data-space__viewer__diagrams__dropdown__option__tag">
|
|
132
138
|
featured
|
|
133
139
|
</div>
|
|
134
140
|
)}
|
|
135
141
|
</div>
|
|
136
142
|
);
|
|
137
143
|
|
|
138
|
-
// featured diagram toggler
|
|
139
|
-
const toggleShowFeaturedDiagrams = (): void =>
|
|
140
|
-
dataSpaceViewerState.setShowOnlyFeaturedDiagrams(
|
|
141
|
-
!dataSpaceViewerState.showOnlyFeaturedDiagrams,
|
|
142
|
-
);
|
|
143
|
-
|
|
144
144
|
if (dataSpaceViewerState.diagrams.length === 0) {
|
|
145
145
|
return <BlankPanelContent>No diagrams available</BlankPanelContent>;
|
|
146
146
|
}
|
|
147
147
|
return (
|
|
148
|
-
<div className="
|
|
149
|
-
<div className="
|
|
148
|
+
<div className="data-space__viewer__main-panel__content data-space__viewer__diagrams">
|
|
149
|
+
<div className="data-space__viewer__diagrams__header">
|
|
150
150
|
<CustomSelectorInput
|
|
151
|
-
className="
|
|
151
|
+
className="data-space__viewer__diagrams__diagram-selector"
|
|
152
152
|
options={diagramOptions}
|
|
153
153
|
onChange={onDiagramOptionChange}
|
|
154
154
|
value={selectedDiagramOption}
|
|
@@ -156,26 +156,8 @@ const DataSpaceModelsOverview = observer(
|
|
|
156
156
|
darkMode={true}
|
|
157
157
|
formatOptionLabel={formatDiagramOptionLabel}
|
|
158
158
|
/>
|
|
159
|
-
<div className="query-setup__data-space__viewer__diagrams__toggler">
|
|
160
|
-
<button
|
|
161
|
-
className={clsx(
|
|
162
|
-
'query-setup__data-space__viewer__diagrams__toggler__btn',
|
|
163
|
-
{
|
|
164
|
-
'query-setup__data-space__viewer__diagrams__toggler__btn--active':
|
|
165
|
-
dataSpaceViewerState.showOnlyFeaturedDiagrams,
|
|
166
|
-
},
|
|
167
|
-
)}
|
|
168
|
-
tabIndex={-1}
|
|
169
|
-
title={`[${
|
|
170
|
-
dataSpaceViewerState.showOnlyFeaturedDiagrams ? 'on' : 'off'
|
|
171
|
-
}] Toggle show only featured diagrams`}
|
|
172
|
-
onClick={toggleShowFeaturedDiagrams}
|
|
173
|
-
>
|
|
174
|
-
<StarIcon />
|
|
175
|
-
</button>
|
|
176
|
-
</div>
|
|
177
159
|
</div>
|
|
178
|
-
<div className="
|
|
160
|
+
<div className="data-space__viewer__diagrams__content">
|
|
179
161
|
{dataSpaceViewerState.currentDiagram && (
|
|
180
162
|
<DataSpaceDiagramCanvas
|
|
181
163
|
dataSpaceViewerState={dataSpaceViewerState}
|
|
@@ -184,14 +166,7 @@ const DataSpaceModelsOverview = observer(
|
|
|
184
166
|
/>
|
|
185
167
|
)}
|
|
186
168
|
</div>
|
|
187
|
-
<div className="
|
|
188
|
-
<div className="query-setup__data-space__viewer__diagrams__footer__icon">
|
|
189
|
-
<LightBulbIcon />
|
|
190
|
-
</div>
|
|
191
|
-
<div className="query-setup__data-space__viewer__diagrams__footer__text">
|
|
192
|
-
Double-click a class to start a query for that class
|
|
193
|
-
</div>
|
|
194
|
-
</div>
|
|
169
|
+
<div className="data-space__viewer__diagrams__footer"></div>
|
|
195
170
|
</div>
|
|
196
171
|
);
|
|
197
172
|
},
|
|
@@ -239,13 +214,13 @@ const DataSpaceExecutionViewer = observer(
|
|
|
239
214
|
const formatExecutionContextOptionLabel = (
|
|
240
215
|
option: ExecutionContextOption,
|
|
241
216
|
): React.ReactNode => (
|
|
242
|
-
<div className="
|
|
243
|
-
<div className="
|
|
217
|
+
<div className="data-space__viewer__execution__entry__content__dropdown__option">
|
|
218
|
+
<div className="data-space__viewer__execution__entry__content__dropdown__option__label">
|
|
244
219
|
{option.label}
|
|
245
220
|
</div>
|
|
246
221
|
{option.value ===
|
|
247
222
|
dataSpaceViewerState.dataSpace.defaultExecutionContext && (
|
|
248
|
-
<div className="
|
|
223
|
+
<div className="data-space__viewer__execution__entry__content__dropdown__option__tag">
|
|
249
224
|
default
|
|
250
225
|
</div>
|
|
251
226
|
)}
|
|
@@ -266,13 +241,13 @@ const DataSpaceExecutionViewer = observer(
|
|
|
266
241
|
const formatRuntimeOptionLabel = (
|
|
267
242
|
option: RuntimeOption,
|
|
268
243
|
): React.ReactNode => (
|
|
269
|
-
<div className="
|
|
270
|
-
<div className="
|
|
244
|
+
<div className="data-space__viewer__execution__entry__content__dropdown__option">
|
|
245
|
+
<div className="data-space__viewer__execution__entry__content__dropdown__option__label">
|
|
271
246
|
{option.label}
|
|
272
247
|
</div>
|
|
273
248
|
{option.value ===
|
|
274
249
|
dataSpaceViewerState.currentExecutionContext.defaultRuntime.value && (
|
|
275
|
-
<div className="
|
|
250
|
+
<div className="data-space__viewer__execution__entry__content__dropdown__option__tag">
|
|
276
251
|
default
|
|
277
252
|
</div>
|
|
278
253
|
)}
|
|
@@ -280,14 +255,14 @@ const DataSpaceExecutionViewer = observer(
|
|
|
280
255
|
);
|
|
281
256
|
|
|
282
257
|
return (
|
|
283
|
-
<div className="
|
|
284
|
-
<div className="
|
|
285
|
-
<div className="
|
|
286
|
-
<CogIcon className="
|
|
258
|
+
<div className="data-space__viewer__main-panel__content data-space__viewer__execution">
|
|
259
|
+
<div className="data-space__viewer__execution__entry">
|
|
260
|
+
<div className="data-space__viewer__execution__entry__icon">
|
|
261
|
+
<CogIcon className="data-space__viewer__execution__context-icon" />
|
|
287
262
|
</div>
|
|
288
|
-
<div className="
|
|
263
|
+
<div className="data-space__viewer__execution__entry__content data-space__viewer__execution__entry__content__dropdown__container">
|
|
289
264
|
<CustomSelectorInput
|
|
290
|
-
className="
|
|
265
|
+
className="data-space__viewer__execution__entry__content__dropdown"
|
|
291
266
|
options={executionContextOptions}
|
|
292
267
|
onChange={onExecutionContextOptionChange}
|
|
293
268
|
value={selectedExecutionContextOption}
|
|
@@ -297,33 +272,30 @@ const DataSpaceExecutionViewer = observer(
|
|
|
297
272
|
</div>
|
|
298
273
|
</div>
|
|
299
274
|
<div
|
|
300
|
-
className={clsx(
|
|
301
|
-
'
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
!dataSpaceViewerState.currentExecutionContext.description,
|
|
305
|
-
},
|
|
306
|
-
)}
|
|
275
|
+
className={clsx('data-space__viewer__execution__description', {
|
|
276
|
+
'data-space__viewer__execution__description--empty':
|
|
277
|
+
!dataSpaceViewerState.currentExecutionContext.description,
|
|
278
|
+
})}
|
|
307
279
|
>
|
|
308
280
|
{dataSpaceViewerState.currentExecutionContext.description
|
|
309
281
|
? dataSpaceViewerState.currentExecutionContext.description
|
|
310
282
|
: 'No description'}
|
|
311
283
|
</div>
|
|
312
|
-
<div className="
|
|
313
|
-
<div className="
|
|
284
|
+
<div className="data-space__viewer__execution__entry data-space__viewer__execution__mapping">
|
|
285
|
+
<div className="data-space__viewer__execution__entry__icon">
|
|
314
286
|
<MappingIcon />
|
|
315
287
|
</div>
|
|
316
|
-
<div className="
|
|
288
|
+
<div className="data-space__viewer__execution__entry__content data-space__viewer__execution__entry__content__text">
|
|
317
289
|
{dataSpaceViewerState.currentExecutionContext.mapping.value.path}
|
|
318
290
|
</div>
|
|
319
291
|
</div>
|
|
320
|
-
<div className="
|
|
321
|
-
<div className="
|
|
292
|
+
<div className="data-space__viewer__execution__entry">
|
|
293
|
+
<div className="data-space__viewer__execution__entry__icon">
|
|
322
294
|
<RuntimeIcon />
|
|
323
295
|
</div>
|
|
324
|
-
<div className="
|
|
296
|
+
<div className="data-space__viewer__execution__entry__content data-space__viewer__execution__entry__content__dropdown__container">
|
|
325
297
|
<CustomSelectorInput
|
|
326
|
-
className="
|
|
298
|
+
className="data-space__viewer__execution__entry__content__dropdown"
|
|
327
299
|
options={runtimeOptions}
|
|
328
300
|
onChange={onRuntimeOptionChange}
|
|
329
301
|
value={selectedRuntimeOption}
|
|
@@ -337,6 +309,68 @@ const DataSpaceExecutionViewer = observer(
|
|
|
337
309
|
},
|
|
338
310
|
);
|
|
339
311
|
|
|
312
|
+
const DataSpaceTags = observer(
|
|
313
|
+
(props: { dataSpaceViewerState: DataSpaceViewerState }) => {
|
|
314
|
+
const { dataSpaceViewerState } = props;
|
|
315
|
+
|
|
316
|
+
const dataSpace = dataSpaceViewerState.dataSpace;
|
|
317
|
+
|
|
318
|
+
return (
|
|
319
|
+
<div className="data-space__viewer__tags">
|
|
320
|
+
<div className="data-space__viewer__tags__section">
|
|
321
|
+
<div className="data-space__viewer__tags__section__title">
|
|
322
|
+
Tagged Values
|
|
323
|
+
</div>
|
|
324
|
+
{dataSpace.taggedValues.length !== 0 &&
|
|
325
|
+
dataSpace.taggedValues.map((taggedValueData) => (
|
|
326
|
+
<div
|
|
327
|
+
key={taggedValueData.uuid}
|
|
328
|
+
className="data-space__viewer__tags__section__entry"
|
|
329
|
+
>
|
|
330
|
+
<div
|
|
331
|
+
className="data-space__viewer__tags__tagged-value__tag"
|
|
332
|
+
title={`${taggedValueData.profile}.${taggedValueData.tag}`}
|
|
333
|
+
>
|
|
334
|
+
{taggedValueData.tag}
|
|
335
|
+
</div>
|
|
336
|
+
<div className="data-space__viewer__tags__tagged-value__value">
|
|
337
|
+
{taggedValueData.value}
|
|
338
|
+
</div>
|
|
339
|
+
</div>
|
|
340
|
+
))}
|
|
341
|
+
{dataSpace.taggedValues.length === 0 && (
|
|
342
|
+
<div className="data-space__viewer__tags__section__placeholder">
|
|
343
|
+
(empty)
|
|
344
|
+
</div>
|
|
345
|
+
)}
|
|
346
|
+
</div>
|
|
347
|
+
<div className="data-space__viewer__tags__section">
|
|
348
|
+
<div className="data-space__viewer__tags__section__title">
|
|
349
|
+
Stereotypes
|
|
350
|
+
</div>
|
|
351
|
+
{dataSpace.stereotypes.length !== 0 &&
|
|
352
|
+
dataSpace.stereotypes.map((stereotypeData) => (
|
|
353
|
+
<div
|
|
354
|
+
key={stereotypeData.uuid}
|
|
355
|
+
className="data-space__viewer__tags__section__entry"
|
|
356
|
+
title={`${stereotypeData.profile}.${stereotypeData.stereotype}`}
|
|
357
|
+
>
|
|
358
|
+
<div className="data-space__viewer__tags__steoreotype">
|
|
359
|
+
{stereotypeData.stereotype}
|
|
360
|
+
</div>
|
|
361
|
+
</div>
|
|
362
|
+
))}
|
|
363
|
+
{dataSpace.stereotypes.length === 0 && (
|
|
364
|
+
<div className="data-space__viewer__tags__section__placeholder">
|
|
365
|
+
(empty)
|
|
366
|
+
</div>
|
|
367
|
+
)}
|
|
368
|
+
</div>
|
|
369
|
+
</div>
|
|
370
|
+
);
|
|
371
|
+
},
|
|
372
|
+
);
|
|
373
|
+
|
|
340
374
|
const DataSpaceSupportEmailViewer = observer(
|
|
341
375
|
(props: {
|
|
342
376
|
dataSpaceViewerState: DataSpaceViewerState;
|
|
@@ -345,14 +379,14 @@ const DataSpaceSupportEmailViewer = observer(
|
|
|
345
379
|
const { dataSpaceSupportEmail } = props;
|
|
346
380
|
|
|
347
381
|
return (
|
|
348
|
-
<div className="
|
|
349
|
-
<div className="
|
|
350
|
-
<div className="
|
|
382
|
+
<div className="data-space__viewer__support-email">
|
|
383
|
+
<div className="data-space__viewer__support-email__entry">
|
|
384
|
+
<div className="data-space__viewer__support-email__entry__icon">
|
|
351
385
|
<EnvelopIcon />
|
|
352
386
|
</div>
|
|
353
387
|
<a
|
|
354
388
|
href={`mailto:${dataSpaceSupportEmail.address}`}
|
|
355
|
-
className="
|
|
389
|
+
className="data-space__viewer__support-email__entry__content"
|
|
356
390
|
>
|
|
357
391
|
{dataSpaceSupportEmail.address}
|
|
358
392
|
</a>
|
|
@@ -395,7 +429,7 @@ export const DataSpaceViewer = observer(
|
|
|
395
429
|
|
|
396
430
|
const activities: DataSpaceViewerActivityConfig[] = [
|
|
397
431
|
{
|
|
398
|
-
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.
|
|
432
|
+
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS_OVERVIEW,
|
|
399
433
|
title: 'Models Overview',
|
|
400
434
|
icon: <ShapesIcon />,
|
|
401
435
|
},
|
|
@@ -404,11 +438,26 @@ export const DataSpaceViewer = observer(
|
|
|
404
438
|
title: 'Execution Context',
|
|
405
439
|
icon: <PlayIcon />,
|
|
406
440
|
},
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
441
|
+
{
|
|
442
|
+
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.ENTITLEMENT,
|
|
443
|
+
title: 'Entitlement',
|
|
444
|
+
icon: <KeyIcon />,
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.TEST_DATA,
|
|
448
|
+
title: 'Test Data',
|
|
449
|
+
icon: <FlaskIcon />,
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.TEST_COVERAGE,
|
|
453
|
+
title: 'Test Coverage',
|
|
454
|
+
icon: <ShieldIcon />,
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.TAGS,
|
|
458
|
+
title: 'Tags',
|
|
459
|
+
icon: <TagsIcon />,
|
|
460
|
+
},
|
|
412
461
|
{
|
|
413
462
|
mode: DATA_SPACE_VIEWER_ACTIVITY_MODE.SUPPORT,
|
|
414
463
|
title: 'Support',
|
|
@@ -416,53 +465,77 @@ export const DataSpaceViewer = observer(
|
|
|
416
465
|
},
|
|
417
466
|
];
|
|
418
467
|
|
|
468
|
+
const viewDataSpaceProject = (): void =>
|
|
469
|
+
dataSpaceViewerState.viewProject?.(
|
|
470
|
+
dataSpaceViewerState.dataSpaceGroupId,
|
|
471
|
+
dataSpaceViewerState.dataSpaceArtifactId,
|
|
472
|
+
dataSpaceViewerState.dataSpaceVersionId,
|
|
473
|
+
dataSpace.path,
|
|
474
|
+
);
|
|
475
|
+
const viewProject = (): void =>
|
|
476
|
+
dataSpaceViewerState.viewProject?.(
|
|
477
|
+
dataSpace.groupId,
|
|
478
|
+
dataSpace.artifactId,
|
|
479
|
+
dataSpace.versionId,
|
|
480
|
+
undefined,
|
|
481
|
+
);
|
|
482
|
+
|
|
419
483
|
return (
|
|
420
|
-
<div className="
|
|
421
|
-
<div className="
|
|
422
|
-
<
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
484
|
+
<div className="data-space__viewer">
|
|
485
|
+
<div className="data-space__viewer__header">
|
|
486
|
+
<button
|
|
487
|
+
className="data-space__viewer__path"
|
|
488
|
+
tabIndex={-1}
|
|
489
|
+
title="View Data Space in Project"
|
|
490
|
+
onClick={viewDataSpaceProject}
|
|
491
|
+
>
|
|
492
|
+
<div className="data-space__viewer__path__label">
|
|
493
|
+
{dataSpace.path}
|
|
428
494
|
</div>
|
|
429
|
-
<div className="
|
|
430
|
-
|
|
495
|
+
<div className="data-space__viewer__path__link">
|
|
496
|
+
<ExternalLinkSquareIcon />
|
|
431
497
|
</div>
|
|
432
|
-
|
|
433
|
-
|
|
498
|
+
</button>
|
|
499
|
+
<button
|
|
500
|
+
className="data-space__viewer__gav"
|
|
501
|
+
tabIndex={-1}
|
|
502
|
+
title="View Project"
|
|
503
|
+
onClick={viewProject}
|
|
504
|
+
>
|
|
505
|
+
<div className="data-space__viewer__gav__group-id">
|
|
506
|
+
{dataSpace.groupId}
|
|
434
507
|
</div>
|
|
435
|
-
<div className="
|
|
436
|
-
|
|
508
|
+
<div className="data-space__viewer__gav__separator">:</div>
|
|
509
|
+
<div className="data-space__viewer__gav__artifact-id">
|
|
510
|
+
{dataSpace.artifactId}
|
|
437
511
|
</div>
|
|
438
|
-
<div className="
|
|
512
|
+
<div className="data-space__viewer__gav__separator">:</div>
|
|
513
|
+
<div className="data-space__viewer__gav__version-id">
|
|
439
514
|
{dataSpace.versionId}
|
|
440
515
|
</div>
|
|
441
|
-
|
|
516
|
+
<div className="data-space__viewer__gav__link">
|
|
517
|
+
<ExternalLinkIcon />
|
|
518
|
+
</div>
|
|
519
|
+
</button>
|
|
442
520
|
<div
|
|
443
|
-
className={clsx('
|
|
444
|
-
'
|
|
445
|
-
!dataSpace.description,
|
|
521
|
+
className={clsx('data-space__viewer__description', {
|
|
522
|
+
'data-space__viewer__description--empty': !dataSpace.description,
|
|
446
523
|
})}
|
|
447
524
|
>
|
|
448
525
|
{dataSpace.description ? dataSpace.description : 'No description'}
|
|
449
526
|
</div>
|
|
450
527
|
</div>
|
|
451
|
-
<div className="
|
|
452
|
-
<div className="
|
|
453
|
-
<div className="
|
|
454
|
-
<div className="
|
|
528
|
+
<div className="data-space__viewer__content">
|
|
529
|
+
<div className="data-space__viewer__body">
|
|
530
|
+
<div className="data-space__viewer__activity-bar">
|
|
531
|
+
<div className="data-space__viewer__activity-bar__items">
|
|
455
532
|
{activities.map((activity) => (
|
|
456
533
|
<button
|
|
457
534
|
key={activity.mode}
|
|
458
|
-
className={clsx(
|
|
459
|
-
'
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
dataSpaceViewerState.currentActivity ===
|
|
463
|
-
activity.mode,
|
|
464
|
-
},
|
|
465
|
-
)}
|
|
535
|
+
className={clsx('data-space__viewer__activity-bar__item', {
|
|
536
|
+
'data-space__viewer__activity-bar__item--active':
|
|
537
|
+
dataSpaceViewerState.currentActivity === activity.mode,
|
|
538
|
+
})}
|
|
466
539
|
onClick={changeActivity(activity.mode)}
|
|
467
540
|
tabIndex={-1}
|
|
468
541
|
title={activity.title}
|
|
@@ -472,9 +545,9 @@ export const DataSpaceViewer = observer(
|
|
|
472
545
|
))}
|
|
473
546
|
</div>
|
|
474
547
|
</div>
|
|
475
|
-
<div className="
|
|
548
|
+
<div className="data-space__viewer__main-panel">
|
|
476
549
|
{dataSpaceViewerState.currentActivity ===
|
|
477
|
-
DATA_SPACE_VIEWER_ACTIVITY_MODE.
|
|
550
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS_OVERVIEW && (
|
|
478
551
|
<DataSpaceModelsOverview
|
|
479
552
|
dataSpaceViewerState={dataSpaceViewerState}
|
|
480
553
|
/>
|
|
@@ -485,9 +558,31 @@ export const DataSpaceViewer = observer(
|
|
|
485
558
|
dataSpaceViewerState={dataSpaceViewerState}
|
|
486
559
|
/>
|
|
487
560
|
)}
|
|
561
|
+
{dataSpaceViewerState.currentActivity ===
|
|
562
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.ENTITLEMENT && (
|
|
563
|
+
<BlankPanelContent>
|
|
564
|
+
Request entitlement(s) (Work in Progress)
|
|
565
|
+
</BlankPanelContent>
|
|
566
|
+
)}
|
|
567
|
+
{dataSpaceViewerState.currentActivity ===
|
|
568
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.TEST_DATA && (
|
|
569
|
+
<BlankPanelContent>
|
|
570
|
+
View test data (Work in Progress)
|
|
571
|
+
</BlankPanelContent>
|
|
572
|
+
)}
|
|
573
|
+
{dataSpaceViewerState.currentActivity ===
|
|
574
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.TEST_COVERAGE && (
|
|
575
|
+
<BlankPanelContent>
|
|
576
|
+
View test coverage (Work in Progress)
|
|
577
|
+
</BlankPanelContent>
|
|
578
|
+
)}
|
|
579
|
+
{dataSpaceViewerState.currentActivity ===
|
|
580
|
+
DATA_SPACE_VIEWER_ACTIVITY_MODE.TAGS && (
|
|
581
|
+
<DataSpaceTags dataSpaceViewerState={dataSpaceViewerState} />
|
|
582
|
+
)}
|
|
488
583
|
{dataSpaceViewerState.currentActivity ===
|
|
489
584
|
DATA_SPACE_VIEWER_ACTIVITY_MODE.SUPPORT && (
|
|
490
|
-
<div className="
|
|
585
|
+
<div className="data-space__viewer__main-panel__content data-space__viewer__support-info">
|
|
491
586
|
<DataSpaceSupportInfoViewerInner
|
|
492
587
|
dataSpaceViewerState={dataSpaceViewerState}
|
|
493
588
|
dataSpaceSupportInfo={dataSpace.supportInfo}
|
package/src/components/query/{DSLDataSpace_QueryPlugin.tsx → DSLDataSpace_LegendQueryPlugin.tsx}
RENAMED
|
@@ -16,26 +16,21 @@
|
|
|
16
16
|
|
|
17
17
|
import packageJson from '../../../package.json';
|
|
18
18
|
import type {
|
|
19
|
-
QueryPluginManager,
|
|
20
19
|
QuerySetupOptionRendererConfiguration,
|
|
21
20
|
QuerySetupRenderer,
|
|
22
21
|
QuerySetupState,
|
|
23
22
|
QuerySetupStore,
|
|
24
23
|
} from '@finos/legend-query';
|
|
25
|
-
import {
|
|
24
|
+
import { LegendQueryPlugin } from '@finos/legend-query';
|
|
26
25
|
import { SquareIcon } from '@finos/legend-art';
|
|
27
26
|
import { DataSpaceQuerySetupState } from '../../stores/query/DataSpaceQuerySetupState';
|
|
28
27
|
import { DataspaceQuerySetup } from './DataSpaceQuerySetup';
|
|
29
28
|
|
|
30
|
-
export class
|
|
29
|
+
export class DSLDataSpace_LegendQueryPlugin extends LegendQueryPlugin {
|
|
31
30
|
constructor() {
|
|
32
31
|
super(packageJson.extensions.queryPlugin, packageJson.version);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
install(pluginManager: QueryPluginManager): void {
|
|
36
|
-
pluginManager.registerQueryPlugin(this);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
34
|
override getExtraQuerySetupOptionRendererConfigurations(): QuerySetupOptionRendererConfiguration[] {
|
|
40
35
|
return [
|
|
41
36
|
{
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import { useApplicationStore } from '@finos/legend-application';
|
|
18
18
|
import type { SelectComponent } from '@finos/legend-art';
|
|
19
19
|
import {
|
|
20
|
+
BoltIcon,
|
|
20
21
|
ArrowRightIcon,
|
|
21
22
|
clsx,
|
|
22
23
|
BlankPanelContent,
|
|
@@ -26,7 +27,8 @@ import {
|
|
|
26
27
|
CustomSelectorInput,
|
|
27
28
|
SearchIcon,
|
|
28
29
|
} from '@finos/legend-art';
|
|
29
|
-
import { useQuerySetupStore,
|
|
30
|
+
import { useQuerySetupStore, useLegendQueryStore } from '@finos/legend-query';
|
|
31
|
+
import { generateGAVCoordinates } from '@finos/legend-server-depot';
|
|
30
32
|
import { debounce } from '@finos/legend-shared';
|
|
31
33
|
import { flowResult } from 'mobx';
|
|
32
34
|
import { observer } from 'mobx-react-lite';
|
|
@@ -35,7 +37,7 @@ import type {
|
|
|
35
37
|
DataSpaceQuerySetupState,
|
|
36
38
|
LightDataSpace,
|
|
37
39
|
} from '../../stores/query/DataSpaceQuerySetupState';
|
|
38
|
-
import { DataSpaceViewer } from '
|
|
40
|
+
import { DataSpaceViewer } from '../DataSpaceViewer';
|
|
39
41
|
|
|
40
42
|
type DataSpaceOption = { label: string; value: LightDataSpace };
|
|
41
43
|
const buildDataSpaceOption = (dataSpace: LightDataSpace): DataSpaceOption => ({
|
|
@@ -48,10 +50,17 @@ export const DataspaceQuerySetup = observer(
|
|
|
48
50
|
const { querySetupState } = props;
|
|
49
51
|
const applicationStore = useApplicationStore();
|
|
50
52
|
const setupStore = useQuerySetupStore();
|
|
51
|
-
const queryStore =
|
|
53
|
+
const queryStore = useLegendQueryStore();
|
|
52
54
|
const dataSpaceSearchRef = useRef<SelectComponent>(null);
|
|
53
55
|
const [searchText, setSearchText] = useState('');
|
|
54
56
|
|
|
57
|
+
const toggleGetSnapshot = (): void => {
|
|
58
|
+
querySetupState.setToGetSnapShot(!querySetupState.toGetSnapShot);
|
|
59
|
+
flowResult(querySetupState.loadDataSpaces(searchText)).catch(
|
|
60
|
+
applicationStore.alertIllegalUnhandledError,
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
55
64
|
const next = (): void => {
|
|
56
65
|
if (querySetupState.dataSpaceViewerState) {
|
|
57
66
|
flowResult(querySetupState.proceedToCreateQuery()).catch(
|
|
@@ -88,8 +97,11 @@ export const DataspaceQuerySetup = observer(
|
|
|
88
97
|
{option.label}
|
|
89
98
|
</div>
|
|
90
99
|
<div className="query-setup__data-space__option__gav">
|
|
91
|
-
{
|
|
92
|
-
|
|
100
|
+
{generateGAVCoordinates(
|
|
101
|
+
option.value.groupId,
|
|
102
|
+
option.value.artifactId,
|
|
103
|
+
option.value.versionId,
|
|
104
|
+
)}
|
|
93
105
|
</div>
|
|
94
106
|
</div>
|
|
95
107
|
);
|
|
@@ -174,6 +186,19 @@ export const DataspaceQuerySetup = observer(
|
|
|
174
186
|
darkMode={true}
|
|
175
187
|
formatOptionLabel={formatQueryOptionLabel}
|
|
176
188
|
/>
|
|
189
|
+
<button
|
|
190
|
+
className={clsx('query-setup__data-space__use-snapshot-btn', {
|
|
191
|
+
'query-setup__data-space__use-snapshot-btn--active':
|
|
192
|
+
querySetupState.toGetSnapShot,
|
|
193
|
+
})}
|
|
194
|
+
tabIndex={-1}
|
|
195
|
+
title={`[${
|
|
196
|
+
querySetupState.toGetSnapShot ? 'on' : 'off'
|
|
197
|
+
}] Toggle show data spaces from snapshot releases instead of latest releases`}
|
|
198
|
+
onClick={toggleGetSnapshot}
|
|
199
|
+
>
|
|
200
|
+
<BoltIcon />
|
|
201
|
+
</button>
|
|
177
202
|
</div>
|
|
178
203
|
<div className="query-setup__data-space__view">
|
|
179
204
|
<PanelLoadingIndicator
|