@finos/legend-application 0.2.2 → 1.1.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.
- package/CHANGELOG.md +24 -0
- package/lib/application/LegendApplication.d.ts +22 -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 +31 -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.d.ts +1 -0
- package/lib/components/ActionAlert.d.ts.map +1 -1
- package/lib/components/ActionAlert.js +2 -1
- package/lib/components/ActionAlert.js.map +1 -1
- package/lib/components/ApplicationStoreProvider.d.ts +3 -5
- package/lib/components/ApplicationStoreProvider.d.ts.map +1 -1
- package/lib/components/ApplicationStoreProvider.js +4 -2
- 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.d.ts +1 -0
- package/lib/components/BlockingAlert.d.ts.map +1 -1
- package/lib/components/BlockingAlert.js +3 -2
- package/lib/components/BlockingAlert.js.map +1 -1
- package/lib/components/LambdaEditor.d.ts +3 -2
- package/lib/components/LambdaEditor.d.ts.map +1 -1
- package/lib/components/LambdaEditor.js +5 -6
- package/lib/components/LambdaEditor.js.map +1 -1
- package/lib/components/{NotificationSnackbar.d.ts → LegendApplicationComponentFrameworkProvider.d.ts} +5 -4
- package/lib/components/LegendApplicationComponentFrameworkProvider.d.ts.map +1 -0
- package/lib/components/LegendApplicationComponentFrameworkProvider.js +25 -0
- package/lib/components/LegendApplicationComponentFrameworkProvider.js.map +1 -0
- package/lib/components/{ApplicationBackdrop.d.ts → NotificationManager.d.ts} +3 -4
- package/lib/components/NotificationManager.d.ts.map +1 -0
- package/lib/components/{NotificationSnackbar.js → NotificationManager.js} +14 -15
- package/lib/components/NotificationManager.js.map +1 -0
- package/lib/components/TextInputEditor.d.ts +2 -3
- package/lib/components/TextInputEditor.d.ts.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 +1 -1
- package/lib/components/WebApplicationNavigatorProvider.js.map +1 -1
- package/lib/components/WebApplicationNavigatorProviderTestUtils.d.ts +1 -1
- package/lib/components/WebApplicationNavigatorProviderTestUtils.d.ts.map +1 -1
- package/lib/components/WebApplicationNavigatorProviderTestUtils.js +1 -1
- package/lib/components/WebApplicationNavigatorProviderTestUtils.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -5
- package/lib/index.js.map +1 -1
- package/lib/stores/ApplicationStore.d.ts +7 -3
- package/lib/stores/ApplicationStore.d.ts.map +1 -1
- package/lib/stores/ApplicationStore.js +12 -5
- 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/LambdaEditorState.d.ts +2 -3
- package/lib/stores/LambdaEditorState.d.ts.map +1 -1
- package/lib/stores/LambdaEditorState.js +1 -1
- package/lib/stores/LambdaEditorState.js.map +1 -1
- package/lib/stores/WebApplicationNavigator.d.ts +7 -0
- package/lib/stores/WebApplicationNavigator.d.ts.map +1 -1
- package/lib/stores/WebApplicationNavigator.js.map +1 -1
- package/package.json +18 -20
- package/src/application/LegendApplication.tsx +58 -27
- package/src/application/LegendApplicationPluginManager.tsx +73 -0
- package/src/components/ActionAlert.tsx +3 -2
- package/src/components/ApplicationStoreProvider.tsx +6 -7
- package/src/components/ApplicationStoreProviderTestUtils.tsx +7 -12
- package/src/components/BlockingAlert.tsx +4 -2
- package/src/components/LambdaEditor.tsx +19 -14
- package/src/components/{ApplicationBackdrop.tsx → LegendApplicationComponentFrameworkProvider.tsx} +18 -5
- package/src/components/{NotificationSnackbar.tsx → NotificationManager.tsx} +30 -25
- package/src/components/TextInputEditor.tsx +6 -4
- package/src/components/WebApplicationNavigatorProvider.tsx +2 -4
- package/src/components/WebApplicationNavigatorProviderTestUtils.tsx +1 -2
- package/src/index.ts +3 -6
- package/src/stores/ApplicationStore.ts +27 -5
- package/src/stores/ApplicationStoreTestUtils.ts +3 -2
- package/src/stores/LambdaEditorState.ts +6 -4
- package/src/stores/WebApplicationNavigator.ts +7 -0
- package/tsconfig.json +3 -3
- package/lib/components/ApplicationBackdrop.d.ts.map +0 -1
- package/lib/components/ApplicationBackdrop.js +0 -20
- package/lib/components/ApplicationBackdrop.js.map +0 -1
- package/lib/components/NotificationSnackbar.d.ts.map +0 -1
- package/lib/components/NotificationSnackbar.js.map +0 -1
- package/lib/network/TelemetryEvent.d.ts +0 -19
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStore.js","sourceRoot":"","sources":["../../src/stores/ApplicationStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"ApplicationStore.js","sourceRoot":"","sources":["../../src/stores/ApplicationStore.ts"],"names":[],"mapp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AC,kDAAkD,CAAC,CAAC;IACvE,CAAC;IAED,wBAAwB,CAAC,WAAmB;QAC1C,IAAI,CAAC,aAAa,CAAC,wBAAwB,WAAW,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF"}
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { ApplicationStore } from './ApplicationStore';
|
|
17
17
|
import type { LegendApplicationConfig } from './ApplicationConfig';
|
|
18
|
+
import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager';
|
|
18
19
|
export declare const TEST_DATA__applicationVersion: {
|
|
19
20
|
buildTime: string;
|
|
20
21
|
version: string;
|
|
21
22
|
commitSHA: string;
|
|
22
23
|
};
|
|
23
|
-
export declare const TEST__getTestApplicationStore: <T extends LegendApplicationConfig>(config: T) => ApplicationStore<T>;
|
|
24
|
+
export declare const TEST__getTestApplicationStore: <T extends LegendApplicationConfig>(config: T, pluginManager: LegendApplicationPluginManager) => ApplicationStore<T>;
|
|
24
25
|
//# sourceMappingURL=ApplicationStoreTestUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStoreTestUtils.d.ts","sourceRoot":"","sources":["../../src/stores/ApplicationStoreTestUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ApplicationStoreTestUtils.d.ts","sourceRoot":"","sources":["../../src/stores/ApplicationStoreTestUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,+CAA+C,CAAC;AAEpG,eAAO,MAAM,6BAA6B;;;;CAIzC,CAAC;AAEF,eAAO,MAAM,6BAA6B,gEAIzB,8BAA8B,wBAM5C,CAAC"}
|
|
@@ -16,11 +16,10 @@
|
|
|
16
16
|
import { ApplicationStore } from './ApplicationStore';
|
|
17
17
|
import { createBrowserHistory } from 'history';
|
|
18
18
|
import { WebApplicationNavigator } from './WebApplicationNavigator';
|
|
19
|
-
import { Log } from '@finos/legend-shared';
|
|
20
19
|
export const TEST_DATA__applicationVersion = {
|
|
21
20
|
buildTime: '2001-01-01T00:00:00-0000',
|
|
22
21
|
version: 'test-version',
|
|
23
22
|
commitSHA: 'test-commit-id',
|
|
24
23
|
};
|
|
25
|
-
export const TEST__getTestApplicationStore = (config) => new ApplicationStore(config, new WebApplicationNavigator(createBrowserHistory()),
|
|
24
|
+
export const TEST__getTestApplicationStore = (config, pluginManager) => new ApplicationStore(config, new WebApplicationNavigator(createBrowserHistory()), pluginManager);
|
|
26
25
|
//# sourceMappingURL=ApplicationStoreTestUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStoreTestUtils.js","sourceRoot":"","sources":["../../src/stores/ApplicationStoreTestUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"ApplicationStoreTestUtils.js","sourceRoot":"","sources":["../../src/stores/ApplicationStoreTestUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIpE,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,SAAS,EAAE,0BAA0B;IACrC,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE,gBAAgB;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAG3C,MAAS,EACT,aAA6C,EACxB,EAAE,CACvB,IAAI,gBAAgB,CAClB,MAAM,EACN,IAAI,uBAAuB,CAAC,oBAAoB,EAAE,CAAC,EACnD,aAAa,CACd,CAAC"}
|
|
@@ -13,9 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type
|
|
17
|
-
import type
|
|
18
|
-
import { SourceInformation } from '@finos/legend-graph';
|
|
16
|
+
import { type GeneratorFn } from '@finos/legend-shared';
|
|
17
|
+
import { type ParserError, type CompilationError, SourceInformation } from '@finos/legend-graph';
|
|
19
18
|
/**
|
|
20
19
|
* This is not strictly meant for lambda. The idea is to create an editor that allows
|
|
21
20
|
* editing _something_ but allows user to edit via text.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LambdaEditorState.d.ts","sourceRoot":"","sources":["../../src/stores/LambdaEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"LambdaEditorState.d.ts","sourceRoot":"","sources":["../../src/stores/LambdaEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,KAAK,WAAW,EAAQ,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,8BAAsB,iBAAiB;IACrC,IAAI,SAAU;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACtC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;gBAEpC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IAmBtD,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC;IAGhC,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIlC,WAAW,IAAI,IAAI;IAKnB,mBAAmB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,GAAG,IAAI;IAUzE,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI;IAU1D,wBAAwB,CACtB,iBAAiB,EAAE,iBAAiB,GACnC,iBAAiB;IAcpB,mBAAmB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM;IAOrD,QAAQ,CAAC,kCAAkC,IAAI,WAAW,CAAC,IAAI,CAAC;IAChE,QAAQ,CAAC,kCAAkC,CACzC,MAAM,EAAE,OAAO,GACd,WAAW,CAAC,IAAI,CAAC;CACrB"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { observable, action, computed, makeObservable, flow } from 'mobx';
|
|
17
17
|
import { uuid } from '@finos/legend-shared';
|
|
18
|
-
import { SourceInformation } from '@finos/legend-graph';
|
|
18
|
+
import { SourceInformation, } from '@finos/legend-graph';
|
|
19
19
|
/**
|
|
20
20
|
* This is not strictly meant for lambda. The idea is to create an editor that allows
|
|
21
21
|
* editing _something_ but allows user to edit via text.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LambdaEditorState.js","sourceRoot":"","sources":["../../src/stores/LambdaEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"LambdaEditorState.js","sourceRoot":"","sources":["../../src/stores/LambdaEditorState.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'history';
|
|
|
31
31
|
*
|
|
32
32
|
* As such, instead, we should design a more generic concept `Location` to pass around.
|
|
33
33
|
* We would need to flesh out the details, but this is the rough idea.
|
|
34
|
+
*
|
|
35
|
+
* Another thought is that we should also generalize Router so it handles more than just
|
|
36
|
+
* URLs. If we make `router` and `navigator` work together, we can potentially generalize
|
|
37
|
+
* application navigation
|
|
38
|
+
*
|
|
39
|
+
* However, this depends on how and when we move to another platform, like `electron` for example
|
|
40
|
+
* See https://github.com/finos/legend-studio/issues/718
|
|
34
41
|
*/
|
|
35
42
|
interface ApplicationNavigator<T> {
|
|
36
43
|
reload(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebApplicationNavigator.d.ts","sourceRoot":"","sources":["../../src/stores/WebApplicationNavigator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGvC
|
|
1
|
+
{"version":3,"file":"WebApplicationNavigator.d.ts","sourceRoot":"","sources":["../../src/stores/WebApplicationNavigator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGvC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,UAAU,oBAAoB,CAAC,CAAC;IAC9B,MAAM,IAAI,IAAI,CAAC;IACf,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC;IACxB,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC;IAC1B,aAAa,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC;IACjC,kBAAkB,IAAI,CAAC,CAAC;IACxB,sBAAsB,IAAI,CAAC,CAAC;IAC5B,gBAAgB,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC,CAAC;CACtC;AAED,qBAAa,uBAAwB,YAAW,oBAAoB,CAAC,MAAM,CAAC;IAC1E,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAU;IAErC,OAAO,KAAK,MAAM,GAKjB;gBAEW,gBAAgB,EAAE,OAAO;IAIrC,MAAM,IAAI,IAAI;IAId,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI5B,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI9B,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIrC,kBAAkB,IAAI,MAAM;IAI5B,sBAAsB,IAAI,MAAM;IAIhC,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;CAM/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebApplicationNavigator.js","sourceRoot":"","sources":["../../src/stores/WebApplicationNavigator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"WebApplicationNavigator.js","sourceRoot":"","sources":["../../src/stores/WebApplicationNavigator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAqC5D,MAAM,OAAO,uBAAuB;IACjB,UAAU,CAAU;IAErC,IAAY,MAAM;QAChB,OAAO,oBAAoB,CACzB,MAAM,EACN,uDAAuD,CACxD,CAAC;IACJ,CAAC;IAED,YAAY,gBAAyB;QACnC,IAAI,CAAC,UAAU,GAAG,gBAAgB,CAAC;IACrC,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAChC,CAAC;IAED,IAAI,CAAC,QAAgB;QACnB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,QAAgB;QACrB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvC,CAAC;IAED,aAAa,CAAC,QAAgB;QAC5B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;IACnC,CAAC;IAED,sBAAsB;QACpB,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAC3C,CAAC;IAED,gBAAgB,CAAC,YAAoB;QACnC,OAAO,CACL,MAAM,CAAC,QAAQ,CAAC,MAAM;YACtB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CACvD,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Legend application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
"build": "yarn clean && yarn build:sass && yarn build:tsc",
|
|
28
28
|
"build:sass": "cross-env INIT_CWD=$INIT_CWD node ../../scripts/workflow/buildSass.js",
|
|
29
29
|
"build:tsc": "tsc --project ./tsconfig.build.json",
|
|
30
|
-
"clean": "
|
|
30
|
+
"clean": "npm-run-all clean:cache clean:lib",
|
|
31
|
+
"clean:cache": "rimraf \"build\"",
|
|
32
|
+
"clean:lib": "rimraf \"lib\"",
|
|
31
33
|
"dev": "npm-run-all --parallel dev:sass dev:tsc",
|
|
32
34
|
"dev:sass": "sass style lib --watch --load-path=../../node_modules/@finos/legend-art/scss",
|
|
33
35
|
"dev:tsc": "tsc --watch --preserveWatchOutput",
|
|
@@ -38,37 +40,33 @@
|
|
|
38
40
|
"test:watch": "jest --watch"
|
|
39
41
|
},
|
|
40
42
|
"dependencies": {
|
|
41
|
-
"@finos/legend-art": "0.
|
|
42
|
-
"@finos/legend-graph": "0.
|
|
43
|
-
"@finos/legend-shared": "
|
|
44
|
-
"@material-ui/core": "4.12.3",
|
|
45
|
-
"@testing-library/react": "12.1.2",
|
|
43
|
+
"@finos/legend-art": "0.3.0",
|
|
44
|
+
"@finos/legend-graph": "1.0.0",
|
|
45
|
+
"@finos/legend-shared": "1.1.0",
|
|
46
46
|
"@types/css-font-loading-module": "0.0.7",
|
|
47
|
-
"@types/react": "17.0.
|
|
47
|
+
"@types/react": "17.0.38",
|
|
48
48
|
"@types/react-dom": "17.0.11",
|
|
49
49
|
"@types/react-router-dom": "5.3.2",
|
|
50
|
-
"history": "5.
|
|
51
|
-
"mobx": "6.3.
|
|
52
|
-
"mobx-react-lite": "3.2.
|
|
53
|
-
"monaco-editor": "0.
|
|
50
|
+
"history": "5.2.0",
|
|
51
|
+
"mobx": "6.3.12",
|
|
52
|
+
"mobx-react-lite": "3.2.3",
|
|
53
|
+
"monaco-editor": "0.31.1",
|
|
54
54
|
"react": "17.0.2",
|
|
55
55
|
"react-dom": "17.0.2",
|
|
56
|
-
"react-
|
|
57
|
-
"react-resize-detector": "6.7.6",
|
|
56
|
+
"react-resize-detector": "7.0.0",
|
|
58
57
|
"react-router": "5.2.1",
|
|
59
58
|
"react-router-dom": "5.3.0",
|
|
60
59
|
"serializr": "2.0.5"
|
|
61
60
|
},
|
|
62
61
|
"devDependencies": {
|
|
63
|
-
"@finos/legend-dev-utils": "0.
|
|
64
|
-
"@testing-library/dom": "8.11.1",
|
|
62
|
+
"@finos/legend-dev-utils": "0.3.4",
|
|
65
63
|
"cross-env": "7.0.3",
|
|
66
|
-
"eslint": "8.
|
|
67
|
-
"jest": "27.
|
|
64
|
+
"eslint": "8.7.0",
|
|
65
|
+
"jest": "27.4.7",
|
|
68
66
|
"npm-run-all": "4.1.5",
|
|
69
67
|
"rimraf": "3.0.2",
|
|
70
|
-
"sass": "1.
|
|
71
|
-
"typescript": "4.5.
|
|
68
|
+
"sass": "1.49.0",
|
|
69
|
+
"typescript": "4.5.4"
|
|
72
70
|
},
|
|
73
71
|
"peerDependencies": {
|
|
74
72
|
"react": "^17.0.0"
|
|
@@ -34,16 +34,11 @@ import type {
|
|
|
34
34
|
LegendApplicationConfigurationData,
|
|
35
35
|
LegendApplicationVersionData,
|
|
36
36
|
} from '../stores/ApplicationConfig';
|
|
37
|
-
import type {
|
|
38
|
-
AbstractPlugin,
|
|
39
|
-
AbstractPluginManager,
|
|
40
|
-
AbstractPreset,
|
|
41
|
-
Logger,
|
|
42
|
-
} from '@finos/legend-shared';
|
|
43
37
|
import {
|
|
38
|
+
type AbstractPlugin,
|
|
39
|
+
type AbstractPreset,
|
|
44
40
|
assertErrorThrown,
|
|
45
41
|
LogEvent,
|
|
46
|
-
Log,
|
|
47
42
|
guaranteeNonEmptyString,
|
|
48
43
|
assertNonNullable,
|
|
49
44
|
NetworkClient,
|
|
@@ -51,6 +46,46 @@ import {
|
|
|
51
46
|
import { APPLICATION_LOG_EVENT } from '../stores/ApplicationLogEvent';
|
|
52
47
|
import { configureComponents } from '@finos/legend-art';
|
|
53
48
|
import type { GraphPluginManager } from '@finos/legend-graph';
|
|
49
|
+
import type { LegendApplicationPluginManager } from './LegendApplicationPluginManager';
|
|
50
|
+
|
|
51
|
+
export abstract class LegendApplicationLogger {
|
|
52
|
+
abstract debug(event: LogEvent, ...data: unknown[]): void;
|
|
53
|
+
abstract info(event: LogEvent, ...data: unknown[]): void;
|
|
54
|
+
abstract warn(event: LogEvent, ...data: unknown[]): void;
|
|
55
|
+
abstract error(event: LogEvent, ...data: unknown[]): void;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const { debug, info, warn, error } = console;
|
|
59
|
+
|
|
60
|
+
export class LegendApplicationWebConsole extends LegendApplicationLogger {
|
|
61
|
+
debug(event: LogEvent, ...data: unknown[]): void {
|
|
62
|
+
debug(
|
|
63
|
+
`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`,
|
|
64
|
+
...data,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
info(event: LogEvent, ...data: unknown[]): void {
|
|
69
|
+
info(
|
|
70
|
+
`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`,
|
|
71
|
+
...data,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
warn(event: LogEvent, ...data: unknown[]): void {
|
|
76
|
+
warn(
|
|
77
|
+
`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`,
|
|
78
|
+
...data,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
error(event: LogEvent, ...data: unknown[]): void {
|
|
83
|
+
error(
|
|
84
|
+
`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`,
|
|
85
|
+
...data,
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
54
89
|
|
|
55
90
|
export const setupTextEdtiorAPI = (pluginManager: GraphPluginManager): void => {
|
|
56
91
|
// Register Pure as a language in `monaco-editor`
|
|
@@ -78,7 +113,7 @@ export const setupTextEdtiorAPI = (pluginManager: GraphPluginManager): void => {
|
|
|
78
113
|
// See https://sgom.es/posts/2020-06-15-everything-you-never-wanted-to-know-about-side-effects/
|
|
79
114
|
export const setupLegendApplicationUILibrary = async (
|
|
80
115
|
pluginManager: GraphPluginManager,
|
|
81
|
-
|
|
116
|
+
logger: LegendApplicationLogger,
|
|
82
117
|
): Promise<void> => {
|
|
83
118
|
setupTextEdtiorAPI(pluginManager);
|
|
84
119
|
|
|
@@ -92,19 +127,19 @@ export const setupLegendApplicationUILibrary = async (
|
|
|
92
127
|
.then(() => {
|
|
93
128
|
if (document.fonts.check(`1em ${MONOSPACED_FONT_FAMILY}`)) {
|
|
94
129
|
monacoEditorAPI.remeasureFonts();
|
|
95
|
-
|
|
130
|
+
logger.info(
|
|
96
131
|
LogEvent.create(APPLICATION_LOG_EVENT.TEXT_EDITOR_FONT_LOADED),
|
|
97
132
|
`Monospaced font '${MONOSPACED_FONT_FAMILY}' has been loaded`,
|
|
98
133
|
);
|
|
99
134
|
} else {
|
|
100
|
-
|
|
135
|
+
logger.error(
|
|
101
136
|
LogEvent.create(APPLICATION_LOG_EVENT.APPLICATION_SETUP_FAILURE),
|
|
102
137
|
fontLoadFailureErrorMessage,
|
|
103
138
|
);
|
|
104
139
|
}
|
|
105
140
|
})
|
|
106
141
|
.catch(() =>
|
|
107
|
-
|
|
142
|
+
logger.error(
|
|
108
143
|
LogEvent.create(APPLICATION_LOG_EVENT.APPLICATION_SETUP_FAILURE),
|
|
109
144
|
fontLoadFailureErrorMessage,
|
|
110
145
|
),
|
|
@@ -121,34 +156,35 @@ export const setupLegendApplicationUILibrary = async (
|
|
|
121
156
|
|
|
122
157
|
export abstract class LegendApplication {
|
|
123
158
|
protected config!: LegendApplicationConfig;
|
|
159
|
+
protected logger!: LegendApplicationLogger;
|
|
124
160
|
|
|
125
|
-
protected pluginManager:
|
|
161
|
+
protected pluginManager: LegendApplicationPluginManager;
|
|
126
162
|
protected basePresets: AbstractPreset[] = [];
|
|
127
163
|
protected basePlugins: AbstractPlugin[] = [];
|
|
128
164
|
|
|
129
|
-
protected log = new Log();
|
|
130
165
|
protected baseUrl!: string;
|
|
131
166
|
protected pluginRegister?:
|
|
132
167
|
| ((
|
|
133
|
-
pluginManager:
|
|
168
|
+
pluginManager: LegendApplicationPluginManager,
|
|
134
169
|
config: LegendApplicationConfig,
|
|
135
170
|
) => void)
|
|
136
171
|
| undefined;
|
|
137
172
|
protected _isConfigured = false;
|
|
138
173
|
|
|
139
|
-
protected constructor(pluginManager:
|
|
174
|
+
protected constructor(pluginManager: LegendApplicationPluginManager) {
|
|
140
175
|
this.pluginManager = pluginManager;
|
|
176
|
+
this.logger = new LegendApplicationWebConsole();
|
|
141
177
|
}
|
|
142
178
|
|
|
143
179
|
setup(options: {
|
|
144
180
|
/** Base URL of the application. e.g. /studio/, /query/ */
|
|
145
181
|
baseUrl: string;
|
|
146
182
|
/**
|
|
147
|
-
* Provide an alternative mechanism to register plugins and presets
|
|
148
|
-
* by allowing configuring specific plugin or preset.
|
|
183
|
+
* Provide an alternative mechanism to register and configure plugins and presets
|
|
184
|
+
* which is more flexible by allowing configuring specific plugin or preset.
|
|
149
185
|
*/
|
|
150
186
|
pluginRegister?: (
|
|
151
|
-
pluginManager:
|
|
187
|
+
pluginManager: LegendApplicationPluginManager,
|
|
152
188
|
config: LegendApplicationConfig,
|
|
153
189
|
) => void;
|
|
154
190
|
}): LegendApplication {
|
|
@@ -181,11 +217,6 @@ export abstract class LegendApplication {
|
|
|
181
217
|
return this;
|
|
182
218
|
}
|
|
183
219
|
|
|
184
|
-
withLoggers(loggers: Logger[]): LegendApplication {
|
|
185
|
-
loggers.forEach((logger) => this.log.registerLogger(logger));
|
|
186
|
-
return this;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
220
|
async fetchApplicationConfiguration(
|
|
190
221
|
baseUrl: string,
|
|
191
222
|
): Promise<[LegendApplicationConfig, Record<PropertyKey, object>]> {
|
|
@@ -197,7 +228,7 @@ export abstract class LegendApplication {
|
|
|
197
228
|
);
|
|
198
229
|
} catch (error) {
|
|
199
230
|
assertErrorThrown(error);
|
|
200
|
-
this.
|
|
231
|
+
this.logger.error(
|
|
201
232
|
LogEvent.create(
|
|
202
233
|
APPLICATION_LOG_EVENT.APPLICATION_CONFIGURATION_FAILURE,
|
|
203
234
|
),
|
|
@@ -215,7 +246,7 @@ export abstract class LegendApplication {
|
|
|
215
246
|
);
|
|
216
247
|
} catch (error) {
|
|
217
248
|
assertErrorThrown(error);
|
|
218
|
-
this.
|
|
249
|
+
this.logger.error(
|
|
219
250
|
LogEvent.create(
|
|
220
251
|
APPLICATION_LOG_EVENT.APPLICATION_CONFIGURATION_FAILURE,
|
|
221
252
|
),
|
|
@@ -255,13 +286,13 @@ export abstract class LegendApplication {
|
|
|
255
286
|
|
|
256
287
|
await this.loadApplication();
|
|
257
288
|
|
|
258
|
-
this.
|
|
289
|
+
this.logger.info(
|
|
259
290
|
LogEvent.create(APPLICATION_LOG_EVENT.APPLICATION_LOADED),
|
|
260
291
|
'Legend application loaded',
|
|
261
292
|
);
|
|
262
293
|
} catch (error) {
|
|
263
294
|
assertErrorThrown(error);
|
|
264
|
-
this.
|
|
295
|
+
this.logger.error(
|
|
265
296
|
LogEvent.create(APPLICATION_LOG_EVENT.APPLICATION_FAILURE),
|
|
266
297
|
'Failed to load Legend application',
|
|
267
298
|
);
|
|
@@ -0,0 +1,73 @@
|
|
|
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 EventNotifierPlugin,
|
|
19
|
+
type EventNotifierServicePluginManager,
|
|
20
|
+
type LoggerPlugin,
|
|
21
|
+
type LoggerPluginManager,
|
|
22
|
+
type TelemetryServicePlugin,
|
|
23
|
+
type TelemetryServicePluginManager,
|
|
24
|
+
type TracerServicePlugin,
|
|
25
|
+
type TracerServicePluginManager,
|
|
26
|
+
AbstractPluginManager,
|
|
27
|
+
} from '@finos/legend-shared';
|
|
28
|
+
|
|
29
|
+
export class LegendApplicationPluginManager
|
|
30
|
+
extends AbstractPluginManager
|
|
31
|
+
implements
|
|
32
|
+
LoggerPluginManager,
|
|
33
|
+
TelemetryServicePluginManager,
|
|
34
|
+
TracerServicePluginManager,
|
|
35
|
+
EventNotifierServicePluginManager
|
|
36
|
+
{
|
|
37
|
+
protected loggerPlugins: LoggerPlugin[] = [];
|
|
38
|
+
protected telemetryServicePlugins: TelemetryServicePlugin[] = [];
|
|
39
|
+
protected tracerServicePlugins: TracerServicePlugin<unknown>[] = [];
|
|
40
|
+
protected eventNotifierPlugins: EventNotifierPlugin[] = [];
|
|
41
|
+
|
|
42
|
+
registerLoggerPlugin(plugin: LoggerPlugin): void {
|
|
43
|
+
this.loggerPlugins.push(plugin);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
registerTelemetryServicePlugin(plugin: TelemetryServicePlugin): void {
|
|
47
|
+
this.telemetryServicePlugins.push(plugin);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
registerTracerServicePlugin(plugin: TracerServicePlugin<unknown>): void {
|
|
51
|
+
this.tracerServicePlugins.push(plugin);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
registerEventNotifierPlugin(plugin: EventNotifierPlugin): void {
|
|
55
|
+
this.eventNotifierPlugins.push(plugin);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
getLoggerPlugins(): LoggerPlugin[] {
|
|
59
|
+
return [...this.loggerPlugins];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
getTelemetryServicePlugins(): TelemetryServicePlugin[] {
|
|
63
|
+
return [...this.telemetryServicePlugins];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
getTracerServicePlugins(): TracerServicePlugin<unknown>[] {
|
|
67
|
+
return [...this.tracerServicePlugins];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
getEventNotifierPlugins(): EventNotifierPlugin[] {
|
|
71
|
+
return [...this.eventNotifierPlugins];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import Dialog from '@
|
|
18
|
-
import type { ActionAlertInfo } from '../stores/ApplicationStore';
|
|
17
|
+
import { Dialog } from '@finos/legend-art';
|
|
19
18
|
import {
|
|
20
19
|
ActionAlertActionType,
|
|
21
20
|
ActionAlertType,
|
|
21
|
+
type ActionAlertInfo,
|
|
22
22
|
} from '../stores/ApplicationStore';
|
|
23
23
|
import { observer } from 'mobx-react-lite';
|
|
24
24
|
import { noop } from '@finos/legend-shared';
|
|
@@ -58,6 +58,7 @@ const ActionAlertInner = observer((props: { info: ActionAlertInfo }) => {
|
|
|
58
58
|
open={Boolean(applicationStore.actionAlertInfo)}
|
|
59
59
|
onClose={noop} // disallow closing dialog by using Esc key or clicking on the backdrop
|
|
60
60
|
TransitionProps={{
|
|
61
|
+
appear: false, // disable transition
|
|
61
62
|
onEnter: handleEnter,
|
|
62
63
|
}}
|
|
63
64
|
>
|
|
@@ -18,9 +18,9 @@ import { createContext, useContext } from 'react';
|
|
|
18
18
|
import { useLocalObservable } from 'mobx-react-lite';
|
|
19
19
|
import { ApplicationStore } from '../stores/ApplicationStore';
|
|
20
20
|
import type { LegendApplicationConfig } from '../stores/ApplicationConfig';
|
|
21
|
-
import type { Log } from '@finos/legend-shared';
|
|
22
21
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
23
|
-
import
|
|
22
|
+
import { useWebApplicationNavigator } from './WebApplicationNavigatorProvider';
|
|
23
|
+
import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager';
|
|
24
24
|
|
|
25
25
|
const ApplicationStoreContext = createContext<
|
|
26
26
|
ApplicationStore<LegendApplicationConfig> | undefined
|
|
@@ -29,16 +29,15 @@ const ApplicationStoreContext = createContext<
|
|
|
29
29
|
export const ApplicationStoreProvider = <T extends LegendApplicationConfig>({
|
|
30
30
|
children,
|
|
31
31
|
config,
|
|
32
|
-
|
|
33
|
-
log,
|
|
32
|
+
pluginManager,
|
|
34
33
|
}: {
|
|
35
34
|
children: React.ReactNode;
|
|
36
35
|
config: T;
|
|
37
|
-
|
|
38
|
-
log: Log;
|
|
36
|
+
pluginManager: LegendApplicationPluginManager;
|
|
39
37
|
}): React.ReactElement => {
|
|
38
|
+
const navigator = useWebApplicationNavigator();
|
|
40
39
|
const applicationStore = useLocalObservable(
|
|
41
|
-
() => new ApplicationStore(config, navigator,
|
|
40
|
+
() => new ApplicationStore(config, navigator, pluginManager),
|
|
42
41
|
);
|
|
43
42
|
return (
|
|
44
43
|
<ApplicationStoreContext.Provider value={applicationStore}>
|
|
@@ -19,20 +19,14 @@ import { ApplicationStore } from '../stores/ApplicationStore';
|
|
|
19
19
|
import { WebApplicationNavigator } from '../stores/WebApplicationNavigator';
|
|
20
20
|
import type { LegendApplicationConfig } from '../stores/ApplicationConfig';
|
|
21
21
|
import { ApplicationStoreProvider } from './ApplicationStoreProvider';
|
|
22
|
-
import {
|
|
22
|
+
import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager';
|
|
23
23
|
|
|
24
|
-
export const TEST__ApplicationStoreProvider
|
|
25
|
-
children,
|
|
26
|
-
config,
|
|
27
|
-
}: {
|
|
24
|
+
export const TEST__ApplicationStoreProvider: React.FC<{
|
|
28
25
|
children: React.ReactNode;
|
|
29
26
|
config: LegendApplicationConfig;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
navigator={new WebApplicationNavigator(createMemoryHistory())}
|
|
34
|
-
log={new Log()}
|
|
35
|
-
>
|
|
27
|
+
pluginManager: LegendApplicationPluginManager;
|
|
28
|
+
}> = ({ children, config, pluginManager }) => (
|
|
29
|
+
<ApplicationStoreProvider config={config} pluginManager={pluginManager}>
|
|
36
30
|
{children}
|
|
37
31
|
</ApplicationStoreProvider>
|
|
38
32
|
);
|
|
@@ -41,6 +35,7 @@ export const TEST__provideMockedApplicationStore = <
|
|
|
41
35
|
T extends LegendApplicationConfig,
|
|
42
36
|
>(
|
|
43
37
|
config: T,
|
|
38
|
+
pluginManager: LegendApplicationPluginManager,
|
|
44
39
|
customization?: {
|
|
45
40
|
mock?: ApplicationStore<T>;
|
|
46
41
|
navigator?: WebApplicationNavigator;
|
|
@@ -52,7 +47,7 @@ export const TEST__provideMockedApplicationStore = <
|
|
|
52
47
|
config,
|
|
53
48
|
customization?.navigator ??
|
|
54
49
|
new WebApplicationNavigator(createMemoryHistory()),
|
|
55
|
-
|
|
50
|
+
pluginManager,
|
|
56
51
|
);
|
|
57
52
|
const MockedApplicationStoreProvider = require('./ApplicationStoreProvider'); // eslint-disable-line @typescript-eslint/no-unsafe-assignment
|
|
58
53
|
MockedApplicationStoreProvider.useApplicationStore = jest.fn();
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import Dialog from '@material-ui/core/Dialog';
|
|
18
17
|
import { observer } from 'mobx-react-lite';
|
|
19
|
-
import { PanelLoadingIndicator } from '@finos/legend-art';
|
|
18
|
+
import { PanelLoadingIndicator, Dialog } from '@finos/legend-art';
|
|
20
19
|
import { noop } from '@finos/legend-shared';
|
|
21
20
|
import { useApplicationStore } from './ApplicationStoreProvider';
|
|
22
21
|
|
|
@@ -40,6 +39,9 @@ export const BlockingAlert = observer(() => {
|
|
|
40
39
|
root: 'blocking-alert__root-container',
|
|
41
40
|
container: 'blocking-alert__container',
|
|
42
41
|
}}
|
|
42
|
+
TransitionProps={{
|
|
43
|
+
appear: false, // disable transition
|
|
44
|
+
}}
|
|
43
45
|
>
|
|
44
46
|
<div className="modal modal--dark blocking-alert">
|
|
45
47
|
<PanelLoadingIndicator isLoading={Boolean(info.showLoading)} />
|