@finos/legend-extension-dsl-data-space 10.3.10 → 10.3.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js.map +1 -1
  2. package/lib/components/DataSpaceDataAccess.js.map +1 -1
  3. package/lib/components/DataSpaceDescription.js.map +1 -1
  4. package/lib/components/DataSpaceDiagramViewer.js.map +1 -1
  5. package/lib/components/DataSpaceExecutionContextViewer.js.map +1 -1
  6. package/lib/components/DataSpaceModelsDocumentation.js.map +1 -1
  7. package/lib/components/DataSpaceQuickStart.js.map +1 -1
  8. package/lib/components/DataSpaceSupportPanel.js.map +1 -1
  9. package/lib/components/DataSpaceViewer.js.map +1 -1
  10. package/lib/components/DataSpaceWiki.js.map +1 -1
  11. package/lib/components/query-builder/DataSpaceAdvancedSearchModal.js.map +1 -1
  12. package/lib/components/query-builder/DataSpaceQueryBuilder.d.ts.map +1 -1
  13. package/lib/components/query-builder/DataSpaceQueryBuilder.js +21 -17
  14. package/lib/components/query-builder/DataSpaceQueryBuilder.js.map +1 -1
  15. package/lib/components/query-builder/DataSpaceQueryBuilderTemplateQueryPanelContent.js.map +1 -1
  16. package/lib/graph-manager/DSL_DataSpace_PureGraphManagerPlugin.js.map +1 -1
  17. package/lib/graph-manager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js.map +1 -1
  18. package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
  19. package/lib/graph-manager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js.map +1 -1
  20. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js.map +1 -1
  21. package/lib/index.css +2 -2
  22. package/lib/index.css.map +1 -1
  23. package/lib/package.json +10 -10
  24. package/lib/stores/DataSpaceLayoutState.js.map +1 -1
  25. package/lib/stores/DataSpaceModelsDocumentationState.js.map +1 -1
  26. package/lib/stores/DataSpaceQuickStartState.js.map +1 -1
  27. package/lib/stores/DataSpaceViewerDiagramViewerState.js.map +1 -1
  28. package/lib/stores/DataSpaceViewerNavigation.d.ts +2 -2
  29. package/lib/stores/DataSpaceViewerNavigation.d.ts.map +1 -1
  30. package/lib/stores/DataSpaceViewerState.js.map +1 -1
  31. package/lib/stores/query/DataSpaceAdvancedSearchState.js.map +1 -1
  32. package/lib/stores/query-builder/DataSpaceQueryBuilderState.d.ts +2 -2
  33. package/lib/stores/query-builder/DataSpaceQueryBuilderState.d.ts.map +1 -1
  34. package/lib/stores/query-builder/DataSpaceQueryBuilderState.js +2 -1
  35. package/lib/stores/query-builder/DataSpaceQueryBuilderState.js.map +1 -1
  36. package/package.json +21 -21
  37. package/src/components/DataSpaceModelsDocumentation.tsx +12 -12
  38. package/src/components/query-builder/DataSpaceQueryBuilder.tsx +113 -109
  39. package/src/stores/DataSpaceModelsDocumentationState.ts +4 -4
  40. package/src/stores/query-builder/DataSpaceQueryBuilderState.ts +4 -1
  41. package/tsconfig.json +17 -1
  42. package/tsconfig.package.json +17 -1
@@ -17,16 +17,16 @@
17
17
  import {
18
18
  CustomSelectorInput,
19
19
  createFilter,
20
- PURE_RuntimeIcon,
21
- PlayIcon,
22
20
  DropdownMenu,
23
- MoreHorizontalIcon,
24
21
  MenuContentItem,
25
22
  MenuContent,
26
23
  MenuContentItemIcon,
27
24
  CheckIcon,
28
25
  MenuContentItemLabel,
29
26
  SearchIcon,
27
+ PanelHeaderActions,
28
+ PanelHeader,
29
+ MoreVerticalIcon,
30
30
  } from '@finos/legend-art';
31
31
  import { observer } from 'mobx-react-lite';
32
32
  import { useApplicationStore } from '@finos/legend-application';
@@ -51,7 +51,6 @@ import { useEffect } from 'react';
51
51
  import { guaranteeType } from '@finos/legend-shared';
52
52
  import { flowResult } from 'mobx';
53
53
  import { type DataSpaceExecutionContext } from '../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
54
- import { DataSpaceIcon } from '../shared/DSL_DataSpace_Icon.js';
55
54
  import { DataSpaceAdvancedSearchModal } from './DataSpaceAdvancedSearchModal.js';
56
55
 
57
56
  export type DataSpaceOption = {
@@ -128,8 +127,9 @@ const DataSpaceQueryBuilderSetupPanelContent = observer(
128
127
  const applicationStore = useApplicationStore();
129
128
 
130
129
  // data space
131
- const dataSpaceOptions =
132
- queryBuilderState.dataSpaces.map(buildDataSpaceOption);
130
+ const dataSpaceOptions = queryBuilderState.dataSpaces
131
+ .map(buildDataSpaceOption)
132
+ .sort((a, b) => a.label.localeCompare(b.label));
133
133
  const selectedDataSpaceOption: DataSpaceOption = {
134
134
  label:
135
135
  queryBuilderState.dataSpace.title ?? queryBuilderState.dataSpace.name,
@@ -153,9 +153,9 @@ const DataSpaceQueryBuilderSetupPanelContent = observer(
153
153
 
154
154
  // execution context
155
155
  const executionContextOptions =
156
- queryBuilderState.dataSpace.executionContexts.map(
157
- buildExecutionContextOption,
158
- );
156
+ queryBuilderState.dataSpace.executionContexts
157
+ .map(buildExecutionContextOption)
158
+ .sort((a, b) => a.label.localeCompare(b.label));
159
159
  const selectedExecutionContextOption = buildExecutionContextOption(
160
160
  queryBuilderState.executionContext,
161
161
  );
@@ -179,7 +179,8 @@ const DataSpaceQueryBuilderSetupPanelContent = observer(
179
179
  (rt) =>
180
180
  new RuntimePointer(PackageableElementExplicitReference.create(rt)),
181
181
  )
182
- .map(buildRuntimeValueOption);
182
+ .map(buildRuntimeValueOption)
183
+ .sort((a, b) => a.label.localeCompare(b.label));
183
184
  const selectedRuntimeOption = queryBuilderState.executionContextState
184
185
  .runtimeValue
185
186
  ? buildRuntimeValueOption(
@@ -217,14 +218,11 @@ const DataSpaceQueryBuilderSetupPanelContent = observer(
217
218
  }, [queryBuilderState, applicationStore]);
218
219
 
219
220
  return (
220
- <>
221
- <div className="query-builder__setup__config-group">
222
- <div className="query-builder__setup__config-group__header">
223
- <div className="query-builder__setup__config-group__header__title">
224
- data space execution context
225
- </div>
221
+ <div className="query-builder__setup__config-group">
222
+ <PanelHeader title="properties">
223
+ <PanelHeaderActions>
226
224
  <DropdownMenu
227
- className="query-builder__setup__config-group__header__dropdown-trigger"
225
+ className="panel__header__action query-builder__setup__config-group__header__dropdown-trigger"
228
226
  title="Show Settings..."
229
227
  content={
230
228
  <MenuContent>
@@ -251,113 +249,119 @@ const DataSpaceQueryBuilderSetupPanelContent = observer(
251
249
  transformOrigin: { vertical: 'top', horizontal: 'right' },
252
250
  }}
253
251
  >
254
- <MoreHorizontalIcon />
252
+ <MoreVerticalIcon className="query-builder__icon__more-options" />
255
253
  </DropdownMenu>
254
+ </PanelHeaderActions>
255
+ </PanelHeader>
256
+ <div className="query-builder__setup__config-group__content">
257
+ <div className="query-builder__setup__config-group__item">
258
+ <label
259
+ className="btn--sm query-builder__setup__config-group__item__label"
260
+ title="data space"
261
+ htmlFor="query-builder__setup__data-space-selector"
262
+ >
263
+ Data Space
264
+ </label>
265
+ <CustomSelectorInput
266
+ inputId="query-builder__setup__data-space-selector"
267
+ className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
268
+ options={dataSpaceOptions}
269
+ isLoading={queryBuilderState.loadDataSpacesState.isInProgress}
270
+ onChange={onDataSpaceOptionChange}
271
+ value={selectedDataSpaceOption}
272
+ placeholder="Search for data space..."
273
+ escapeClearsValue={true}
274
+ darkMode={
275
+ !applicationStore.layoutService
276
+ .TEMPORARY__isLightColorThemeEnabled
277
+ }
278
+ formatOptionLabel={formatDataSpaceOptionLabel}
279
+ />
280
+ {queryBuilderState.isAdvancedDataSpaceSearchEnabled && (
281
+ <>
282
+ <button
283
+ tabIndex={-1}
284
+ className="query-builder__setup__data-space-searcher__btn btn--dark"
285
+ onClick={openDataSpaceAdvancedSearch}
286
+ title="Open advanced search for data space..."
287
+ >
288
+ <SearchIcon />
289
+ </button>
290
+ {queryBuilderState.advancedSearchState && (
291
+ <DataSpaceAdvancedSearchModal
292
+ searchState={queryBuilderState.advancedSearchState}
293
+ onClose={() => queryBuilderState.hideAdvancedSearchPanel()}
294
+ />
295
+ )}
296
+ </>
297
+ )}
256
298
  </div>
257
- <div className="query-builder__setup__config-group__content">
258
- <div className="query-builder__setup__config-group__item">
259
- <div
260
- className="btn--sm query-builder__setup__config-group__item__label"
261
- title="data space"
262
- >
263
- <DataSpaceIcon />
264
- </div>
265
- <CustomSelectorInput
266
- className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
267
- options={dataSpaceOptions}
268
- isLoading={queryBuilderState.loadDataSpacesState.isInProgress}
269
- onChange={onDataSpaceOptionChange}
270
- value={selectedDataSpaceOption}
271
- placeholder="Search for data space..."
272
- escapeClearsValue={true}
273
- darkMode={
274
- !applicationStore.layoutService
275
- .TEMPORARY__isLightColorThemeEnabled
276
- }
277
- formatOptionLabel={formatDataSpaceOptionLabel}
278
- />
279
- {queryBuilderState.isAdvancedDataSpaceSearchEnabled && (
280
- <>
281
- <button
282
- tabIndex={-1}
283
- className="query-builder__setup__data-space-searcher__btn btn--dark"
284
- onClick={openDataSpaceAdvancedSearch}
285
- title="Open advanced search for data space..."
286
- >
287
- <SearchIcon />
288
- </button>
289
- {queryBuilderState.advancedSearchState && (
290
- <DataSpaceAdvancedSearchModal
291
- searchState={queryBuilderState.advancedSearchState}
292
- onClose={() =>
293
- queryBuilderState.hideAdvancedSearchPanel()
294
- }
295
- />
296
- )}
297
- </>
298
- )}
299
- </div>
299
+ <div className="query-builder__setup__config-group__item">
300
+ <label
301
+ className="btn--sm query-builder__setup__config-group__item__label"
302
+ title="execution context"
303
+ htmlFor="query-builder__setup__context-selector"
304
+ >
305
+ Context
306
+ </label>
307
+ <CustomSelectorInput
308
+ inputId="query-builder__setup__context-selector"
309
+ className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
310
+ placeholder="Choose an execution context..."
311
+ options={executionContextOptions}
312
+ disabled={
313
+ executionContextOptions.length < 1 ||
314
+ (executionContextOptions.length === 1 &&
315
+ Boolean(selectedExecutionContextOption))
316
+ }
317
+ onChange={onExecutionContextOptionChange}
318
+ value={selectedExecutionContextOption}
319
+ darkMode={
320
+ !applicationStore.layoutService
321
+ .TEMPORARY__isLightColorThemeEnabled
322
+ }
323
+ />
324
+ </div>
325
+ {queryBuilderState.showRuntimeSelector && (
300
326
  <div className="query-builder__setup__config-group__item">
301
- <div
327
+ <label
302
328
  className="btn--sm query-builder__setup__config-group__item__label"
303
- title="execution context"
329
+ title="runtime"
330
+ htmlFor="query-builder__setup__runtime-selector"
304
331
  >
305
- <PlayIcon className="query-builder__setup__data-space__icon__execution-context" />
306
- </div>
332
+ Runtime
333
+ </label>
307
334
  <CustomSelectorInput
335
+ inputId="query-builder__setup__runtime-selector"
308
336
  className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
309
- placeholder="Choose an execution context..."
310
- options={executionContextOptions}
311
- disabled={
312
- executionContextOptions.length < 1 ||
313
- (executionContextOptions.length === 1 &&
314
- Boolean(selectedExecutionContextOption))
315
- }
316
- onChange={onExecutionContextOptionChange}
317
- value={selectedExecutionContextOption}
337
+ placeholder="Choose a runtime..."
338
+ noMatchMessage="No compatible runtime found for specified execution context"
339
+ options={runtimeOptions}
340
+ onChange={changeRuntime}
341
+ value={selectedRuntimeOption}
318
342
  darkMode={
319
343
  !applicationStore.layoutService
320
344
  .TEMPORARY__isLightColorThemeEnabled
321
345
  }
346
+ filterOption={runtimeFilterOption}
347
+ formatOptionLabel={getRuntimeOptionFormatter({
348
+ darkMode:
349
+ !applicationStore.layoutService
350
+ .TEMPORARY__isLightColorThemeEnabled,
351
+ })}
322
352
  />
323
353
  </div>
324
- {queryBuilderState.showRuntimeSelector && (
325
- <div className="query-builder__setup__config-group__item">
326
- <div
327
- className="btn--sm query-builder__setup__config-group__item__label"
328
- title="runtime"
329
- >
330
- <PURE_RuntimeIcon />
331
- </div>
332
- <CustomSelectorInput
333
- className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
334
- placeholder="Choose a runtime..."
335
- noMatchMessage="No compatible runtime found for specified execution context"
336
- options={runtimeOptions}
337
- onChange={changeRuntime}
338
- value={selectedRuntimeOption}
339
- darkMode={
340
- !applicationStore.layoutService
341
- .TEMPORARY__isLightColorThemeEnabled
342
- }
343
- filterOption={runtimeFilterOption}
344
- formatOptionLabel={getRuntimeOptionFormatter({
345
- darkMode:
346
- !applicationStore.layoutService
347
- .TEMPORARY__isLightColorThemeEnabled,
348
- })}
349
- />
350
- </div>
351
- )}
354
+ )}
355
+ <div className="query-builder__setup__config-group__item">
356
+ <QueryBuilderClassSelector
357
+ queryBuilderState={queryBuilderState}
358
+ classes={classes}
359
+ onClassChange={queryBuilderState.onClassChange}
360
+ noMatchMessage="No compatible entity found for specified execution context"
361
+ />
352
362
  </div>
353
363
  </div>
354
- <QueryBuilderClassSelector
355
- queryBuilderState={queryBuilderState}
356
- classes={classes}
357
- onClassChange={queryBuilderState.onClassChange}
358
- noMatchMessage="No compatible class found for specified execution context"
359
- />
360
- </>
364
+ </div>
361
365
  );
362
366
  },
363
367
  );
@@ -307,10 +307,10 @@ const buildPackageFilterTreeData = (
307
307
  entry instanceof DataSpaceClassDocumentationEntry
308
308
  ? CORE_PURE_PATH.CLASS
309
309
  : entry instanceof DataSpaceEnumerationDocumentationEntry
310
- ? CORE_PURE_PATH.ENUMERATION
311
- : entry instanceof DataSpaceAssociationDocumentationEntry
312
- ? CORE_PURE_PATH.ASSOCIATION
313
- : undefined,
310
+ ? CORE_PURE_PATH.ENUMERATION
311
+ : entry instanceof DataSpaceAssociationDocumentationEntry
312
+ ? CORE_PURE_PATH.ASSOCIATION
313
+ : undefined,
314
314
  );
315
315
  } else {
316
316
  node = new ModelsDocumentationFilterTreePackageNodeData(
@@ -17,9 +17,10 @@
17
17
  import { type GenericLegendApplicationStore } from '@finos/legend-application';
18
18
  import {
19
19
  type QueryBuilderConfig,
20
- QueryBuilderState,
21
20
  type QuerySDLC,
22
21
  type QueryBuilderWorkflowState,
22
+ type QueryBuilderActionConfig,
23
+ QueryBuilderState,
23
24
  } from '@finos/legend-query-builder';
24
25
  import {
25
26
  type GraphManagerState,
@@ -155,6 +156,7 @@ export class DataSpaceQueryBuilderState extends QueryBuilderState {
155
156
  graphManagerState: GraphManagerState,
156
157
  depotServerClient: DepotServerClient,
157
158
  workflow: QueryBuilderWorkflowState,
159
+ actionConfig: QueryBuilderActionConfig,
158
160
  dataSpace: DataSpace,
159
161
  executionContext: DataSpaceExecutionContext,
160
162
  onDataSpaceChange: (val: DataSpaceInfo) => void,
@@ -195,6 +197,7 @@ export class DataSpaceQueryBuilderState extends QueryBuilderState {
195
197
  this.onClassChange = onClassChange;
196
198
  this.isAdvancedDataSpaceSearchEnabled = isAdvancedDataSpaceSearchEnabled;
197
199
  this.dataSpaceAnalysisResult = dataSpaceAnalysisResult;
200
+ this.workflowState.updateActionConfig(actionConfig);
198
201
  }
199
202
 
200
203
  override get sideBarClassName(): string | undefined {
package/tsconfig.json CHANGED
@@ -24,7 +24,23 @@
24
24
  "outDir": "./lib",
25
25
  "tsBuildInfoFile": "./build/prod.tsbuildinfo",
26
26
  "rootDir": "./src",
27
- "jsx": "react-jsx"
27
+ "jsx": "react-jsx",
28
+ "moduleResolution": "nodenext",
29
+ "moduleDetection": "force",
30
+ "isolatedModules": true,
31
+ "esModuleInterop": true,
32
+ "allowSyntheticDefaultImports": true,
33
+ "preserveConstEnums": true,
34
+ "incremental": true,
35
+ "useDefineForClassFields": true,
36
+ "noImplicitAny": true,
37
+ "noImplicitThis": true,
38
+ "strictNullChecks": true,
39
+ "strictFunctionTypes": true,
40
+ "strictBindCallApply": true,
41
+ "strictPropertyInitialization": true,
42
+ "alwaysStrict": true,
43
+ "useUnknownInCatchVariables": true
28
44
  },
29
45
  "references": [
30
46
  {
@@ -23,7 +23,23 @@
23
23
  "forceConsistentCasingInFileNames": true,
24
24
  "outDir": "./lib",
25
25
  "tsBuildInfoFile": "./build/package.tsbuildinfo",
26
- "rootDir": "./"
26
+ "rootDir": "./",
27
+ "moduleResolution": "nodenext",
28
+ "moduleDetection": "force",
29
+ "isolatedModules": true,
30
+ "esModuleInterop": true,
31
+ "allowSyntheticDefaultImports": true,
32
+ "preserveConstEnums": true,
33
+ "incremental": true,
34
+ "useDefineForClassFields": true,
35
+ "noImplicitAny": true,
36
+ "noImplicitThis": true,
37
+ "strictNullChecks": true,
38
+ "strictFunctionTypes": true,
39
+ "strictBindCallApply": true,
40
+ "strictPropertyInitialization": true,
41
+ "alwaysStrict": true,
42
+ "useUnknownInCatchVariables": true
27
43
  },
28
44
  "files": [
29
45
  "./package.json"