@finos/legend-application-query 11.0.16 → 12.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 (149) hide show
  1. package/lib/__lib__/LegendQueryApplicationNavigationContext.d.ts.map +1 -0
  2. package/lib/__lib__/LegendQueryApplicationNavigationContext.js.map +1 -0
  3. package/lib/__lib__/LegendQueryEvent.d.ts.map +1 -0
  4. package/lib/__lib__/LegendQueryEvent.js.map +1 -0
  5. package/lib/__lib__/LegendQueryEventHelper.d.ts.map +1 -0
  6. package/lib/__lib__/LegendQueryEventHelper.js.map +1 -0
  7. package/lib/__lib__/LegendQueryNavigation.d.ts.map +1 -0
  8. package/lib/{application → __lib__}/LegendQueryNavigation.js +4 -4
  9. package/lib/__lib__/LegendQueryNavigation.js.map +1 -0
  10. package/lib/{application → __lib__}/LegendQueryTelemetryHelper.d.ts +2 -0
  11. package/lib/__lib__/LegendQueryTelemetryHelper.d.ts.map +1 -0
  12. package/lib/{application → __lib__}/LegendQueryTelemetryHelper.js +4 -0
  13. package/lib/__lib__/LegendQueryTelemetryHelper.js.map +1 -0
  14. package/lib/application/LegendQuery.d.ts +2 -1
  15. package/lib/application/LegendQuery.d.ts.map +1 -1
  16. package/lib/application/LegendQuery.js +4 -6
  17. package/lib/application/LegendQuery.js.map +1 -1
  18. package/lib/application/LegendQueryApplicationConfig.d.ts +1 -0
  19. package/lib/application/LegendQueryApplicationConfig.d.ts.map +1 -1
  20. package/lib/application/LegendQueryApplicationConfig.js +3 -0
  21. package/lib/application/LegendQueryApplicationConfig.js.map +1 -1
  22. package/lib/components/CloneQueryServiceSetup.d.ts.map +1 -1
  23. package/lib/components/CloneQueryServiceSetup.js +5 -5
  24. package/lib/components/CloneQueryServiceSetup.js.map +1 -1
  25. package/lib/components/Core_LegendQueryApplicationPlugin.d.ts.map +1 -1
  26. package/lib/components/Core_LegendQueryApplicationPlugin.js +11 -7
  27. package/lib/components/Core_LegendQueryApplicationPlugin.js.map +1 -1
  28. package/lib/components/CreateMappingQuerySetup.d.ts.map +1 -1
  29. package/lib/components/CreateMappingQuerySetup.js +7 -6
  30. package/lib/components/CreateMappingQuerySetup.js.map +1 -1
  31. package/lib/components/EditExistingQuerySetup.d.ts.map +1 -1
  32. package/lib/components/EditExistingQuerySetup.js +6 -7
  33. package/lib/components/EditExistingQuerySetup.js.map +1 -1
  34. package/lib/components/{LegendQueryBaseStoreProvider.d.ts → LegendQueryFrameworkProvider.d.ts} +3 -3
  35. package/lib/components/LegendQueryFrameworkProvider.d.ts.map +1 -0
  36. package/lib/components/{LegendQueryBaseStoreProvider.js → LegendQueryFrameworkProvider.js} +5 -6
  37. package/lib/components/LegendQueryFrameworkProvider.js.map +1 -0
  38. package/lib/components/{LegendQueryApplication.d.ts → LegendQueryWebApplication.d.ts} +3 -4
  39. package/lib/components/LegendQueryWebApplication.d.ts.map +1 -0
  40. package/lib/components/LegendQueryWebApplication.js +42 -0
  41. package/lib/components/LegendQueryWebApplication.js.map +1 -0
  42. package/lib/components/LoadProjectServiceQuerySetup.d.ts.map +1 -1
  43. package/lib/components/LoadProjectServiceQuerySetup.js +4 -5
  44. package/lib/components/LoadProjectServiceQuerySetup.js.map +1 -1
  45. package/lib/components/QueryEditor.js +4 -3
  46. package/lib/components/QueryEditor.js.map +1 -1
  47. package/lib/components/QueryEditorStoreProvider.d.ts.map +1 -1
  48. package/lib/components/QueryEditorStoreProvider.js +7 -8
  49. package/lib/components/QueryEditorStoreProvider.js.map +1 -1
  50. package/lib/components/QueryProductionizerSetup.d.ts.map +1 -1
  51. package/lib/components/QueryProductionizerSetup.js +6 -7
  52. package/lib/components/QueryProductionizerSetup.js.map +1 -1
  53. package/lib/components/QuerySetup.js +2 -2
  54. package/lib/components/QuerySetup.js.map +1 -1
  55. package/lib/components/UpdateExistingServiceQuerySetup.d.ts.map +1 -1
  56. package/lib/components/UpdateExistingServiceQuerySetup.js +4 -5
  57. package/lib/components/UpdateExistingServiceQuerySetup.js.map +1 -1
  58. package/lib/components/{QueryEditorComponentTestUtils.d.ts → __test-utils__/QueryEditorComponentTestUtils.d.ts} +3 -9
  59. package/lib/components/__test-utils__/QueryEditorComponentTestUtils.d.ts.map +1 -0
  60. package/lib/components/{QueryEditorComponentTestUtils.js → __test-utils__/QueryEditorComponentTestUtils.js} +17 -23
  61. package/lib/components/__test-utils__/QueryEditorComponentTestUtils.js.map +1 -0
  62. package/lib/index.css +1 -1
  63. package/lib/index.d.ts +4 -4
  64. package/lib/index.d.ts.map +1 -1
  65. package/lib/index.js +4 -4
  66. package/lib/index.js.map +1 -1
  67. package/lib/package.json +2 -2
  68. package/lib/stores/CloneServiceQuerySetupStore.js +1 -1
  69. package/lib/stores/CloneServiceQuerySetupStore.js.map +1 -1
  70. package/lib/stores/CreateMappingQuerySetupStore.js +1 -1
  71. package/lib/stores/CreateMappingQuerySetupStore.js.map +1 -1
  72. package/lib/stores/LegendQueryBaseStore.d.ts +2 -2
  73. package/lib/stores/LegendQueryBaseStore.d.ts.map +1 -1
  74. package/lib/stores/LegendQueryBaseStore.js +6 -3
  75. package/lib/stores/LegendQueryBaseStore.js.map +1 -1
  76. package/lib/stores/LoadProjectServiceQuerySetupStore.js +1 -1
  77. package/lib/stores/LoadProjectServiceQuerySetupStore.js.map +1 -1
  78. package/lib/stores/QueryEditorStore.d.ts.map +1 -1
  79. package/lib/stores/QueryEditorStore.js +10 -8
  80. package/lib/stores/QueryEditorStore.js.map +1 -1
  81. package/lib/stores/QueryProductionizerSetupStore.js +1 -1
  82. package/lib/stores/QueryProductionizerSetupStore.js.map +1 -1
  83. package/lib/stores/QuerySetupStore.js +4 -4
  84. package/lib/stores/QuerySetupStore.js.map +1 -1
  85. package/lib/stores/UpdateExistingServiceQuerySetupStore.js +1 -1
  86. package/lib/stores/UpdateExistingServiceQuerySetupStore.js.map +1 -1
  87. package/lib/stores/{QueryEditorStoreTestUtils.d.ts → __test-utils__/LegendQueryApplicationTestUtils.d.ts} +2 -2
  88. package/lib/stores/__test-utils__/LegendQueryApplicationTestUtils.d.ts.map +1 -0
  89. package/lib/stores/{QueryEditorStoreTestUtils.js → __test-utils__/LegendQueryApplicationTestUtils.js} +5 -5
  90. package/lib/stores/__test-utils__/LegendQueryApplicationTestUtils.js.map +1 -0
  91. package/package.json +11 -11
  92. package/src/{application → __lib__}/LegendQueryNavigation.ts +4 -4
  93. package/src/{application → __lib__}/LegendQueryTelemetryHelper.ts +14 -0
  94. package/src/application/LegendQuery.tsx +10 -17
  95. package/src/application/LegendQueryApplicationConfig.ts +4 -0
  96. package/src/components/CloneQueryServiceSetup.tsx +11 -5
  97. package/src/components/Core_LegendQueryApplicationPlugin.tsx +13 -7
  98. package/src/components/CreateMappingQuerySetup.tsx +16 -10
  99. package/src/components/EditExistingQuerySetup.tsx +16 -10
  100. package/src/components/{LegendQueryBaseStoreProvider.tsx → LegendQueryFrameworkProvider.tsx} +11 -4
  101. package/src/components/LegendQueryWebApplication.tsx +117 -0
  102. package/src/components/LoadProjectServiceQuerySetup.tsx +7 -5
  103. package/src/components/QueryEditor.tsx +3 -3
  104. package/src/components/QueryEditorStoreProvider.tsx +10 -8
  105. package/src/components/QueryProductionizerSetup.tsx +14 -9
  106. package/src/components/QuerySetup.tsx +2 -2
  107. package/src/components/UpdateExistingServiceQuerySetup.tsx +7 -5
  108. package/src/components/{QueryEditorComponentTestUtils.tsx → __test-utils__/QueryEditorComponentTestUtils.tsx} +30 -63
  109. package/src/index.ts +9 -4
  110. package/src/stores/CloneServiceQuerySetupStore.ts +1 -1
  111. package/src/stores/CreateMappingQuerySetupStore.ts +1 -1
  112. package/src/stores/LegendQueryBaseStore.ts +6 -7
  113. package/src/stores/LoadProjectServiceQuerySetupStore.ts +1 -1
  114. package/src/stores/QueryEditorStore.ts +11 -9
  115. package/src/stores/QueryProductionizerSetupStore.ts +1 -1
  116. package/src/stores/QuerySetupStore.ts +4 -4
  117. package/src/stores/UpdateExistingServiceQuerySetupStore.ts +1 -1
  118. package/src/stores/{QueryEditorStoreTestUtils.ts → __test-utils__/LegendQueryApplicationTestUtils.ts} +4 -4
  119. package/tsconfig.json +10 -10
  120. package/lib/application/LegendQueryApplicationNavigationContext.d.ts.map +0 -1
  121. package/lib/application/LegendQueryApplicationNavigationContext.js.map +0 -1
  122. package/lib/application/LegendQueryEvent.d.ts.map +0 -1
  123. package/lib/application/LegendQueryEvent.js.map +0 -1
  124. package/lib/application/LegendQueryEventHelper.d.ts.map +0 -1
  125. package/lib/application/LegendQueryEventHelper.js.map +0 -1
  126. package/lib/application/LegendQueryNavigation.d.ts.map +0 -1
  127. package/lib/application/LegendQueryNavigation.js.map +0 -1
  128. package/lib/application/LegendQueryTelemetryHelper.d.ts.map +0 -1
  129. package/lib/application/LegendQueryTelemetryHelper.js.map +0 -1
  130. package/lib/components/LegendQueryApplication.d.ts.map +0 -1
  131. package/lib/components/LegendQueryApplication.js +0 -49
  132. package/lib/components/LegendQueryApplication.js.map +0 -1
  133. package/lib/components/LegendQueryBaseStoreProvider.d.ts.map +0 -1
  134. package/lib/components/LegendQueryBaseStoreProvider.js.map +0 -1
  135. package/lib/components/QueryEditorComponentTestUtils.d.ts.map +0 -1
  136. package/lib/components/QueryEditorComponentTestUtils.js.map +0 -1
  137. package/lib/stores/QueryEditorStoreTestUtils.d.ts.map +0 -1
  138. package/lib/stores/QueryEditorStoreTestUtils.js.map +0 -1
  139. package/src/components/LegendQueryApplication.tsx +0 -133
  140. /package/lib/{application → __lib__}/LegendQueryApplicationNavigationContext.d.ts +0 -0
  141. /package/lib/{application → __lib__}/LegendQueryApplicationNavigationContext.js +0 -0
  142. /package/lib/{application → __lib__}/LegendQueryEvent.d.ts +0 -0
  143. /package/lib/{application → __lib__}/LegendQueryEvent.js +0 -0
  144. /package/lib/{application → __lib__}/LegendQueryEventHelper.d.ts +0 -0
  145. /package/lib/{application → __lib__}/LegendQueryEventHelper.js +0 -0
  146. /package/lib/{application → __lib__}/LegendQueryNavigation.d.ts +0 -0
  147. /package/src/{application → __lib__}/LegendQueryApplicationNavigationContext.ts +0 -0
  148. /package/src/{application → __lib__}/LegendQueryEvent.ts +0 -0
  149. /package/src/{application → __lib__}/LegendQueryEventHelper.ts +0 -0
@@ -1,133 +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 { observer } from 'mobx-react-lite';
18
- import { LEGEND_QUERY_ROUTE_PATTERN } from '../application/LegendQueryNavigation.js';
19
- import { QuerySetupLandingPage } from './QuerySetup.js';
20
- import {
21
- MappingQueryCreator,
22
- ExistingQueryEditor,
23
- ServiceQueryCreator,
24
- } from './QueryEditor.js';
25
- import { DepotServerClientProvider } from '@finos/legend-server-depot';
26
- import {
27
- generateExtensionUrlPattern,
28
- LegendApplicationComponentFrameworkProvider,
29
- Redirect,
30
- Route,
31
- Switch,
32
- } from '@finos/legend-application';
33
- import type { LegendQueryApplicationConfig } from '../application/LegendQueryApplicationConfig.js';
34
- import {
35
- LegendQueryBaseStoreProvider,
36
- useLegendQueryApplicationStore,
37
- useLegendQueryBaseStore,
38
- } from './LegendQueryBaseStoreProvider.js';
39
- import { EditExistingQuerySetup } from './EditExistingQuerySetup.js';
40
- import { CreateMappingQuerySetup } from './CreateMappingQuerySetup.js';
41
- import { useEffect } from 'react';
42
- import { flowResult } from 'mobx';
43
- import { PanelLoadingIndicator } from '@finos/legend-art';
44
-
45
- const LegendQueryApplicationRoot = observer(() => {
46
- const applicationStore = useLegendQueryApplicationStore();
47
- const baseStore = useLegendQueryBaseStore();
48
-
49
- const extraApplicationPageEntries = applicationStore.pluginManager
50
- .getApplicationPlugins()
51
- .flatMap((plugin) => plugin.getExtraApplicationPageEntries?.() ?? []);
52
-
53
- useEffect(() => {
54
- flowResult(baseStore.initialize()).catch(
55
- applicationStore.alertUnhandledError,
56
- );
57
- }, [applicationStore, baseStore]);
58
-
59
- if (baseStore.initState.isInProgress) {
60
- return (
61
- <div className="app">
62
- <div className="app__page">
63
- <PanelLoadingIndicator isLoading={true} />
64
- </div>
65
- </div>
66
- );
67
- }
68
- return (
69
- <div className="app">
70
- <Switch>
71
- <Route
72
- exact={true}
73
- path={LEGEND_QUERY_ROUTE_PATTERN.SETUP}
74
- component={QuerySetupLandingPage}
75
- />
76
- <Route
77
- exact={true}
78
- path={LEGEND_QUERY_ROUTE_PATTERN.EDIT_EXISTING_QUERY_SETUP}
79
- component={EditExistingQuerySetup}
80
- />
81
- <Route
82
- exact={true}
83
- path={LEGEND_QUERY_ROUTE_PATTERN.CREATE_MAPPING_QUERY_SETUP}
84
- component={CreateMappingQuerySetup}
85
- />
86
- <Route
87
- exact={true}
88
- path={LEGEND_QUERY_ROUTE_PATTERN.EDIT_EXISTING_QUERY}
89
- component={ExistingQueryEditor}
90
- />
91
- <Route
92
- exact={true}
93
- path={LEGEND_QUERY_ROUTE_PATTERN.CREATE_FROM_SERVICE_QUERY}
94
- component={ServiceQueryCreator}
95
- />
96
- <Route
97
- exact={true}
98
- path={LEGEND_QUERY_ROUTE_PATTERN.CREATE_FROM_MAPPING_QUERY}
99
- component={MappingQueryCreator}
100
- />
101
- {extraApplicationPageEntries.map((entry) => (
102
- <Route
103
- key={entry.key}
104
- exact={true}
105
- path={entry.urlPatterns.map(generateExtensionUrlPattern)}
106
- component={entry.renderer as React.ComponentType<unknown>}
107
- />
108
- ))}
109
- <Redirect to={LEGEND_QUERY_ROUTE_PATTERN.SETUP} />
110
- </Switch>
111
- </div>
112
- );
113
- });
114
-
115
- export const LegendQueryApplication = observer(
116
- (props: { config: LegendQueryApplicationConfig }) => {
117
- const { config } = props;
118
-
119
- return (
120
- <DepotServerClientProvider
121
- config={{
122
- serverUrl: config.depotServerUrl,
123
- }}
124
- >
125
- <LegendQueryBaseStoreProvider>
126
- <LegendApplicationComponentFrameworkProvider>
127
- <LegendQueryApplicationRoot />
128
- </LegendApplicationComponentFrameworkProvider>
129
- </LegendQueryBaseStoreProvider>
130
- </DepotServerClientProvider>
131
- );
132
- },
133
- );