@finos/legend-application-marketplace 0.0.11

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 (93) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +3 -0
  3. package/lib/__lib__/LegendMarketplaceEventHelper.d.ts +20 -0
  4. package/lib/__lib__/LegendMarketplaceEventHelper.d.ts.map +1 -0
  5. package/lib/__lib__/LegendMarketplaceEventHelper.js +22 -0
  6. package/lib/__lib__/LegendMarketplaceEventHelper.js.map +1 -0
  7. package/lib/__lib__/LegendMarketplaceNavigation.d.ts +19 -0
  8. package/lib/__lib__/LegendMarketplaceNavigation.d.ts.map +1 -0
  9. package/lib/__lib__/LegendMarketplaceNavigation.js +19 -0
  10. package/lib/__lib__/LegendMarketplaceNavigation.js.map +1 -0
  11. package/lib/__lib__/LegendMarketplaceTesting.d.ts +19 -0
  12. package/lib/__lib__/LegendMarketplaceTesting.d.ts.map +1 -0
  13. package/lib/__lib__/LegendMarketplaceTesting.js +20 -0
  14. package/lib/__lib__/LegendMarketplaceTesting.js.map +1 -0
  15. package/lib/application/LegendMarketplace.d.ts +27 -0
  16. package/lib/application/LegendMarketplace.d.ts.map +1 -0
  17. package/lib/application/LegendMarketplace.js +39 -0
  18. package/lib/application/LegendMarketplace.js.map +1 -0
  19. package/lib/application/LegendMarketplaceApplicationConfig.d.ts +53 -0
  20. package/lib/application/LegendMarketplaceApplicationConfig.d.ts.map +1 -0
  21. package/lib/application/LegendMarketplaceApplicationConfig.js +65 -0
  22. package/lib/application/LegendMarketplaceApplicationConfig.js.map +1 -0
  23. package/lib/application/LegendMarketplacePluginManager.d.ts +22 -0
  24. package/lib/application/LegendMarketplacePluginManager.d.ts.map +1 -0
  25. package/lib/application/LegendMarketplacePluginManager.js +25 -0
  26. package/lib/application/LegendMarketplacePluginManager.js.map +1 -0
  27. package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.d.ts +18 -0
  28. package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.d.ts.map +1 -0
  29. package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.js +46 -0
  30. package/lib/application/__test-utils__/LegendMarketplaceApplicationTestUtils.js.map +1 -0
  31. package/lib/components/LegendMarketplaceFrameworkProvider.d.ts +22 -0
  32. package/lib/components/LegendMarketplaceFrameworkProvider.d.ts.map +1 -0
  33. package/lib/components/LegendMarketplaceFrameworkProvider.js +31 -0
  34. package/lib/components/LegendMarketplaceFrameworkProvider.js.map +1 -0
  35. package/lib/components/LegendMarketplaceWebApplication.d.ts +24 -0
  36. package/lib/components/LegendMarketplaceWebApplication.d.ts.map +1 -0
  37. package/lib/components/LegendMarketplaceWebApplication.js +43 -0
  38. package/lib/components/LegendMarketplaceWebApplication.js.map +1 -0
  39. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.d.ts +30 -0
  40. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.d.ts.map +1 -0
  41. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.js +56 -0
  42. package/lib/components/__test-utils__/LegendMarketplaceStoreTestUtils.js.map +1 -0
  43. package/lib/components/extensions/Core_LegendMarketplaceApplicationPlugin.d.ts +21 -0
  44. package/lib/components/extensions/Core_LegendMarketplaceApplicationPlugin.d.ts.map +1 -0
  45. package/lib/components/extensions/Core_LegendMarketplaceApplicationPlugin.js +24 -0
  46. package/lib/components/extensions/Core_LegendMarketplaceApplicationPlugin.js.map +1 -0
  47. package/lib/components/header/LegendMarketplaceAppInfo.d.ts +21 -0
  48. package/lib/components/header/LegendMarketplaceAppInfo.d.ts.map +1 -0
  49. package/lib/components/header/LegendMarketplaceAppInfo.js +28 -0
  50. package/lib/components/header/LegendMarketplaceAppInfo.js.map +1 -0
  51. package/lib/components/header/LegendMarketplaceHeader.d.ts +19 -0
  52. package/lib/components/header/LegendMarketplaceHeader.d.ts.map +1 -0
  53. package/lib/components/header/LegendMarketplaceHeader.js +36 -0
  54. package/lib/components/header/LegendMarketplaceHeader.js.map +1 -0
  55. package/lib/components/home/LegendMarketplaceHome.d.ts +19 -0
  56. package/lib/components/home/LegendMarketplaceHome.d.ts.map +1 -0
  57. package/lib/components/home/LegendMarketplaceHome.js +22 -0
  58. package/lib/components/home/LegendMarketplaceHome.js.map +1 -0
  59. package/lib/index.css +17 -0
  60. package/lib/index.css.map +1 -0
  61. package/lib/index.d.ts +22 -0
  62. package/lib/index.d.ts.map +1 -0
  63. package/lib/index.js +24 -0
  64. package/lib/index.js.map +1 -0
  65. package/lib/package.json +87 -0
  66. package/lib/stores/LegendMarketplaceApplicationPlugin.d.ts +26 -0
  67. package/lib/stores/LegendMarketplaceApplicationPlugin.d.ts.map +1 -0
  68. package/lib/stores/LegendMarketplaceApplicationPlugin.js +27 -0
  69. package/lib/stores/LegendMarketplaceApplicationPlugin.js.map +1 -0
  70. package/lib/stores/LegendMarketplaceBaseStore.d.ts +30 -0
  71. package/lib/stores/LegendMarketplaceBaseStore.d.ts.map +1 -0
  72. package/lib/stores/LegendMarketplaceBaseStore.js +63 -0
  73. package/lib/stores/LegendMarketplaceBaseStore.js.map +1 -0
  74. package/package.json +87 -0
  75. package/src/__lib__/LegendMarketplaceEventHelper.ts +26 -0
  76. package/src/__lib__/LegendMarketplaceNavigation.ts +19 -0
  77. package/src/__lib__/LegendMarketplaceTesting.ts +19 -0
  78. package/src/application/LegendMarketplace.tsx +65 -0
  79. package/src/application/LegendMarketplaceApplicationConfig.ts +129 -0
  80. package/src/application/LegendMarketplacePluginManager.ts +28 -0
  81. package/src/application/__test-utils__/LegendMarketplaceApplicationTestUtils.ts +53 -0
  82. package/src/components/LegendMarketplaceFrameworkProvider.tsx +70 -0
  83. package/src/components/LegendMarketplaceWebApplication.tsx +117 -0
  84. package/src/components/__test-utils__/LegendMarketplaceStoreTestUtils.tsx +98 -0
  85. package/src/components/extensions/Core_LegendMarketplaceApplicationPlugin.tsx +26 -0
  86. package/src/components/header/LegendMarketplaceAppInfo.tsx +166 -0
  87. package/src/components/header/LegendMarketplaceHeader.tsx +68 -0
  88. package/src/components/home/LegendMarketplaceHome.tsx +41 -0
  89. package/src/index.ts +28 -0
  90. package/src/stores/LegendMarketplaceApplicationPlugin.ts +30 -0
  91. package/src/stores/LegendMarketplaceBaseStore.ts +105 -0
  92. package/tsconfig.json +81 -0
  93. package/tsconfig.package.json +56 -0
package/lib/index.js ADDED
@@ -0,0 +1,24 @@
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
+ // application
17
+ export * from './application/LegendMarketplace.js';
18
+ export * from './application/LegendMarketplaceApplicationConfig.js';
19
+ export * from './application/LegendMarketplacePluginManager.js';
20
+ export { useLegendMarketplaceApplicationStore, useLegendMarketplaceBaseStore, } from './components/LegendMarketplaceFrameworkProvider.js';
21
+ export {} from './stores/LegendMarketplaceBaseStore.js';
22
+ // stores
23
+ export * from './stores/LegendMarketplaceApplicationPlugin.js';
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc;AACd,cAAc,oCAAoC,CAAC;AACnD,cAAc,qDAAqD,CAAC;AACpE,cAAc,iDAAiD,CAAC;AAChE,OAAO,EACL,oCAAoC,EACpC,6BAA6B,GAC9B,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAA0C,MAAM,wCAAwC,CAAC;AAEhG,SAAS;AACT,cAAc,gDAAgD,CAAC"}
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "@finos/legend-application-marketplace",
3
+ "version": "0.0.11",
4
+ "description": "Legend Marketplace application core",
5
+ "keywords": [
6
+ "legend",
7
+ "legend-application",
8
+ "legend-marketplace",
9
+ "search",
10
+ "discovery"
11
+ ],
12
+ "homepage": "https://github.com/finos/legend-studio/tree/master/packages/legend-application-marketplace",
13
+ "bugs": {
14
+ "url": "https://github.com/finos/legend-studio/issues"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/finos/legend-studio.git",
19
+ "directory": "packages/legend-application-marketplace"
20
+ },
21
+ "license": "Apache-2.0",
22
+ "sideEffects": false,
23
+ "type": "module",
24
+ "exports": {
25
+ ".": "./lib/index.js",
26
+ "./test": "./lib/__test__.js",
27
+ "./lib/index.css": "./lib/index.css"
28
+ },
29
+ "module": "lib/index.js",
30
+ "types": "lib/index.d.ts",
31
+ "scripts": {
32
+ "build": "yarn clean && yarn build:sass && yarn build:ts",
33
+ "build:sass": "cross-env INIT_CWD=$INIT_CWD node ../../scripts/workflow/buildSass.js",
34
+ "build:ts": "tsc --project ./tsconfig.build.json",
35
+ "clean": "npm-run-all clean:cache clean:lib",
36
+ "clean:cache": "rimraf \"build\"",
37
+ "clean:lib": "rimraf \"lib\"",
38
+ "dev": "npm-run-all --parallel dev:sass dev:ts",
39
+ "dev:sass": "sass style:lib --watch --load-path=../../node_modules/@finos/legend-art/scss",
40
+ "dev:ts": "tsc --watch --preserveWatchOutput",
41
+ "lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location ./build/.eslintcache --report-unused-disable-directives --parser-options=project:\"./tsconfig.json\" \"./src/**/*.{js,ts,tsx}\"",
42
+ "publish:prepare": "node ../../scripts/release/preparePublishContent.js",
43
+ "publish:snapshot": "node ../../scripts/release/publishDevSnapshot.js",
44
+ "test": "jest",
45
+ "test:watch": "jest --watch"
46
+ },
47
+ "dependencies": {
48
+ "@finos/legend-application": "workspace:*",
49
+ "@finos/legend-art": "workspace:*",
50
+ "@finos/legend-graph": "workspace:*",
51
+ "@finos/legend-server-depot": "workspace:*",
52
+ "@finos/legend-shared": "workspace:*",
53
+ "@testing-library/dom": "10.4.0",
54
+ "@testing-library/react": "16.2.0",
55
+ "@types/react": "19.0.10",
56
+ "@types/react-dom": "19.0.4",
57
+ "mobx": "6.13.6",
58
+ "mobx-react-lite": "4.1.0",
59
+ "mobx-utils": "6.1.0",
60
+ "node-diff3": "3.1.2",
61
+ "react": "19.0.0",
62
+ "react-dnd": "16.0.1",
63
+ "react-dom": "19.0.0",
64
+ "serializr": "3.0.3",
65
+ "yaml": "2.7.0"
66
+ },
67
+ "devDependencies": {
68
+ "@finos/legend-dev-utils": "workspace:*",
69
+ "@jest/globals": "29.7.0",
70
+ "cross-env": "7.0.3",
71
+ "eslint": "9.20.1",
72
+ "jest": "29.7.0",
73
+ "npm-run-all": "4.1.5",
74
+ "rimraf": "6.0.1",
75
+ "sass": "1.85.0",
76
+ "typescript": "5.7.3"
77
+ },
78
+ "peerDependencies": {
79
+ "react": "^19.0.0"
80
+ },
81
+ "publishConfig": {
82
+ "directory": "build/publishContent"
83
+ },
84
+ "extensions": {
85
+ "applicationMarketplacePlugin": "@finos/legend-application-marketplace-plugin-core"
86
+ }
87
+ }
@@ -0,0 +1,26 @@
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 { LegendApplicationPlugin } from '@finos/legend-application';
17
+ import type { LegendMarketplacePluginManager } from '../application/LegendMarketplacePluginManager.js';
18
+ export declare abstract class LegendMarketplaceApplicationPlugin extends LegendApplicationPlugin {
19
+ /**
20
+ * This helps to better type-check for this empty abtract type
21
+ * See https://github.com/finos/legend-studio/blob/master/docs/technical/typescript-usage.md#understand-typescript-structual-type-system
22
+ */
23
+ private readonly _$nominalTypeBrand;
24
+ install(pluginManager: LegendMarketplacePluginManager): void;
25
+ }
26
+ //# sourceMappingURL=LegendMarketplaceApplicationPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendMarketplaceApplicationPlugin.d.ts","sourceRoot":"","sources":["../../src/stores/LegendMarketplaceApplicationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kDAAkD,CAAC;AAEvG,8BAAsB,kCAAmC,SAAQ,uBAAuB;IACtF;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAwC;IAE3E,OAAO,CAAC,aAAa,EAAE,8BAA8B,GAAG,IAAI;CAG7D"}
@@ -0,0 +1,27 @@
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 { LegendApplicationPlugin } from '@finos/legend-application';
17
+ export class LegendMarketplaceApplicationPlugin extends LegendApplicationPlugin {
18
+ /**
19
+ * This helps to better type-check for this empty abtract type
20
+ * See https://github.com/finos/legend-studio/blob/master/docs/technical/typescript-usage.md#understand-typescript-structual-type-system
21
+ */
22
+ _$nominalTypeBrand;
23
+ install(pluginManager) {
24
+ pluginManager.registerApplicationPlugin(this);
25
+ }
26
+ }
27
+ //# sourceMappingURL=LegendMarketplaceApplicationPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendMarketplaceApplicationPlugin.js","sourceRoot":"","sources":["../../src/stores/LegendMarketplaceApplicationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,MAAM,OAAgB,kCAAmC,SAAQ,uBAAuB;IACtF;;;OAGG;IACc,kBAAkB,CAAwC;IAE3E,OAAO,CAAC,aAA6C;QACnD,aAAa,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;CACF"}
@@ -0,0 +1,30 @@
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 { type GeneratorFn, ActionState } from '@finos/legend-shared';
17
+ import { type ApplicationStore } from '@finos/legend-application';
18
+ import { DepotServerClient } from '@finos/legend-server-depot';
19
+ import type { LegendMarketplaceApplicationConfig } from '../application/LegendMarketplaceApplicationConfig.js';
20
+ import type { LegendMarketplacePluginManager } from '../application/LegendMarketplacePluginManager.js';
21
+ export type LegendMarketplaceApplicationStore = ApplicationStore<LegendMarketplaceApplicationConfig, LegendMarketplacePluginManager>;
22
+ export declare class LegendMarketplaceBaseStore {
23
+ readonly applicationStore: LegendMarketplaceApplicationStore;
24
+ readonly depotServerClient: DepotServerClient;
25
+ readonly pluginManager: LegendMarketplacePluginManager;
26
+ readonly initState: ActionState;
27
+ constructor(applicationStore: LegendMarketplaceApplicationStore);
28
+ initialize(): GeneratorFn<void>;
29
+ }
30
+ //# sourceMappingURL=LegendMarketplaceBaseStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendMarketplaceBaseStore.d.ts","sourceRoot":"","sources":["../../src/stores/LegendMarketplaceBaseStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,sDAAsD,CAAC;AAC/G,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kDAAkD,CAAC;AAGvG,MAAM,MAAM,iCAAiC,GAAG,gBAAgB,CAC9D,kCAAkC,EAClC,8BAA8B,CAC/B,CAAC;AAEF,qBAAa,0BAA0B;IACrC,QAAQ,CAAC,gBAAgB,EAAE,iCAAiC,CAAC;IAC7D,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,aAAa,EAAE,8BAA8B,CAAC;IAEvD,QAAQ,CAAC,SAAS,cAAwB;gBAE9B,gBAAgB,EAAE,iCAAiC;IAiB9D,UAAU,IAAI,WAAW,CAAC,IAAI,CAAC;CAyCjC"}
@@ -0,0 +1,63 @@
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 { ActionState, LogEvent, assertErrorThrown, } from '@finos/legend-shared';
17
+ import { LegendApplicationTelemetryHelper, APPLICATION_EVENT, } from '@finos/legend-application';
18
+ import { flow, makeObservable } from 'mobx';
19
+ import { DepotServerClient } from '@finos/legend-server-depot';
20
+ import { getCurrentUserIDFromEngineServer } from '@finos/legend-graph';
21
+ import { LegendMarketplaceEventHelper } from '../__lib__/LegendMarketplaceEventHelper.js';
22
+ export class LegendMarketplaceBaseStore {
23
+ applicationStore;
24
+ depotServerClient;
25
+ pluginManager;
26
+ initState = ActionState.create();
27
+ constructor(applicationStore) {
28
+ makeObservable(this, {
29
+ initialize: flow,
30
+ });
31
+ this.applicationStore = applicationStore;
32
+ this.pluginManager = applicationStore.pluginManager;
33
+ // depot
34
+ this.depotServerClient = new DepotServerClient({
35
+ serverUrl: this.applicationStore.config.depotServerUrl,
36
+ });
37
+ this.depotServerClient.setTracerService(this.applicationStore.tracerService);
38
+ }
39
+ *initialize() {
40
+ if (!this.initState.isInInitialState) {
41
+ this.applicationStore.notificationService.notifyIllegalState('Base store is re-initialized');
42
+ return;
43
+ }
44
+ this.initState.inProgress();
45
+ // retrieved the user identity is not already configured
46
+ if (this.applicationStore.identityService.isAnonymous) {
47
+ try {
48
+ this.applicationStore.identityService.setCurrentUser((yield getCurrentUserIDFromEngineServer(this.applicationStore.config.engineServerUrl)));
49
+ }
50
+ catch (error) {
51
+ assertErrorThrown(error);
52
+ this.applicationStore.logService.error(LogEvent.create(APPLICATION_EVENT.IDENTITY_AUTO_FETCH__FAILURE), error);
53
+ this.applicationStore.notificationService.notifyWarning(error.message);
54
+ }
55
+ }
56
+ // setup telemetry service
57
+ this.applicationStore.telemetryService.setup();
58
+ LegendApplicationTelemetryHelper.logEvent_ApplicationInitializationSucceeded(this.applicationStore.telemetryService, this.applicationStore);
59
+ LegendMarketplaceEventHelper.notify_ApplicationLoadSucceeded(this.applicationStore.eventService);
60
+ this.initState.complete();
61
+ }
62
+ }
63
+ //# sourceMappingURL=LegendMarketplaceBaseStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendMarketplaceBaseStore.js","sourceRoot":"","sources":["../../src/stores/LegendMarketplaceBaseStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,WAAW,EACX,QAAQ,EACR,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,gCAAgC,EAChC,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAGvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAO1F,MAAM,OAAO,0BAA0B;IAC5B,gBAAgB,CAAoC;IACpD,iBAAiB,CAAoB;IACrC,aAAa,CAAiC;IAE9C,SAAS,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IAE1C,YAAY,gBAAmD;QAC7D,cAAc,CAA6B,IAAI,EAAE;YAC/C,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;QAEH,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC,aAAa,CAAC;QAEpD,QAAQ;QACR,IAAI,CAAC,iBAAiB,GAAG,IAAI,iBAAiB,CAAC;YAC7C,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,cAAc;SACvD,CAAC,CAAC;QACH,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CACrC,IAAI,CAAC,gBAAgB,CAAC,aAAa,CACpC,CAAC;IACJ,CAAC;IAED,CAAC,UAAU;QACT,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAC;YACrC,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,kBAAkB,CAC1D,8BAA8B,CAC/B,CAAC;YACF,OAAO;QACT,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;QAE5B,wDAAwD;QACxD,IAAI,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC;YACtD,IAAI,CAAC;gBACH,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,cAAc,CAClD,CAAC,MAAM,gCAAgC,CACrC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,eAAe,CAC7C,CAAW,CACb,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;gBACzB,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,KAAK,CACpC,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,4BAA4B,CAAC,EAC/D,KAAK,CACN,CAAC;gBACF,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACzE,CAAC;QACH,CAAC;QAED,0BAA0B;QAC1B,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;QAE/C,gCAAgC,CAAC,2CAA2C,CAC1E,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,EACtC,IAAI,CAAC,gBAAgB,CACtB,CAAC;QAEF,4BAA4B,CAAC,+BAA+B,CAC1D,IAAI,CAAC,gBAAgB,CAAC,YAAY,CACnC,CAAC;QAEF,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IAC5B,CAAC;CACF"}
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "@finos/legend-application-marketplace",
3
+ "version": "0.0.11",
4
+ "description": "Legend Marketplace application core",
5
+ "keywords": [
6
+ "legend",
7
+ "legend-application",
8
+ "legend-marketplace",
9
+ "search",
10
+ "discovery"
11
+ ],
12
+ "homepage": "https://github.com/finos/legend-studio/tree/master/packages/legend-application-marketplace",
13
+ "bugs": {
14
+ "url": "https://github.com/finos/legend-studio/issues"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/finos/legend-studio.git",
19
+ "directory": "packages/legend-application-marketplace"
20
+ },
21
+ "license": "Apache-2.0",
22
+ "sideEffects": false,
23
+ "type": "module",
24
+ "exports": {
25
+ ".": "./lib/index.js",
26
+ "./test": "./lib/__test__.js",
27
+ "./lib/index.css": "./lib/index.css"
28
+ },
29
+ "module": "lib/index.js",
30
+ "types": "lib/index.d.ts",
31
+ "scripts": {
32
+ "build": "yarn clean && yarn build:sass && yarn build:ts",
33
+ "build:sass": "cross-env INIT_CWD=$INIT_CWD node ../../scripts/workflow/buildSass.js",
34
+ "build:ts": "tsc --project ./tsconfig.build.json",
35
+ "clean": "npm-run-all clean:cache clean:lib",
36
+ "clean:cache": "rimraf \"build\"",
37
+ "clean:lib": "rimraf \"lib\"",
38
+ "dev": "npm-run-all --parallel dev:sass dev:ts",
39
+ "dev:sass": "sass style:lib --watch --load-path=../../node_modules/@finos/legend-art/scss",
40
+ "dev:ts": "tsc --watch --preserveWatchOutput",
41
+ "lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location ./build/.eslintcache --report-unused-disable-directives --parser-options=project:\"./tsconfig.json\" \"./src/**/*.{js,ts,tsx}\"",
42
+ "publish:prepare": "node ../../scripts/release/preparePublishContent.js",
43
+ "publish:snapshot": "node ../../scripts/release/publishDevSnapshot.js",
44
+ "test": "jest",
45
+ "test:watch": "jest --watch"
46
+ },
47
+ "dependencies": {
48
+ "@finos/legend-application": "16.0.35",
49
+ "@finos/legend-art": "7.1.92",
50
+ "@finos/legend-graph": "32.1.18",
51
+ "@finos/legend-server-depot": "6.0.87",
52
+ "@finos/legend-shared": "11.0.10",
53
+ "@testing-library/dom": "10.4.0",
54
+ "@testing-library/react": "16.2.0",
55
+ "@types/react": "19.0.10",
56
+ "@types/react-dom": "19.0.4",
57
+ "mobx": "6.13.6",
58
+ "mobx-react-lite": "4.1.0",
59
+ "mobx-utils": "6.1.0",
60
+ "node-diff3": "3.1.2",
61
+ "react": "19.0.0",
62
+ "react-dnd": "16.0.1",
63
+ "react-dom": "19.0.0",
64
+ "serializr": "3.0.3",
65
+ "yaml": "2.7.0"
66
+ },
67
+ "devDependencies": {
68
+ "@finos/legend-dev-utils": "2.2.4",
69
+ "@jest/globals": "29.7.0",
70
+ "cross-env": "7.0.3",
71
+ "eslint": "9.20.1",
72
+ "jest": "29.7.0",
73
+ "npm-run-all": "4.1.5",
74
+ "rimraf": "6.0.1",
75
+ "sass": "1.85.0",
76
+ "typescript": "5.7.3"
77
+ },
78
+ "peerDependencies": {
79
+ "react": "^19.0.0"
80
+ },
81
+ "publishConfig": {
82
+ "directory": "build/publishContent"
83
+ },
84
+ "extensions": {
85
+ "applicationMarketplacePlugin": "@finos/legend-application-marketplace-plugin-core"
86
+ }
87
+ }
@@ -0,0 +1,26 @@
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 EventService,
19
+ APPLICATION_EVENT,
20
+ } from '@finos/legend-application';
21
+
22
+ export class LegendMarketplaceEventHelper {
23
+ static notify_ApplicationLoadSucceeded(service: EventService): void {
24
+ service.notify(APPLICATION_EVENT.APPLICATION_LOAD__SUCCESS, {});
25
+ }
26
+ }
@@ -0,0 +1,19 @@
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
+ export const LEGEND_MARKETPLACE_ROUTE_PATTERN = Object.freeze({
18
+ DEFAULT: '/',
19
+ });
@@ -0,0 +1,19 @@
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
+ export enum LEGEND_MARKETPLACE_TEST_ID {
18
+ HEADER = 'legend-marketplace-header',
19
+ }
@@ -0,0 +1,65 @@
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 { createRoot } from 'react-dom/client';
18
+ import {
19
+ type LegendApplicationConfig,
20
+ type LegendApplicationConfigurationInput,
21
+ ApplicationStoreProvider,
22
+ Core_LegendApplicationPlugin,
23
+ getApplicationRootElement,
24
+ LegendApplication,
25
+ } from '@finos/legend-application';
26
+ import {
27
+ type LegendMarketplaceApplicationConfigurationData,
28
+ LegendMarketplaceApplicationConfig,
29
+ } from './LegendMarketplaceApplicationConfig.js';
30
+ import { LegendMarketplacePluginManager } from './LegendMarketplacePluginManager.js';
31
+ import { Core_LegendMarketplaceApplicationPlugin } from '../components/extensions/Core_LegendMarketplaceApplicationPlugin.js';
32
+ import type { LegendMarketplaceApplicationStore } from '../stores/LegendMarketplaceBaseStore.js';
33
+ import { LegendMarketplaceWebApplication } from '../components/LegendMarketplaceWebApplication.js';
34
+
35
+ export class LegendMarketplace extends LegendApplication {
36
+ declare config: LegendMarketplaceApplicationConfig;
37
+ declare pluginManager: LegendMarketplacePluginManager;
38
+
39
+ static create(): LegendMarketplace {
40
+ const application = new LegendMarketplace(
41
+ LegendMarketplacePluginManager.create(),
42
+ );
43
+ application.withBasePlugins([
44
+ new Core_LegendApplicationPlugin(),
45
+ new Core_LegendMarketplaceApplicationPlugin(),
46
+ ]);
47
+ return application;
48
+ }
49
+
50
+ async configureApplication(
51
+ input: LegendApplicationConfigurationInput<LegendMarketplaceApplicationConfigurationData>,
52
+ ): Promise<LegendApplicationConfig> {
53
+ return new LegendMarketplaceApplicationConfig(input);
54
+ }
55
+
56
+ async loadApplication(
57
+ applicationStore: LegendMarketplaceApplicationStore,
58
+ ): Promise<void> {
59
+ createRoot(getApplicationRootElement()).render(
60
+ <ApplicationStoreProvider store={applicationStore}>
61
+ <LegendMarketplaceWebApplication baseUrl={this.baseAddress} />
62
+ </ApplicationStoreProvider>,
63
+ );
64
+ }
65
+ }
@@ -0,0 +1,129 @@
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 { createModelSchema, optional, primitive } from 'serializr';
18
+ import {
19
+ type PlainObject,
20
+ assertNonNullable,
21
+ guaranteeNonEmptyString,
22
+ SerializationFactory,
23
+ } from '@finos/legend-shared';
24
+ import {
25
+ type LegendApplicationConfigurationData,
26
+ type LegendApplicationConfigurationInput,
27
+ LegendApplicationConfig,
28
+ } from '@finos/legend-application';
29
+
30
+ class LegendMarketplaceApplicationCoreOptions {
31
+ /**
32
+ * This flag is for any feature that is not production ready.
33
+ * Used to iterate over features until they are ready for production.
34
+ */
35
+ NonProductionFeatureFlag = false;
36
+
37
+ private static readonly serialization = new SerializationFactory(
38
+ createModelSchema(LegendMarketplaceApplicationCoreOptions, {
39
+ NonProductionFeatureFlag: optional(primitive()),
40
+ }),
41
+ );
42
+
43
+ static create(
44
+ configData: PlainObject<LegendMarketplaceApplicationCoreOptions>,
45
+ ): LegendMarketplaceApplicationCoreOptions {
46
+ return LegendMarketplaceApplicationCoreOptions.serialization.fromJson(
47
+ configData,
48
+ );
49
+ }
50
+ }
51
+
52
+ export interface LegendMarketplaceApplicationConfigurationData
53
+ extends LegendApplicationConfigurationData {
54
+ depot: { url: string };
55
+ engine: {
56
+ url: string;
57
+ queryUrl?: string;
58
+ };
59
+ studio?: { url: string };
60
+ query?: { url: string };
61
+ }
62
+
63
+ export class LegendMarketplaceApplicationConfig extends LegendApplicationConfig {
64
+ readonly options = new LegendMarketplaceApplicationCoreOptions();
65
+
66
+ readonly engineServerUrl: string;
67
+ readonly engineQueryServerUrl?: string | undefined;
68
+ readonly depotServerUrl: string;
69
+ readonly studioApplicationUrl?: string | undefined;
70
+ readonly queryApplicationUrl?: string | undefined;
71
+
72
+ constructor(
73
+ input: LegendApplicationConfigurationInput<LegendMarketplaceApplicationConfigurationData>,
74
+ ) {
75
+ super(input);
76
+
77
+ // engine
78
+ assertNonNullable(
79
+ input.configData.engine,
80
+ `Can't configure application: 'engine' field is missing`,
81
+ );
82
+ this.engineServerUrl = LegendApplicationConfig.resolveAbsoluteUrl(
83
+ guaranteeNonEmptyString(
84
+ input.configData.engine.url,
85
+ `Can't configure application: 'engine.url' field is missing or empty`,
86
+ ),
87
+ );
88
+ if (input.configData.engine.queryUrl) {
89
+ this.engineQueryServerUrl = LegendApplicationConfig.resolveAbsoluteUrl(
90
+ input.configData.engine.queryUrl,
91
+ );
92
+ }
93
+
94
+ // depot
95
+ assertNonNullable(
96
+ input.configData.depot,
97
+ `Can't configure application: 'depot' field is missing`,
98
+ );
99
+ this.depotServerUrl = LegendApplicationConfig.resolveAbsoluteUrl(
100
+ guaranteeNonEmptyString(
101
+ input.configData.depot.url,
102
+ `Can't configure application: 'depot.url' field is missing or empty`,
103
+ ),
104
+ );
105
+
106
+ // studio
107
+ if (input.configData.studio?.url) {
108
+ this.studioApplicationUrl = LegendApplicationConfig.resolveAbsoluteUrl(
109
+ input.configData.studio.url,
110
+ );
111
+ }
112
+
113
+ // query
114
+ if (input.configData.query?.url) {
115
+ this.queryApplicationUrl = LegendApplicationConfig.resolveAbsoluteUrl(
116
+ input.configData.query.url,
117
+ );
118
+ }
119
+
120
+ // options
121
+ this.options = LegendMarketplaceApplicationCoreOptions.create(
122
+ input.configData.extensions?.core ?? {},
123
+ );
124
+ }
125
+
126
+ override getDefaultApplicationStorageKey(): string {
127
+ return 'legend-marketplace';
128
+ }
129
+ }
@@ -0,0 +1,28 @@
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 { LegendApplicationPluginManager } from '@finos/legend-application';
18
+ import type { LegendMarketplaceApplicationPlugin } from '../stores/LegendMarketplaceApplicationPlugin.js';
19
+
20
+ export class LegendMarketplacePluginManager extends LegendApplicationPluginManager<LegendMarketplaceApplicationPlugin> {
21
+ private constructor() {
22
+ super();
23
+ }
24
+
25
+ static create(): LegendMarketplacePluginManager {
26
+ return new LegendMarketplacePluginManager();
27
+ }
28
+ }