@memberjunction/react-runtime 5.11.0 → 5.13.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/react-runtime",
3
- "version": "5.11.0",
3
+ "version": "5.13.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",
@@ -29,11 +29,11 @@
29
29
  },
30
30
  "homepage": "https://github.com/MemberJunction/MJ#readme",
31
31
  "dependencies": {
32
- "@memberjunction/core": "5.11.0",
33
- "@memberjunction/global": "5.11.0",
34
- "@memberjunction/interactive-component-types": "5.11.0",
35
- "@memberjunction/core-entities": "5.11.0",
36
- "@memberjunction/graphql-dataprovider": "5.11.0",
32
+ "@memberjunction/core": "5.13.0",
33
+ "@memberjunction/global": "5.13.0",
34
+ "@memberjunction/interactive-component-types": "5.13.0",
35
+ "@memberjunction/core-entities": "5.13.0",
36
+ "@memberjunction/graphql-dataprovider": "5.13.0",
37
37
  "@babel/standalone": "^7.29.1",
38
38
  "rxjs": "^7.8.2"
39
39
  },
@@ -234,7 +234,12 @@ export class ComponentCompiler {
234
234
  console.log(' - Has .component property:', 'component' in ${dep.name}Raw);
235
235
  console.log(' - .component type:', typeof ${dep.name}Raw.component);
236
236
  }` : ''}
237
- const ${dep.name} = ${dep.name}Raw?.component || ${dep.name}Raw;
237
+ const ${dep.name}Unwrapped = ${dep.name}Raw?.component || ${dep.name}Raw;
238
+ const ${dep.name} = (props) => React.createElement(
239
+ 'div',
240
+ { 'data-mj-component': '${dep.name}', style: { display: 'contents' } },
241
+ React.createElement(${dep.name}Unwrapped, props)
242
+ );
238
243
  ${debug ? `console.log(' - Final ${dep.name} type:', typeof ${dep.name});
239
244
  console.log(' - Final ${dep.name} is function:', typeof ${dep.name} === 'function');` : ''}`)
240
245
  .join('\n ')
@@ -375,13 +380,17 @@ export class ComponentCompiler {
375
380
  };
376
381
  }, [props.callbacks]);
377
382
 
378
- // Render the original component with enhanced callbacks
379
- return React.createElement(DestructureWrapperUserComponent, {
383
+ // Render the original component with enhanced callbacks, wrapped in a DOM marker div
384
+ return React.createElement('div', {
385
+ 'data-mj-component': '${componentName}',
386
+ 'data-mj-root': 'true',
387
+ style: { display: 'contents' }
388
+ }, React.createElement(DestructureWrapperUserComponent, {
380
389
  ...props,
381
390
  callbacks: enhancedCallbacks
382
- });
391
+ }));
383
392
  };
384
-
393
+
385
394
  ComponentWithMethodRegistry.displayName = '${componentName}WithMethods';
386
395
 
387
396
  // Return the component object with method access