@finos/legend-extension-dsl-data-space 10.0.11 → 10.0.12

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 (126) hide show
  1. package/lib/__lib__/DSL_DataSpace_LegendApplicationCommand.d.ts +28 -0
  2. package/lib/__lib__/DSL_DataSpace_LegendApplicationCommand.d.ts.map +1 -0
  3. package/lib/__lib__/DSL_DataSpace_LegendApplicationCommand.js +70 -0
  4. package/lib/__lib__/DSL_DataSpace_LegendApplicationCommand.js.map +1 -0
  5. package/lib/__lib__/DSL_DataSpace_LegendApplicationNavigation.d.ts +20 -0
  6. package/lib/__lib__/DSL_DataSpace_LegendApplicationNavigation.d.ts.map +1 -0
  7. package/lib/__lib__/DSL_DataSpace_LegendApplicationNavigation.js +21 -0
  8. package/lib/__lib__/DSL_DataSpace_LegendApplicationNavigation.js.map +1 -0
  9. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.d.ts +3 -1
  10. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.d.ts.map +1 -1
  11. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js +13 -1
  12. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js.map +1 -1
  13. package/lib/components/DataSpaceDataAccess.d.ts.map +1 -1
  14. package/lib/components/DataSpaceDataAccess.js +5 -76
  15. package/lib/components/DataSpaceDataAccess.js.map +1 -1
  16. package/lib/components/DataSpaceDescription.d.ts.map +1 -1
  17. package/lib/components/DataSpaceDescription.js +2 -1
  18. package/lib/components/DataSpaceDescription.js.map +1 -1
  19. package/lib/components/DataSpaceDiagramViewer.d.ts.map +1 -1
  20. package/lib/components/DataSpaceDiagramViewer.js +110 -39
  21. package/lib/components/DataSpaceDiagramViewer.js.map +1 -1
  22. package/lib/components/DataSpaceExecutionContextViewer.d.ts.map +1 -1
  23. package/lib/components/DataSpaceExecutionContextViewer.js +3 -3
  24. package/lib/components/DataSpaceExecutionContextViewer.js.map +1 -1
  25. package/lib/components/DataSpaceInfoPanel.d.ts.map +1 -1
  26. package/lib/components/DataSpaceInfoPanel.js +6 -6
  27. package/lib/components/DataSpaceInfoPanel.js.map +1 -1
  28. package/lib/components/DataSpaceModelsDocumentation.d.ts.map +1 -1
  29. package/lib/components/DataSpaceModelsDocumentation.js +18 -8
  30. package/lib/components/DataSpaceModelsDocumentation.js.map +1 -1
  31. package/lib/components/DataSpacePlaceholder.d.ts +4 -0
  32. package/lib/components/DataSpacePlaceholder.d.ts.map +1 -1
  33. package/lib/components/DataSpacePlaceholder.js +6 -1
  34. package/lib/components/DataSpacePlaceholder.js.map +1 -1
  35. package/lib/components/DataSpaceQuickStart.d.ts.map +1 -1
  36. package/lib/components/DataSpaceQuickStart.js +24 -11
  37. package/lib/components/DataSpaceQuickStart.js.map +1 -1
  38. package/lib/components/DataSpaceSupportPanel.d.ts.map +1 -1
  39. package/lib/components/DataSpaceSupportPanel.js +17 -8
  40. package/lib/components/DataSpaceSupportPanel.js.map +1 -1
  41. package/lib/components/DataSpaceViewer.d.ts.map +1 -1
  42. package/lib/components/DataSpaceViewer.js +34 -13
  43. package/lib/components/DataSpaceViewer.js.map +1 -1
  44. package/lib/components/DataSpaceViewerActivityBar.d.ts.map +1 -1
  45. package/lib/components/DataSpaceViewerActivityBar.js +15 -12
  46. package/lib/components/DataSpaceViewerActivityBar.js.map +1 -1
  47. package/lib/components/index.d.ts +1 -0
  48. package/lib/components/index.d.ts.map +1 -1
  49. package/lib/components/index.js +1 -0
  50. package/lib/components/index.js.map +1 -1
  51. package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +1 -1
  52. package/lib/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
  53. package/lib/index.css +2 -2
  54. package/lib/index.css.map +1 -1
  55. package/lib/package.json +1 -1
  56. package/lib/stores/DataSpaceLayoutState.d.ts +46 -0
  57. package/lib/stores/DataSpaceLayoutState.d.ts.map +1 -1
  58. package/lib/stores/DataSpaceLayoutState.js +184 -1
  59. package/lib/stores/DataSpaceLayoutState.js.map +1 -1
  60. package/lib/stores/DataSpaceModelsDocumentationState.d.ts +11 -2
  61. package/lib/stores/DataSpaceModelsDocumentationState.d.ts.map +1 -1
  62. package/lib/stores/DataSpaceModelsDocumentationState.js +41 -0
  63. package/lib/stores/DataSpaceModelsDocumentationState.js.map +1 -1
  64. package/lib/stores/DataSpaceQuickStartState.d.ts +24 -0
  65. package/lib/stores/DataSpaceQuickStartState.d.ts.map +1 -0
  66. package/lib/stores/DataSpaceQuickStartState.js +48 -0
  67. package/lib/stores/DataSpaceQuickStartState.js.map +1 -0
  68. package/lib/stores/DataSpaceViewerDiagramViewerState.d.ts +44 -0
  69. package/lib/stores/DataSpaceViewerDiagramViewerState.d.ts.map +1 -0
  70. package/lib/stores/DataSpaceViewerDiagramViewerState.js +194 -0
  71. package/lib/stores/DataSpaceViewerDiagramViewerState.js.map +1 -0
  72. package/lib/stores/DataSpaceViewerNavigation.d.ts +36 -0
  73. package/lib/stores/DataSpaceViewerNavigation.d.ts.map +1 -0
  74. package/lib/stores/DataSpaceViewerNavigation.js +47 -0
  75. package/lib/stores/DataSpaceViewerNavigation.js.map +1 -0
  76. package/lib/stores/DataSpaceViewerState.d.ts +22 -74
  77. package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
  78. package/lib/stores/DataSpaceViewerState.js +34 -259
  79. package/lib/stores/DataSpaceViewerState.js.map +1 -1
  80. package/lib/stores/query/DataSpaceAdvancedSearchState.d.ts.map +1 -1
  81. package/lib/stores/query/DataSpaceAdvancedSearchState.js +8 -5
  82. package/lib/stores/query/DataSpaceAdvancedSearchState.js.map +1 -1
  83. package/lib/stores/query/DataSpaceQueryCreatorStore.d.ts +8 -8
  84. package/lib/stores/query/DataSpaceQueryCreatorStore.d.ts.map +1 -1
  85. package/lib/stores/query/DataSpaceQueryCreatorStore.js +1 -1
  86. package/lib/stores/query/DataSpaceQueryCreatorStore.js.map +1 -1
  87. package/lib/stores/query/DataSpaceQuerySetupStore.d.ts +1 -1
  88. package/lib/stores/query/DataSpaceQuerySetupStore.d.ts.map +1 -1
  89. package/lib/stores/query/DataSpaceQuerySetupStore.js +1 -1
  90. package/lib/stores/query/DataSpaceQuerySetupStore.js.map +1 -1
  91. package/lib/stores/studio/DataSpacePreviewState.d.ts.map +1 -1
  92. package/lib/stores/studio/DataSpacePreviewState.js +15 -3
  93. package/lib/stores/studio/DataSpacePreviewState.js.map +1 -1
  94. package/package.json +13 -13
  95. package/src/__lib__/DSL_DataSpace_LegendApplicationCommand.ts +74 -0
  96. package/src/__lib__/DSL_DataSpace_LegendApplicationNavigation.ts +33 -0
  97. package/src/components/DSL_DataSpace_LegendApplicationPlugin.tsx +20 -1
  98. package/src/components/DataSpaceDataAccess.tsx +9 -122
  99. package/src/components/DataSpaceDescription.tsx +5 -5
  100. package/src/components/DataSpaceDiagramViewer.tsx +449 -69
  101. package/src/components/DataSpaceExecutionContextViewer.tsx +47 -40
  102. package/src/components/DataSpaceInfoPanel.tsx +107 -117
  103. package/src/components/DataSpaceModelsDocumentation.tsx +31 -12
  104. package/src/components/DataSpacePlaceholder.tsx +22 -0
  105. package/src/components/DataSpaceQuickStart.tsx +95 -15
  106. package/src/components/DataSpaceSupportPanel.tsx +146 -14
  107. package/src/components/DataSpaceViewer.tsx +153 -23
  108. package/src/components/DataSpaceViewerActivityBar.tsx +40 -20
  109. package/src/components/index.ts +1 -0
  110. package/src/graph-manager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +1 -1
  111. package/src/stores/DataSpaceLayoutState.ts +272 -0
  112. package/src/stores/DataSpaceModelsDocumentationState.ts +61 -2
  113. package/src/stores/DataSpaceQuickStartState.ts +91 -0
  114. package/src/stores/DataSpaceViewerDiagramViewerState.ts +245 -0
  115. package/src/stores/DataSpaceViewerNavigation.ts +64 -0
  116. package/src/stores/DataSpaceViewerState.ts +88 -401
  117. package/src/stores/query/DataSpaceAdvancedSearchState.ts +30 -6
  118. package/src/stores/query/DataSpaceQueryCreatorStore.ts +8 -8
  119. package/src/stores/query/DataSpaceQuerySetupStore.ts +1 -1
  120. package/src/stores/studio/DataSpacePreviewState.ts +27 -5
  121. package/tsconfig.json +5 -1
  122. package/lib/stores/DataSpaceViewerDataAccessState.d.ts +0 -35
  123. package/lib/stores/DataSpaceViewerDataAccessState.d.ts.map +0 -1
  124. package/lib/stores/DataSpaceViewerDataAccessState.js +0 -98
  125. package/lib/stores/DataSpaceViewerDataAccessState.js.map +0 -1
  126. package/src/stores/DataSpaceViewerDataAccessState.ts +0 -143
@@ -115,49 +115,56 @@ export const DataSpaceExecutionContextViewer = observer(
115
115
 
116
116
  return (
117
117
  <div className="data-space__viewer__panel">
118
- <div className="data-space__viewer__execution-context">
119
- <div className="data-space__viewer__execution-context__entry">
120
- <div className="data-space__viewer__execution-context__entry__icon">
121
- <PlayIcon className="data-space__viewer__execution-context__context-icon" />
122
- </div>
123
- <div className="data-space__viewer__execution-context__entry__content data-space__viewer__execution-context__entry__content__dropdown__container">
124
- <CustomSelectorInput
125
- className="data-space__viewer__execution-context__entry__content__dropdown"
126
- options={executionContextOptions}
127
- onChange={onExecutionContextOptionChange}
128
- value={selectedExecutionContextOption}
129
- darkMode={
130
- !applicationStore.layoutService
131
- .TEMPORARY__isLightColorThemeEnabled
132
- }
133
- formatOptionLabel={formatExecutionContextOptionLabel}
134
- />
135
- </div>
118
+ <div className="data-space__viewer__panel__header">
119
+ <div className="data-space__viewer__panel__header__label">
120
+ Execution Context
136
121
  </div>
137
- <div className="data-space__viewer__execution-context__entry data-space__viewer__execution-context__mapping">
138
- <div className="data-space__viewer__execution-context__entry__icon">
139
- <PURE_MappingIcon />
140
- </div>
141
- <div className="data-space__viewer__execution-context__entry__content data-space__viewer__execution-context__entry__content__text">
142
- {dataSpaceViewerState.currentExecutionContext.mapping.path}
122
+ </div>
123
+ <div className="data-space__viewer__panel__content">
124
+ <div className="data-space__viewer__execution-context">
125
+ <div className="data-space__viewer__execution-context__entry">
126
+ <div className="data-space__viewer__execution-context__entry__icon">
127
+ <PlayIcon className="data-space__viewer__execution-context__context-icon" />
128
+ </div>
129
+ <div className="data-space__viewer__execution-context__entry__content data-space__viewer__execution-context__entry__content__dropdown__container">
130
+ <CustomSelectorInput
131
+ className="data-space__viewer__execution-context__entry__content__dropdown"
132
+ options={executionContextOptions}
133
+ onChange={onExecutionContextOptionChange}
134
+ value={selectedExecutionContextOption}
135
+ darkMode={
136
+ !applicationStore.layoutService
137
+ .TEMPORARY__isLightColorThemeEnabled
138
+ }
139
+ formatOptionLabel={formatExecutionContextOptionLabel}
140
+ />
141
+ </div>
143
142
  </div>
144
- </div>
145
- <div className="data-space__viewer__execution-context__entry">
146
- <div className="data-space__viewer__execution-context__entry__icon">
147
- <PURE_RuntimeIcon />
143
+ <div className="data-space__viewer__execution-context__entry data-space__viewer__execution-context__mapping">
144
+ <div className="data-space__viewer__execution-context__entry__icon">
145
+ <PURE_MappingIcon />
146
+ </div>
147
+ <div className="data-space__viewer__execution-context__entry__content data-space__viewer__execution-context__entry__content__text">
148
+ {dataSpaceViewerState.currentExecutionContext.mapping.path}
149
+ </div>
148
150
  </div>
149
- <div className="data-space__viewer__execution-context__entry__content data-space__viewer__execution-context__entry__content__dropdown__container">
150
- <CustomSelectorInput
151
- className="data-space__viewer__execution-context__entry__content__dropdown"
152
- options={runtimeOptions}
153
- onChange={onRuntimeOptionChange}
154
- value={selectedRuntimeOption}
155
- darkMode={
156
- !applicationStore.layoutService
157
- .TEMPORARY__isLightColorThemeEnabled
158
- }
159
- formatOptionLabel={formatRuntimeOptionLabel}
160
- />
151
+ <div className="data-space__viewer__execution-context__entry">
152
+ <div className="data-space__viewer__execution-context__entry__icon">
153
+ <PURE_RuntimeIcon />
154
+ </div>
155
+ <div className="data-space__viewer__execution-context__entry__content data-space__viewer__execution-context__entry__content__dropdown__container">
156
+ <CustomSelectorInput
157
+ className="data-space__viewer__execution-context__entry__content__dropdown"
158
+ options={runtimeOptions}
159
+ onChange={onRuntimeOptionChange}
160
+ value={selectedRuntimeOption}
161
+ darkMode={
162
+ !applicationStore.layoutService
163
+ .TEMPORARY__isLightColorThemeEnabled
164
+ }
165
+ formatOptionLabel={formatRuntimeOptionLabel}
166
+ />
167
+ </div>
161
168
  </div>
162
169
  </div>
163
170
  </div>
@@ -27,141 +27,131 @@ export const DataSpaceInfoPanel = observer(
27
27
  const applicationStore = useApplicationStore();
28
28
  const analysisResult = dataSpaceViewerState.dataSpaceAnalysisResult;
29
29
 
30
- const viewProject = (): void =>
31
- dataSpaceViewerState.viewProject(
32
- dataSpaceViewerState.groupId,
33
- dataSpaceViewerState.artifactId,
34
- dataSpaceViewerState.versionId,
35
- undefined,
36
- );
30
+ const viewProject = (): void => dataSpaceViewerState.viewProject(undefined);
37
31
  const viewDataSpaceInProject = (): void =>
38
- dataSpaceViewerState.viewProject(
39
- dataSpaceViewerState.groupId,
40
- dataSpaceViewerState.artifactId,
41
- dataSpaceViewerState.versionId,
42
- analysisResult.path,
43
- );
32
+ dataSpaceViewerState.viewProject(analysisResult.path);
44
33
  const viewDataSpaceInSDLCProject = (): void => {
45
34
  dataSpaceViewerState
46
- .viewSDLCProject(
47
- dataSpaceViewerState.groupId,
48
- dataSpaceViewerState.artifactId,
49
- analysisResult.path,
50
- )
35
+ .viewSDLCProject(analysisResult.path)
51
36
  .catch(applicationStore.alertUnhandledError);
52
37
  };
53
38
 
54
39
  return (
55
40
  <div className="data-space__viewer__panel">
56
- <div className="data-space__viewer__info">
57
- <div className="data-space__viewer__info__section">
58
- <div className="data-space__viewer__info__section__entry">
59
- <div className="data-space__viewer__info__project-info__label">
60
- Project
41
+ <div className="data-space__viewer__panel__header">
42
+ <div className="data-space__viewer__panel__header__label">Info</div>
43
+ </div>
44
+ <div className="data-space__viewer__panel__content">
45
+ <div className="data-space__viewer__info">
46
+ <div className="data-space__viewer__info__section">
47
+ <div className="data-space__viewer__info__section__entry">
48
+ <div className="data-space__viewer__info__project-info__label">
49
+ Project
50
+ </div>
51
+ <button
52
+ className="data-space__viewer__info__project-info__value"
53
+ tabIndex={-1}
54
+ title="Click to View Project"
55
+ onClick={viewProject}
56
+ >
57
+ {generateGAVCoordinates(
58
+ dataSpaceViewerState.groupId,
59
+ dataSpaceViewerState.artifactId,
60
+ dataSpaceViewerState.versionId,
61
+ )}
62
+ </button>
63
+ <button
64
+ className="data-space__viewer__info__project-info__link"
65
+ tabIndex={-1}
66
+ title="View Project"
67
+ onClick={viewProject}
68
+ >
69
+ <ExternalLinkIcon />
70
+ </button>
61
71
  </div>
62
- <button
63
- className="data-space__viewer__info__project-info__value"
64
- tabIndex={-1}
65
- title="Click to View Project"
66
- onClick={viewProject}
67
- >
68
- {generateGAVCoordinates(
69
- dataSpaceViewerState.groupId,
70
- dataSpaceViewerState.artifactId,
71
- dataSpaceViewerState.versionId,
72
- )}
73
- </button>
74
- <button
75
- className="data-space__viewer__info__project-info__link"
76
- tabIndex={-1}
77
- title="View Project"
78
- onClick={viewProject}
79
- >
80
- <ExternalLinkIcon />
81
- </button>
82
- </div>
83
- <div className="data-space__viewer__info__section__entry">
84
- <div className="data-space__viewer__info__project-info__label">
85
- Data Space
72
+ <div className="data-space__viewer__info__section__entry">
73
+ <div className="data-space__viewer__info__project-info__label">
74
+ Data Space
75
+ </div>
76
+ <button
77
+ className="data-space__viewer__info__project-info__value"
78
+ tabIndex={-1}
79
+ title="Click to View Data Space"
80
+ onClick={viewDataSpaceInProject}
81
+ >
82
+ {analysisResult.path}
83
+ </button>
84
+ <button
85
+ className="data-space__viewer__info__project-info__link"
86
+ tabIndex={-1}
87
+ title="Edit Data Space"
88
+ onClick={viewDataSpaceInSDLCProject}
89
+ >
90
+ <PencilIcon />
91
+ </button>
92
+ <button
93
+ className="data-space__viewer__info__project-info__link"
94
+ tabIndex={-1}
95
+ title="View Data Space"
96
+ onClick={viewDataSpaceInProject}
97
+ >
98
+ <ExternalLinkIcon />
99
+ </button>
86
100
  </div>
87
- <button
88
- className="data-space__viewer__info__project-info__value"
89
- tabIndex={-1}
90
- title="Click to View Data Space"
91
- onClick={viewDataSpaceInProject}
92
- >
93
- {analysisResult.path}
94
- </button>
95
- <button
96
- className="data-space__viewer__info__project-info__link"
97
- tabIndex={-1}
98
- title="Edit Data Space"
99
- onClick={viewDataSpaceInSDLCProject}
100
- >
101
- <PencilIcon />
102
- </button>
103
- <button
104
- className="data-space__viewer__info__project-info__link"
105
- tabIndex={-1}
106
- title="View Data Space"
107
- onClick={viewDataSpaceInProject}
108
- >
109
- <ExternalLinkIcon />
110
- </button>
111
- </div>
112
- </div>
113
- <div className="data-space__viewer__info__section">
114
- <div className="data-space__viewer__info__section__title">
115
- Tagged Values
116
101
  </div>
117
- {analysisResult.taggedValues.length !== 0 &&
118
- analysisResult.taggedValues.map((taggedValue) => (
119
- <div
120
- key={taggedValue._UUID}
121
- className="data-space__viewer__info__section__entry"
122
- >
102
+ <div className="data-space__viewer__info__section">
103
+ <div className="data-space__viewer__info__section__title">
104
+ Tagged Values
105
+ </div>
106
+ {analysisResult.taggedValues.length !== 0 &&
107
+ analysisResult.taggedValues.map((taggedValue) => (
123
108
  <div
124
- className="data-space__viewer__info__tagged-value__tag"
125
- title={`${taggedValue.profile}.${taggedValue.tag}`}
109
+ key={taggedValue._UUID}
110
+ className="data-space__viewer__info__section__entry"
126
111
  >
127
- {`${extractElementNameFromPath(taggedValue.profile)}.${
128
- taggedValue.tag
129
- }`}
130
- </div>
131
- <div className="data-space__viewer__info__tagged-value__value">
132
- {taggedValue.value}
112
+ <div
113
+ className="data-space__viewer__info__tagged-value__tag"
114
+ title={`${taggedValue.profile}.${taggedValue.tag}`}
115
+ >
116
+ {`${extractElementNameFromPath(taggedValue.profile)}.${
117
+ taggedValue.tag
118
+ }`}
119
+ </div>
120
+ <div className="data-space__viewer__info__tagged-value__value">
121
+ {taggedValue.value}
122
+ </div>
133
123
  </div>
124
+ ))}
125
+ {analysisResult.taggedValues.length === 0 && (
126
+ <div className="data-space__viewer__info__section__placeholder">
127
+ (empty)
134
128
  </div>
135
- ))}
136
- {analysisResult.taggedValues.length === 0 && (
137
- <div className="data-space__viewer__info__section__placeholder">
138
- (empty)
139
- </div>
140
- )}
141
- </div>
142
- <div className="data-space__viewer__info__section">
143
- <div className="data-space__viewer__info__section__title">
144
- Stereotypes
129
+ )}
145
130
  </div>
146
- {analysisResult.stereotypes.length !== 0 &&
147
- analysisResult.stereotypes.map((stereotype) => (
148
- <div
149
- key={stereotype._UUID}
150
- className="data-space__viewer__info__section__entry"
151
- title={`${stereotype.profile}.${stereotype.value}`}
152
- >
153
- <div className="data-space__viewer__info__steoreotype">
154
- {`${extractElementNameFromPath(stereotype.profile)}.${
155
- stereotype.value
156
- }`}
131
+ <div className="data-space__viewer__info__section">
132
+ <div className="data-space__viewer__info__section__title">
133
+ Stereotypes
134
+ </div>
135
+ {analysisResult.stereotypes.length !== 0 &&
136
+ analysisResult.stereotypes.map((stereotype) => (
137
+ <div
138
+ key={stereotype._UUID}
139
+ className="data-space__viewer__info__section__entry"
140
+ title={`${stereotype.profile}.${stereotype.value}`}
141
+ >
142
+ <div className="data-space__viewer__info__steoreotype">
143
+ {`${extractElementNameFromPath(stereotype.profile)}.${
144
+ stereotype.value
145
+ }`}
146
+ </div>
157
147
  </div>
148
+ ))}
149
+ {analysisResult.stereotypes.length === 0 && (
150
+ <div className="data-space__viewer__info__section__placeholder">
151
+ (empty)
158
152
  </div>
159
- ))}
160
- {analysisResult.stereotypes.length === 0 && (
161
- <div className="data-space__viewer__info__section__placeholder">
162
- (empty)
163
- </div>
164
- )}
153
+ )}
154
+ </div>
165
155
  </div>
166
156
  </div>
167
157
  </div>
@@ -41,11 +41,7 @@ import {
41
41
  CaretRightIcon,
42
42
  CaretLeftIcon,
43
43
  } from '@finos/legend-art';
44
- import {
45
- DATA_SPACE_VIEWER_ACTIVITY_MODE,
46
- generateAnchorForActivity,
47
- type DataSpaceViewerState,
48
- } from '../stores/DataSpaceViewerState.js';
44
+ import { type DataSpaceViewerState } from '../stores/DataSpaceViewerState.js';
49
45
  import { DataSpaceWikiPlaceholder } from './DataSpacePlaceholder.js';
50
46
  import {
51
47
  DataSpaceAssociationDocumentationEntry,
@@ -57,7 +53,7 @@ import {
57
53
  type NormalizedDataSpaceDocumentationEntry,
58
54
  } from '../graph-manager/action/analytics/DataSpaceAnalysis.js';
59
55
  import { debounce, isNonNullable, prettyCONSTName } from '@finos/legend-shared';
60
- import { useApplicationStore } from '@finos/legend-application';
56
+ import { useApplicationStore, useCommands } from '@finos/legend-application';
61
57
  import {
62
58
  CORE_PURE_PATH,
63
59
  ELEMENT_PATH_DELIMITER,
@@ -83,6 +79,10 @@ import {
83
79
  type DataGridCellRendererParams,
84
80
  } from '@finos/legend-lego/data-grid';
85
81
  import { FuzzySearchAdvancedConfigMenu } from '@finos/legend-lego/application';
82
+ import {
83
+ DATA_SPACE_VIEWER_ACTIVITY_MODE,
84
+ generateAnchorForActivity,
85
+ } from '../stores/DataSpaceViewerNavigation.js';
86
86
 
87
87
  const getMilestoningLabel = (val: string | undefined): string | undefined => {
88
88
  switch (val) {
@@ -408,7 +408,9 @@ const SubElementDocContentCellRenderer = observer(
408
408
  return null;
409
409
  }
410
410
 
411
- const label = showHumanizedForm ? prettyCONSTName(data.text) : data.text;
411
+ let label = showHumanizedForm ? prettyCONSTName(data.text) : data.text;
412
+ const isDerivedProperty = label.endsWith('()');
413
+ label = isDerivedProperty ? label.slice(0, -2) : label;
412
414
 
413
415
  if (data.entry instanceof DataSpaceModelDocumentationEntry) {
414
416
  return null;
@@ -416,7 +418,9 @@ const SubElementDocContentCellRenderer = observer(
416
418
  return (
417
419
  <div
418
420
  className="data-space__viewer__models-documentation__grid__cell"
419
- title={`Property: ${data.elementEntry.path}${PROPERTY_ACCESSOR}${data.entry.name}`}
421
+ title={`${isDerivedProperty ? 'Derived property' : 'Property'}: ${
422
+ data.elementEntry.path
423
+ }${PROPERTY_ACCESSOR}${data.entry.name}`}
420
424
  >
421
425
  <div className="data-space__viewer__models-documentation__grid__cell__label">
422
426
  <div className="data-space__viewer__models-documentation__grid__cell__label__icon data-space__viewer__models-documentation__grid__cell__label__icon--property">
@@ -425,6 +429,11 @@ const SubElementDocContentCellRenderer = observer(
425
429
  <div className="data-space__viewer__models-documentation__grid__cell__label__text">
426
430
  {label}
427
431
  </div>
432
+ {isDerivedProperty && (
433
+ <div className="data-space__viewer__models-documentation__grid__cell__label__derived-property-badge">
434
+ ()
435
+ </div>
436
+ )}
428
437
  {data.entry.milestoning && (
429
438
  <div
430
439
  className="data-space__viewer__models-documentation__grid__cell__label__milestoning-badge"
@@ -943,7 +952,7 @@ const DataSpaceModelsDocumentationSearchBar = observer(
943
952
  // actions
944
953
  const clearSearchText = (): void => {
945
954
  documentationState.resetSearch();
946
- searchInputRef.current?.focus();
955
+ documentationState.focusSearchInput();
947
956
  };
948
957
  const toggleSearchConfigMenu = (): void =>
949
958
  documentationState.setShowSearchConfigurationMenu(
@@ -951,14 +960,22 @@ const DataSpaceModelsDocumentationSearchBar = observer(
951
960
  );
952
961
  const onKeyDown: React.KeyboardEventHandler<HTMLInputElement> = (event) => {
953
962
  if (event.code === 'Escape') {
954
- searchInputRef.current?.select();
963
+ documentationState.selectSearchInput();
955
964
  }
956
965
  };
957
966
 
958
967
  // search config menu
959
968
  const closeSearchConfigMenu = (): void =>
960
969
  documentationState.setShowSearchConfigurationMenu(false);
961
- const onSearchConfigMenuOpen = (): void => searchInputRef.current?.focus();
970
+ const onSearchConfigMenuOpen = (): void =>
971
+ documentationState.focusSearchInput();
972
+
973
+ useEffect(() => {
974
+ if (searchInputRef.current) {
975
+ documentationState.setSearchInput(searchInputRef.current);
976
+ }
977
+ return () => documentationState.setSearchInput(undefined);
978
+ }, [documentationState]);
962
979
 
963
980
  return (
964
981
  <div className="data-space__viewer__models-documentation__search">
@@ -969,7 +986,7 @@ const DataSpaceModelsDocumentationSearchBar = observer(
969
986
  spellCheck={false}
970
987
  onChange={onSearchTextChange}
971
988
  value={searchText}
972
- placeholder="Search documentation"
989
+ placeholder="Search (Ctrl + Shift + F)"
973
990
  />
974
991
  <button
975
992
  ref={searchConfigTriggerRef}
@@ -1040,6 +1057,8 @@ export const DataSpaceModelsDocumentation = observer(
1040
1057
  DATA_SPACE_VIEWER_ACTIVITY_MODE.MODELS_DOCUMENTATION,
1041
1058
  );
1042
1059
 
1060
+ useCommands(dataSpaceViewerState.modelsDocumentationState);
1061
+
1043
1062
  useEffect(() => {
1044
1063
  if (sectionRef.current) {
1045
1064
  dataSpaceViewerState.layoutState.setWikiPageAnchor(
@@ -14,8 +14,30 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
+ import { SparkleIcon } from '@finos/legend-art';
18
+
17
19
  export const DataSpaceWikiPlaceholder: React.FC<{ message: string }> = (
18
20
  props,
19
21
  ) => (
20
22
  <div className="data-space__viewer__wiki__placeholder">{props.message}</div>
21
23
  );
24
+
25
+ export const DataSpacePlaceholderPanel: React.FC<{
26
+ header: string;
27
+ message: string;
28
+ }> = (props) => {
29
+ const { header, message } = props;
30
+
31
+ return (
32
+ <div className="data-space__viewer__panel">
33
+ <div className="data-space__viewer__panel__header">
34
+ <div className="data-space__viewer__panel__header__label">{header}</div>
35
+ </div>
36
+ <div className="data-space__viewer__panel__content">
37
+ <div className="data-space__viewer__panel__content__placeholder">
38
+ <SparkleIcon /> This is work in progress.{` ${message}`}
39
+ </div>
40
+ </div>
41
+ </div>
42
+ );
43
+ };