@memberjunction/react-runtime 2.100.1 → 2.100.3

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": "2.100.1",
3
+ "version": "2.100.3",
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
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,11 +27,11 @@
27
27
  },
28
28
  "homepage": "https://github.com/MemberJunction/MJ#readme",
29
29
  "dependencies": {
30
- "@memberjunction/core": "2.100.1",
31
- "@memberjunction/global": "2.100.1",
32
- "@memberjunction/interactive-component-types": "2.100.1",
33
- "@memberjunction/core-entities": "2.100.1",
34
- "@memberjunction/graphql-dataprovider": "2.100.1",
30
+ "@memberjunction/core": "2.100.3",
31
+ "@memberjunction/global": "2.100.3",
32
+ "@memberjunction/interactive-component-types": "2.100.3",
33
+ "@memberjunction/core-entities": "2.100.3",
34
+ "@memberjunction/graphql-dataprovider": "2.100.3",
35
35
  "@babel/standalone": "^7.23.5",
36
36
  "rxjs": "^7.8.1"
37
37
  },
@@ -41,7 +41,8 @@ export function buildComponentProps(
41
41
  utilities: any = {},
42
42
  callbacks: ComponentCallbacks = {
43
43
  OpenEntityRecord: () => {},
44
- RegisterMethod: () => {}
44
+ RegisterMethod: () => {},
45
+ CreateSimpleNotification: () => {}
45
46
  },
46
47
  components: Record<string, any> = {},
47
48
  styles?: ComponentStyles,
@@ -122,7 +123,8 @@ export function normalizeCallbacks(callbacks: any, debounceMs: number = 3000): C
122
123
  // Provide default implementations for required callbacks
123
124
  const normalized: ComponentCallbacks = {
124
125
  OpenEntityRecord: callbacks?.OpenEntityRecord || (() => {}),
125
- RegisterMethod: callbacks?.RegisterMethod || (() => {})
126
+ RegisterMethod: callbacks?.RegisterMethod || (() => {}),
127
+ CreateSimpleNotification: callbacks?.CreateSimpleNotification || (() => {})
126
128
  };
127
129
 
128
130
  // Copy any additional callbacks that might exist
@@ -273,12 +275,13 @@ export function wrapCallbacksWithLogging(
273
275
  ): ComponentCallbacks {
274
276
  const wrapped: ComponentCallbacks = {
275
277
  OpenEntityRecord: callbacks?.OpenEntityRecord || (() => {}),
276
- RegisterMethod: callbacks?.RegisterMethod || (() => {})
278
+ RegisterMethod: callbacks?.RegisterMethod || (() => {}),
279
+ CreateSimpleNotification: callbacks?.CreateSimpleNotification || (() => {})
277
280
  };
278
281
 
279
282
  // Wrap any additional callbacks that might exist
280
283
  Object.keys(callbacks).forEach(key => {
281
- if (key !== 'OpenEntityRecord' && key !== 'RegisterMethod' && typeof (callbacks as any)[key] === 'function') {
284
+ if (key !== 'OpenEntityRecord' && key !== 'RegisterMethod' && key !== 'CreateSimpleNotification' && typeof (callbacks as any)[key] === 'function') {
282
285
  (wrapped as any)[key] = (...args: any[]) => {
283
286
  console.log(`[${componentName}] ${key} called with args:`, args);
284
287
  return (callbacks as any)[key](...args);
@@ -300,6 +303,13 @@ export function wrapCallbacksWithLogging(
300
303
  };
301
304
  }
302
305
 
306
+ if (callbacks.CreateSimpleNotification) {
307
+ wrapped.CreateSimpleNotification = (message: string, style: "none" | "success" | "error" | "warning" | "info", hideAfter?: number) => {
308
+ console.log(`[${componentName}] CreateSimpleNotification called:`, { message, style, hideAfter });
309
+ callbacks.CreateSimpleNotification!(message, style, hideAfter);
310
+ };
311
+ }
312
+
303
313
  return wrapped;
304
314
  }
305
315