@finos/legend-application 14.0.3 → 15.0.0

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 (261) hide show
  1. package/lib/__lib__/LegendApplicationDocumentation.d.ts.map +1 -0
  2. package/lib/__lib__/LegendApplicationDocumentation.js.map +1 -0
  3. package/lib/{application → __lib__}/LegendApplicationEvent.d.ts +0 -1
  4. package/lib/__lib__/LegendApplicationEvent.d.ts.map +1 -0
  5. package/lib/{application → __lib__}/LegendApplicationEvent.js +0 -1
  6. package/lib/__lib__/LegendApplicationEvent.js.map +1 -0
  7. package/lib/__lib__/LegendApplicationNavigation.d.ts +19 -0
  8. package/lib/__lib__/LegendApplicationNavigation.d.ts.map +1 -0
  9. package/lib/__lib__/LegendApplicationNavigation.js +20 -0
  10. package/lib/__lib__/LegendApplicationNavigation.js.map +1 -0
  11. package/lib/__lib__/LegendApplicationSetting.d.ts.map +1 -0
  12. package/lib/__lib__/LegendApplicationSetting.js.map +1 -0
  13. package/lib/{application → __lib__}/LegendApplicationTelemetry.d.ts +0 -11
  14. package/lib/__lib__/LegendApplicationTelemetry.d.ts.map +1 -0
  15. package/lib/{application → __lib__}/LegendApplicationTelemetry.js +0 -4
  16. package/lib/__lib__/LegendApplicationTelemetry.js.map +1 -0
  17. package/lib/__lib__/LegendApplicationTheme.d.ts.map +1 -0
  18. package/lib/__lib__/LegendApplicationTheme.js.map +1 -0
  19. package/lib/__test__.d.ts +18 -0
  20. package/lib/__test__.d.ts.map +1 -0
  21. package/lib/__test__.js +18 -0
  22. package/lib/__test__.js.map +1 -0
  23. package/lib/application/LegendApplication.d.ts +7 -4
  24. package/lib/application/LegendApplication.d.ts.map +1 -1
  25. package/lib/application/LegendApplication.js +28 -11
  26. package/lib/application/LegendApplication.js.map +1 -1
  27. package/lib/application/LegendApplicationConfig.d.ts +8 -1
  28. package/lib/application/LegendApplicationConfig.d.ts.map +1 -1
  29. package/lib/application/LegendApplicationConfig.js +6 -2
  30. package/lib/application/LegendApplicationConfig.js.map +1 -1
  31. package/lib/browser.d.ts +19 -0
  32. package/lib/browser.d.ts.map +1 -0
  33. package/lib/browser.js +19 -0
  34. package/lib/browser.js.map +1 -0
  35. package/lib/components/{LegendApplicationComponentFrameworkProvider.d.ts → ApplicationComponentFrameworkProvider.d.ts} +2 -2
  36. package/lib/components/ApplicationComponentFrameworkProvider.d.ts.map +1 -0
  37. package/lib/components/{LegendApplicationComponentFrameworkProvider.js → ApplicationComponentFrameworkProvider.js} +3 -3
  38. package/lib/components/ApplicationComponentFrameworkProvider.js.map +1 -0
  39. package/lib/components/ApplicationFrameworkProvider.d.ts +21 -0
  40. package/lib/components/ApplicationFrameworkProvider.d.ts.map +1 -0
  41. package/lib/components/ApplicationFrameworkProvider.js +39 -0
  42. package/lib/components/ApplicationFrameworkProvider.js.map +1 -0
  43. package/lib/components/{shared/DocumentationLink.d.ts → ApplicationPlatformProvider.d.ts} +4 -10
  44. package/lib/components/ApplicationPlatformProvider.d.ts.map +1 -0
  45. package/lib/components/{WebApplicationNavigatorProviderTestUtils.d.ts → ApplicationPlatformProvider.js} +5 -7
  46. package/lib/components/ApplicationPlatformProvider.js.map +1 -0
  47. package/lib/components/ApplicationStoreProvider.d.ts +3 -4
  48. package/lib/components/ApplicationStoreProvider.d.ts.map +1 -1
  49. package/lib/components/ApplicationStoreProvider.js +6 -23
  50. package/lib/components/ApplicationStoreProvider.js.map +1 -1
  51. package/lib/components/{WebApplicationNavigatorProvider.d.ts → BrowserEnvironmentProvider.d.ts} +3 -4
  52. package/lib/components/BrowserEnvironmentProvider.d.ts.map +1 -0
  53. package/lib/components/BrowserEnvironmentProvider.js +31 -0
  54. package/lib/components/BrowserEnvironmentProvider.js.map +1 -0
  55. package/lib/components/VirtualAssistant.d.ts.map +1 -1
  56. package/lib/components/VirtualAssistant.js +17 -9
  57. package/lib/components/VirtualAssistant.js.map +1 -1
  58. package/lib/components/{shared/FuzzySearchAdvancedConfigMenu.d.ts → __test-utils__/BrowserEnvironmentTestUtils.d.ts} +13 -7
  59. package/lib/components/__test-utils__/BrowserEnvironmentTestUtils.d.ts.map +1 -0
  60. package/lib/components/__test-utils__/BrowserEnvironmentTestUtils.js +42 -0
  61. package/lib/components/__test-utils__/BrowserEnvironmentTestUtils.js.map +1 -0
  62. package/lib/index.css +2 -2
  63. package/lib/index.css.map +1 -1
  64. package/lib/index.d.ts +8 -16
  65. package/lib/index.d.ts.map +1 -1
  66. package/lib/index.js +8 -18
  67. package/lib/index.js.map +1 -1
  68. package/lib/package.json +4 -6
  69. package/lib/stores/{shared/PackageableElementOption.d.ts → ApplicationConfig.d.ts} +6 -7
  70. package/lib/stores/ApplicationConfig.d.ts.map +1 -0
  71. package/lib/stores/ApplicationConfig.js +21 -0
  72. package/lib/stores/ApplicationConfig.js.map +1 -0
  73. package/lib/stores/ApplicationNavigationContextService.js +1 -1
  74. package/lib/stores/ApplicationNavigationContextService.js.map +1 -1
  75. package/lib/stores/ApplicationStore.d.ts +4 -8
  76. package/lib/stores/ApplicationStore.d.ts.map +1 -1
  77. package/lib/stores/ApplicationStore.js +14 -14
  78. package/lib/stores/ApplicationStore.js.map +1 -1
  79. package/lib/stores/AssistantService.d.ts +3 -3
  80. package/lib/stores/AssistantService.d.ts.map +1 -1
  81. package/lib/stores/AssistantService.js +18 -10
  82. package/lib/stores/AssistantService.js.map +1 -1
  83. package/lib/stores/CommandService.js +1 -1
  84. package/lib/stores/CommandService.js.map +1 -1
  85. package/lib/stores/Core_LegendApplicationPlugin.d.ts.map +1 -1
  86. package/lib/stores/Core_LegendApplicationPlugin.js +2 -52
  87. package/lib/stores/Core_LegendApplicationPlugin.js.map +1 -1
  88. package/lib/stores/DocumentationService.d.ts +1 -1
  89. package/lib/stores/DocumentationService.d.ts.map +1 -1
  90. package/lib/stores/DocumentationService.js +4 -5
  91. package/lib/stores/DocumentationService.js.map +1 -1
  92. package/lib/stores/LayoutService.js +3 -3
  93. package/lib/stores/LayoutService.js.map +1 -1
  94. package/lib/stores/LegendApplicationPlugin.d.ts +1 -15
  95. package/lib/stores/LegendApplicationPlugin.d.ts.map +1 -1
  96. package/lib/stores/LegendApplicationPlugin.js +0 -5
  97. package/lib/stores/LegendApplicationPlugin.js.map +1 -1
  98. package/lib/stores/SettingService.d.ts +1 -0
  99. package/lib/stores/SettingService.d.ts.map +1 -1
  100. package/lib/stores/SettingService.js +1 -1
  101. package/lib/stores/SettingService.js.map +1 -1
  102. package/lib/stores/__test-utils__/ApplicationStoreTestUtils.d.ts +18 -0
  103. package/lib/stores/__test-utils__/ApplicationStoreTestUtils.d.ts.map +1 -0
  104. package/lib/stores/__test-utils__/ApplicationStoreTestUtils.js +21 -0
  105. package/lib/stores/__test-utils__/ApplicationStoreTestUtils.js.map +1 -0
  106. package/lib/stores/navigation/BrowserNavigator.d.ts +64 -0
  107. package/lib/stores/navigation/BrowserNavigator.d.ts.map +1 -0
  108. package/lib/stores/navigation/{WebApplicationNavigator.js → BrowserNavigator.js} +22 -3
  109. package/lib/stores/navigation/BrowserNavigator.js.map +1 -0
  110. package/lib/stores/navigation/{WebApplicationNavigator.d.ts → DefaultNavigator.d.ts} +3 -12
  111. package/lib/stores/navigation/DefaultNavigator.d.ts.map +1 -0
  112. package/lib/stores/navigation/DefaultNavigator.js +74 -0
  113. package/lib/stores/navigation/DefaultNavigator.js.map +1 -0
  114. package/lib/stores/navigation/NavigationService.d.ts +7 -0
  115. package/lib/stores/navigation/NavigationService.d.ts.map +1 -1
  116. package/lib/stores/navigation/NavigationService.js.map +1 -1
  117. package/lib/stores/platform/ApplicationPlatform.d.ts +24 -0
  118. package/lib/stores/platform/ApplicationPlatform.d.ts.map +1 -0
  119. package/lib/stores/platform/ApplicationPlatform.js +25 -0
  120. package/lib/stores/platform/ApplicationPlatform.js.map +1 -0
  121. package/lib/stores/platform/BrowserPlatform.d.ts +29 -0
  122. package/lib/stores/platform/BrowserPlatform.d.ts.map +1 -0
  123. package/lib/stores/platform/BrowserPlatform.js +39 -0
  124. package/lib/stores/platform/BrowserPlatform.js.map +1 -0
  125. package/lib/stores/storage/StorageService.d.ts +5 -2
  126. package/lib/stores/storage/StorageService.d.ts.map +1 -1
  127. package/lib/stores/storage/StorageService.js +20 -10
  128. package/lib/stores/storage/StorageService.js.map +1 -1
  129. package/lib/stores/terminal/XTerm.d.ts.map +1 -1
  130. package/lib/stores/terminal/XTerm.js +5 -5
  131. package/lib/stores/terminal/XTerm.js.map +1 -1
  132. package/package.json +7 -9
  133. package/src/{application → __lib__}/LegendApplicationEvent.ts +1 -1
  134. package/{lib/stores/shared/PackageableElementOption.js → src/__lib__/LegendApplicationNavigation.ts} +4 -5
  135. package/src/{application → __lib__}/LegendApplicationTelemetry.ts +0 -24
  136. package/src/{components.ts → __test__.ts} +2 -7
  137. package/src/application/LegendApplication.ts +45 -16
  138. package/src/application/LegendApplicationConfig.ts +13 -2
  139. package/src/browser.ts +19 -0
  140. package/src/components/{LegendApplicationComponentFrameworkProvider.tsx → ApplicationComponentFrameworkProvider.tsx} +2 -2
  141. package/src/components/ApplicationFrameworkProvider.tsx +47 -0
  142. package/src/components/ApplicationPlatformProvider.tsx +29 -0
  143. package/src/components/ApplicationStoreProvider.tsx +8 -33
  144. package/src/components/BrowserEnvironmentProvider.tsx +48 -0
  145. package/src/components/VirtualAssistant.tsx +53 -11
  146. package/src/components/__test-utils__/BrowserEnvironmentTestUtils.tsx +63 -0
  147. package/src/index.ts +12 -24
  148. package/src/stores/ApplicationConfig.ts +22 -0
  149. package/src/stores/ApplicationNavigationContextService.ts +1 -1
  150. package/src/stores/ApplicationStore.ts +18 -19
  151. package/src/stores/AssistantService.ts +20 -9
  152. package/src/stores/CommandService.ts +1 -1
  153. package/src/stores/Core_LegendApplicationPlugin.ts +2 -78
  154. package/src/stores/DocumentationService.ts +4 -5
  155. package/src/stores/LayoutService.ts +3 -3
  156. package/src/stores/LegendApplicationPlugin.ts +1 -21
  157. package/src/stores/SettingService.ts +2 -1
  158. package/src/stores/__test-utils__/ApplicationStoreTestUtils.ts +24 -0
  159. package/src/stores/navigation/{WebApplicationNavigator.ts → BrowserNavigator.ts} +41 -2
  160. package/src/stores/navigation/DefaultNavigator.ts +150 -0
  161. package/src/stores/navigation/NavigationService.ts +8 -0
  162. package/src/stores/{shared/PackageableElementOption.ts → platform/ApplicationPlatform.ts} +14 -11
  163. package/src/stores/platform/BrowserPlatform.ts +54 -0
  164. package/src/stores/storage/StorageService.ts +32 -14
  165. package/src/stores/terminal/XTerm.ts +8 -5
  166. package/tsconfig.json +19 -23
  167. package/lib/application/LegendApplicationDocumentation.d.ts.map +0 -1
  168. package/lib/application/LegendApplicationDocumentation.js.map +0 -1
  169. package/lib/application/LegendApplicationEvent.d.ts.map +0 -1
  170. package/lib/application/LegendApplicationEvent.js.map +0 -1
  171. package/lib/application/LegendApplicationSetting.d.ts.map +0 -1
  172. package/lib/application/LegendApplicationSetting.js.map +0 -1
  173. package/lib/application/LegendApplicationTelemetry.d.ts.map +0 -1
  174. package/lib/application/LegendApplicationTelemetry.js.map +0 -1
  175. package/lib/application/LegendApplicationTheme.d.ts.map +0 -1
  176. package/lib/application/LegendApplicationTheme.js.map +0 -1
  177. package/lib/components/ApplicationStoreProviderTestUtils.d.ts +0 -31
  178. package/lib/components/ApplicationStoreProviderTestUtils.d.ts.map +0 -1
  179. package/lib/components/ApplicationStoreProviderTestUtils.js +0 -32
  180. package/lib/components/ApplicationStoreProviderTestUtils.js.map +0 -1
  181. package/lib/components/LegendApplicationComponentFrameworkProvider.d.ts.map +0 -1
  182. package/lib/components/LegendApplicationComponentFrameworkProvider.js.map +0 -1
  183. package/lib/components/WebApplicationNavigatorProvider.d.ts.map +0 -1
  184. package/lib/components/WebApplicationNavigatorProvider.js +0 -29
  185. package/lib/components/WebApplicationNavigatorProvider.js.map +0 -1
  186. package/lib/components/WebApplicationNavigatorProviderTestUtils.d.ts.map +0 -1
  187. package/lib/components/WebApplicationNavigatorProviderTestUtils.js +0 -28
  188. package/lib/components/WebApplicationNavigatorProviderTestUtils.js.map +0 -1
  189. package/lib/components/shared/DocumentationLink.d.ts.map +0 -1
  190. package/lib/components/shared/DocumentationLink.js +0 -53
  191. package/lib/components/shared/DocumentationLink.js.map +0 -1
  192. package/lib/components/shared/FuzzySearchAdvancedConfigMenu.d.ts.map +0 -1
  193. package/lib/components/shared/FuzzySearchAdvancedConfigMenu.js +0 -37
  194. package/lib/components/shared/FuzzySearchAdvancedConfigMenu.js.map +0 -1
  195. package/lib/components/shared/PackageableElementOptionLabel.d.ts +0 -22
  196. package/lib/components/shared/PackageableElementOptionLabel.d.ts.map +0 -1
  197. package/lib/components/shared/PackageableElementOptionLabel.js +0 -46
  198. package/lib/components/shared/PackageableElementOptionLabel.js.map +0 -1
  199. package/lib/components/shared/TabManager.d.ts +0 -24
  200. package/lib/components/shared/TabManager.d.ts.map +0 -1
  201. package/lib/components/shared/TabManager.js +0 -117
  202. package/lib/components/shared/TabManager.js.map +0 -1
  203. package/lib/components.d.ts +0 -21
  204. package/lib/components.d.ts.map +0 -1
  205. package/lib/components.js +0 -21
  206. package/lib/components.js.map +0 -1
  207. package/lib/const.d.ts +0 -35
  208. package/lib/const.d.ts.map +0 -1
  209. package/lib/const.js +0 -39
  210. package/lib/const.js.map +0 -1
  211. package/lib/stores/ApplicationStoreTestUtils.d.ts +0 -41
  212. package/lib/stores/ApplicationStoreTestUtils.d.ts.map +0 -1
  213. package/lib/stores/ApplicationStoreTestUtils.js +0 -70
  214. package/lib/stores/ApplicationStoreTestUtils.js.map +0 -1
  215. package/lib/stores/navigation/WebApplicationNavigator.d.ts.map +0 -1
  216. package/lib/stores/navigation/WebApplicationNavigator.js.map +0 -1
  217. package/lib/stores/navigation/WebApplicationRouter.d.ts +0 -22
  218. package/lib/stores/navigation/WebApplicationRouter.d.ts.map +0 -1
  219. package/lib/stores/navigation/WebApplicationRouter.js +0 -25
  220. package/lib/stores/navigation/WebApplicationRouter.js.map +0 -1
  221. package/lib/stores/pure-language/PureLanguageCodeEditorSupport.d.ts +0 -70
  222. package/lib/stores/pure-language/PureLanguageCodeEditorSupport.d.ts.map +0 -1
  223. package/lib/stores/pure-language/PureLanguageCodeEditorSupport.js +0 -237
  224. package/lib/stores/pure-language/PureLanguageCodeEditorSupport.js.map +0 -1
  225. package/lib/stores/pure-language/PureLanguageSupport.d.ts +0 -39
  226. package/lib/stores/pure-language/PureLanguageSupport.d.ts.map +0 -1
  227. package/lib/stores/pure-language/PureLanguageSupport.js +0 -437
  228. package/lib/stores/pure-language/PureLanguageSupport.js.map +0 -1
  229. package/lib/stores/shared/FuzzySearchAdvancedConfigState.d.ts +0 -30
  230. package/lib/stores/shared/FuzzySearchAdvancedConfigState.d.ts.map +0 -1
  231. package/lib/stores/shared/FuzzySearchAdvancedConfigState.js +0 -59
  232. package/lib/stores/shared/FuzzySearchAdvancedConfigState.js.map +0 -1
  233. package/lib/stores/shared/PackageableElementOption.d.ts.map +0 -1
  234. package/lib/stores/shared/PackageableElementOption.js.map +0 -1
  235. package/lib/stores/shared/TabManagerState.d.ts +0 -40
  236. package/lib/stores/shared/TabManagerState.d.ts.map +0 -1
  237. package/lib/stores/shared/TabManagerState.js +0 -93
  238. package/lib/stores/shared/TabManagerState.js.map +0 -1
  239. package/src/components/ApplicationStoreProviderTestUtils.tsx +0 -59
  240. package/src/components/WebApplicationNavigatorProvider.tsx +0 -46
  241. package/src/components/WebApplicationNavigatorProviderTestUtils.tsx +0 -37
  242. package/src/components/shared/DocumentationLink.tsx +0 -87
  243. package/src/components/shared/FuzzySearchAdvancedConfigMenu.tsx +0 -73
  244. package/src/components/shared/PackageableElementOptionLabel.tsx +0 -85
  245. package/src/components/shared/TabManager.tsx +0 -288
  246. package/src/const.ts +0 -40
  247. package/src/stores/ApplicationStoreTestUtils.ts +0 -107
  248. package/src/stores/navigation/WebApplicationRouter.ts +0 -49
  249. package/src/stores/pure-language/PureLanguageCodeEditorSupport.ts +0 -338
  250. package/src/stores/pure-language/PureLanguageSupport.ts +0 -498
  251. package/src/stores/shared/FuzzySearchAdvancedConfigState.ts +0 -65
  252. package/src/stores/shared/TabManagerState.ts +0 -124
  253. /package/lib/{application → __lib__}/LegendApplicationDocumentation.d.ts +0 -0
  254. /package/lib/{application → __lib__}/LegendApplicationDocumentation.js +0 -0
  255. /package/lib/{application → __lib__}/LegendApplicationSetting.d.ts +0 -0
  256. /package/lib/{application → __lib__}/LegendApplicationSetting.js +0 -0
  257. /package/lib/{application → __lib__}/LegendApplicationTheme.d.ts +0 -0
  258. /package/lib/{application → __lib__}/LegendApplicationTheme.js +0 -0
  259. /package/src/{application → __lib__}/LegendApplicationDocumentation.ts +0 -0
  260. /package/src/{application → __lib__}/LegendApplicationSetting.ts +0 -0
  261. /package/src/{application → __lib__}/LegendApplicationTheme.ts +0 -0
@@ -1,93 +0,0 @@
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
- import { assertNonNullable, assertTrue, swapEntry, uuid, } from '@finos/legend-shared';
17
- import { action, makeObservable, observable } from 'mobx';
18
- export class TabState {
19
- uuid = uuid();
20
- get description() {
21
- return undefined;
22
- }
23
- match(tab) {
24
- return this === tab;
25
- }
26
- onOpen() {
27
- // do nothing
28
- }
29
- onClose() {
30
- // do nothing
31
- }
32
- }
33
- export class TabManagerState {
34
- currentTab;
35
- tabs = [];
36
- constructor() {
37
- makeObservable(this, {
38
- currentTab: observable,
39
- tabs: observable,
40
- setCurrentTab: action,
41
- closeTab: action,
42
- closeAllTabs: action,
43
- closeAllOtherTabs: action,
44
- openTab: action,
45
- swapTabs: action,
46
- });
47
- }
48
- setCurrentTab(val) {
49
- this.currentTab = val;
50
- }
51
- closeAllOtherTabs(tab) {
52
- assertNonNullable(this.tabs.find((e) => e === tab), 'Specified tab should be currently opened');
53
- this.setCurrentTab(tab);
54
- this.tabs = [tab];
55
- }
56
- closeAllTabs() {
57
- this.setCurrentTab(undefined);
58
- this.tabs = [];
59
- }
60
- swapTabs(tab1, tab2) {
61
- swapEntry(this.tabs, tab1, tab2);
62
- }
63
- openTab(tab) {
64
- const existingTab = this.tabs.find((t) => t.match(tab));
65
- if (!existingTab) {
66
- if (this.currentTab) {
67
- const currIndex = this.tabs.findIndex((e) => e === this.currentTab);
68
- this.tabs.splice(currIndex + 1, 0, tab);
69
- }
70
- else {
71
- this.tabs.push(tab);
72
- }
73
- }
74
- this.setCurrentTab(tab);
75
- tab.onOpen();
76
- }
77
- closeTab(tab) {
78
- const tabIndex = this.tabs.findIndex((t) => t.match(tab));
79
- assertTrue(tabIndex !== -1, `Can't close a tab which is not opened`);
80
- this.tabs.splice(tabIndex, 1);
81
- if (this.currentTab === tab) {
82
- if (this.tabs.length) {
83
- const openIndex = tabIndex - 1;
84
- this.setCurrentTab(openIndex >= 0 ? this.tabs[openIndex] : this.tabs[0]);
85
- }
86
- else {
87
- this.setCurrentTab(undefined);
88
- }
89
- }
90
- tab.onClose();
91
- }
92
- }
93
- //# sourceMappingURL=TabManagerState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabManagerState.js","sourceRoot":"","sources":["../../../src/stores/shared/TabManagerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,IAAI,GACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE1D,MAAM,OAAgB,QAAQ;IACnB,IAAI,GAAG,IAAI,EAAE,CAAC;IAIvB,IAAI,W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,EAAE,CAAC;IAChB,CAAC;CACF"}
@@ -1,59 +0,0 @@
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
-
17
- import { createMemoryHistory } from 'history';
18
- import { ApplicationStore } from '../stores/ApplicationStore.js';
19
- import { WebApplicationNavigator } from '../stores/navigation/WebApplicationNavigator.js';
20
- import type { LegendApplicationConfig } from '../application/LegendApplicationConfig.js';
21
- import { ApplicationStoreProvider } from './ApplicationStoreProvider.js';
22
- import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager.js';
23
- import type { LegendApplicationPlugin } from '../stores/LegendApplicationPlugin.js';
24
- import { createMock } from '@finos/legend-shared';
25
-
26
- export const TEST__ApplicationStoreProvider: React.FC<{
27
- children: React.ReactNode;
28
- config: LegendApplicationConfig;
29
- pluginManager: LegendApplicationPluginManager<LegendApplicationPlugin>;
30
- }> = ({ children, config, pluginManager }) => (
31
- <ApplicationStoreProvider config={config} pluginManager={pluginManager}>
32
- {children}
33
- </ApplicationStoreProvider>
34
- );
35
-
36
- export const TEST__provideMockedApplicationStore = <
37
- T extends LegendApplicationConfig,
38
- V extends LegendApplicationPluginManager<LegendApplicationPlugin>,
39
- >(
40
- config: T,
41
- pluginManager: V,
42
- customization?: {
43
- mock?: ApplicationStore<T, V>;
44
- navigator?: WebApplicationNavigator;
45
- },
46
- ): ApplicationStore<T, V> => {
47
- const value =
48
- customization?.mock ??
49
- new ApplicationStore(
50
- config,
51
- customization?.navigator ??
52
- new WebApplicationNavigator(createMemoryHistory()),
53
- pluginManager,
54
- );
55
- const MOCK__ApplicationStoreProvider = require('./ApplicationStoreProvider.js'); // eslint-disable-line @typescript-eslint/no-unsafe-assignment
56
- MOCK__ApplicationStoreProvider.useApplicationStore = createMock();
57
- MOCK__ApplicationStoreProvider.useApplicationStore.mockReturnValue(value);
58
- return value;
59
- };
@@ -1,46 +0,0 @@
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
-
17
- import { guaranteeNonNullable } from '@finos/legend-shared';
18
- import { useLocalObservable } from 'mobx-react-lite';
19
- import { createContext, useContext } from 'react';
20
- import type { History } from 'history';
21
- import { WebApplicationNavigator } from '../stores/navigation/WebApplicationNavigator.js';
22
- import { useHistory } from 'react-router';
23
-
24
- const WebApplicationNavigatorContext = createContext<
25
- WebApplicationNavigator | undefined
26
- >(undefined);
27
-
28
- export const WebApplicationNavigatorProvider: React.FC<{
29
- children: React.ReactNode;
30
- }> = ({ children }) => {
31
- const history = useHistory() as History;
32
- const navigator = useLocalObservable(
33
- () => new WebApplicationNavigator(history),
34
- );
35
- return (
36
- <WebApplicationNavigatorContext.Provider value={navigator}>
37
- {children}
38
- </WebApplicationNavigatorContext.Provider>
39
- );
40
- };
41
-
42
- export const useWebApplicationNavigator = (): WebApplicationNavigator =>
43
- guaranteeNonNullable(
44
- useContext(WebApplicationNavigatorContext),
45
- `Can't find web application navigator in context`,
46
- );
@@ -1,37 +0,0 @@
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
-
17
- import { WebApplicationNavigator } from '../stores/navigation/WebApplicationNavigator.js';
18
- import { createMemoryHistory, type History } from 'history';
19
- import { createMock } from '@finos/legend-shared';
20
-
21
- export const TEST__provideMockedWebApplicationNavigator = (customization?: {
22
- mock?: WebApplicationNavigator;
23
- history?: History;
24
- }): WebApplicationNavigator => {
25
- const value =
26
- customization?.mock ??
27
- new WebApplicationNavigator(
28
- customization?.history ?? createMemoryHistory(),
29
- );
30
- const MOCK__WebApplicationNavigatorProvider = require('./WebApplicationNavigatorProvider.js'); // eslint-disable-line @typescript-eslint/no-unsafe-assignment
31
- MOCK__WebApplicationNavigatorProvider.useWebApplicationNavigator =
32
- createMock();
33
- MOCK__WebApplicationNavigatorProvider.useWebApplicationNavigator.mockReturnValue(
34
- value,
35
- );
36
- return value;
37
- };
@@ -1,87 +0,0 @@
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
-
17
- import { clsx, QuestionCircleIcon } from '@finos/legend-art';
18
- import { useApplicationStore } from '../ApplicationStoreProvider.js';
19
- import { shouldDisplayVirtualAssistantDocumentationEntry } from '../../stores/AssistantService.js';
20
-
21
- export const DocumentationLink: React.FC<{
22
- documentationKey: string;
23
- className?: string | undefined;
24
- }> = (props) => {
25
- const { documentationKey, className } = props;
26
- const applicationStore = useApplicationStore();
27
- const documentationEntry =
28
- applicationStore.documentationService.getDocEntry(documentationKey);
29
- const openDocLink: React.MouseEventHandler<HTMLDivElement> = (
30
- event,
31
- ): void => {
32
- event.preventDefault();
33
- event.stopPropagation();
34
- if (documentationEntry) {
35
- if (shouldDisplayVirtualAssistantDocumentationEntry(documentationEntry)) {
36
- applicationStore.assistantService.openDocumentationEntry(
37
- documentationKey,
38
- );
39
- } else if (documentationEntry.url) {
40
- applicationStore.navigationService.navigator.visitAddress(
41
- documentationEntry.url,
42
- );
43
- }
44
- }
45
- };
46
-
47
- if (
48
- !documentationEntry ||
49
- (!documentationEntry.url &&
50
- !shouldDisplayVirtualAssistantDocumentationEntry(documentationEntry))
51
- ) {
52
- return null;
53
- }
54
- return (
55
- <div
56
- onClick={openDocLink}
57
- title="Click to see documentation"
58
- className={clsx('documentation-link', className)}
59
- >
60
- <QuestionCircleIcon />
61
- </div>
62
- );
63
- };
64
-
65
- export const DocumentationPreview: React.FC<{
66
- text?: string | undefined;
67
- documentationKey: string;
68
- className?: string | undefined;
69
- }> = (props) => {
70
- const { documentationKey, text, className } = props;
71
- const applicationStore = useApplicationStore();
72
- const documentationEntry =
73
- applicationStore.documentationService.getDocEntry(documentationKey);
74
- const textContent = text ?? documentationEntry?.text;
75
-
76
- if (!documentationEntry || !textContent) {
77
- return null;
78
- }
79
- return (
80
- <div className={clsx('documentation-preview', className)}>
81
- <div className="documentation-preview__text">{textContent}</div>
82
- <div className="documentation-preview__hint">
83
- <DocumentationLink documentationKey={documentationKey} />
84
- </div>
85
- </div>
86
- );
87
- };
@@ -1,73 +0,0 @@
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
-
17
- import { BaseRadioGroup, InfoCircleIcon } from '@finos/legend-art';
18
- import { observer } from 'mobx-react-lite';
19
- import {
20
- ADVANCED_FUZZY_SEARCH_MODE,
21
- type FuzzySearchAdvancedConfigState,
22
- } from '../../stores/shared/FuzzySearchAdvancedConfigState.js';
23
- import { LEGEND_APPLICATION_DOCUMENTATION_KEY } from '../../application/LegendApplicationDocumentation.js';
24
- import { useApplicationStore } from '../ApplicationStoreProvider.js';
25
-
26
- export const FuzzySearchAdvancedConfigMenu = observer(
27
- (props: { configState: FuzzySearchAdvancedConfigState }) => {
28
- const { configState } = props;
29
- const applicationStore = useApplicationStore();
30
-
31
- const handleSearchMode: React.ChangeEventHandler<HTMLInputElement> = (
32
- event,
33
- ): void => {
34
- const searchMode = event.target.value as ADVANCED_FUZZY_SEARCH_MODE;
35
- configState.setCurrentMode(searchMode);
36
- };
37
- const seeDocumentation = (): void =>
38
- applicationStore.assistantService.openDocumentationEntry(
39
- LEGEND_APPLICATION_DOCUMENTATION_KEY.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX,
40
- );
41
-
42
- return (
43
- <div className="fuzzy-search__advanced-config__panel">
44
- <div className="fuzzy-search__advanced-config__panel__header__label">
45
- search config
46
- <button
47
- className="fuzzy-search__advanced-config__panel__header__hint"
48
- tabIndex={-1}
49
- onClick={seeDocumentation}
50
- title="Click to see more details on advanced search"
51
- >
52
- <InfoCircleIcon />
53
- </button>
54
- </div>
55
- <div>
56
- <BaseRadioGroup
57
- className="text-search-advanced-config__options"
58
- value={configState.currentMode}
59
- onChange={handleSearchMode}
60
- row={false}
61
- options={[
62
- ADVANCED_FUZZY_SEARCH_MODE.STANDARD,
63
- ADVANCED_FUZZY_SEARCH_MODE.INCLUDE,
64
- ADVANCED_FUZZY_SEARCH_MODE.EXACT,
65
- ADVANCED_FUZZY_SEARCH_MODE.INVERSE,
66
- ]}
67
- size={1}
68
- />
69
- </div>
70
- </div>
71
- );
72
- },
73
- );
@@ -1,85 +0,0 @@
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
-
17
- import {
18
- type PackageableElement,
19
- isSystemElement,
20
- isGeneratedElement,
21
- isDependencyElement,
22
- type PureModel,
23
- } from '@finos/legend-graph';
24
- import type { PackageableElementOption } from '../../stores/shared/PackageableElementOption.js';
25
-
26
- const getElementColorCode = (
27
- element: PackageableElement,
28
- graph: PureModel | undefined,
29
- ): string =>
30
- graph
31
- ? isSystemElement(element)
32
- ? 'system'
33
- : isGeneratedElement(element)
34
- ? 'generated'
35
- : isDependencyElement(element, graph)
36
- ? 'dependency'
37
- : ''
38
- : '';
39
-
40
- const generateOptionTooltipText = (
41
- element: PackageableElement,
42
- graph: PureModel | undefined,
43
- ): string | undefined =>
44
- graph
45
- ? isSystemElement(element)
46
- ? 'system element'
47
- : isGeneratedElement(element)
48
- ? 'generated element'
49
- : isDependencyElement(element, graph)
50
- ? 'dependency element'
51
- : undefined
52
- : undefined;
53
-
54
- export const getPackageableElementOptionFormatter = (props: {
55
- darkMode?: boolean | undefined;
56
- graph?: PureModel | undefined;
57
- }): ((
58
- option: PackageableElementOption<PackageableElement>,
59
- ) => React.ReactNode) =>
60
- function PackageableElementOptionLabel(
61
- option: PackageableElementOption<PackageableElement>,
62
- ): React.ReactNode {
63
- const { darkMode, graph } = props;
64
- const className = darkMode
65
- ? 'packageable-element-option-label--dark'
66
- : 'packageable-element-option-label';
67
- const colorCode = getElementColorCode(option.value, graph);
68
-
69
- return (
70
- <div className={className}>
71
- <div
72
- title={generateOptionTooltipText(option.value, graph)}
73
- className={`packageable-element-option-label__type ${
74
- colorCode
75
- ? `packageable-element-option-label__type--${colorCode}`
76
- : ''
77
- } `}
78
- ></div>
79
- <div className={`${className}__name`}>{option.label}</div>
80
- {option.value.package && (
81
- <div className={`${className}__tag`}>{option.value.path}</div>
82
- )}
83
- </div>
84
- );
85
- };