@finos/legend-application-pure-ide 6.2.33 → 6.2.34

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 (141) hide show
  1. package/lib/components/editor/ActivityBar.js +2 -2
  2. package/lib/components/editor/ActivityBar.js.map +1 -1
  3. package/lib/components/editor/Editor.d.ts.map +1 -1
  4. package/lib/components/editor/Editor.js +1 -3
  5. package/lib/components/editor/Editor.js.map +1 -1
  6. package/lib/components/editor/StatusBar.d.ts +1 -3
  7. package/lib/components/editor/StatusBar.d.ts.map +1 -1
  8. package/lib/components/editor/StatusBar.js +3 -3
  9. package/lib/components/editor/StatusBar.js.map +1 -1
  10. package/lib/components/editor/aux-panel/AuxiliaryPanel.d.ts.map +1 -1
  11. package/lib/components/editor/aux-panel/AuxiliaryPanel.js +22 -8
  12. package/lib/components/editor/aux-panel/AuxiliaryPanel.js.map +1 -1
  13. package/lib/components/editor/aux-panel/CodeFixSuggestionsPanel.d.ts +20 -0
  14. package/lib/components/editor/aux-panel/CodeFixSuggestionsPanel.d.ts.map +1 -0
  15. package/lib/components/editor/aux-panel/CodeFixSuggestionsPanel.js +61 -0
  16. package/lib/components/editor/aux-panel/CodeFixSuggestionsPanel.js.map +1 -0
  17. package/lib/components/editor/{command-center/TextSearchCommand.d.ts → aux-panel/ReferenceUsagePanel.d.ts} +2 -2
  18. package/lib/components/editor/aux-panel/ReferenceUsagePanel.d.ts.map +1 -0
  19. package/lib/components/editor/aux-panel/ReferenceUsagePanel.js +63 -0
  20. package/lib/components/editor/aux-panel/ReferenceUsagePanel.js.map +1 -0
  21. package/lib/components/editor/aux-panel/TestRunnerPanel.d.ts.map +1 -1
  22. package/lib/components/editor/aux-panel/TestRunnerPanel.js +123 -3
  23. package/lib/components/editor/aux-panel/TestRunnerPanel.js.map +1 -1
  24. package/lib/components/editor/aux-panel/{SearchPanel.d.ts → TextSearchPanel.d.ts} +2 -2
  25. package/lib/components/editor/aux-panel/TextSearchPanel.d.ts.map +1 -0
  26. package/lib/components/editor/aux-panel/TextSearchPanel.js +105 -0
  27. package/lib/components/editor/aux-panel/TextSearchPanel.js.map +1 -0
  28. package/lib/components/editor/command-center/FileSearchCommand.js +2 -2
  29. package/lib/components/editor/command-center/FileSearchCommand.js.map +1 -1
  30. package/lib/components/editor/side-bar/ConceptTreeExplorer.d.ts.map +1 -1
  31. package/lib/components/editor/side-bar/ConceptTreeExplorer.js +5 -2
  32. package/lib/components/editor/side-bar/ConceptTreeExplorer.js.map +1 -1
  33. package/lib/components/editor/side-bar/CreateNewFilePrompt.js +1 -1
  34. package/lib/components/editor/side-bar/CreateNewFilePrompt.js.map +1 -1
  35. package/lib/components/editor/side-bar/DirectoryTreeExplorer.js +1 -1
  36. package/lib/components/editor/side-bar/DirectoryTreeExplorer.js.map +1 -1
  37. package/lib/components/editor/side-bar/RenameFilePrompt.js +1 -1
  38. package/lib/components/editor/side-bar/RenameFilePrompt.js.map +1 -1
  39. package/lib/components/editor/side-bar/SideBar.js +2 -2
  40. package/lib/components/editor/side-bar/SideBar.js.map +1 -1
  41. package/lib/extensions.css +1 -1
  42. package/lib/index.css +2 -2
  43. package/lib/index.css.map +1 -1
  44. package/lib/package.json +4 -4
  45. package/lib/server/PureServerClient.d.ts.map +1 -1
  46. package/lib/server/PureServerClient.js +2 -1
  47. package/lib/server/PureServerClient.js.map +1 -1
  48. package/lib/server/models/DirectoryTree.js +1 -1
  49. package/lib/server/models/DirectoryTree.js.map +1 -1
  50. package/lib/server/models/Execution.d.ts +1 -1
  51. package/lib/server/models/Execution.d.ts.map +1 -1
  52. package/lib/server/models/Execution.js +3 -3
  53. package/lib/server/models/Execution.js.map +1 -1
  54. package/lib/server/models/SearchEntry.d.ts +2 -0
  55. package/lib/server/models/SearchEntry.d.ts.map +1 -1
  56. package/lib/server/models/SearchEntry.js +6 -0
  57. package/lib/server/models/SearchEntry.js.map +1 -1
  58. package/lib/stores/CodeFixSuggestion.d.ts +30 -0
  59. package/lib/stores/CodeFixSuggestion.d.ts.map +1 -0
  60. package/lib/stores/CodeFixSuggestion.js +36 -0
  61. package/lib/stores/CodeFixSuggestion.js.map +1 -0
  62. package/lib/stores/ConceptTreeState.d.ts +7 -0
  63. package/lib/stores/ConceptTreeState.d.ts.map +1 -1
  64. package/lib/stores/ConceptTreeState.js +37 -1
  65. package/lib/stores/ConceptTreeState.js.map +1 -1
  66. package/lib/stores/DirectoryTreeState.d.ts +9 -1
  67. package/lib/stores/DirectoryTreeState.d.ts.map +1 -1
  68. package/lib/stores/DirectoryTreeState.js +14 -10
  69. package/lib/stores/DirectoryTreeState.js.map +1 -1
  70. package/lib/stores/EditorConfig.d.ts +9 -4
  71. package/lib/stores/EditorConfig.d.ts.map +1 -1
  72. package/lib/stores/EditorConfig.js +8 -3
  73. package/lib/stores/EditorConfig.js.map +1 -1
  74. package/lib/stores/EditorStore.d.ts +15 -13
  75. package/lib/stores/EditorStore.d.ts.map +1 -1
  76. package/lib/stores/EditorStore.js +72 -70
  77. package/lib/stores/EditorStore.js.map +1 -1
  78. package/lib/stores/FileEditorState.js +1 -1
  79. package/lib/stores/FileEditorState.js.map +1 -1
  80. package/lib/stores/{SearchCommandState.d.ts → FileSearchCommandState.d.ts} +2 -4
  81. package/lib/stores/FileSearchCommandState.d.ts.map +1 -0
  82. package/lib/stores/{SearchCommandState.js → FileSearchCommandState.js} +2 -8
  83. package/lib/stores/FileSearchCommandState.js.map +1 -0
  84. package/lib/stores/LegendPureIDECommand.d.ts +3 -2
  85. package/lib/stores/LegendPureIDECommand.d.ts.map +1 -1
  86. package/lib/stores/LegendPureIDECommand.js +3 -2
  87. package/lib/stores/LegendPureIDECommand.js.map +1 -1
  88. package/lib/stores/LegendPureIDETerminal.d.ts.map +1 -1
  89. package/lib/stores/LegendPureIDETerminal.js +110 -10
  90. package/lib/stores/LegendPureIDETerminal.js.map +1 -1
  91. package/lib/stores/{SearchResultState.d.ts → ReferenceUsageResult.d.ts} +4 -21
  92. package/lib/stores/ReferenceUsageResult.d.ts.map +1 -0
  93. package/lib/stores/{SearchResultState.js → ReferenceUsageResult.js} +18 -44
  94. package/lib/stores/ReferenceUsageResult.js.map +1 -0
  95. package/lib/stores/TextSearchState.d.ts +41 -0
  96. package/lib/stores/TextSearchState.d.ts.map +1 -0
  97. package/lib/stores/TextSearchState.js +94 -0
  98. package/lib/stores/TextSearchState.js.map +1 -0
  99. package/package.json +10 -10
  100. package/src/components/editor/ActivityBar.tsx +2 -2
  101. package/src/components/editor/Editor.tsx +2 -5
  102. package/src/components/editor/StatusBar.tsx +5 -3
  103. package/src/components/editor/aux-panel/AuxiliaryPanel.tsx +42 -17
  104. package/src/components/editor/aux-panel/CodeFixSuggestionsPanel.tsx +235 -0
  105. package/src/components/editor/aux-panel/ReferenceUsagePanel.tsx +301 -0
  106. package/src/components/editor/aux-panel/TestRunnerPanel.tsx +193 -14
  107. package/src/components/editor/aux-panel/TextSearchPanel.tsx +351 -0
  108. package/src/components/editor/command-center/FileSearchCommand.tsx +2 -2
  109. package/src/components/editor/side-bar/ConceptTreeExplorer.tsx +11 -10
  110. package/src/components/editor/side-bar/CreateNewFilePrompt.tsx +1 -1
  111. package/src/components/editor/side-bar/DirectoryTreeExplorer.tsx +1 -1
  112. package/src/components/editor/side-bar/RenameFilePrompt.tsx +1 -1
  113. package/src/components/editor/side-bar/SideBar.tsx +2 -2
  114. package/src/server/PureServerClient.ts +2 -1
  115. package/src/server/models/DirectoryTree.ts +2 -2
  116. package/src/server/models/Execution.ts +3 -3
  117. package/src/server/models/SearchEntry.ts +9 -0
  118. package/src/stores/CodeFixSuggestion.ts +47 -0
  119. package/src/stores/ConceptTreeState.ts +57 -0
  120. package/src/stores/DirectoryTreeState.ts +32 -16
  121. package/src/stores/EditorConfig.ts +9 -3
  122. package/src/stores/EditorStore.ts +100 -91
  123. package/src/stores/FileEditorState.ts +1 -1
  124. package/src/stores/{SearchCommandState.ts → FileSearchCommandState.ts} +1 -9
  125. package/src/stores/LegendPureIDECommand.ts +4 -2
  126. package/src/stores/LegendPureIDETerminal.ts +156 -12
  127. package/src/stores/{SearchResultState.ts → ReferenceUsageResult.ts} +33 -71
  128. package/src/stores/TextSearchState.ts +129 -0
  129. package/tsconfig.json +7 -4
  130. package/lib/components/editor/aux-panel/SearchPanel.d.ts.map +0 -1
  131. package/lib/components/editor/aux-panel/SearchPanel.js +0 -90
  132. package/lib/components/editor/aux-panel/SearchPanel.js.map +0 -1
  133. package/lib/components/editor/command-center/TextSearchCommand.d.ts.map +0 -1
  134. package/lib/components/editor/command-center/TextSearchCommand.js +0 -50
  135. package/lib/components/editor/command-center/TextSearchCommand.js.map +0 -1
  136. package/lib/stores/SearchCommandState.d.ts.map +0 -1
  137. package/lib/stores/SearchCommandState.js.map +0 -1
  138. package/lib/stores/SearchResultState.d.ts.map +0 -1
  139. package/lib/stores/SearchResultState.js.map +0 -1
  140. package/src/components/editor/aux-panel/SearchPanel.tsx +0 -445
  141. package/src/components/editor/command-center/TextSearchCommand.tsx +0 -103
@@ -23,12 +23,12 @@ export const ActivityBar = observer(() => {
23
23
  const changeActivity = (activity) => () => editorStore.setActiveActivity(activity);
24
24
  const activities = [
25
25
  {
26
- mode: ACTIVITY_MODE.CONCEPT,
26
+ mode: ACTIVITY_MODE.CONCEPT_EXPLORER,
27
27
  title: 'Concept Explorer',
28
28
  icon: _jsx(ListIcon, {}),
29
29
  },
30
30
  {
31
- mode: ACTIVITY_MODE.FILE,
31
+ mode: ACTIVITY_MODE.FILE_EXPLORER,
32
32
  title: 'File Explorer',
33
33
  icon: _jsx(FileAltIcon, {}),
34
34
  },
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityBar.js","sourceRoot":"","sources":["../../../src/components/editor/ActivityBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EA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,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAC5B,iBAEE,SAAS,EAAE,IAAI,CAAC,oBAAoB,EAAE;wBACpC,4BAA4B,EAC1B,WAAW,CAAC,mBAAmB,CAAC,MAAM;4BACtC,WAAW,CAAC,cAAc,KAAK,QAAQ,CAAC,IAAI;qBAC/C,CAAC,EACF,OAAO,EAAE,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,EACtC,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAE,GAAG,QAAQ,CAAC,KAAK,GACtB,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAC1C,EAAE,YAED,QAAQ,CAAC,IAAI,IAZT,QAAQ,CAAC,IAAI,CAaX,CACV,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../../src/components/editor/Editor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AA8BH,eAAO,MAAM,MAAM,wBAuIlB,CAAC"}
1
+ {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../../src/components/editor/Editor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AA6BH,eAAO,MAAM,MAAM,wBAqIlB,CAAC"}
@@ -24,14 +24,12 @@ import { StatusBar } from './StatusBar.js';
24
24
  import { EditPanel } from './edit-panel/EditPanel.js';
25
25
  import { FileSearchCommand } from './command-center/FileSearchCommand.js';
26
26
  import { flowResult } from 'mobx';
27
- import { TextSearchCommand } from './command-center/TextSearchCommand.js';
28
27
  import { useApplicationStore, useCommands } from '@finos/legend-application';
29
28
  import { useResizeDetector, ResizablePanelSplitterLine, ResizablePanel, ResizablePanelGroup, ResizablePanelSplitter, getCollapsiblePanelGroupProps, } from '@finos/legend-art';
30
29
  import { getQueryParameters } from '@finos/legend-shared';
31
30
  export const Editor = withEditorStore(observer(() => {
32
31
  const editorStore = useEditorStore();
33
32
  const applicationStore = useApplicationStore();
34
- const editable = !editorStore.initState.isInInitialState;
35
33
  // layout
36
34
  const { ref, width, height } = useResizeDetector();
37
35
  // These create snapping effect on panel resizing
@@ -75,6 +73,6 @@ export const Editor = withEditorStore(observer(() => {
75
73
  ? 'transparent'
76
74
  : 'var(--color-dark-grey-250)' }) }), _jsx(ResizablePanel, { ...auxCollapsiblePanelGroupProps.collapsiblePanel, ...(editorStore.auxPanelDisplayState.isMaximized
77
75
  ? maximizedAuxCollapsiblePanelGroupProps.remainingPanel
78
- : {}), direction: -1, children: _jsx(AuxiliaryPanel, {}) })] }) })] }) }) })] }), _jsx(StatusBar, { actionsDisabled: !editable }), editable && _jsx(FileSearchCommand, {}), editable && _jsx(TextSearchCommand, {})] }));
76
+ : {}), direction: -1, children: _jsx(AuxiliaryPanel, {}) })] }) })] }) }) })] }), _jsx(StatusBar, {}), _jsx(FileSearchCommand, {})] }));
79
77
  }));
80
78
  //# sourceMappingURL=Editor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../../src/components/editor/Editor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,O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Z,MAAC,mBAAmB,IAAC,WAAW,EAAC,YAAY,aAC3C,KAAC,cAAc,OACT,sCAAsC,CAAC,gBAAgB,KACvD,CAAC,WAAW,CAAC,oBAAoB,CAAC,IAAI,KAAK,CAAC;wDAC9C,CAAC,CAAC,6BAA6B,CAAC,cAAc;wDAC9C,CAAC,CAAC,EAAE,CAAC,YAEP,KAAC,SAAS,KAAG,GACE,EACjB,KAAC,sBAAsB,cACrB,KAAC,0BAA0B,IACzB,KAAK,EACH,WAAW,CAAC,oBAAoB,CAAC,WAAW;4DAC1C,CAAC,CAAC,aAAa;4DACf,CAAC,CAAC,4BAA4B,GAElC,GACqB,EACzB,KAAC,cAAc,OACT,6BAA6B,CAAC,gBAAgB,KAC9C,CAAC,WAAW,CAAC,oBAAoB,CAAC,WAAW;wDAC/C,CAAC,CAAC,sCAAsC,CAAC,cAAc;wDACvD,CAAC,CAAC,EAAE,CAAC,EACP,SAAS,EAAE,CAAC,CAAC,YAEb,KAAC,cAAc,KAAG,GACH,IACG,GACP,IACG,GAClB,GACF,IACF,EACN,KAAC,SAAS,KAAG,EACb,KAAC,iBAAiB,KAAG,IACjB,CACP,CAAC;AACJ,CAAC,CAAC,CACH,CAAC"}
@@ -14,9 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /// <reference types="react" resolution-mode="require"/>
17
- export declare const StatusBar: ((props: {
18
- actionsDisabled: boolean;
19
- }) => JSX.Element) & {
17
+ export declare const StatusBar: (() => JSX.Element) & {
20
18
  displayName: string;
21
19
  };
22
20
  //# sourceMappingURL=StatusBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../src/components/editor/StatusBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AA8CH,eAAO,MAAM,SAAS,WAAoB;IAAE,eAAe,EAAE,OAAO,CAAA;CAAE;;CAyEpE,CAAC"}
1
+ {"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../src/components/editor/StatusBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AA8CH,eAAO,MAAM,SAAS;;CA2EpB,CAAC"}
@@ -30,8 +30,7 @@ const FileEditorStatusBar = observer((props) => {
30
30
  const goToLine = () => fileEditorState.setShowGoToLinePrompt(true);
31
31
  return (_jsx("div", { className: "file-editor__status-bar", children: currentCursorInfo?.position && (_jsx("button", { className: "editor__status-bar__action file-editor__status-bar__cursor-info", onClick: goToLine, tabIndex: -1, title: "Go to Line/Column", children: `Ln ${currentCursorInfo.position.lineNumber}, Col ${currentCursorInfo.position.column} ${selectionLength ? ` (${selectionLength} selected)` : ''}` })) }));
32
32
  });
33
- export const StatusBar = observer((props) => {
34
- const { actionsDisabled } = props;
33
+ export const StatusBar = observer(() => {
35
34
  const editorStore = useEditorStore();
36
35
  const applicationStore = useApplicationStore();
37
36
  // actions
@@ -42,7 +41,8 @@ export const StatusBar = observer((props) => {
42
41
  const toggleAssistant = () => applicationStore.assistantService.toggleAssistant();
43
42
  return (_jsxs("div", { className: "editor__status-bar", children: [_jsx("div", { className: "editor__status-bar__left", children: _jsx("div", { className: "editor__status-bar__workspace" }) }), _jsxs("div", { className: "editor__status-bar__right", children: [editorStore.tabManagerState.currentTab instanceof FileEditorState && (_jsx(FileEditorStatusBar, { fileEditorState: editorStore.tabManagerState.currentTab })), _jsx("button", { className: clsx('editor__status-bar__action editor__status-bar__compile-btn', {
44
43
  'editor__status-bar__compile-btn--wiggling': editorStore.executionState.isInProgress,
45
- }), disabled: actionsDisabled || editorStore.executionState.isInProgress, onClick: executeGo, tabIndex: -1, title: "Execute (F9)", children: _jsx(HammerIcon, {}) }), _jsx("button", { className: clsx('editor__status-bar__action editor__status-bar__action__toggler', {
44
+ }), disabled: editorStore.initState.isInInitialState ||
45
+ editorStore.executionState.isInProgress, onClick: executeGo, tabIndex: -1, title: "Execute (F9)", children: _jsx(HammerIcon, {}) }), _jsx("button", { className: clsx('editor__status-bar__action editor__status-bar__action__toggler', {
46
46
  'editor__status-bar__action__toggler--active': Boolean(editorStore.auxPanelDisplayState.isOpen),
47
47
  }), onClick: toggleAuxPanel, tabIndex: -1, title: "Toggle auxiliary panel", children: _jsx(TerminalIcon, {}) }), _jsx("button", { className: clsx('editor__status-bar__action editor__status-bar__action__toggler', {
48
48
  'editor__status-bar__action__toggler--active': !applicationStore.assistantService.isHidden,
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBar.js","sourceRoot":"","sources":["../../../src/components/editor/StatusBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,aAAa,EACb,IAAI,EACJ,UAAU,EACV,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,mBAAmB,GAAG,QAAQ,CAClC,CAAC,KAA2C,EAAE,EAAE;IAC9C,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAClC,MAAM,iBAAiB,GAAG,eAAe,CAAC,eAAe,CAAC,cAAc,CAAC;IACzE,MAAM,eAAe,GAAG,iBAAiB,EAAE,SAAS;QAClD,CAAC,CAAC,eAAe,CAAC,eAAe,CAAC,KAAK,CAAC,eAAe,CACnD,iBAAiB,CAAC,SAAS,CAC5B,CAAC,MAAM;QACV,CAAC,CAAC,CAAC,CAAC;IAEN,UAAU;IACV,MAAM,QAAQ,GAAG,GAAS,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAEzE,OAAO,CACL,cAAK,SAAS,EAAC,yBAAyB,YACrC,iBAAiB,EAAE,Q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C5D;4BACE,2CAA2C,EACzC,WAAW,CAAC,cAAc,CAAC,YAAY;yBAC1C,CACF,EACD,QAAQ,EAAE,eAAe,IAAI,WAAW,CAAC,cAAc,CAAC,YAAY,EACpE,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAC,cAAc,YAEpB,KAAC,UAAU,KAAG,GACP,EACT,iBACE,SAAS,EAAE,IAAI,CACb,gEAAgE,EAChE;4BACE,6CAA6C,EAAE,OAAO,CACpD,WAAW,CAAC,oBAAoB,CAAC,MAAM,CACxC;yBACF,CACF,EACD,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAC,wBAAwB,YAE9B,KAAC,YAAY,KAAG,GACT,EACT,iBACE,SAAS,EAAE,IAAI,CACb,gEAAgE,EAChE;4BACE,6CAA6C,EAC3C,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ;yBAC9C,CACF,EACD,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAC,kBAAkB,YAExB,KAAC,aAAa,KAAG,GACV,IACL,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"StatusBar.js","sourceRoot":"","sources":["../../../src/components/editor/StatusBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,aAAa,EACb,IAAI,EACJ,UAAU,EACV,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,mBAAmB,GAA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1 @@
1
- {"version":3,"file":"AuxiliaryPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/AuxiliaryPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAmBH,eAAO,MAAM,cAAc;;CAyHzB,CAAC"}
1
+ {"version":3,"file":"AuxiliaryPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/AuxiliaryPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAwBH,eAAO,MAAM,cAAc;;CA6IzB,CAAC"}
@@ -18,11 +18,13 @@ import { useEffect } from 'react';
18
18
  import { observer } from 'mobx-react-lite';
19
19
  import { Console } from './TerminalPanel.js';
20
20
  import { AUX_PANEL_MODE } from '../../../stores/EditorConfig.js';
21
- import { SearchPanel } from './SearchPanel.js';
21
+ import { TextSearchPanel } from './TextSearchPanel.js';
22
22
  import { TestRunnerPanel } from './TestRunnerPanel.js';
23
23
  import { isNonNullable } from '@finos/legend-shared';
24
- import { ChevronDownIcon, ChevronUpIcon, clsx, FlaskIcon, SearchIcon, XIcon, } from '@finos/legend-art';
24
+ import { ChevronDownIcon, ChevronUpIcon, clsx, FlaskIcon, ReferencesIcon, SearchIcon, TerminalIcon, WandIcon, XIcon, } from '@finos/legend-art';
25
25
  import { useEditorStore } from '../EditorStoreProvider.js';
26
+ import { CodeFixSuggestionsPanel } from './CodeFixSuggestionsPanel.js';
27
+ import { ReferenceUsagePanel } from './ReferenceUsagePanel.js';
26
28
  export const AuxiliaryPanel = observer(() => {
27
29
  const editorStore = useEditorStore();
28
30
  const changeMode = (mode) => () => editorStore.setActiveAuxPanelMode(mode);
@@ -32,21 +34,33 @@ export const AuxiliaryPanel = observer(() => {
32
34
  [AUX_PANEL_MODE.TERMINAL]: {
33
35
  mode: AUX_PANEL_MODE.TERMINAL,
34
36
  name: 'TERMINAL',
35
- icon: undefined,
37
+ icon: (_jsx(TerminalIcon, { className: "auxiliary-panel__header__tab__icon--terminal" })),
36
38
  isVisible: true,
37
39
  },
38
- [AUX_PANEL_MODE.SEARCH_RESULT]: {
39
- mode: AUX_PANEL_MODE.SEARCH_RESULT,
40
+ [AUX_PANEL_MODE.SEARCH]: {
41
+ mode: AUX_PANEL_MODE.SEARCH,
40
42
  name: 'SEARCH',
41
- icon: (_jsx("div", { className: "auxiliary-panel__header__tab__icon--search", children: _jsx(SearchIcon, {}) })),
43
+ icon: (_jsx(SearchIcon, { className: "auxiliary-panel__header__tab__icon--search" })),
42
44
  isVisible: true,
43
45
  },
44
46
  [AUX_PANEL_MODE.TEST_RUNNER]: {
45
47
  mode: AUX_PANEL_MODE.TEST_RUNNER,
46
48
  name: 'TEST',
47
- icon: (_jsx("div", { className: "auxiliary-panel__header__tab__icon--test", children: _jsx(FlaskIcon, {}) })),
49
+ icon: _jsx(FlaskIcon, { className: "auxiliary-panel__header__tab__icon--test" }),
48
50
  isVisible: true,
49
51
  },
52
+ [AUX_PANEL_MODE.REFERENCES]: {
53
+ mode: AUX_PANEL_MODE.REFERENCES,
54
+ name: 'REFERENCES',
55
+ icon: (_jsx(ReferencesIcon, { className: "auxiliary-panel__header__tab__icon--references" })),
56
+ isVisible: true,
57
+ },
58
+ [AUX_PANEL_MODE.CODE_FIX_SUGGESTION]: {
59
+ mode: AUX_PANEL_MODE.CODE_FIX_SUGGESTION,
60
+ name: 'SUGGESTIONS',
61
+ icon: (_jsx(WandIcon, { className: "auxiliary-panel__header__tab__icon--suggestion" })),
62
+ isVisible: Boolean(editorStore.codeFixSuggestion),
63
+ },
50
64
  };
51
65
  const tabsToShow = Object.values(AUX_PANEL_MODE).filter((tab) => isNonNullable(auxTabMap[tab]) && auxTabMap[tab].isVisible);
52
66
  const isTabVisible = (tabType) => editorStore.activeAuxPanelMode === tabType && tabsToShow.includes(tabType);
@@ -60,6 +74,6 @@ export const AuxiliaryPanel = observer(() => {
60
74
  .filter(isNonNullable)
61
75
  .map((tab) => (_jsxs("button", { tabIndex: -1, className: clsx('auxiliary-panel__header__tab', {
62
76
  'auxiliary-panel__header__tab--active': editorStore.activeAuxPanelMode === tab.mode,
63
- }), onClick: changeMode(tab.mode), children: [tab.icon && (_jsx("div", { className: "auxiliary-panel__header__tab__icon", children: tab.icon })), _jsx("div", { className: "auxiliary-panel__header__tab__title", children: tab.name })] }, tab.mode))) }), _jsxs("div", { className: "auxiliary-panel__header__actions", children: [_jsx("button", { className: "auxiliary-panel__header__action", onClick: toggleExpandAuxPanel, tabIndex: -1, title: "Toggle Expand/Collapse", children: editorStore.auxPanelDisplayState.isMaximized ? (_jsx(ChevronDownIcon, {})) : (_jsx(ChevronUpIcon, {})) }), _jsx("button", { className: "auxiliary-panel__header__action", onClick: closePanel, tabIndex: -1, title: "Close", children: _jsx(XIcon, {}) })] })] }), _jsxs("div", { className: "panel__content", children: [isTabVisible(AUX_PANEL_MODE.TERMINAL) && (_jsx("div", { className: "auxiliary-panel__content__tab", children: _jsx(Console, {}) })), isTabVisible(AUX_PANEL_MODE.SEARCH_RESULT) && (_jsx("div", { className: "auxiliary-panel__content__tab", children: _jsx(SearchPanel, {}) })), isTabVisible(AUX_PANEL_MODE.TEST_RUNNER) && (_jsx("div", { className: "auxiliary-panel__content__tab", children: _jsx(TestRunnerPanel, {}) }))] })] }));
77
+ }), onClick: changeMode(tab.mode), children: [_jsx("div", { className: "auxiliary-panel__header__tab__icon", children: tab.icon }), _jsx("div", { className: "auxiliary-panel__header__tab__title", children: tab.name })] }, tab.mode))) }), _jsxs("div", { className: "auxiliary-panel__header__actions", children: [_jsx("button", { className: "auxiliary-panel__header__action", onClick: toggleExpandAuxPanel, tabIndex: -1, title: "Toggle Expand/Collapse", children: editorStore.auxPanelDisplayState.isMaximized ? (_jsx(ChevronDownIcon, {})) : (_jsx(ChevronUpIcon, {})) }), _jsx("button", { className: "auxiliary-panel__header__action", onClick: closePanel, tabIndex: -1, title: "Close", children: _jsx(XIcon, {}) })] })] }), _jsxs("div", { className: "panel__content", children: [isTabVisible(AUX_PANEL_MODE.TERMINAL) && (_jsx("div", { className: "auxiliary-panel__content__tab", children: _jsx(Console, {}) })), isTabVisible(AUX_PANEL_MODE.SEARCH) && (_jsx("div", { className: "auxiliary-panel__content__tab", children: _jsx(TextSearchPanel, {}) })), isTabVisible(AUX_PANEL_MODE.TEST_RUNNER) && (_jsx("div", { className: "auxiliary-panel__content__tab", children: _jsx(TestRunnerPanel, {}) })), isTabVisible(AUX_PANEL_MODE.CODE_FIX_SUGGESTION) && (_jsx("div", { className: "auxiliary-panel__content__tab", children: _jsx(CodeFixSuggestionsPanel, {}) })), isTabVisible(AUX_PANEL_MODE.REFERENCES) && (_jsx("div", { className: "auxiliary-panel__content__tab", children: _jsx(ReferenceUsagePanel, {}) }))] })] }));
64
78
  });
65
79
  //# sourceMappingURL=AuxiliaryPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuxiliaryPanel.js","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/AuxiliaryPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,eAAe,EACf,aAAa,EACb,IAAI,EACJ,SAAS,EACT,UAAU,EACV,KAAK,GACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,GAAG,EAAE;IAC1C,M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AAC,CAC9C,KAAC,eAAe,KAAG,CACpB,CAAC,CAAC,CAAC,CACF,KAAC,aAAa,KAAG,CAClB,GACM,EACT,iBACE,SAAS,EAAC,iCAAiC,EAC3C,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,CAAC,CAAC,EACZ,KAAK,EAAC,OAAO,YAEb,KAAC,KAAK,KAAG,GACF,IACL,IACF,EACN,eAAK,SAAS,EAAC,gBAAgB,aAC5B,YAAY,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CACxC,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,OAAO,KAAG,GACP,CACP,EACA,YAAY,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,CAC7C,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,WAAW,KAAG,GACX,CACP,EACA,YAAY,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAC3C,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,eAAe,KAAG,GACf,CACP,IACG,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"AuxiliaryPanel.js","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/AuxiliaryPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,eAAe,EACf,aAAa,EACb,IAAI,EACJ,SAAS,EACT,cAAc,EACd,UAAU,EACV,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AY,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAC3C,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,eAAe,KAAG,GACf,CACP,EACA,YAAY,CAAC,cAAc,CAAC,mBAAmB,CAAC,IAAI,CACnD,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,uBAAuB,KAAG,GACvB,CACP,EACA,YAAY,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAC1C,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,mBAAmB,KAAG,GACnB,CACP,IACG,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /// <reference types="react" resolution-mode="require"/>
17
+ export declare const CodeFixSuggestionsPanel: (() => JSX.Element) & {
18
+ displayName: string;
19
+ };
20
+ //# sourceMappingURL=CodeFixSuggestionsPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeFixSuggestionsPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/CodeFixSuggestionsPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAyMH,eAAO,MAAM,uBAAuB;;CAmBlC,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2020-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { observer } from 'mobx-react-lite';
18
+ import { FileCoordinate, trimPathLeadingSlash, } from '../../../server/models/File.js';
19
+ import { flowResult } from 'mobx';
20
+ import { ArrowCircleRightIcon } from '@finos/legend-art';
21
+ import { useApplicationStore } from '@finos/legend-application';
22
+ import { useEditorStore } from '../EditorStoreProvider.js';
23
+ import { UnknownSymbolCodeFixSuggestion, UnmatchedFunctionCodeFixSuggestion, } from '../../../stores/CodeFixSuggestion.js';
24
+ const CandidateWithPackageImportedDisplay = observer((props) => {
25
+ const { candidate } = props;
26
+ const editorStore = useEditorStore();
27
+ const applicationStore = useApplicationStore();
28
+ const goToResult = () => {
29
+ flowResult(editorStore.loadFile(candidate.sourceID, new FileCoordinate(candidate.sourceID, candidate.line, candidate.column))).catch(applicationStore.alertUnhandledError);
30
+ };
31
+ return (_jsxs("div", { className: "suggestions-panel__entry__content__item", children: [_jsxs("div", { className: "suggestions-panel__entry__content__item__label__candidate", title: "Go to Result", onClick: goToResult, children: [_jsx("div", { className: "suggestions-panel__entry__content__item__label__candidate-name", children: candidate.foundName }), _jsx("div", { className: "suggestions-panel__entry__content__item__label__candidate-location", children: `${trimPathLeadingSlash(candidate.sourceID)} [${candidate.line}:${candidate.column}]` })] }), _jsx("div", { className: "suggestions-panel__entry__content__item__actions", children: _jsx("button", { className: "suggestions-panel__entry__content__item__action", tabIndex: -1, title: "Go to Result", onClick: goToResult, children: _jsx(ArrowCircleRightIcon, {}) }) })] }));
32
+ });
33
+ const CandidateWithPackageNotImportedDisplay = observer((props) => {
34
+ const { candidate } = props;
35
+ const editorStore = useEditorStore();
36
+ const applicationStore = useApplicationStore();
37
+ const goToResult = () => {
38
+ flowResult(editorStore.loadFile(candidate.sourceID, new FileCoordinate(candidate.sourceID, candidate.line, candidate.column))).catch(applicationStore.alertUnhandledError);
39
+ };
40
+ const useCandidate = () => {
41
+ flowResult(editorStore.updateFileUsingSuggestionCandidate(candidate)).catch(applicationStore.alertUnhandledError);
42
+ };
43
+ return (_jsxs("div", { className: "suggestions-panel__entry__content__item", children: [_jsxs("div", { className: "suggestions-panel__entry__content__item__label__candidate", title: "Add Suggested Import", onClick: useCandidate, children: [_jsx("div", { className: "suggestions-panel__entry__content__item__label__candidate-name", children: candidate.foundName }), _jsx("div", { className: "suggestions-panel__entry__content__item__label__candidate-location", children: `${trimPathLeadingSlash(candidate.sourceID)} [${candidate.line}:${candidate.column}]` })] }), _jsx("div", { className: "suggestions-panel__entry__content__item__actions", children: _jsx("button", { className: "suggestions-panel__entry__content__item__action", tabIndex: -1, title: "Go to Result", onClick: goToResult, children: _jsx(ArrowCircleRightIcon, {}) }) })] }));
44
+ });
45
+ const UnmatchedFunctionExecutionResultDisplay = observer((props) => {
46
+ const { suggestionState } = props;
47
+ const result = suggestionState.result;
48
+ return (_jsxs("div", { className: "suggestions-panel__content", children: [!result.candidatesWithPackageImported.length && (_jsx("div", { className: "suggestions-panel__content__header", children: `No functions, in packages already imported, match the function '${result.candidateName}'` })), Boolean(result.candidatesWithPackageImported.length) && (_jsxs(_Fragment, { children: [_jsx("div", { className: "suggestions-panel__content__header", children: `These functions, in packages already imported, would match the function '${result.candidateName}' if you changed the parameters` }), _jsx("div", { className: "suggestions-panel__entry", children: result.candidatesWithPackageImported.map((candidate) => (_jsx(CandidateWithPackageImportedDisplay, { candidate: candidate }, candidate.uuid))) })] })), !result.candidatesWithPackageNotImported.length && (_jsx("div", { className: "suggestions-panel__content__header", children: `No functions, in packages not imported, match the function '${result.candidateName}'` })), Boolean(result.candidatesWithPackageNotImported.length) && (_jsxs(_Fragment, { children: [_jsx("div", { className: "suggestions-panel__content__header", children: `These functions, in packages not imported, match the function '${result.candidateName}'. Click on result to import the necessary package` }), _jsx("div", { className: "suggestions-panel__entry", children: result.candidatesWithPackageNotImported.map((candidate) => (_jsx(CandidateWithPackageNotImportedDisplay, { candidate: candidate }, candidate.uuid))) })] }))] }));
49
+ });
50
+ const UnmatchExecutionResultDisplay = observer((props) => {
51
+ const { suggestionState } = props;
52
+ const result = suggestionState.result;
53
+ return (_jsxs("div", { className: "suggestions-panel__content", children: [!result.candidates.length && (_jsx("div", { className: "suggestions-panel__content__header", children: `No possible matches found for '${result.candidateName}'` })), Boolean(result.candidates.length) && (_jsxs(_Fragment, { children: [_jsx("div", { className: "suggestions-panel__content__header", children: `Found possible matches for '${result.candidateName}'. Click on result to import the necessary package` }), _jsx("div", { className: "suggestions-panel__entry", children: result.candidates.map((candidate) => (_jsx(CandidateWithPackageNotImportedDisplay, { candidate: candidate }, candidate.uuid))) })] }))] }));
54
+ });
55
+ export const CodeFixSuggestionsPanel = observer(() => {
56
+ const editorStore = useEditorStore();
57
+ return (_jsxs("div", { className: "suggestions-panel", children: [editorStore.codeFixSuggestion instanceof
58
+ UnmatchedFunctionCodeFixSuggestion && (_jsx(UnmatchedFunctionExecutionResultDisplay, { suggestionState: editorStore.codeFixSuggestion })), editorStore.codeFixSuggestion instanceof
59
+ UnknownSymbolCodeFixSuggestion && (_jsx(UnmatchExecutionResultDisplay, { suggestionState: editorStore.codeFixSuggestion }))] }));
60
+ });
61
+ //# sourceMappingURL=CodeFixSuggestionsPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeFixSuggestionsPanel.js","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/CodeFixSuggestionsPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,oBA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AAC,CAAC"}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /// <reference types="react" resolution-mode="require"/>
17
- export declare const TextSearchCommand: (() => JSX.Element) & {
17
+ export declare const ReferenceUsagePanel: (() => JSX.Element) & {
18
18
  displayName: string;
19
19
  };
20
- //# sourceMappingURL=TextSearchCommand.d.ts.map
20
+ //# sourceMappingURL=ReferenceUsagePanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReferenceUsagePanel.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/ReferenceUsagePanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AA2PH,eAAO,MAAM,mBAAmB;;CAmC9B,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2020-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { observer } from 'mobx-react-lite';
18
+ import { FileCoordinate, trimPathLeadingSlash, } from '../../../server/models/File.js';
19
+ import { flowResult } from 'mobx';
20
+ import { getConceptInfoLabel } from '../../../server/models/Usage.js';
21
+ import { BlankPanelContent, ChevronDownIcon, ChevronRightIcon, CloseIcon, CollapseTreeIcon, ExpandTreeIcon, FileAltIcon, PanelLoadingIndicator, PlusIcon, RefreshIcon, TimesIcon, } from '@finos/legend-art';
22
+ import { useApplicationStore } from '@finos/legend-application';
23
+ import { useEditorStore } from '../EditorStoreProvider.js';
24
+ const ReferenceUsageSearchResultEntryDisplay = observer((props) => {
25
+ const { referenceUsageResult, result } = props;
26
+ const editorStore = useEditorStore();
27
+ const applicationStore = useApplicationStore();
28
+ const goToResult = (coordinate) => () => flowResult(editorStore.loadFile(result.sourceId, new FileCoordinate(result.sourceId, coordinate.startLine, coordinate.startColumn))).catch(applicationStore.alertUnhandledError);
29
+ const dismissResultForFile = () => referenceUsageResult.dismissSearchEntry(result);
30
+ const dismissCoordinate = (coordinate) => () => {
31
+ result.dismissCoordinate(coordinate);
32
+ if (!result.coordinates.length) {
33
+ referenceUsageResult.dismissSearchEntry(result);
34
+ }
35
+ };
36
+ return (_jsxs("div", { className: "references-panel__entry", children: [_jsxs("div", { className: "references-panel__entry__header", onClick: () => result.setIsExpanded(!result.isExpanded), children: [_jsxs("div", { className: "references-panel__entry__header__title", children: [_jsx("div", { className: "references-panel__entry__header__title__expander", children: result.isExpanded ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) }), _jsx("div", { className: "references-panel__entry__header__title__label", children: _jsx(FileAltIcon, {}) }), _jsx("div", { className: "references-panel__entry__header__title__content", children: trimPathLeadingSlash(result.sourceId) })] }), _jsxs("div", { className: "references-panel__entry__header__actions", children: [_jsx("div", { className: "references-panel__entry__header__action references-panel__entry__header__action--with-counter", children: _jsx("div", { className: "references-panel__entry__header__action__counter", children: result.coordinates.length }) }), _jsx("button", { className: "references-panel__entry__header__action references-panel__entry__header__action--hidden", tabIndex: -1, title: "Dismiss", onClick: dismissResultForFile, children: _jsx(TimesIcon, {}) })] })] }), result.isExpanded && (_jsx("div", { className: "references-panel__entry__content", children: result.coordinates.map((coordinate) => (_jsxs("div", { className: "references-panel__entry__content__item", children: [_jsxs("div", { className: "references-panel__entry__content__item__label references-panel__entry__content__item__label--full", title: coordinate.preview
37
+ ? `${coordinate.preview.before}${coordinate.preview.found.replaceAll(/\n/g, '\u21B5')}${coordinate.preview.after}`
38
+ : 'Go To Result', onClick: goToResult(coordinate), children: [coordinate.preview && (_jsxs("div", { className: "references-panel__entry__content__item__label__content", children: [_jsx("div", { className: "references-panel__entry__content__item__label__coordinates", children: `[${coordinate.startLine}:${coordinate.startColumn}]` }), _jsxs("div", { className: "references-panel__entry__content__item__label__preview", children: [_jsx("span", { className: "references-panel__entry__content__item__label__preview__text", children: coordinate.preview.before }), _jsx("span", { className: "references-panel__entry__content__item__label__preview__text references-panel__entry__content__item__label__preview__text--found", children: coordinate.preview.found.replaceAll(/\n/g, '\u21B5') }), _jsx("span", { className: "references-panel__entry__content__item__label__preview__text", children: coordinate.preview.after })] })] })), !coordinate.preview && (_jsx(_Fragment, { children: `line: ${coordinate.startLine} - column: ${coordinate.startColumn}` }))] }), _jsx("div", { className: "references-panel__entry__content__item__actions", children: _jsx("button", { className: "references-panel__entry__content__item__action references-panel__entry__content__item__action--hidden", tabIndex: -1, title: "Dismiss", onClick: dismissCoordinate(coordinate), children: _jsx(TimesIcon, {}) }) })] }, coordinate.uuid))) }))] }));
39
+ });
40
+ const UsageResultDisplay = observer((props) => {
41
+ const { referenceUsageState } = props;
42
+ const editorStore = useEditorStore();
43
+ const applicationStore = useApplicationStore();
44
+ const showExpandAction = referenceUsageState.searchEntries.some((entry) => !entry.isExpanded);
45
+ const refresh = () => {
46
+ flowResult(editorStore.findUsages(referenceUsageState.usageConcept)).catch(applicationStore.alertUnhandledError);
47
+ };
48
+ const clear = () => editorStore.setReferenceUsageResult(undefined);
49
+ const expandAll = () => {
50
+ referenceUsageState.searchEntries.forEach((entry) => entry.setIsExpanded(true));
51
+ };
52
+ const collapseAll = () => {
53
+ referenceUsageState.searchEntries.forEach((entry) => entry.setIsExpanded(false));
54
+ };
55
+ return (_jsxs("div", { className: "references-panel__content", children: [_jsxs("div", { className: "references-panel__content__header", children: [_jsx("div", { className: "references-panel__content__header__title", children: !referenceUsageState.searchEntries.length
56
+ ? `No usages found for ${getConceptInfoLabel(referenceUsageState.usageConcept)}`
57
+ : `${referenceUsageState.numberOfResults} usages(s) in ${referenceUsageState.numberOfFiles} files for ${getConceptInfoLabel(referenceUsageState.usageConcept)}` }), _jsxs("div", { className: "references-panel__content__header__actions", children: [_jsx("button", { className: "references-panel__content__header__action", tabIndex: -1, title: "Refresh", onClick: refresh, children: _jsx(RefreshIcon, {}) }), _jsx("button", { className: "references-panel__content__header__action", tabIndex: -1, title: "Clear", onClick: clear, children: _jsx(CloseIcon, {}) }), !showExpandAction && (_jsx("button", { className: "references-panel__content__header__action", tabIndex: -1, title: "Collapse All", onClick: collapseAll, children: _jsx(CollapseTreeIcon, {}) })), showExpandAction && (_jsx("button", { className: "references-panel__content__header__action", tabIndex: -1, title: "Expand All", onClick: expandAll, children: _jsx(ExpandTreeIcon, {}) }))] })] }), _jsx("div", { className: "references-panel__content__results", children: referenceUsageState.searchEntries.map((searchEntry) => (_jsx(ReferenceUsageSearchResultEntryDisplay, { referenceUsageResult: referenceUsageState, result: searchEntry }, searchEntry.uuid))) })] }));
58
+ });
59
+ export const ReferenceUsagePanel = observer(() => {
60
+ const editorStore = useEditorStore();
61
+ return (_jsxs("div", { className: "references-panel", children: [_jsx(PanelLoadingIndicator, { isLoading: editorStore.referenceUsageLoadState.isInProgress }), !editorStore.referenceUsageResult && (_jsx(BlankPanelContent, { children: _jsx("div", { className: "auxiliary-panel__splash-screen", children: _jsx("div", { className: "auxiliary-panel__splash-screen__content", children: _jsxs("div", { className: "auxiliary-panel__splash-screen__content__item", children: [_jsx("div", { className: "auxiliary-panel__splash-screen__content__item__label", children: "Find Concept References" }), _jsxs("div", { className: "auxiliary-panel__splash-screen__content__item__hot-keys", children: [_jsx("div", { className: "hotkey__key", children: "Alt" }), _jsx("div", { className: "hotkey__plus", children: _jsx(PlusIcon, {}) }), _jsx("div", { className: "hotkey__key", children: "F7" })] })] }) }) }) })), editorStore.referenceUsageResult && (_jsx(UsageResultDisplay, { referenceUsageState: editorStore.referenceUsageResult }))] }));
62
+ });
63
+ //# sourceMappingURL=ReferenceUsagePanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReferenceUsagePanel.js","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/ReferenceUsagePanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK3C,OAAO,EACL,cAAc,EACd,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,qBAAqB,EACrB,QAAQ,EACR,WAAW,EACX,SAAS,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,MAAM,sCAAsC,GAAG,QAAQ,CACrD,CAAC,KAGA,EAAE,EAAE;IACH,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC/C,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,UAAU,GACd,CAAC,UAAkC,EAAgB,EAAE,CACrD,GAAkB,EAAE,CAClB,UAAU,CACR,WAAW,CAAC,QAAQ,CAClB,MAAM,CAAC,QAAQ,EACf,IAAI,cAAc,CAChB,MAAM,CAAC,QAAQ,EACf,UAAU,CAAC,SAAS,EACpB,UAAU,CAAC,WAAW,CACvB,CACF,CACF,CAAC,KAAK,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAClD,MAAM,oBAAoB,GAAG,GAAS,EAAE,CACtC,oBAAoB,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACl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,cAChB,cAAK,SAAS,EAAC,gCAAgC,YAC7C,cAAK,SAAS,EAAC,yCAAyC,YACtD,eAAK,SAAS,EAAC,+CAA+C,aAC5D,cAAK,SAAS,EAAC,sDAAsD,wCAE/D,EACN,eAAK,SAAS,EAAC,yDAAyD,aACtE,cAAK,SAAS,EAAC,aAAa,oBAAU,EACtC,cAAK,SAAS,EAAC,cAAc,YAC3B,KAAC,QAAQ,KAAG,GACR,EACN,cAAK,SAAS,EAAC,aAAa,mBAAS,IACjC,IACF,GACF,GACF,GACY,CACrB,EACA,WAAW,CAAC,oBAAoB,IAAI,CACnC,KAAC,kBAAkB,IACjB,mBAAmB,EAAE,WAAW,CAAC,oBAAoB,GACrD,CACH,IACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TestRunnerPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/TestRunnerPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AA+hBH,eAAO,MAAM,eAAe;;CAuC1B,CAAC"}
1
+ {"version":3,"file":"TestRunnerPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/aux-panel/TestRunnerPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAktBH,eAAO,MAAM,eAAe;;CAuC1B,CAAC"}
@@ -18,12 +18,14 @@ import { observer } from 'mobx-react-lite';
18
18
  import { getTestTreeNodeStatus, TestResultType, TestSuiteStatus, } from '../../../stores/TestRunnerState.js';
19
19
  import { TestFailureResult, TestSuccessResult, } from '../../../server/models/Test.js';
20
20
  import { flowResult } from 'mobx';
21
- import { clsx, ResizablePanel, ResizablePanelGroup, ResizablePanelSplitter, BlankPanelContent, PanelLoadingIndicator, TreeView, ProgressBar, QuestionCircleIcon, CheckCircleIcon, ExclamationCircleIcon, TimesCircleIcon, CircleNotchIcon, ChevronDownIcon, ChevronRightIcon, ExpandIcon, CompressIcon, BanIcon, PlayIcon, PlusIcon, ResizablePanelSplitterLine, GoToFileIcon, SubjectIcon, ViewHeadlineIcon, TimesIcon, } from '@finos/legend-art';
21
+ import { clsx, ResizablePanel, ResizablePanelGroup, ResizablePanelSplitter, BlankPanelContent, PanelLoadingIndicator, TreeView, ProgressBar, QuestionCircleIcon, CheckCircleIcon, ExclamationCircleIcon, TimesCircleIcon, CircleNotchIcon, ChevronDownIcon, ChevronRightIcon, ExpandIcon, CompressIcon, BanIcon, PlayIcon, PlusIcon, ResizablePanelSplitterLine, GoToFileIcon, SubjectIcon, ViewHeadlineIcon, TimesIcon, disposeEditor, useResizeDetector, WordWrapIcon, getBaseConsoleOptions, } from '@finos/legend-art';
22
22
  import { guaranteeNonNullable, isNonNullable, noop, } from '@finos/legend-shared';
23
- import { useApplicationStore } from '@finos/legend-application';
23
+ import { EDITOR_LANGUAGE, EDITOR_THEME, useApplicationStore, } from '@finos/legend-application';
24
24
  import { useEditorStore } from '../EditorStoreProvider.js';
25
25
  import { FileCoordinate } from '../../../server/models/File.js';
26
26
  import { ELEMENT_PATH_DELIMITER } from '@finos/legend-graph';
27
+ import { useEffect, useRef, useState } from 'react';
28
+ import { editor as monacoEditorAPI, languages as monacoLanguagesAPI, } from 'monaco-editor';
27
29
  const TestTreeNodeContainer = observer((props) => {
28
30
  const { node, level, stepPaddingInRem, onNodeSelect, innerProps } = props;
29
31
  const { testRunnerState, onNodeOpen, onNodeExpand, onNodeCompress, renderNodeLabel, } = innerProps;
@@ -150,16 +152,134 @@ const TestRunnerTree = observer((props) => {
150
152
  onNodeCompress,
151
153
  } }))] }));
152
154
  });
155
+ // NOTE: we need the global match hence, including /g in the regexp
156
+ const TEST_ERROR_LOCATION_PATTERN = /(?<path>resource:(?<path_sourceId>\/?(?:\w+\/)*\w+(?:\.\w+)*) (?:line:(?<path_line>\d+)) (?:column:(?<path_column>\d+)))/g;
157
+ const TestResultConsole = (props) => {
158
+ const { wrapText, result } = props;
159
+ const editorStore = useEditorStore();
160
+ const applicationStore = useApplicationStore();
161
+ const [editor, setEditor] = useState();
162
+ const locationLinkProviderDisposer = useRef(undefined);
163
+ const textInputRef = useRef(null);
164
+ const { ref, width, height } = useResizeDetector();
165
+ useEffect(() => {
166
+ if (width !== undefined && height !== undefined) {
167
+ editor?.layout({ width, height });
168
+ }
169
+ }, [editor, width, height]);
170
+ useEffect(() => {
171
+ if (!editor && textInputRef.current) {
172
+ const element = textInputRef.current;
173
+ const newEditor = monacoEditorAPI.create(element, {
174
+ ...getBaseConsoleOptions(),
175
+ theme: EDITOR_THEME.LEGEND,
176
+ language: EDITOR_LANGUAGE.TEXT,
177
+ });
178
+ setEditor(newEditor);
179
+ }
180
+ }, [applicationStore, editor]);
181
+ locationLinkProviderDisposer.current?.dispose();
182
+ locationLinkProviderDisposer.current =
183
+ monacoLanguagesAPI.registerLinkProvider(EDITOR_LANGUAGE.TEXT, {
184
+ provideLinks: (model) => {
185
+ const links = [];
186
+ for (let i = 1; i <= model.getLineCount(); ++i) {
187
+ Array.from(model.getLineContent(i).matchAll(TEST_ERROR_LOCATION_PATTERN)).forEach((match) => {
188
+ if (match.index !== undefined &&
189
+ match.groups?.path &&
190
+ match.groups.path_sourceId &&
191
+ match.groups.path_column &&
192
+ match.groups.path_line) {
193
+ links.push({
194
+ range: {
195
+ startLineNumber: i,
196
+ startColumn: match.index + 1,
197
+ endLineNumber: i,
198
+ endColumn: match.index + 1 + match.groups.path.length,
199
+ },
200
+ tooltip: 'Click to go to location',
201
+ sourceId: match.groups.path_sourceId,
202
+ line: match.groups.path_line,
203
+ column: match.groups.path_column,
204
+ });
205
+ }
206
+ });
207
+ }
208
+ return {
209
+ links,
210
+ };
211
+ },
212
+ // NOTE: this is a hacky way to customize the behavior of clicking on a link
213
+ // there is no good solution right now to intercept this cleanly and prevent the default behavior
214
+ // this will produce a warning in the console since link resolved is not navigatable by monaco-editor
215
+ resolveLink: (link) => {
216
+ const locationLink = link;
217
+ flowResult(editorStore.loadFile(locationLink.sourceId, new FileCoordinate(locationLink.sourceId, Number.parseInt(locationLink.line, 10), Number.parseInt(locationLink.column, 10)))).catch(editorStore.applicationStore.alertUnhandledError);
218
+ return undefined;
219
+ },
220
+ });
221
+ useEffect(() => {
222
+ if (width !== undefined && height !== undefined) {
223
+ editor?.layout({ width, height });
224
+ }
225
+ }, [editor, width, height]);
226
+ useEffect(() => {
227
+ if (editor) {
228
+ const value = result instanceof TestSuccessResult
229
+ ? 'Test passed!'
230
+ : result instanceof TestFailureResult
231
+ ? result.error.text
232
+ : 'Running...';
233
+ editor.setValue(value);
234
+ // color text based on test result/status
235
+ if (result instanceof TestSuccessResult ||
236
+ result instanceof TestFailureResult) {
237
+ editor.createDecorationsCollection([
238
+ {
239
+ range: {
240
+ startLineNumber: 1,
241
+ startColumn: 1,
242
+ endLineNumber: Number.MAX_SAFE_INTEGER,
243
+ endColumn: Number.MAX_SAFE_INTEGER,
244
+ },
245
+ options: {
246
+ inlineClassName: result instanceof TestSuccessResult
247
+ ? 'test-runner-panel__result__content--success'
248
+ : 'test-runner-panel__result__content--failure',
249
+ },
250
+ },
251
+ ]);
252
+ }
253
+ }
254
+ }, [editor, result]);
255
+ useEffect(() => {
256
+ if (editor) {
257
+ editor.updateOptions({
258
+ wordWrap: wrapText ? 'on' : 'off',
259
+ });
260
+ }
261
+ }, [editor, wrapText]);
262
+ useEffect(() => () => {
263
+ if (editor) {
264
+ disposeEditor(editor);
265
+ }
266
+ locationLinkProviderDisposer.current?.dispose();
267
+ }, [editor]); // dispose editor
268
+ return (_jsx("div", { ref: ref, className: "text-editor__container", children: _jsx("div", { className: "text-editor__body", ref: textInputRef }) }));
269
+ };
153
270
  const TestResultViewer = observer((props) => {
154
271
  const { testRunnerState, selectedTestId, testResultInfo } = props;
155
272
  const editorStore = useEditorStore();
156
273
  const applicationStore = useApplicationStore();
274
+ const [wrapText, setWrapText] = useState(false);
157
275
  const result = testResultInfo.results.get(selectedTestId);
158
276
  const testInfo = guaranteeNonNullable(testRunnerState.allTests.get(selectedTestId), `Can't find info for test with ID '${selectedTestId}'`);
159
277
  const goToFile = () => {
160
278
  flowResult(editorStore.loadFile(testInfo.li_attr.file, new FileCoordinate(testInfo.li_attr.file, Number.parseInt(testInfo.li_attr.line, 10), Number.parseInt(testInfo.li_attr.column, 10)))).catch(applicationStore.alertUnhandledError);
161
279
  };
162
- return (_jsxs("div", { className: "panel", children: [_jsxs("div", { className: "panel__header", children: [_jsx("div", { className: "panel__header__title", children: _jsx("div", { className: "panel__header__title__label", children: testInfo.text }) }), _jsx("div", { className: "panel__header__actions", children: _jsx("button", { className: "panel__header__action", tabIndex: -1, title: "Open File", onClick: goToFile, children: _jsx(GoToFileIcon, {}) }) })] }), _jsxs("div", { className: "panel__content test-runner-panel__result", children: [!result && (_jsx("div", { className: "test-runner-panel__result__content", children: "Running..." })), result instanceof TestSuccessResult && (_jsx("div", { className: "test-runner-panel__result__content", children: "Test passed!" })), result instanceof TestFailureResult && (_jsx("pre", { className: "test-runner-panel__result__content", children: result.error.text }))] })] }));
280
+ return (_jsxs("div", { className: "panel", children: [_jsxs("div", { className: "panel__header", children: [_jsx("div", { className: "panel__header__title", children: _jsx("div", { className: "panel__header__title__label", children: testInfo.text }) }), _jsxs("div", { className: "panel__header__actions", children: [_jsx("button", { className: clsx('panel__header__action', {
281
+ 'panel__header__action--active': wrapText,
282
+ }), tabIndex: -1, onClick: () => setWrapText(!wrapText), title: "Toggle Text Wrap", children: _jsx(WordWrapIcon, { className: "test-runner-panel__result__header__icon--text-wrap" }) }), _jsx("button", { className: "panel__header__action", tabIndex: -1, title: "Open File", onClick: goToFile, children: _jsx(GoToFileIcon, {}) })] })] }), _jsx("div", { className: "panel__content test-runner-panel__result", children: _jsx(TestResultConsole, { result: result, wrapText: wrapText }) })] }));
163
283
  });
164
284
  const TestRunnerResultDisplay = observer((props) => {
165
285
  const { testRunnerState } = props;