@finos/legend-application 6.0.2 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/lib/application/LegendApplication.d.ts +8 -7
  2. package/lib/application/LegendApplication.d.ts.map +1 -1
  3. package/lib/application/LegendApplication.js +2 -2
  4. package/lib/application/LegendApplication.js.map +1 -1
  5. package/lib/{stores → application}/LegendApplicationConfig.d.ts +8 -8
  6. package/lib/application/LegendApplicationConfig.d.ts.map +1 -0
  7. package/lib/{stores → application}/LegendApplicationConfig.js +2 -2
  8. package/lib/application/LegendApplicationConfig.js.map +1 -0
  9. package/lib/application/LegendApplicationPluginManager.d.ts +4 -4
  10. package/lib/application/LegendApplicationPluginManager.d.ts.map +1 -1
  11. package/lib/application/LegendApplicationPluginManager.js.map +1 -1
  12. package/lib/components/ActionAlert.js +2 -2
  13. package/lib/components/ActionAlert.js.map +1 -1
  14. package/lib/components/{LegendApplicationNavigationContextServiceUtils.d.ts → ApplicationNavigationContextServiceUtils.d.ts} +14 -2
  15. package/lib/components/ApplicationNavigationContextServiceUtils.d.ts.map +1 -0
  16. package/lib/components/{LegendApplicationNavigationContextServiceUtils.js → ApplicationNavigationContextServiceUtils.js} +15 -3
  17. package/lib/components/ApplicationNavigationContextServiceUtils.js.map +1 -0
  18. package/lib/components/ApplicationStoreProvider.d.ts +5 -4
  19. package/lib/components/ApplicationStoreProvider.d.ts.map +1 -1
  20. package/lib/components/ApplicationStoreProvider.js +1 -1
  21. package/lib/components/ApplicationStoreProvider.js.map +1 -1
  22. package/lib/components/ApplicationStoreProviderTestUtils.d.ts +6 -5
  23. package/lib/components/ApplicationStoreProviderTestUtils.d.ts.map +1 -1
  24. package/lib/components/ApplicationStoreProviderTestUtils.js.map +1 -1
  25. package/lib/components/VirtualAssistant.d.ts.map +1 -1
  26. package/lib/components/VirtualAssistant.js +5 -6
  27. package/lib/components/VirtualAssistant.js.map +1 -1
  28. package/lib/components/shared/PackageableElementOptionRenderer.d.ts +1 -1
  29. package/lib/components/shared/PackageableElementOptionRenderer.d.ts.map +1 -1
  30. package/lib/index.css +1 -1
  31. package/lib/index.d.ts +6 -6
  32. package/lib/index.d.ts.map +1 -1
  33. package/lib/index.js +6 -6
  34. package/lib/index.js.map +1 -1
  35. package/lib/stores/{LegendApplicationNavigationContextService.d.ts → ApplicationNavigationContextService.d.ts} +5 -6
  36. package/lib/stores/ApplicationNavigationContextService.d.ts.map +1 -0
  37. package/lib/stores/{LegendApplicationNavigationContextService.js → ApplicationNavigationContextService.js} +2 -2
  38. package/lib/stores/ApplicationNavigationContextService.js.map +1 -0
  39. package/lib/stores/ApplicationStore.d.ts +14 -12
  40. package/lib/stores/ApplicationStore.d.ts.map +1 -1
  41. package/lib/stores/ApplicationStore.js +8 -9
  42. package/lib/stores/ApplicationStore.js.map +1 -1
  43. package/lib/stores/ApplicationStoreTestUtils.d.ts +3 -2
  44. package/lib/stores/ApplicationStoreTestUtils.d.ts.map +1 -1
  45. package/lib/stores/ApplicationStoreTestUtils.js.map +1 -1
  46. package/lib/stores/{LegendApplicationAssistantService.d.ts → AssistantService.d.ts} +8 -9
  47. package/lib/stores/AssistantService.d.ts.map +1 -0
  48. package/lib/stores/{LegendApplicationAssistantService.js → AssistantService.js} +2 -2
  49. package/lib/stores/AssistantService.js.map +1 -0
  50. package/lib/stores/{LegendApplicationDocumentationService.d.ts → DocumentationService.d.ts} +23 -24
  51. package/lib/stores/DocumentationService.d.ts.map +1 -0
  52. package/lib/stores/{LegendApplicationDocumentationService.js → DocumentationService.js} +15 -16
  53. package/lib/stores/DocumentationService.js.map +1 -0
  54. package/lib/stores/{LegendApplicationEventService.d.ts → EventService.d.ts} +2 -2
  55. package/lib/stores/EventService.d.ts.map +1 -0
  56. package/lib/stores/{LegendApplicationEventService.js → EventService.js} +2 -2
  57. package/lib/stores/EventService.js.map +1 -0
  58. package/lib/stores/LegendApplicationPlugin.d.ts +20 -5
  59. package/lib/stores/LegendApplicationPlugin.d.ts.map +1 -1
  60. package/lib/stores/LegendApplicationPlugin.js +5 -0
  61. package/lib/stores/LegendApplicationPlugin.js.map +1 -1
  62. package/lib/stores/shared/ExecutionPlanState.d.ts +3 -4
  63. package/lib/stores/shared/ExecutionPlanState.d.ts.map +1 -1
  64. package/lib/stores/shared/ExecutionPlanState.js.map +1 -1
  65. package/lib/stores/shared/PackageableElementOption.d.ts +1 -1
  66. package/lib/stores/shared/PackageableElementOption.d.ts.map +1 -1
  67. package/lib/stores/shared/PackageableElementOption.js.map +1 -1
  68. package/package.json +11 -13
  69. package/src/application/LegendApplication.tsx +22 -21
  70. package/src/{stores → application}/LegendApplicationConfig.ts +16 -19
  71. package/src/application/LegendApplicationPluginManager.tsx +4 -4
  72. package/src/components/ActionAlert.tsx +2 -2
  73. package/src/components/{LegendApplicationNavigationContextServiceUtils.tsx → ApplicationNavigationContextServiceUtils.tsx} +14 -2
  74. package/src/components/ApplicationStoreProvider.tsx +15 -7
  75. package/src/components/ApplicationStoreProviderTestUtils.tsx +7 -5
  76. package/src/components/VirtualAssistant.tsx +5 -6
  77. package/src/components/shared/PackageableElementOptionRenderer.tsx +1 -1
  78. package/src/index.ts +6 -6
  79. package/src/stores/{LegendApplicationNavigationContextService.ts → ApplicationNavigationContextService.ts} +4 -5
  80. package/src/stores/ApplicationStore.ts +26 -16
  81. package/src/stores/ApplicationStoreTestUtils.ts +5 -3
  82. package/src/stores/{LegendApplicationAssistantService.ts → AssistantService.ts} +8 -9
  83. package/src/stores/{LegendApplicationDocumentationService.ts → DocumentationService.ts} +39 -54
  84. package/src/stores/{LegendApplicationEventService.ts → EventService.ts} +1 -1
  85. package/src/stores/LegendApplicationPlugin.ts +27 -9
  86. package/src/stores/shared/ExecutionPlanState.ts +3 -4
  87. package/src/stores/shared/PackageableElementOption.ts +3 -3
  88. package/tsconfig.json +6 -6
  89. package/lib/components/LegendApplicationNavigationContextServiceUtils.d.ts.map +0 -1
  90. package/lib/components/LegendApplicationNavigationContextServiceUtils.js.map +0 -1
  91. package/lib/stores/LegendApplicationAssistantService.d.ts.map +0 -1
  92. package/lib/stores/LegendApplicationAssistantService.js.map +0 -1
  93. package/lib/stores/LegendApplicationConfig.d.ts.map +0 -1
  94. package/lib/stores/LegendApplicationConfig.js.map +0 -1
  95. package/lib/stores/LegendApplicationDocumentationService.d.ts.map +0 -1
  96. package/lib/stores/LegendApplicationDocumentationService.js.map +0 -1
  97. package/lib/stores/LegendApplicationEventService.d.ts.map +0 -1
  98. package/lib/stores/LegendApplicationEventService.js.map +0 -1
  99. package/lib/stores/LegendApplicationNavigationContextService.d.ts.map +0 -1
  100. package/lib/stores/LegendApplicationNavigationContextService.js.map +0 -1
@@ -13,10 +13,21 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ /// <reference types="react" resolution-mode="require"/>
16
17
  import { AbstractPlugin } from '@finos/legend-shared';
17
18
  import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager.js';
18
- import type { LegendApplicationContextualDocumentationEntry, LegendApplicationDocumentationRegistryEntry, LegendApplicationKeyedDocumentationEntry } from './LegendApplicationDocumentationService.js';
19
- export declare type LegendApplicationSetup = (pluginManager: LegendApplicationPluginManager) => Promise<void>;
19
+ import type { ContextualDocumentationEntry, DocumentationRegistryEntry, KeyedDocumentationEntry } from './DocumentationService.js';
20
+ export declare type LegendApplicationSetup = <T extends LegendApplicationPlugin>(pluginManager: LegendApplicationPluginManager<T>) => Promise<void>;
21
+ /**
22
+ * Prefix URL patterns coming from extensions with `/extensions/`
23
+ * to avoid potential conflicts with main routes.
24
+ */
25
+ export declare const generateExtensionUrlPattern: (pattern: string) => string;
26
+ export declare type ApplicationPageEntry = {
27
+ key: string;
28
+ urlPatterns: string[];
29
+ renderer: React.FC | React.ReactElement;
30
+ };
20
31
  export declare abstract class LegendApplicationPlugin extends AbstractPlugin {
21
32
  /**
22
33
  * Get the list of setup procedures to be run when booting up the application.
@@ -24,15 +35,19 @@ export declare abstract class LegendApplicationPlugin extends AbstractPlugin {
24
35
  * NOTE: The application will call the setup procedures from all extensions concurrently.
25
36
  */
26
37
  getExtraApplicationSetups?(): LegendApplicationSetup[];
38
+ /**
39
+ * Get the list of application page entries to be rendered.
40
+ */
41
+ getExtraApplicationPageEntries?(): ApplicationPageEntry[];
27
42
  /**
28
43
  * Get the list of documentation registry entries from which the application can fetch
29
44
  * documentation config data and load the documentation registry
30
45
  */
31
- getExtraDocumentationRegistryEntries?(): LegendApplicationDocumentationRegistryEntry[];
46
+ getExtraDocumentationRegistryEntries?(): DocumentationRegistryEntry[];
32
47
  /**
33
48
  * Get the list of keyed documentation entries to be registered with documentation service.
34
49
  */
35
- getExtraKeyedDocumentationEntries?(): LegendApplicationKeyedDocumentationEntry[];
50
+ getExtraKeyedDocumentationEntries?(): KeyedDocumentationEntry[];
36
51
  /**
37
52
  * Get the list of documentation keys whose corresponding documentation entry is required
38
53
  * in the application. The documentation registry will be scanned for the presence of these,
@@ -42,7 +57,7 @@ export declare abstract class LegendApplicationPlugin extends AbstractPlugin {
42
57
  /**
43
58
  * Get the list of contextual documentation entries to be registered with documentation service.
44
59
  */
45
- getExtraContextualDocumentationEntries?(): LegendApplicationContextualDocumentationEntry[];
60
+ getExtraContextualDocumentationEntries?(): ContextualDocumentationEntry[];
46
61
  /**
47
62
  * Get the list of application context keys for which the application will log event for
48
63
  * when their corresponding contexts are accessed
@@ -1 +1 @@
1
- {"version":3,"file":"LegendApplicationPlugin.d.ts","sourceRoot":"","sources":["../../src/stores/LegendApplicationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kDAAkD,CAAC;AACvG,OAAO,KAAK,EACV,6CAA6C,EAC7C,2CAA2C,EAC3C,wCAAwC,EACzC,MAAM,4CAA4C,CAAC;AAEpD,oBAAY,sB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sB,EAAE;IAEtD;;OAEG;IACH,8BAA8B,CAAC,IAAI,oBAAoB,EAAE;IAEzD;;;OAGG;IACH,oCAAoC,CAAC,IAAI,0BAA0B,EAAE;IAErE;;OAEG;IACH,iCAAiC,CAAC,IAAI,uBAAuB,EAAE;IAE/D;;;;OAIG;IACH,iCAAiC,CAAC,IAAI,MAAM,EAAE;IAE9C;;OAEG;IACH,sCAAsC,CAAC,IAAI,4BAA4B,EAAE;IAEzE;;;OAGG;IACH,gDAAgD,CAAC,IAAI,MAAM,EAAE;CAC9D"}
@@ -14,6 +14,11 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { AbstractPlugin } from '@finos/legend-shared';
17
+ /**
18
+ * Prefix URL patterns coming from extensions with `/extensions/`
19
+ * to avoid potential conflicts with main routes.
20
+ */
21
+ export const generateExtensionUrlPattern = (pattern) => `/extensions/${pattern}`.replace(/^\/extensions\/\//, '/extensions/');
17
22
  export class LegendApplicationPlugin extends AbstractPlugin {
18
23
  }
19
24
  //# sourceMappingURL=LegendApplicationPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendApplicationPlugin.js","sourceRoot":"","sources":["../../src/stores/LegendApplicationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAYtD,MAAM,OAAgB,uBAAwB,SAAQ,cAAc;CAoCnE"}
1
+ {"version":3,"file":"LegendApplicationPlugin.js","sourceRoot":"","sources":["../../src/stores/LegendApplicationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAYtD;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,OAAe,EAAU,EAAE,CACrE,eAAe,OAAO,EAAE,CAAC,OAAO,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;AAQxE,MAAM,OAAgB,uBAAwB,SAAQ,cAAc;CAyCnE"}
@@ -14,8 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { type RawExecutionPlan, type GraphManagerState, ExecutionPlan, ExecutionNode } from '@finos/legend-graph';
17
- import type { ApplicationStore } from '../ApplicationStore.js';
18
- import type { LegendApplicationConfig } from '../LegendApplicationConfig.js';
17
+ import type { GenericLegendApplicationStore } from '../ApplicationStore.js';
19
18
  import type { TreeNodeData } from '@finos/legend-art';
20
19
  export declare class ExecutionPlanViewTreeNodeData implements TreeNodeData {
21
20
  id: string;
@@ -40,7 +39,7 @@ export declare enum EXECUTION_PLAN_VIEW_MODE {
40
39
  JSON = "JSON"
41
40
  }
42
41
  export declare class ExecutionPlanState {
43
- applicationStore: ApplicationStore<LegendApplicationConfig>;
42
+ applicationStore: GenericLegendApplicationStore;
44
43
  graphManagerState: GraphManagerState;
45
44
  displayDataJson: object;
46
45
  displayData: string;
@@ -49,7 +48,7 @@ export declare class ExecutionPlanState {
49
48
  rawPlan?: RawExecutionPlan | undefined;
50
49
  plan?: ExecutionPlan | undefined;
51
50
  debugText?: string | undefined;
52
- constructor(applicationStore: ApplicationStore<LegendApplicationConfig>, graphManagerState: GraphManagerState);
51
+ constructor(applicationStore: GenericLegendApplicationStore, graphManagerState: GraphManagerState);
53
52
  setViewMode(val: EXECUTION_PLAN_VIEW_MODE): void;
54
53
  setRawPlan: (val: RawExecutionPlan | undefined) => void;
55
54
  setPlan: (val: ExecutionPlan | undefined) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"ExecutionPlanState.d.ts","sourceRoot":"","sources":["../../../src/stores/shared/ExecutionPlanState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,aAAa,EACb,aAAa,EACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,K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AG,aAAa,GACvC,IAAI;CAWR"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExecutionPlanState.js","sourceRoot":"","sources":["../../../src/stores/shared/ExecutionPlanState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAGL,aAAa,EACb,aAAa,GACd,MAAM,qBAAqB,CAAC;AAK7B,MAAM,OAAO,6BAA6B;IACxC,EAAE,CAAS;IACX,KAAK,CAAS;IACd,UAAU,CAAW;IACrB,MAAM,CAAW;IACjB,WAAW,CAAY;IACvB,aAAa,CAAiB;IAE9B,YAAY,EAAU,EAAE,KAAa,EAAE,aAA4B;QACjE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;CACF;AAED,MAAM,OAAO,yBAAyB;IACpC,EAAE,CAAS;IACX,KAAK,CAAS;IACd,UAAU,CAAW;IACrB,MAAM,CAAW;IACjB,WAAW,CAAY;IACvB,aAAa,CAAgB;IAE7B,YAAY,EAAU,EAAE,KAAa,EAAE,aAA4B;QACjE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;CACF;AAED,MAAM,CAAN,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,yCAAa,CAAA;IACb,yCAAa,CAAA;AACf,CAAC,EAHW,wBAAwB,GAAxB,wBAAwB,KAAxB,wBAAwB,QAGnC;AAED,MAAM,OAAO,kBAAkB;IAC7B,gBAAgB,CAA4C;IAC5D,iBAAiB,CAAoB;IACrC,eAAe,GAAW,EAAE,CAAC;IAC7B,WAAW,GAAG,EAAE,CAAC;IACjB,YAAY,G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IAAI,SAAS,YAAY,aAAa,EAAE;YAC7C,MAAM,YAAY,GAChB,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;YACxE,IAAI,CAAC,+BAA+B,CAAC,YAAY,CAAC,CAAC;SACpD;IACH,CAAC;CACF"}
@@ -18,5 +18,5 @@ export interface PackageableElementOption<T extends PackageableElement> {
18
18
  label: string;
19
19
  value: T;
20
20
  }
21
- export declare const buildElementOption: (element: PackageableElement) => PackageableElementOption<PackageableElement>;
21
+ export declare const buildElementOption: <T extends PackageableElement>(element: T) => PackageableElementOption<T>;
22
22
  //# sourceMappingURL=PackageableElementOption.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PackageableElementOption.d.ts","sourceRoot":"","sources":["../../../src/stores/shared/PackageableElementOption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,kBAAkB;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;CACV;AAED,eAAO,MAAM,kBAAkB,YACpB,kBAAkB,KAC1B,yBAAyB,kBAAkB,CAG5C,CAAC"}
1
+ {"version":3,"file":"PackageableElementOption.d.ts","sourceRoot":"","sources":["../../../src/stores/shared/PackageableElementOption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,kBAAkB;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;CACV;AAED,eAAO,MAAM,kBAAkB,2EAK7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PackageableElementOption.js","sourceRoot":"","sources":["../../../src/stores/shared/PackageableElementOption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,OAA2B,EACmB,EAAE,CAAC,CAAC;IAClD,KAAK,EAAE,OAAO,CAAC,IAAI;IACnB,KAAK,EAAE,OAAO;CACf,CAAC,CAAC"}
1
+ {"version":3,"file":"PackageableElementOption.js","sourceRoot":"","sources":["../../../src/stores/shared/PackageableElementOption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,OAAU,EACmB,EAAE,CAAC,CAAC;IACjC,KAAK,EAAE,OAAO,CAAC,IAAI;IACnB,KAAK,EAAE,OAAO;CACf,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-application",
3
- "version": "6.0.2",
3
+ "version": "7.0.0",
4
4
  "description": "Legend application core",
5
5
  "keywords": [
6
6
  "legend",
@@ -43,15 +43,14 @@
43
43
  "test:watch": "jest --watch"
44
44
  },
45
45
  "dependencies": {
46
- "@finos/legend-art": "2.0.8",
47
- "@finos/legend-graph": "10.1.2",
48
- "@finos/legend-shared": "4.0.3",
46
+ "@finos/legend-art": "2.0.9",
47
+ "@finos/legend-graph": "11.0.0",
48
+ "@finos/legend-shared": "5.0.0",
49
49
  "@types/css-font-loading-module": "0.0.7",
50
50
  "@types/papaparse": "5.3.2",
51
51
  "@types/react": "18.0.15",
52
52
  "@types/react-dom": "18.0.6",
53
- "@types/react-router-dom": "5.3.3",
54
- "date-fns": "2.28.0",
53
+ "date-fns": "2.29.1",
55
54
  "fuse.js": "6.6.2",
56
55
  "history": "5.3.0",
57
56
  "mobx": "6.6.1",
@@ -63,19 +62,18 @@
63
62
  "react-draggable": "4.4.5",
64
63
  "react-resize-detector": "7.1.2",
65
64
  "react-router": "5.3.3",
66
- "react-router-dom": "5.3.3",
67
65
  "serializr": "2.0.5",
68
- "sql-formatter": "8.0.2"
66
+ "sql-formatter": "8.2.0"
69
67
  },
70
68
  "devDependencies": {
71
- "@finos/legend-dev-utils": "2.0.5",
72
- "@jest/globals": "28.1.2",
69
+ "@finos/legend-dev-utils": "2.0.6",
70
+ "@jest/globals": "28.1.3",
73
71
  "cross-env": "7.0.3",
74
- "eslint": "8.19.0",
75
- "jest": "28.1.2",
72
+ "eslint": "8.20.0",
73
+ "jest": "28.1.3",
76
74
  "npm-run-all": "4.1.5",
77
75
  "rimraf": "3.0.2",
78
- "sass": "1.53.0",
76
+ "sass": "1.54.0",
79
77
  "typescript": "4.7.4"
80
78
  },
81
79
  "peerDependencies": {
@@ -21,7 +21,7 @@ import type {
21
21
  LegendApplicationConfig,
22
22
  LegendApplicationConfigurationData,
23
23
  LegendApplicationVersionData,
24
- } from '../stores/LegendApplicationConfig.js';
24
+ } from './LegendApplicationConfig.js';
25
25
  import {
26
26
  type AbstractPlugin,
27
27
  type AbstractPreset,
@@ -39,10 +39,11 @@ import type { LegendApplicationPluginManager } from './LegendApplicationPluginMa
39
39
  import { setupPureLanguageService } from '../stores/PureLanguageSupport.js';
40
40
  import {
41
41
  collectKeyedDocumnetationEntriesFromConfig,
42
- type LegendApplicationDocumentationConfigEntry,
43
- type LegendApplicationDocumentationRegistryData,
44
- type LegendApplicationDocumentationRegistryEntry,
45
- } from '../stores/LegendApplicationDocumentationService.js';
42
+ type DocumentationConfigEntry,
43
+ type DocumentationRegistryData,
44
+ type DocumentationRegistryEntry,
45
+ } from '../stores/DocumentationService.js';
46
+ import type { LegendApplicationPlugin } from '../stores/LegendApplicationPlugin.js';
46
47
 
47
48
  export abstract class LegendApplicationLogger {
48
49
  abstract debug(event: LogEvent, ...data: unknown[]): void;
@@ -139,27 +140,29 @@ export interface LegendApplicationConfigurationInput<
139
140
  baseUrl: string;
140
141
  configData: T;
141
142
  versionData: LegendApplicationVersionData;
142
- docEntries?: Record<string, LegendApplicationDocumentationConfigEntry>;
143
+ docEntries?: Record<string, DocumentationConfigEntry>;
143
144
  }
144
145
 
145
146
  export abstract class LegendApplication {
146
147
  protected config!: LegendApplicationConfig;
147
148
  protected logger!: LegendApplicationLogger;
148
149
 
149
- protected pluginManager: LegendApplicationPluginManager;
150
+ protected pluginManager: LegendApplicationPluginManager<LegendApplicationPlugin>;
150
151
  protected basePresets: AbstractPreset[] = [];
151
152
  protected basePlugins: AbstractPlugin[] = [];
152
153
 
153
154
  protected baseUrl!: string;
154
155
  protected pluginRegister?:
155
156
  | ((
156
- pluginManager: LegendApplicationPluginManager,
157
+ pluginManager: LegendApplicationPluginManager<LegendApplicationPlugin>,
157
158
  config: LegendApplicationConfig,
158
159
  ) => void)
159
160
  | undefined;
160
161
  protected _isConfigured = false;
161
162
 
162
- protected constructor(pluginManager: LegendApplicationPluginManager) {
163
+ protected constructor(
164
+ pluginManager: LegendApplicationPluginManager<LegendApplicationPlugin>,
165
+ ) {
163
166
  this.pluginManager = pluginManager;
164
167
  this.logger = new LegendApplicationWebConsole();
165
168
  }
@@ -172,7 +175,7 @@ export abstract class LegendApplication {
172
175
  * which is more flexible by allowing configuring specific plugin or preset.
173
176
  */
174
177
  pluginRegister?: (
175
- pluginManager: LegendApplicationPluginManager,
178
+ pluginManager: LegendApplicationPluginManager<LegendApplicationPlugin>,
176
179
  config: LegendApplicationConfig,
177
180
  ) => void;
178
181
  }): LegendApplication {
@@ -256,8 +259,7 @@ export abstract class LegendApplication {
256
259
  async loadDocumentationRegistryData(
257
260
  config: LegendApplicationConfig,
258
261
  ): Promise<void> {
259
- const entries: Record<string, LegendApplicationDocumentationConfigEntry> =
260
- {};
262
+ const entries: Record<string, DocumentationConfigEntry> = {};
261
263
 
262
264
  await Promise.all(
263
265
  [
@@ -267,13 +269,13 @@ export abstract class LegendApplication {
267
269
  .flatMap(
268
270
  (plugin) => plugin.getExtraDocumentationRegistryEntries?.() ?? [],
269
271
  ),
270
- ].map(async (entry: LegendApplicationDocumentationRegistryEntry) => {
272
+ ].map(async (entry: DocumentationRegistryEntry) => {
271
273
  try {
272
274
  const client = new NetworkClient(
273
275
  entry.simple
274
276
  ? {
275
277
  /**
276
- * NOTE: see the documentation for `simple` flag {@link LegendApplicationDocumentationRegistryEntry}
278
+ * NOTE: see the documentation for `simple` flag {@link DocumentationRegistryEntry}
277
279
  * here, basically, we expect to fetch just the JSON from an endpoint where `Access-Control-Allow-Origin", "*"` is set
278
280
  * as such, we must not include the credential in our request
279
281
  * See https://stackoverflow.com/questions/19743396/cors-cannot-use-wildcard-in-access-control-allow-origin-when-credentials-flag-i
@@ -284,13 +286,12 @@ export abstract class LegendApplication {
284
286
  }
285
287
  : {},
286
288
  );
287
- const docData =
288
- await client.get<LegendApplicationDocumentationRegistryData>(
289
- guaranteeNonEmptyString(
290
- entry.url,
291
- `Can't load documentation registry: 'url' field is missing or empty`,
292
- ),
293
- );
289
+ const docData = await client.get<DocumentationRegistryData>(
290
+ guaranteeNonEmptyString(
291
+ entry.url,
292
+ `Can't load documentation registry: 'url' field is missing or empty`,
293
+ ),
294
+ );
294
295
  assertNonNullable(
295
296
  docData.entries,
296
297
  `Can't load documentation registry data: 'entries' field is missing`,
@@ -18,16 +18,16 @@ import {
18
18
  guaranteeNonEmptyString,
19
19
  guaranteeNonNullable,
20
20
  } from '@finos/legend-shared';
21
- import type { LegendApplicationConfigurationInput } from '../index.js';
21
+ import type { LegendApplicationConfigurationInput } from './LegendApplication.js';
22
22
  import {
23
23
  collectKeyedDocumnetationEntriesFromConfig,
24
- collectContextualDocumnetationEntry,
25
- type LegendApplicationKeyedDocumentationEntry,
26
- type LegendApplicationDocumentationConfigEntry,
27
- type LegendApplicationContextualDocumentationMapConfig,
28
- type LegendApplicationContextualDocumentationEntry,
29
- type LegendApplicationDocumentationRegistryEntry,
30
- } from './LegendApplicationDocumentationService.js';
24
+ collectContextualDocumnetationEntries,
25
+ type KeyedDocumentationEntry,
26
+ type DocumentationConfigEntry,
27
+ type ContextualDocumentationConfig,
28
+ type ContextualDocumentationEntry,
29
+ type DocumentationRegistryEntry,
30
+ } from '../stores/DocumentationService.js';
31
31
 
32
32
  export interface LegendApplicationVersionData {
33
33
  buildTime: string;
@@ -40,9 +40,9 @@ export interface LegendApplicationConfigurationData {
40
40
  env: string;
41
41
  documentation?: {
42
42
  url: string;
43
- registry?: LegendApplicationDocumentationRegistryEntry[];
44
- entries?: Record<string, LegendApplicationDocumentationConfigEntry>;
45
- contextualDocMap?: LegendApplicationContextualDocumentationMapConfig;
43
+ registry?: DocumentationRegistryEntry[];
44
+ entries?: Record<string, DocumentationConfigEntry>;
45
+ contextualEntries?: ContextualDocumentationConfig;
46
46
  };
47
47
  // TODO: when we support vault-like settings, we could support `settingOverrides`
48
48
  // See https://github.com/finos/legend-studio/issues/407
@@ -57,12 +57,9 @@ export abstract class LegendApplicationConfig {
57
57
 
58
58
  // documentation
59
59
  readonly documentationUrl: string | undefined;
60
- readonly documentationRegistryEntries: LegendApplicationDocumentationRegistryEntry[] =
61
- [];
62
- readonly keyedDocumentationEntries: LegendApplicationKeyedDocumentationEntry[] =
63
- [];
64
- readonly contextualDocEntries: LegendApplicationContextualDocumentationEntry[] =
65
- [];
60
+ readonly documentationRegistryEntries: DocumentationRegistryEntry[] = [];
61
+ readonly keyedDocumentationEntries: KeyedDocumentationEntry[] = [];
62
+ readonly contextualDocEntries: ContextualDocumentationEntry[] = [];
66
63
 
67
64
  // version
68
65
  readonly appVersion: string;
@@ -89,8 +86,8 @@ export abstract class LegendApplicationConfig {
89
86
  this.keyedDocumentationEntries = collectKeyedDocumnetationEntriesFromConfig(
90
87
  input.configData.documentation?.entries ?? {},
91
88
  );
92
- this.contextualDocEntries = collectContextualDocumnetationEntry(
93
- input.configData.documentation?.contextualDocMap ?? {},
89
+ this.contextualDocEntries = collectContextualDocumnetationEntries(
90
+ input.configData.documentation?.contextualEntries ?? {},
94
91
  );
95
92
 
96
93
  // Version
@@ -27,7 +27,7 @@ import {
27
27
  } from '@finos/legend-shared';
28
28
  import type { LegendApplicationPlugin } from '../stores/LegendApplicationPlugin.js';
29
29
 
30
- export class LegendApplicationPluginManager
30
+ export class LegendApplicationPluginManager<T extends LegendApplicationPlugin>
31
31
  extends AbstractPluginManager
32
32
  implements
33
33
  LoggerPluginManager,
@@ -39,7 +39,7 @@ export class LegendApplicationPluginManager
39
39
  protected telemetryServicePlugins: TelemetryServicePlugin[] = [];
40
40
  protected tracerServicePlugins: TracerServicePlugin<unknown>[] = [];
41
41
  protected eventNotifierPlugins: EventNotifierPlugin[] = [];
42
- protected applicationPlugins: LegendApplicationPlugin[] = [];
42
+ protected applicationPlugins: T[] = [];
43
43
 
44
44
  registerLoggerPlugin(plugin: LoggerPlugin): void {
45
45
  this.loggerPlugins.push(plugin);
@@ -57,7 +57,7 @@ export class LegendApplicationPluginManager
57
57
  this.eventNotifierPlugins.push(plugin);
58
58
  }
59
59
 
60
- registerApplicationPlugin(plugin: LegendApplicationPlugin): void {
60
+ registerApplicationPlugin(plugin: T): void {
61
61
  this.applicationPlugins.push(plugin);
62
62
  }
63
63
 
@@ -77,7 +77,7 @@ export class LegendApplicationPluginManager
77
77
  return [...this.eventNotifierPlugins];
78
78
  }
79
79
 
80
- getApplicationPlugins(): LegendApplicationPlugin[] {
80
+ getApplicationPlugins(): T[] {
81
81
  return [...this.applicationPlugins];
82
82
  }
83
83
  }
@@ -35,7 +35,7 @@ const getActionButtonClassName = (type: ActionAlertActionType): string => {
35
35
  }
36
36
  };
37
37
 
38
- const ActionAlertInner = observer((props: { info: ActionAlertInfo }) => {
38
+ const ActionAlertContent = observer((props: { info: ActionAlertInfo }) => {
39
39
  const { info } = props;
40
40
  const applicationStore = useApplicationStore();
41
41
  const { title, message, prompt, type, onClose, onEnter, actions } = info;
@@ -126,5 +126,5 @@ export const ActionAlert = observer(() => {
126
126
  if (!actionAlertInfo) {
127
127
  return null;
128
128
  }
129
- return <ActionAlertInner info={actionAlertInfo} />;
129
+ return <ActionAlertContent info={actionAlertInfo} />;
130
130
  });
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { useEffect } from 'react';
18
- import { ApplicationNavigationContextData } from '../stores/LegendApplicationNavigationContextService.js';
18
+ import { ApplicationNavigationContextData } from '../stores/ApplicationNavigationContextService.js';
19
19
  import { useApplicationStore } from './ApplicationStoreProvider.js';
20
20
 
21
21
  /**
@@ -30,7 +30,7 @@ import { useApplicationStore } from './ApplicationStoreProvider.js';
30
30
  * navigation, e.g. clicking, focusing, etc. else if the component
31
31
  * is already pre-rendered and just temporarily hidden away (e.g. dialog)
32
32
  * it is not safe to call this as it might mess up the stack. For this,
33
- * use {@link useConditionedApplicationNavigationContext }
33
+ * use {@link useConditionedApplicationNavigationContext}
34
34
  */
35
35
  export const useApplicationNavigationContext = (value: string): void => {
36
36
  const applicationStore = useApplicationStore();
@@ -42,6 +42,18 @@ export const useApplicationNavigationContext = (value: string): void => {
42
42
  }, [applicationStore, value]);
43
43
  };
44
44
 
45
+ /**
46
+ * Provides a convenient hook mechanism to handle application navigation
47
+ * context of a component.
48
+ *
49
+ * This will push the context when the condition is met
50
+ * and will cleanup the context when the condition
51
+ * is no longer met.
52
+ *
53
+ * Unlike {@link useApplicationNavigationContext}, this is useful for case
54
+ * where the the context is attached to an element that is never remounted
55
+ * just hidden/shown based on some condition
56
+ */
45
57
  export const useConditionedApplicationNavigationContext = (
46
58
  value: string,
47
59
  condition: boolean,
@@ -16,24 +16,31 @@
16
16
 
17
17
  import { createContext, useContext } from 'react';
18
18
  import { useLocalObservable } from 'mobx-react-lite';
19
- import { ApplicationStore } from '../stores/ApplicationStore.js';
20
- import type { LegendApplicationConfig } from '../stores/LegendApplicationConfig.js';
19
+ import {
20
+ ApplicationStore,
21
+ type GenericLegendApplicationStore,
22
+ } from '../stores/ApplicationStore.js';
23
+ import type { LegendApplicationConfig } from '../application/LegendApplicationConfig.js';
21
24
  import { guaranteeNonNullable } from '@finos/legend-shared';
22
25
  import { useWebApplicationNavigator } from './WebApplicationNavigatorProvider.js';
23
26
  import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager.js';
27
+ import type { LegendApplicationPlugin } from '../stores/LegendApplicationPlugin.js';
24
28
 
25
29
  const ApplicationStoreContext = createContext<
26
- ApplicationStore<LegendApplicationConfig> | undefined
30
+ GenericLegendApplicationStore | undefined
27
31
  >(undefined);
28
32
 
29
- export const ApplicationStoreProvider = <T extends LegendApplicationConfig>({
33
+ export const ApplicationStoreProvider = <
34
+ T extends LegendApplicationConfig,
35
+ V extends LegendApplicationPlugin,
36
+ >({
30
37
  children,
31
38
  config,
32
39
  pluginManager,
33
40
  }: {
34
41
  children: React.ReactNode;
35
42
  config: T;
36
- pluginManager: LegendApplicationPluginManager;
43
+ pluginManager: LegendApplicationPluginManager<V>;
37
44
  }): React.ReactElement => {
38
45
  const navigator = useWebApplicationNavigator();
39
46
  const applicationStore = useLocalObservable(
@@ -48,8 +55,9 @@ export const ApplicationStoreProvider = <T extends LegendApplicationConfig>({
48
55
 
49
56
  export const useApplicationStore = <
50
57
  T extends LegendApplicationConfig,
51
- >(): ApplicationStore<T> =>
58
+ V extends LegendApplicationPlugin,
59
+ >(): ApplicationStore<T, V> =>
52
60
  guaranteeNonNullable(
53
- useContext(ApplicationStoreContext) as ApplicationStore<T> | undefined,
61
+ useContext(ApplicationStoreContext) as ApplicationStore<T, V> | undefined,
54
62
  `Can't find application store in context`,
55
63
  );
@@ -18,14 +18,15 @@ import { jest } from '@jest/globals';
18
18
  import { createMemoryHistory } from 'history';
19
19
  import { ApplicationStore } from '../stores/ApplicationStore.js';
20
20
  import { WebApplicationNavigator } from '../stores/WebApplicationNavigator.js';
21
- import type { LegendApplicationConfig } from '../stores/LegendApplicationConfig.js';
21
+ import type { LegendApplicationConfig } from '../application/LegendApplicationConfig.js';
22
22
  import { ApplicationStoreProvider } from './ApplicationStoreProvider.js';
23
23
  import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager.js';
24
+ import type { LegendApplicationPlugin } from '../stores/LegendApplicationPlugin.js';
24
25
 
25
26
  export const TEST__ApplicationStoreProvider: React.FC<{
26
27
  children: React.ReactNode;
27
28
  config: LegendApplicationConfig;
28
- pluginManager: LegendApplicationPluginManager;
29
+ pluginManager: LegendApplicationPluginManager<LegendApplicationPlugin>;
29
30
  }> = ({ children, config, pluginManager }) => (
30
31
  <ApplicationStoreProvider config={config} pluginManager={pluginManager}>
31
32
  {children}
@@ -34,14 +35,15 @@ export const TEST__ApplicationStoreProvider: React.FC<{
34
35
 
35
36
  export const TEST__provideMockedApplicationStore = <
36
37
  T extends LegendApplicationConfig,
38
+ V extends LegendApplicationPlugin,
37
39
  >(
38
40
  config: T,
39
- pluginManager: LegendApplicationPluginManager,
41
+ pluginManager: LegendApplicationPluginManager<V>,
40
42
  customization?: {
41
- mock?: ApplicationStore<T>;
43
+ mock?: ApplicationStore<T, V>;
42
44
  navigator?: WebApplicationNavigator;
43
45
  },
44
- ): ApplicationStore<T> => {
46
+ ): ApplicationStore<T, V> => {
45
47
  const value =
46
48
  customization?.mock ??
47
49
  new ApplicationStore(
@@ -51,11 +51,11 @@ import { TAB_SIZE } from '../const.js';
51
51
  import {
52
52
  type VirtualAssistantDocumentationEntry,
53
53
  VIRTUAL_ASSISTANT_TAB,
54
- } from '../stores/LegendApplicationAssistantService.js';
54
+ } from '../stores/AssistantService.js';
55
55
  import { useApplicationStore } from './ApplicationStoreProvider.js';
56
56
  import Draggable from 'react-draggable';
57
57
  import { DATE_TIME_FORMAT } from '@finos/legend-graph';
58
- import { ApplicationTelemetry } from '../index.js';
58
+ import { ApplicationTelemetry } from '../stores/ApplicationTelemetry.js';
59
59
 
60
60
  const WIZARD_GREETING = `Bonjour, It's Pierre!`;
61
61
 
@@ -293,14 +293,14 @@ const VirtualAssistantSearchPanel = observer(() => {
293
293
  ContentType.APPLICATION_JSON,
294
294
  );
295
295
  };
296
- const downloadContextualDocMap = (): void => {
296
+ const downloadContextualDocIndex = (): void => {
297
297
  downloadFileUsingDataURI(
298
298
  `documentation-registry_${format(
299
299
  new Date(Date.now()),
300
300
  DATE_TIME_FORMAT,
301
301
  )}.json`,
302
302
  JSON.stringify(
303
- applicationStore.documentationService.publishContextualDocMap(),
303
+ applicationStore.documentationService.publishContextualDocIndex(),
304
304
  undefined,
305
305
  TAB_SIZE,
306
306
  ),
@@ -419,7 +419,7 @@ const VirtualAssistantSearchPanel = observer(() => {
419
419
  <MenuContentItem onClick={downloadDocRegistry}>
420
420
  Download documentation registry
421
421
  </MenuContentItem>
422
- <MenuContentItem onClick={downloadContextualDocMap}>
422
+ <MenuContentItem onClick={downloadContextualDocIndex}>
423
423
  Download contextual documentation mapping
424
424
  </MenuContentItem>
425
425
  </MenuContent>
@@ -519,7 +519,6 @@ const VirtualAssistantPanel = observer(
519
519
  if (event.key === 'Tab') {
520
520
  event.preventDefault();
521
521
  event.stopPropagation();
522
- return;
523
522
  }
524
523
  }}
525
524
  >
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import type { PackageableElement } from '@finos/legend-graph';
18
- import type { PackageableElementOption } from '../../index.js';
18
+ import type { PackageableElementOption } from '../../stores/shared/PackageableElementOption.js';
19
19
 
20
20
  export const getPackageableElementOptionalFormatter = (props?: {
21
21
  darkMode?: boolean;