@finos/legend-application 0.1.2 → 1.0.1
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.
- package/CHANGELOG.md +20 -0
- package/lib/application/LegendApplication.d.ts +23 -11
- package/lib/application/LegendApplication.d.ts.map +1 -1
- package/lib/application/LegendApplication.js +28 -14
- package/lib/application/LegendApplication.js.map +1 -1
- package/lib/application/LegendApplicationPluginManager.d.ts +32 -0
- package/lib/application/LegendApplicationPluginManager.d.ts.map +1 -0
- package/lib/application/LegendApplicationPluginManager.js +47 -0
- package/lib/application/LegendApplicationPluginManager.js.map +1 -0
- package/lib/components/ActionAlert.js +4 -4
- package/lib/components/ActionAlert.js.map +1 -1
- package/lib/{network/TelemetryEvent.d.ts → components/AppHeader.d.ts} +5 -4
- package/lib/components/AppHeader.d.ts.map +1 -0
- package/lib/components/AppHeader.js +26 -0
- package/lib/components/AppHeader.js.map +1 -0
- package/lib/components/ApplicationStoreProvider.d.ts +3 -5
- package/lib/components/ApplicationStoreProvider.d.ts.map +1 -1
- package/lib/components/ApplicationStoreProvider.js +5 -3
- package/lib/components/ApplicationStoreProvider.js.map +1 -1
- package/lib/components/ApplicationStoreProviderTestUtils.d.ts +6 -3
- package/lib/components/ApplicationStoreProviderTestUtils.d.ts.map +1 -1
- package/lib/components/ApplicationStoreProviderTestUtils.js +3 -4
- package/lib/components/ApplicationStoreProviderTestUtils.js.map +1 -1
- package/lib/components/BlockingAlert.js +2 -2
- package/lib/components/BlockingAlert.js.map +1 -1
- package/lib/components/LambdaEditor.js +8 -8
- package/lib/components/LambdaEditor.js.map +1 -1
- package/lib/components/NotificationSnackbar.js +12 -12
- package/lib/components/NotificationSnackbar.js.map +1 -1
- package/lib/components/TextInputEditor.js +1 -1
- package/lib/components/TextInputEditor.js.map +1 -1
- package/lib/components/WebApplicationNavigatorProvider.d.ts +3 -2
- package/lib/components/WebApplicationNavigatorProvider.d.ts.map +1 -1
- package/lib/components/WebApplicationNavigatorProvider.js +2 -2
- package/lib/components/WebApplicationNavigatorProvider.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/stores/ApplicationStore.d.ts +8 -3
- package/lib/stores/ApplicationStore.d.ts.map +1 -1
- package/lib/stores/ApplicationStore.js +11 -4
- package/lib/stores/ApplicationStore.js.map +1 -1
- package/lib/stores/ApplicationStoreTestUtils.d.ts +2 -1
- package/lib/stores/ApplicationStoreTestUtils.d.ts.map +1 -1
- package/lib/stores/ApplicationStoreTestUtils.js +1 -2
- package/lib/stores/ApplicationStoreTestUtils.js.map +1 -1
- package/lib/stores/WebApplicationNavigator.d.ts +21 -0
- package/lib/stores/WebApplicationNavigator.d.ts.map +1 -1
- package/lib/stores/WebApplicationNavigator.js.map +1 -1
- package/package.json +13 -13
- package/src/application/LegendApplication.tsx +57 -27
- package/src/application/LegendApplicationPluginManager.tsx +73 -0
- package/src/components/AppHeader.tsx +47 -0
- package/src/components/ApplicationStoreProvider.tsx +6 -7
- package/src/components/ApplicationStoreProviderTestUtils.tsx +7 -12
- package/src/components/WebApplicationNavigatorProvider.tsx +2 -4
- package/src/index.ts +2 -2
- package/src/stores/ApplicationStore.ts +26 -4
- package/src/stores/ApplicationStoreTestUtils.ts +3 -2
- package/src/stores/WebApplicationNavigator.ts +21 -0
- package/tsconfig.json +2 -6
- package/lib/network/TelemetryEvent.d.ts.map +0 -1
- package/lib/network/TelemetryEvent.js +0 -20
- package/lib/network/TelemetryEvent.js.map +0 -1
- package/src/network/TelemetryEvent.ts +0 -19
- package/tsconfig.package.json +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @finos/legend-application
|
|
2
2
|
|
|
3
|
+
## 1.0.1
|
|
4
|
+
|
|
5
|
+
## 1.0.0
|
|
6
|
+
|
|
7
|
+
### Major Changes
|
|
8
|
+
|
|
9
|
+
- [#707](https://github.com/finos/legend-studio/pull/707) [`5d9912d9`](https://github.com/finos/legend-studio/commit/5d9912d9a2c883e23d8852325a25fe59ae7597b1) ([@akphi](https://github.com/akphi)) - **BREAKING CHANGE:** Loggers are now considered as plugins, as such, we nolonger expose `.withLoggers()` when booting the application.
|
|
10
|
+
|
|
11
|
+
* [#707](https://github.com/finos/legend-studio/pull/707) [`5d9912d9`](https://github.com/finos/legend-studio/commit/5d9912d9a2c883e23d8852325a25fe59ae7597b1) ([@akphi](https://github.com/akphi)) - **BREAKING CHANGE:** Create a new abstract class `LegendApplicationPluginManager` that contains plugins that is relevant at application level, such as `telemetry`, `tracer`, `logger`, etc. Now all specific Legend applications plugin manager must extend this class, e.g. `LegendStudioPluginManager extends LegendApplicationPluginManager`.
|
|
12
|
+
|
|
13
|
+
## 0.2.2
|
|
14
|
+
|
|
15
|
+
## 0.2.1
|
|
16
|
+
|
|
17
|
+
## 0.2.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- [#692](https://github.com/finos/legend-studio/pull/692) [`caab0e67`](https://github.com/finos/legend-studio/commit/caab0e6772181e514b246fe6030a02e7169952cc) ([@akphi](https://github.com/akphi)) - Add `AppHeader` component.
|
|
22
|
+
|
|
3
23
|
## 0.1.2
|
|
4
24
|
|
|
5
25
|
## 0.1.1
|
|
@@ -14,35 +14,47 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { LegendApplicationConfig, LegendApplicationConfigurationData, LegendApplicationVersionData } from '../stores/ApplicationConfig';
|
|
17
|
-
import type { AbstractPlugin,
|
|
18
|
-
import {
|
|
17
|
+
import type { AbstractPlugin, AbstractPreset } from '@finos/legend-shared';
|
|
18
|
+
import { LogEvent } from '@finos/legend-shared';
|
|
19
19
|
import type { GraphPluginManager } from '@finos/legend-graph';
|
|
20
|
+
import type { LegendApplicationPluginManager } from './LegendApplicationPluginManager';
|
|
21
|
+
export declare abstract class LegendApplicationLogger {
|
|
22
|
+
abstract debug(event: LogEvent, ...data: unknown[]): void;
|
|
23
|
+
abstract info(event: LogEvent, ...data: unknown[]): void;
|
|
24
|
+
abstract warn(event: LogEvent, ...data: unknown[]): void;
|
|
25
|
+
abstract error(event: LogEvent, ...data: unknown[]): void;
|
|
26
|
+
}
|
|
27
|
+
export declare class LegendApplicationWebConsole extends LegendApplicationLogger {
|
|
28
|
+
debug(event: LogEvent, ...data: unknown[]): void;
|
|
29
|
+
info(event: LogEvent, ...data: unknown[]): void;
|
|
30
|
+
warn(event: LogEvent, ...data: unknown[]): void;
|
|
31
|
+
error(event: LogEvent, ...data: unknown[]): void;
|
|
32
|
+
}
|
|
20
33
|
export declare const setupTextEdtiorAPI: (pluginManager: GraphPluginManager) => void;
|
|
21
|
-
export declare const setupLegendApplicationUILibrary: (pluginManager: GraphPluginManager,
|
|
34
|
+
export declare const setupLegendApplicationUILibrary: (pluginManager: GraphPluginManager, logger: LegendApplicationLogger) => Promise<void>;
|
|
22
35
|
export declare abstract class LegendApplication {
|
|
23
36
|
protected config: LegendApplicationConfig;
|
|
24
|
-
protected
|
|
37
|
+
protected logger: LegendApplicationLogger;
|
|
38
|
+
protected pluginManager: LegendApplicationPluginManager;
|
|
25
39
|
protected basePresets: AbstractPreset[];
|
|
26
40
|
protected basePlugins: AbstractPlugin[];
|
|
27
|
-
protected log: Log;
|
|
28
41
|
protected baseUrl: string;
|
|
29
|
-
protected pluginRegister?: ((pluginManager:
|
|
42
|
+
protected pluginRegister?: ((pluginManager: LegendApplicationPluginManager, config: LegendApplicationConfig) => void) | undefined;
|
|
30
43
|
protected _isConfigured: boolean;
|
|
31
|
-
protected constructor(pluginManager:
|
|
44
|
+
protected constructor(pluginManager: LegendApplicationPluginManager);
|
|
32
45
|
setup(options: {
|
|
33
46
|
/** Base URL of the application. e.g. /studio/, /query/ */
|
|
34
47
|
baseUrl: string;
|
|
35
48
|
/**
|
|
36
|
-
* Provide an alternative mechanism to register plugins and presets
|
|
37
|
-
* by allowing configuring specific plugin or preset.
|
|
49
|
+
* Provide an alternative mechanism to register and configure plugins and presets
|
|
50
|
+
* which is more flexible by allowing configuring specific plugin or preset.
|
|
38
51
|
*/
|
|
39
|
-
pluginRegister?: (pluginManager:
|
|
52
|
+
pluginRegister?: (pluginManager: LegendApplicationPluginManager, config: LegendApplicationConfig) => void;
|
|
40
53
|
}): LegendApplication;
|
|
41
54
|
protected withBasePresets(presets: AbstractPreset[]): LegendApplication;
|
|
42
55
|
protected withBasePlugins(plugins: AbstractPlugin[]): LegendApplication;
|
|
43
56
|
withPresets(presets: AbstractPreset[]): LegendApplication;
|
|
44
57
|
withPlugins(plugins: AbstractPlugin[]): LegendApplication;
|
|
45
|
-
withLoggers(loggers: Logger[]): LegendApplication;
|
|
46
58
|
fetchApplicationConfiguration(baseUrl: string): Promise<[LegendApplicationConfig, Record<PropertyKey, object>]>;
|
|
47
59
|
protected abstract configureApplication(configData: LegendApplicationConfigurationData, versionData: LegendApplicationVersionData, baseUrl: string): Promise<LegendApplicationConfig>;
|
|
48
60
|
protected abstract loadApplication(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendApplication.d.ts","sourceRoot":"","sources":["../../src/application/LegendApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,OAAO,KAAK,EACV,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,EAC7B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"LegendApplication.d.ts","sourceRoot":"","sources":["../../src/application/LegendApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,OAAO,KAAK,EACV,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,EAC7B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC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AI,OAAO,CAAC,IAAI,CAAC;CA+B7B"}
|
|
@@ -17,9 +17,26 @@ import { configure as configureMobx } from 'mobx';
|
|
|
17
17
|
import { editor as monacoEditorAPI, languages as monacoLanguagesAPI, } from 'monaco-editor';
|
|
18
18
|
import { configuration, generateLanguageMonarch, theme, } from '../stores/PureLanguageSupport';
|
|
19
19
|
import { EDITOR_THEME, EDITOR_LANGUAGE, MONOSPACED_FONT_FAMILY, } from '../const';
|
|
20
|
-
import { assertErrorThrown, LogEvent,
|
|
20
|
+
import { assertErrorThrown, LogEvent, guaranteeNonEmptyString, assertNonNullable, NetworkClient, } from '@finos/legend-shared';
|
|
21
21
|
import { APPLICATION_LOG_EVENT } from '../stores/ApplicationLogEvent';
|
|
22
22
|
import { configureComponents } from '@finos/legend-art';
|
|
23
|
+
export class LegendApplicationLogger {
|
|
24
|
+
}
|
|
25
|
+
const { debug, info, warn, error } = console;
|
|
26
|
+
export class LegendApplicationWebConsole extends LegendApplicationLogger {
|
|
27
|
+
debug(event, ...data) {
|
|
28
|
+
debug(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);
|
|
29
|
+
}
|
|
30
|
+
info(event, ...data) {
|
|
31
|
+
info(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);
|
|
32
|
+
}
|
|
33
|
+
warn(event, ...data) {
|
|
34
|
+
warn(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);
|
|
35
|
+
}
|
|
36
|
+
error(event, ...data) {
|
|
37
|
+
error(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
23
40
|
export const setupTextEdtiorAPI = (pluginManager) => {
|
|
24
41
|
// Register Pure as a language in `monaco-editor`
|
|
25
42
|
monacoEditorAPI.defineTheme(EDITOR_THEME.LEGEND, theme);
|
|
@@ -34,7 +51,7 @@ export const setupTextEdtiorAPI = (pluginManager) => {
|
|
|
34
51
|
// This is not considered side-effect that hinders tree-shaking because the effectful calls
|
|
35
52
|
// are embedded in the function
|
|
36
53
|
// See https://sgom.es/posts/2020-06-15-everything-you-never-wanted-to-know-about-side-effects/
|
|
37
|
-
export const setupLegendApplicationUILibrary = async (pluginManager,
|
|
54
|
+
export const setupLegendApplicationUILibrary = async (pluginManager, logger) => {
|
|
38
55
|
setupTextEdtiorAPI(pluginManager);
|
|
39
56
|
/**
|
|
40
57
|
* Since we use a custom fonts for text-editor, we want to make sure the font is loaded before any text-editor is opened
|
|
@@ -46,13 +63,13 @@ export const setupLegendApplicationUILibrary = async (pluginManager, log) => {
|
|
|
46
63
|
.then(() => {
|
|
47
64
|
if (document.fonts.check(`1em ${MONOSPACED_FONT_FAMILY}`)) {
|
|
48
65
|
monacoEditorAPI.remeasureFonts();
|
|
49
|
-
|
|
66
|
+
logger.info(LogEvent.create(APPLICATION_LOG_EVENT.TEXT_EDITOR_FONT_LOADED), `Monospaced font '${MONOSPACED_FONT_FAMILY}' has been loaded`);
|
|
50
67
|
}
|
|
51
68
|
else {
|
|
52
|
-
|
|
69
|
+
logger.error(LogEvent.create(APPLICATION_LOG_EVENT.APPLICATION_SETUP_FAILURE), fontLoadFailureErrorMessage);
|
|
53
70
|
}
|
|
54
71
|
})
|
|
55
|
-
.catch(() =>
|
|
72
|
+
.catch(() => logger.error(LogEvent.create(APPLICATION_LOG_EVENT.APPLICATION_SETUP_FAILURE), fontLoadFailureErrorMessage));
|
|
56
73
|
configureMobx({
|
|
57
74
|
// Force state modification to be done via actions
|
|
58
75
|
// See https://github.com/mobxjs/mobx/blob/gh-pages/docs/refguide/api.md#enforceactions
|
|
@@ -62,15 +79,16 @@ export const setupLegendApplicationUILibrary = async (pluginManager, log) => {
|
|
|
62
79
|
};
|
|
63
80
|
export class LegendApplication {
|
|
64
81
|
config;
|
|
82
|
+
logger;
|
|
65
83
|
pluginManager;
|
|
66
84
|
basePresets = [];
|
|
67
85
|
basePlugins = [];
|
|
68
|
-
log = new Log();
|
|
69
86
|
baseUrl;
|
|
70
87
|
pluginRegister;
|
|
71
88
|
_isConfigured = false;
|
|
72
89
|
constructor(pluginManager) {
|
|
73
90
|
this.pluginManager = pluginManager;
|
|
91
|
+
this.logger = new LegendApplicationWebConsole();
|
|
74
92
|
}
|
|
75
93
|
setup(options) {
|
|
76
94
|
this.baseUrl = guaranteeNonEmptyString(options.baseUrl, `Can't setup application: 'baseUrl' is missing or empty`);
|
|
@@ -94,10 +112,6 @@ export class LegendApplication {
|
|
|
94
112
|
this.pluginManager.usePlugins([...this.basePlugins, ...plugins]);
|
|
95
113
|
return this;
|
|
96
114
|
}
|
|
97
|
-
withLoggers(loggers) {
|
|
98
|
-
loggers.forEach((logger) => this.log.registerLogger(logger));
|
|
99
|
-
return this;
|
|
100
|
-
}
|
|
101
115
|
async fetchApplicationConfiguration(baseUrl) {
|
|
102
116
|
const client = new NetworkClient();
|
|
103
117
|
let configData;
|
|
@@ -106,7 +120,7 @@ export class LegendApplication {
|
|
|
106
120
|
}
|
|
107
121
|
catch (error) {
|
|
108
122
|
assertErrorThrown(error);
|
|
109
|
-
this.
|
|
123
|
+
this.logger.error(LogEvent.create(APPLICATION_LOG_EVENT.APPLICATION_CONFIGURATION_FAILURE), error);
|
|
110
124
|
}
|
|
111
125
|
assertNonNullable(configData, `Can't fetch Legend application configuration`);
|
|
112
126
|
let versionData;
|
|
@@ -115,7 +129,7 @@ export class LegendApplication {
|
|
|
115
129
|
}
|
|
116
130
|
catch (error) {
|
|
117
131
|
assertErrorThrown(error);
|
|
118
|
-
this.
|
|
132
|
+
this.logger.error(LogEvent.create(APPLICATION_LOG_EVENT.APPLICATION_CONFIGURATION_FAILURE), error);
|
|
119
133
|
}
|
|
120
134
|
assertNonNullable(versionData, `Can't fetch Legend application version`);
|
|
121
135
|
return [
|
|
@@ -134,11 +148,11 @@ export class LegendApplication {
|
|
|
134
148
|
this.pluginManager.configure(extensionConfigData);
|
|
135
149
|
this.pluginManager.install();
|
|
136
150
|
await this.loadApplication();
|
|
137
|
-
this.
|
|
151
|
+
this.logger.info(LogEvent.create(APPLICATION_LOG_EVENT.APPLICATION_LOADED), 'Legend application loaded');
|
|
138
152
|
}
|
|
139
153
|
catch (error) {
|
|
140
154
|
assertErrorThrown(error);
|
|
141
|
-
this.
|
|
155
|
+
this.logger.error(LogEvent.create(APPLICATION_LOG_EVENT.APPLICATION_FAILURE), 'Failed to load Legend application');
|
|
142
156
|
throw error;
|
|
143
157
|
}
|
|
144
158
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendApplication.js","sourceRoot":"","sources":["../../src/application/LegendApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EACL,MAAM,IAAI,eAAe,EACzB,SAAS,IAAI,kBAAkB,GAChC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,KAAK,GACN,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,sBAAsB,GACvB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"LegendApplication.js","sourceRoot":"","sources":["../../src/application/LegendApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EACL,MAAM,IAAI,eAAe,EACzB,SAAS,IAAI,kBAAkB,GAChC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,KAAK,GACN,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,sBAAsB,GACvB,MAAM,UAAU,CAAC;AAOlB,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,GACd,MAAM,sBAAsB,C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|
+
* 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 type { EventNotifierPlugin, EventNotifierServicePluginManager, LoggerPlugin, LoggerPluginManager, TelemetryServicePlugin, TelemetryServicePluginManager, TracerServicePlugin, TracerServicePluginManager } from '@finos/legend-shared';
|
|
17
|
+
import { AbstractPluginManager } from '@finos/legend-shared';
|
|
18
|
+
export declare class LegendApplicationPluginManager extends AbstractPluginManager implements LoggerPluginManager, TelemetryServicePluginManager, TracerServicePluginManager, EventNotifierServicePluginManager {
|
|
19
|
+
protected loggerPlugins: LoggerPlugin[];
|
|
20
|
+
protected telemetryServicePlugins: TelemetryServicePlugin[];
|
|
21
|
+
protected tracerServicePlugins: TracerServicePlugin<unknown>[];
|
|
22
|
+
protected eventNotifierPlugins: EventNotifierPlugin[];
|
|
23
|
+
registerLoggerPlugin(plugin: LoggerPlugin): void;
|
|
24
|
+
registerTelemetryServicePlugin(plugin: TelemetryServicePlugin): void;
|
|
25
|
+
registerTracerServicePlugin(plugin: TracerServicePlugin<unknown>): void;
|
|
26
|
+
registerEventNotifierPlugin(plugin: EventNotifierPlugin): void;
|
|
27
|
+
getLoggerPlugins(): LoggerPlugin[];
|
|
28
|
+
getTelemetryServicePlugins(): TelemetryServicePlugin[];
|
|
29
|
+
getTracerServicePlugins(): TracerServicePlugin<unknown>[];
|
|
30
|
+
getEventNotifierPlugins(): EventNotifierPlugin[];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=LegendApplicationPluginManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendApplicationPluginManager.d.ts","sourceRoot":"","sources":["../../src/application/LegendApplicationPluginManager.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACnB,iCAAiC,EACjC,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACtB,6BAA6B,EAC7B,mBAAmB,EACnB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,qBAAa,8BACX,SAAQ,qBACR,YACE,mBAAmB,EACnB,6BAA6B,EAC7B,0BAA0B,EAC1B,iCAAiC;IAEnC,SAAS,CAAC,aAAa,EAAE,YAAY,EAAE,CAAM;IAC7C,SAAS,CAAC,uBAAuB,EAAE,sBAAsB,EAAE,CAAM;IACjE,SAAS,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAM;IACpE,SAAS,CAAC,oBAAoB,EAAE,mBAAmB,EAAE,CAAM;IAE3D,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAIhD,8BAA8B,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI;IAIpE,2BAA2B,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,CAAC,GAAG,IAAI;IAIvE,2BAA2B,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI;IAI9D,gBAAgB,IAAI,YAAY,EAAE;IAIlC,0BAA0B,IAAI,sBAAsB,EAAE;IAItD,uBAAuB,IAAI,mBAAmB,CAAC,OAAO,CAAC,EAAE;IAIzD,uBAAuB,IAAI,mBAAmB,EAAE;CAGjD"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { AbstractPluginManager } from '@finos/legend-shared';
|
|
17
|
+
export class LegendApplicationPluginManager extends AbstractPluginManager {
|
|
18
|
+
loggerPlugins = [];
|
|
19
|
+
telemetryServicePlugins = [];
|
|
20
|
+
tracerServicePlugins = [];
|
|
21
|
+
eventNotifierPlugins = [];
|
|
22
|
+
registerLoggerPlugin(plugin) {
|
|
23
|
+
this.loggerPlugins.push(plugin);
|
|
24
|
+
}
|
|
25
|
+
registerTelemetryServicePlugin(plugin) {
|
|
26
|
+
this.telemetryServicePlugins.push(plugin);
|
|
27
|
+
}
|
|
28
|
+
registerTracerServicePlugin(plugin) {
|
|
29
|
+
this.tracerServicePlugins.push(plugin);
|
|
30
|
+
}
|
|
31
|
+
registerEventNotifierPlugin(plugin) {
|
|
32
|
+
this.eventNotifierPlugins.push(plugin);
|
|
33
|
+
}
|
|
34
|
+
getLoggerPlugins() {
|
|
35
|
+
return [...this.loggerPlugins];
|
|
36
|
+
}
|
|
37
|
+
getTelemetryServicePlugins() {
|
|
38
|
+
return [...this.telemetryServicePlugins];
|
|
39
|
+
}
|
|
40
|
+
getTracerServicePlugins() {
|
|
41
|
+
return [...this.tracerServicePlugins];
|
|
42
|
+
}
|
|
43
|
+
getEventNotifierPlugins() {
|
|
44
|
+
return [...this.eventNotifierPlugins];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=LegendApplicationPluginManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendApplicationPluginManager.js","sourceRoot":"","sources":["../../src/application/LegendApplicationPluginManager.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,OAAO,8BACX,SAAQ,qBAAqB;IAOnB,aAAa,GAAmB,EAAE,CAAC;IACnC,uBAAuB,GAA6B,EAAE,CAAC;IACvD,oBAAoB,GAAmC,EAAE,CAAC;IAC1D,oBAAoB,GAA0B,EAAE,CAAC;IAE3D,oBAAoB,CAAC,MAAoB;QACvC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,8BAA8B,CAAC,MAA8B;QAC3D,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,2BAA2B,CAAC,MAAoC;QAC9D,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,2BAA2B,CAAC,MAA2B;QACrD,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,gBAAgB;QACd,OAAO,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC;IAED,0BAA0B;QACxB,OAAO,CAAC,GAAG,IAAI,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IAED,uBAAuB;QACrB,OAAO,CAAC,GAAG,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACxC,CAAC;IAED,uBAAuB;QACrB,OAAO,CAAC,GAAG,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -46,9 +46,9 @@ const ActionAlertInner = observer((props) => {
|
|
|
46
46
|
event.preventDefault();
|
|
47
47
|
handleSubmit();
|
|
48
48
|
};
|
|
49
|
-
return (_jsx(Dialog,
|
|
49
|
+
return (_jsx(Dialog, { open: Boolean(applicationStore.actionAlertInfo), onClose: noop, TransitionProps: {
|
|
50
50
|
onEnter: handleEnter,
|
|
51
|
-
}
|
|
51
|
+
}, children: _jsxs("form", { onSubmit: onSubmit, className: `modal search-modal modal--dark blocking-alert blocking-alert--${(type ?? ActionAlertType.STANDARD).toLowerCase()}`, children: [title && (_jsx("div", { className: "modal__header", children: _jsx("div", { className: "modal__title", children: _jsx("div", { className: "modal__title__label", children: title }, void 0) }, void 0) }, void 0)), _jsxs("div", { className: "modal__body", children: [_jsx("div", { className: "blocking-alert__summary-text", children: message }, void 0), _jsx("div", { className: "blocking-alert__prompt-text", children: prompt }, void 0)] }, void 0), _jsxs("div", { className: "modal__footer", children: [actions.map((action) => {
|
|
52
52
|
// NOTE: need to prevent default for the submit button, otherwise, we would get the warning "Form submission canceled because the form is not connected"
|
|
53
53
|
// See https://stackoverflow.com/a/58234405
|
|
54
54
|
const handler = (e) => {
|
|
@@ -56,8 +56,8 @@ const ActionAlertInner = observer((props) => {
|
|
|
56
56
|
action.handler?.();
|
|
57
57
|
handleClose();
|
|
58
58
|
};
|
|
59
|
-
return (_jsx("button",
|
|
60
|
-
}), !actions.length && (_jsx("button",
|
|
59
|
+
return (_jsx("button", { type: action.default ? 'submit' : 'button', className: `btn btn--dark ${getActionButtonClassName(action.type ?? ActionAlertActionType.STANDARD)}`, onClick: handler, autoFocus: Boolean(action.default), children: action.label }, action.label));
|
|
60
|
+
}), !actions.length && (_jsx("button", { type: "button", className: "btn btn--dark blocking-alert__action--standard", onClick: handleClose, children: "Cancel" }, void 0))] }, void 0)] }, void 0) }, void 0));
|
|
61
61
|
});
|
|
62
62
|
export const ActionAlert = observer(() => {
|
|
63
63
|
const applicationStore = useApplicationStore();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionAlert.js","sourceRoot":"","sources":["../../src/components/ActionAlert.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;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OAAO,CACL,iBAEE,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAC1C,SAAS,EAAE,iBAAiB,wBAAwB,CAClD,MAAM,CAAC,IAAI,IAAI,qBAAqB,CAAC,QAAQ,CAC9C,EAAE,EACH,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,YAGjC,MAAM,CAAC,KAAK,IATR,MAAM,CAAC,KAAK,CAUV,CACV,CAAC;wBACJ,CAAC,CAAC,EACD,CAAC,OAAO,CAAC,MAAM,IAAI,CAClB,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,gDAAgD,EAC1D,OAAO,EAAE,WAAW,+BAGb,CACV,YACG,YACD,WACA,CACV,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE;IACvC,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,eAAe,GAAG,gBAAgB,CAAC,eAAe,CAAC;IAEzD,IAAI,CAAC,eAAe,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAC,gBAAgB,IAAC,IAAI,EAAE,eAAe,WAAI,CAAC;AACrD,CAAC,CAAC,CAAC"}
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
/// <reference types="react" />
|
|
17
|
+
export declare const AppHeader: React.FC<{
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=AppHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../src/components/AppHeader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAMH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAwBA,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } 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 { Link } from 'react-router-dom';
|
|
18
|
+
import { LegendLogo } from '@finos/legend-art';
|
|
19
|
+
import { useApplicationStore } from './ApplicationStoreProvider';
|
|
20
|
+
export const AppHeader = (props) => {
|
|
21
|
+
const { children } = props;
|
|
22
|
+
const applicationStore = useApplicationStore();
|
|
23
|
+
const config = applicationStore.config;
|
|
24
|
+
return (_jsx("div", { className: "app__header", children: _jsxs("div", { className: "app__header__content", children: [_jsxs("div", { className: "app__header__title", children: [_jsx(Link, { to: "/", children: _jsx(LegendLogo, { className: "app__header__logo" }, void 0) }, void 0), _jsx("div", { className: "app__header__tag app__header__app-name", children: config.appName.toUpperCase() }, void 0), _jsx("div", { className: "app__header__tag app__header__tag__name", children: "env" }, void 0), _jsx("div", { className: "app__header__tag app__header__tag__value app__header__env", children: config.env ? config.env.toUpperCase() : 'UNKNOWN' }, void 0)] }, void 0), _jsx("div", { className: "app__header__actions", children: children }, void 0)] }, void 0) }, void 0));
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=AppHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppHeader.js","sourceRoot":"","sources":["../../src/components/AppHeader.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,MAAM,CAAC,MAAM,SAAS,GAEjB,CAAC,KAAK,EAAE,EAAE;IACb,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAEvC,OAAO,CACL,cAAK,SAAS,EAAC,aAAa,YAC1B,eAAK,SAAS,EAAC,sBAAsB,aACnC,eAAK,SAAS,EAAC,oBAAoB,aACjC,KAAC,IAAI,IAAC,EAAE,EAAC,GAAG,YACV,KAAC,UAAU,IAAC,SAAS,EAAC,mBAAmB,WAAG,WACvC,EACP,cAAK,SAAS,EAAC,wCAAwC,YACpD,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,WACzB,EACN,cAAK,SAAS,EAAC,yCAAyC,4BAAU,EAClE,cAAK,SAAS,EAAC,2DAA2D,YACvE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,WAC9C,YACF,EACN,cAAK,SAAS,EAAC,sBAAsB,YAAE,QAAQ,WAAO,YAClD,WACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -15,13 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { ApplicationStore } from '../stores/ApplicationStore';
|
|
17
17
|
import type { LegendApplicationConfig } from '../stores/ApplicationConfig';
|
|
18
|
-
import type {
|
|
19
|
-
|
|
20
|
-
export declare const ApplicationStoreProvider: <T extends LegendApplicationConfig>({ children, config, navigator, log, }: {
|
|
18
|
+
import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager';
|
|
19
|
+
export declare const ApplicationStoreProvider: <T extends LegendApplicationConfig>({ children, config, pluginManager, }: {
|
|
21
20
|
children: React.ReactNode;
|
|
22
21
|
config: T;
|
|
23
|
-
|
|
24
|
-
log: Log;
|
|
22
|
+
pluginManager: LegendApplicationPluginManager;
|
|
25
23
|
}) => React.ReactElement;
|
|
26
24
|
export declare const useApplicationStore: <T extends LegendApplicationConfig>() => ApplicationStore<T>;
|
|
27
25
|
//# sourceMappingURL=ApplicationStoreProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStoreProvider.d.ts","sourceRoot":"","sources":["../../src/components/ApplicationStoreProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"ApplicationStoreProvider.d.ts","sourceRoot":"","sources":["../../src/components/ApplicationStoreProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAG3E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,+CAA+C,CAAC;AAMpG,eAAO,MAAM,wBAAwB;cAKzB,MAAM,SAAS;;mBAEV,8BAA8B;MAC3C,MAAM,YAUT,CAAC;AAEF,eAAO,MAAM,mBAAmB,8DAM7B,CAAC"}
|
|
@@ -18,10 +18,12 @@ import { createContext, useContext } from 'react';
|
|
|
18
18
|
import { useLocalObservable } from 'mobx-react-lite';
|
|
19
19
|
import { ApplicationStore } from '../stores/ApplicationStore';
|
|
20
20
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
21
|
+
import { useWebApplicationNavigator } from './WebApplicationNavigatorProvider';
|
|
21
22
|
const ApplicationStoreContext = createContext(undefined);
|
|
22
|
-
export const ApplicationStoreProvider = ({ children, config,
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
export const ApplicationStoreProvider = ({ children, config, pluginManager, }) => {
|
|
24
|
+
const navigator = useWebApplicationNavigator();
|
|
25
|
+
const applicationStore = useLocalObservable(() => new ApplicationStore(config, navigator, pluginManager));
|
|
26
|
+
return (_jsx(ApplicationStoreContext.Provider, { value: applicationStore, children: children }, void 0));
|
|
25
27
|
};
|
|
26
28
|
export const useApplicationStore = () => guaranteeNonNullable(useContext(ApplicationStoreContext), `Can't find application store in context`);
|
|
27
29
|
//# sourceMappingURL=ApplicationStoreProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStoreProvider.js","sourceRoot":"","sources":["../../src/components/ApplicationStoreProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"ApplicationStoreProvider.js","sourceRoot":"","sources":["../../src/components/ApplicationStoreProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAG/E,MAAM,uBAAuB,GAAG,aAAa,CAE3C,SAAS,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAoC,EAC1E,QAAQ,EACR,MAAM,EACN,aAAa,GAKd,EAAsB,EAAE;IACvB,MAAM,SAAS,GAAG,0BAA0B,EAAE,CAAC;IAC/C,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,GAAG,EAAE,CAAC,IAAI,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAC7D,CAAC;IACF,OAAO,CACL,KAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,gBAAgB,YACtD,QAAQ,WACwB,CACpC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAEV,EAAE,CACzB,oBAAoB,CAClB,UAAU,CAAC,uBAAuB,CAAoC,EACtE,yCAAyC,CAC1C,CAAC"}
|
|
@@ -13,14 +13,17 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
import { ApplicationStore } from '../stores/ApplicationStore';
|
|
17
18
|
import { WebApplicationNavigator } from '../stores/WebApplicationNavigator';
|
|
18
19
|
import type { LegendApplicationConfig } from '../stores/ApplicationConfig';
|
|
19
|
-
|
|
20
|
+
import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager';
|
|
21
|
+
export declare const TEST__ApplicationStoreProvider: React.FC<{
|
|
20
22
|
children: React.ReactNode;
|
|
21
23
|
config: LegendApplicationConfig;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
pluginManager: LegendApplicationPluginManager;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const TEST__provideMockedApplicationStore: <T extends LegendApplicationConfig>(config: T, pluginManager: LegendApplicationPluginManager, customization?: {
|
|
24
27
|
mock?: ApplicationStore<T>;
|
|
25
28
|
navigator?: WebApplicationNavigator;
|
|
26
29
|
} | undefined) => ApplicationStore<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStoreProviderTestUtils.d.ts","sourceRoot":"","sources":["../../src/components/ApplicationStoreProviderTestUtils.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"ApplicationStoreProviderTestUtils.d.ts","sourceRoot":"","sources":["../../src/components/ApplicationStoreProviderTestUtils.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,+CAA+C,CAAC;AAEpG,eAAO,MAAM,8BAA8B,EAAE,KAAK,CAAC,EAAE,CAAC;IACpD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,uBAAuB,CAAC;IAChC,aAAa,EAAE,8BAA8B,CAAC;CAC/C,CAIA,CAAC;AAEF,eAAO,MAAM,mCAAmC,gEAI/B,8BAA8B;;gBAG/B,uBAAuB;qCAetC,CAAC"}
|
|
@@ -18,12 +18,11 @@ import { createMemoryHistory } from 'history';
|
|
|
18
18
|
import { ApplicationStore } from '../stores/ApplicationStore';
|
|
19
19
|
import { WebApplicationNavigator } from '../stores/WebApplicationNavigator';
|
|
20
20
|
import { ApplicationStoreProvider } from './ApplicationStoreProvider';
|
|
21
|
-
|
|
22
|
-
export const
|
|
23
|
-
export const TEST__provideMockedApplicationStore = (config, customization) => {
|
|
21
|
+
export const TEST__ApplicationStoreProvider = ({ children, config, pluginManager }) => (_jsx(ApplicationStoreProvider, { config: config, pluginManager: pluginManager, children: children }, void 0));
|
|
22
|
+
export const TEST__provideMockedApplicationStore = (config, pluginManager, customization) => {
|
|
24
23
|
const value = customization?.mock ??
|
|
25
24
|
new ApplicationStore(config, customization?.navigator ??
|
|
26
|
-
new WebApplicationNavigator(createMemoryHistory()),
|
|
25
|
+
new WebApplicationNavigator(createMemoryHistory()), pluginManager);
|
|
27
26
|
const MockedApplicationStoreProvider = require('./ApplicationStoreProvider'); // eslint-disable-line @typescript-eslint/no-unsafe-assignment
|
|
28
27
|
MockedApplicationStoreProvider.useApplicationStore = jest.fn();
|
|
29
28
|
MockedApplicationStoreProvider.useApplicationStore.mockReturnValue(value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStoreProviderTestUtils.js","sourceRoot":"","sources":["../../src/components/ApplicationStoreProviderTestUtils.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"ApplicationStoreProviderTestUtils.js","sourceRoot":"","sources":["../../src/components/ApplicationStoreProviderTestUtils.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,MAAM,CAAC,MAAM,8BAA8B,GAItC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CAC5C,KAAC,wBAAwB,IAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,YACnE,QAAQ,WACgB,CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAGjD,MAAS,EACT,aAA6C,EAC7C,aAGC,EACoB,EAAE;IACvB,MAAM,KAAK,GACT,aAAa,EAAE,IAAI;QACnB,IAAI,gBAAgB,CAClB,MAAM,EACN,aAAa,EAAE,SAAS;YACtB,IAAI,uBAAuB,CAAC,mBAAmB,EAAE,CAAC,EACpD,aAAa,CACd,CAAC;IACJ,MAAM,8BAA8B,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC,CAAC,8DAA8D;IAC5I,8BAA8B,CAAC,mBAAmB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC/D,8BAA8B,CAAC,mBAAmB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC1E,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -30,9 +30,9 @@ export const BlockingAlert = observer(() => {
|
|
|
30
30
|
if (!info) {
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
|
-
return (_jsx(Dialog,
|
|
33
|
+
return (_jsx(Dialog, { open: Boolean(info), onClose: noop, classes: {
|
|
34
34
|
root: 'blocking-alert__root-container',
|
|
35
35
|
container: 'blocking-alert__container',
|
|
36
|
-
}
|
|
36
|
+
}, children: _jsxs("div", { className: "modal modal--dark blocking-alert", children: [_jsx(PanelLoadingIndicator, { isLoading: Boolean(info.showLoading) }, void 0), _jsxs("div", { className: "modal__body", children: [_jsx("div", { className: "blocking-alert__message", children: info.message }, void 0), info.prompt && (_jsx("div", { className: "blocking-alert__message__prompt", children: info.prompt }, void 0))] }, void 0)] }, void 0) }, void 0));
|
|
37
37
|
});
|
|
38
38
|
//# sourceMappingURL=BlockingAlert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockingAlert.js","sourceRoot":"","sources":["../../src/components/BlockingAlert.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,EAAE;IACzC,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,IAAI,GAAG,gBAAgB,CAAC,iBAAiB,CAAC;IAEhD,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IACD,OAAO,CACL,KAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"BlockingAlert.js","sourceRoot":"","sources":["../../src/components/BlockingAlert.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,EAAE;IACzC,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,IAAI,GAAG,gBAAgB,CAAC,iBAAiB,CA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