@memberjunction/react-runtime 4.4.0 → 5.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/.turbo/turbo-build.log +28 -17
- package/CHANGELOG.md +28 -0
- package/dist/324.runtime.umd.js +17 -17
- package/dist/compiler/component-compiler.js.map +1 -1
- package/dist/component-manager/component-manager.js.map +1 -1
- package/dist/component-manager/types.d.ts +2 -2
- package/dist/component-manager/types.d.ts.map +1 -1
- package/dist/component-manager/types.js.map +1 -1
- package/dist/registry/component-registry-service.js.map +1 -1
- package/dist/runtime/component-hierarchy.d.ts +3 -3
- package/dist/runtime/component-hierarchy.d.ts.map +1 -1
- package/dist/runtime/component-hierarchy.js.map +1 -1
- package/dist/runtime.umd.js +1 -1
- package/dist/types/dependency-types.d.ts +3 -3
- package/dist/types/dependency-types.d.ts.map +1 -1
- package/dist/types/dependency-types.js.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/library-dependency-resolver.d.ts +7 -7
- package/dist/utilities/library-dependency-resolver.d.ts.map +1 -1
- package/dist/utilities/library-dependency-resolver.js.map +1 -1
- package/dist/utilities/library-loader.d.ts +3 -3
- package/dist/utilities/library-loader.d.ts.map +1 -1
- package/dist/utilities/library-loader.js.map +1 -1
- package/dist/utilities/library-registry.d.ts +2 -2
- package/dist/utilities/library-registry.d.ts.map +1 -1
- package/dist/utilities/library-registry.js.map +1 -1
- package/package.json +6 -6
- package/src/compiler/component-compiler.ts +2 -2
- package/src/component-manager/component-manager.ts +1 -1
- package/src/component-manager/types.ts +2 -2
- package/src/registry/component-registry-service.ts +10 -10
- package/src/runtime/component-hierarchy.ts +3 -3
- package/src/types/dependency-types.ts +3 -3
- package/src/types/index.ts +2 -2
- package/src/utilities/library-dependency-resolver.ts +11 -11
- package/src/utilities/library-loader.ts +3 -3
- package/src/utilities/library-registry.ts +4 -4
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { UserInfo } from "@memberjunction/core";
|
|
8
|
-
import {
|
|
8
|
+
import { MJComponentLibraryEntity, ComponentMetadataEngine } from "@memberjunction/core-entities";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Library definition in the registry
|
|
@@ -36,13 +36,13 @@ export interface LibraryDefinition {
|
|
|
36
36
|
export class LibraryRegistry {
|
|
37
37
|
private static libraries: Map<string, LibraryDefinition> = new Map();
|
|
38
38
|
private static _configured: boolean = false;
|
|
39
|
-
public static async Config(forceRefresh: boolean = false, componentLibraries:
|
|
39
|
+
public static async Config(forceRefresh: boolean = false, componentLibraries: MJComponentLibraryEntity[]) {
|
|
40
40
|
if (!this._configured || forceRefresh) {
|
|
41
41
|
// next up, we need to map the component metadata to the library definitions
|
|
42
42
|
// with two steps - first step is that we need to group the libraries in the engine
|
|
43
43
|
// by name and then we'll have all the versions for that particular library we can break
|
|
44
44
|
// into versions in our structure
|
|
45
|
-
const libraryGroups = new Map<string,
|
|
45
|
+
const libraryGroups = new Map<string, MJComponentLibraryEntity[]>();
|
|
46
46
|
for (const lib of componentLibraries) {
|
|
47
47
|
if (!libraryGroups.has(lib.Name.toLowerCase())) {
|
|
48
48
|
libraryGroups.set(lib.Name.toLowerCase(), []);
|
|
@@ -50,7 +50,7 @@ export class LibraryRegistry {
|
|
|
50
50
|
libraryGroups.get(lib.Name.toLowerCase())!.push(lib);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
// now we have grouped libraries using the
|
|
53
|
+
// now we have grouped libraries using the MJComponentLibraryEntity type, and next up
|
|
54
54
|
// we can map this to our internal structure of LibraryDefinition
|
|
55
55
|
for (const [name, versions] of libraryGroups) {
|
|
56
56
|
const libDef: LibraryDefinition = {
|