@memberjunction/react-runtime 5.37.0 → 5.38.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 +12 -12
- package/CHANGELOG.md +23 -0
- package/dist/324.runtime.umd.js +89 -89
- package/dist/compiler/component-compiler.d.ts +1 -1
- package/dist/compiler/component-compiler.d.ts.map +1 -1
- package/dist/compiler/component-compiler.js +10 -16
- package/dist/compiler/component-compiler.js.map +1 -1
- package/dist/compiler/index.d.ts +2 -2
- package/dist/compiler/index.js +2 -2
- package/dist/component-manager/component-manager.d.ts +4 -4
- package/dist/component-manager/index.d.ts +2 -2
- package/dist/component-manager/index.js +1 -1
- package/dist/component-manager/types.d.ts +1 -1
- package/dist/index.d.ts +28 -28
- package/dist/index.js +23 -23
- package/dist/registry/component-registry-service.d.ts +3 -3
- package/dist/registry/component-registry.d.ts +1 -1
- package/dist/registry/component-registry.js +1 -1
- package/dist/registry/component-resolver.d.ts +3 -3
- package/dist/registry/component-resolver.js +1 -1
- package/dist/registry/index.d.ts +4 -4
- package/dist/registry/index.js +3 -3
- package/dist/runtime/component-hierarchy.d.ts +3 -3
- package/dist/runtime/error-boundary.d.ts +1 -1
- package/dist/runtime/index.d.ts +5 -5
- package/dist/runtime/index.js +4 -4
- package/dist/runtime/prop-builder.d.ts +1 -1
- package/dist/runtime/react-root-manager.d.ts +1 -1
- package/dist/runtime/react-root-manager.js +1 -1
- package/dist/runtime.umd.js +2975 -2270
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +2 -2
- package/dist/utilities/core-libraries.d.ts +1 -1
- package/dist/utilities/index.d.ts +9 -9
- package/dist/utilities/index.js +9 -9
- package/dist/utilities/library-dependency-resolver.d.ts +1 -1
- package/dist/utilities/library-loader.d.ts +3 -3
- package/dist/utilities/library-loader.js +4 -4
- package/dist/utilities/standard-libraries.d.ts +1 -1
- package/package.json +7 -7
- package/src/compiler/component-compiler.ts +7 -13
package/dist/types/index.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ export interface ErrorBoundaryOptions {
|
|
|
96
96
|
logErrors?: boolean;
|
|
97
97
|
recovery?: 'retry' | 'reset' | 'none';
|
|
98
98
|
}
|
|
99
|
-
export * from './library-config';
|
|
100
|
-
export * from './dependency-types';
|
|
99
|
+
export * from './library-config.js';
|
|
100
|
+
export * from './dependency-types.js';
|
|
101
101
|
export { ComponentObject } from '@memberjunction/interactive-component-types';
|
|
102
102
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/types/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './library-config';
|
|
2
|
-
export * from './dependency-types';
|
|
1
|
+
export * from './library-config.js';
|
|
2
|
+
export * from './dependency-types.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExternalLibraryConfig } from '../types/library-config';
|
|
1
|
+
import { ExternalLibraryConfig } from '../types/library-config.js';
|
|
2
2
|
export declare function getCoreRuntimeLibraries(debug?: boolean): ExternalLibraryConfig[];
|
|
3
3
|
export declare function isCoreRuntimeLibrary(libraryId: string): boolean;
|
|
4
4
|
//# sourceMappingURL=core-libraries.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './component-styles';
|
|
2
|
-
export * from './standard-libraries';
|
|
3
|
-
export * from './library-loader';
|
|
4
|
-
export * from './library-registry';
|
|
5
|
-
export * from './library-dependency-resolver';
|
|
6
|
-
export * from './component-error-analyzer';
|
|
7
|
-
export * from './resource-manager';
|
|
8
|
-
export * from './cache-manager';
|
|
9
|
-
export * from './component-unwrapper';
|
|
1
|
+
export * from './component-styles.js';
|
|
2
|
+
export * from './standard-libraries.js';
|
|
3
|
+
export * from './library-loader.js';
|
|
4
|
+
export * from './library-registry.js';
|
|
5
|
+
export * from './library-dependency-resolver.js';
|
|
6
|
+
export * from './component-error-analyzer.js';
|
|
7
|
+
export * from './resource-manager.js';
|
|
8
|
+
export * from './cache-manager.js';
|
|
9
|
+
export * from './component-unwrapper.js';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/utilities/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './component-styles';
|
|
2
|
-
export * from './standard-libraries';
|
|
3
|
-
export * from './library-loader';
|
|
4
|
-
export * from './library-registry';
|
|
5
|
-
export * from './library-dependency-resolver';
|
|
6
|
-
export * from './component-error-analyzer';
|
|
7
|
-
export * from './resource-manager';
|
|
8
|
-
export * from './cache-manager';
|
|
9
|
-
export * from './component-unwrapper';
|
|
1
|
+
export * from './component-styles.js';
|
|
2
|
+
export * from './standard-libraries.js';
|
|
3
|
+
export * from './library-loader.js';
|
|
4
|
+
export * from './library-registry.js';
|
|
5
|
+
export * from './library-dependency-resolver.js';
|
|
6
|
+
export * from './component-error-analyzer.js';
|
|
7
|
+
export * from './resource-manager.js';
|
|
8
|
+
export * from './cache-manager.js';
|
|
9
|
+
export * from './component-unwrapper.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MJComponentLibraryEntity } from '@memberjunction/core-entities';
|
|
2
|
-
import { DependencyGraph, LoadOrderResult, ResolvedVersion, VersionRequirement, DependencyResolutionOptions } from '../types/dependency-types';
|
|
2
|
+
import { DependencyGraph, LoadOrderResult, ResolvedVersion, VersionRequirement, DependencyResolutionOptions } from '../types/dependency-types.js';
|
|
3
3
|
export declare class LibraryDependencyResolver {
|
|
4
4
|
private debug;
|
|
5
5
|
constructor(options?: DependencyResolutionOptions);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { StandardLibraries } from './standard-libraries';
|
|
2
|
-
import { LibraryConfiguration, ExternalLibraryConfig, LibraryLoadOptions as ConfigLoadOptions } from '../types/library-config';
|
|
1
|
+
import { StandardLibraries } from './standard-libraries.js';
|
|
2
|
+
import { LibraryConfiguration, ExternalLibraryConfig, LibraryLoadOptions as ConfigLoadOptions } from '../types/library-config.js';
|
|
3
3
|
import { MJComponentLibraryEntity } from '@memberjunction/core-entities';
|
|
4
|
-
import { LoadedLibraryState, DependencyResolutionOptions } from '../types/dependency-types';
|
|
4
|
+
import { LoadedLibraryState, DependencyResolutionOptions } from '../types/dependency-types.js';
|
|
5
5
|
interface LoadedResource {
|
|
6
6
|
element: HTMLScriptElement | HTMLLinkElement;
|
|
7
7
|
promise: Promise<any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { StandardLibraryManager } from './standard-libraries';
|
|
2
|
-
import { getCoreRuntimeLibraries, isCoreRuntimeLibrary } from './core-libraries';
|
|
3
|
-
import { resourceManager } from './resource-manager';
|
|
4
|
-
import { LibraryDependencyResolver } from './library-dependency-resolver';
|
|
1
|
+
import { StandardLibraryManager } from './standard-libraries.js';
|
|
2
|
+
import { getCoreRuntimeLibraries, isCoreRuntimeLibrary } from './core-libraries.js';
|
|
3
|
+
import { resourceManager } from './resource-manager.js';
|
|
4
|
+
import { LibraryDependencyResolver } from './library-dependency-resolver.js';
|
|
5
5
|
const LIBRARY_LOADER_COMPONENT_ID = 'mj-react-runtime-library-loader-singleton';
|
|
6
6
|
export class LibraryLoader {
|
|
7
7
|
static { this.loadedResources = new Map(); }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LibraryConfiguration, ExternalLibraryConfig } from '../types/library-config';
|
|
1
|
+
import { LibraryConfiguration, ExternalLibraryConfig } from '../types/library-config.js';
|
|
2
2
|
export type StandardLibraries = Record<string, any>;
|
|
3
3
|
export declare class StandardLibraryManager {
|
|
4
4
|
private static configuration;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/react-runtime",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.38.0",
|
|
4
4
|
"description": "Platform-agnostic React component runtime for MemberJunction. Provides core compilation, registry, and execution capabilities for React components in any JavaScript environment.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "npm run build:node && npm run build:umd",
|
|
10
|
-
"build:node": "tsc",
|
|
10
|
+
"build:node": "tsc && tsc-alias -f",
|
|
11
11
|
"build:umd": "webpack --config webpack.umd.config.cjs",
|
|
12
12
|
"build:clean": "rimraf ./dist && npm run build",
|
|
13
13
|
"watch": "tsc -w",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/MemberJunction/MJ#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@memberjunction/core": "5.
|
|
33
|
-
"@memberjunction/global": "5.
|
|
34
|
-
"@memberjunction/interactive-component-types": "5.
|
|
35
|
-
"@memberjunction/core-entities": "5.
|
|
36
|
-
"@memberjunction/graphql-dataprovider": "5.
|
|
32
|
+
"@memberjunction/core": "5.38.0",
|
|
33
|
+
"@memberjunction/global": "5.38.0",
|
|
34
|
+
"@memberjunction/interactive-component-types": "5.38.0",
|
|
35
|
+
"@memberjunction/core-entities": "5.38.0",
|
|
36
|
+
"@memberjunction/graphql-dataprovider": "5.38.0",
|
|
37
37
|
"@babel/standalone": "^7.29.1",
|
|
38
38
|
"rxjs": "^7.8.2"
|
|
39
39
|
},
|
|
@@ -352,20 +352,14 @@ export class ComponentCompiler {
|
|
|
352
352
|
// Create a fresh method registry for each factory call
|
|
353
353
|
const methodRegistry = new Map();
|
|
354
354
|
|
|
355
|
-
// Create a wrapper component that provides RegisterMethod in callbacks
|
|
355
|
+
// Create a wrapper component that provides RegisterMethod in callbacks.
|
|
356
|
+
// NOTE: Do NOT clear methodRegistry inside an effect here. React runs
|
|
357
|
+
// child effects before parent effects, so the user component's mount
|
|
358
|
+
// effect (which calls RegisterMethod) fires before this wrapper effect.
|
|
359
|
+
// A clear() here would wipe out the just-registered methods and break
|
|
360
|
+
// hasMethod()/invokeMethod(). Cleanup is handled by the component's own
|
|
361
|
+
// re-renders and by garbage collection when the factory closure is freed.
|
|
356
362
|
const ComponentWithMethodRegistry = (props) => {
|
|
357
|
-
// Register methods on mount
|
|
358
|
-
React.useEffect(() => {
|
|
359
|
-
// Clear previous methods
|
|
360
|
-
methodRegistry.clear();
|
|
361
|
-
|
|
362
|
-
// Provide RegisterMethod callback if callbacks exist
|
|
363
|
-
if (props.callbacks && typeof props.callbacks.RegisterMethod === 'function') {
|
|
364
|
-
// Component can now register its methods
|
|
365
|
-
// This will be called from within the component
|
|
366
|
-
}
|
|
367
|
-
}, [props.callbacks]);
|
|
368
|
-
|
|
369
363
|
// Create enhanced callbacks with RegisterMethod
|
|
370
364
|
const enhancedCallbacks = React.useMemo(() => {
|
|
371
365
|
if (!props.callbacks) return {};
|