@memberjunction/ng-react 2.102.0 → 2.104.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.
@@ -12,27 +12,34 @@
12
12
  * Typically set in your app.module.ts or main.ts file.
13
13
  *
14
14
  * @example
15
- * // In your app.module.ts or environment configuration:
16
- * import { REACT_DEBUG_MODE } from '@memberjunction/ng-react';
17
- *
18
- * // For development:
15
+ * // Option 1: Set via window global (for quick testing):
19
16
  * (window as any).__MJ_REACT_DEBUG_MODE__ = true;
20
17
  *
21
- * // Or use Angular environment:
22
- * (window as any).__MJ_REACT_DEBUG_MODE__ = !environment.production;
18
+ * // Option 2: Use Angular environment (recommended):
19
+ * import { environment } from './environments/environment';
20
+ * import { ReactDebugConfig } from '@memberjunction/ng-react';
21
+ * ReactDebugConfig.setDebugMode(environment.reactDebug || false);
22
+ *
23
+ * // In your environment.ts file:
24
+ * export const environment = {
25
+ * production: false,
26
+ * reactDebug: true // Enable React debug logging
27
+ * };
23
28
  */
24
29
  export declare class ReactDebugConfig {
25
30
  /**
26
31
  * Static property that controls React debug mode globally.
27
32
  * Can be overridden at application startup before React loads.
28
- * Defaults to true for better development experience.
29
- * Should be explicitly set to false in production.
33
+ * Defaults to false to avoid verbose console logging.
34
+ * Set to true via environment variable or setDebugMode() for debugging.
30
35
  */
31
36
  static DEBUG_MODE: boolean;
32
37
  /**
33
38
  * Get the current debug mode setting.
34
- * Checks window global first (for runtime configuration),
35
- * then falls back to static property.
39
+ * Priority order:
40
+ * 1. Window global override (__MJ_REACT_DEBUG_MODE__)
41
+ * 2. Static DEBUG_MODE property (set via setDebugMode() or environment)
42
+ * Defaults to false if none are set.
36
43
  */
37
44
  static getDebugMode(): boolean;
38
45
  /**
@@ -12,39 +12,41 @@
12
12
  * Typically set in your app.module.ts or main.ts file.
13
13
  *
14
14
  * @example
15
- * // In your app.module.ts or environment configuration:
16
- * import { REACT_DEBUG_MODE } from '@memberjunction/ng-react';
17
- *
18
- * // For development:
15
+ * // Option 1: Set via window global (for quick testing):
19
16
  * (window as any).__MJ_REACT_DEBUG_MODE__ = true;
20
17
  *
21
- * // Or use Angular environment:
22
- * (window as any).__MJ_REACT_DEBUG_MODE__ = !environment.production;
18
+ * // Option 2: Use Angular environment (recommended):
19
+ * import { environment } from './environments/environment';
20
+ * import { ReactDebugConfig } from '@memberjunction/ng-react';
21
+ * ReactDebugConfig.setDebugMode(environment.reactDebug || false);
22
+ *
23
+ * // In your environment.ts file:
24
+ * export const environment = {
25
+ * production: false,
26
+ * reactDebug: true // Enable React debug logging
27
+ * };
23
28
  */
24
29
  export class ReactDebugConfig {
25
30
  /**
26
31
  * Static property that controls React debug mode globally.
27
32
  * Can be overridden at application startup before React loads.
28
- * Defaults to true for better development experience.
29
- * Should be explicitly set to false in production.
33
+ * Defaults to false to avoid verbose console logging.
34
+ * Set to true via environment variable or setDebugMode() for debugging.
30
35
  */
31
- static { this.DEBUG_MODE = true; }
36
+ static { this.DEBUG_MODE = false; }
32
37
  /**
33
38
  * Get the current debug mode setting.
34
- * Checks window global first (for runtime configuration),
35
- * then falls back to static property.
39
+ * Priority order:
40
+ * 1. Window global override (__MJ_REACT_DEBUG_MODE__)
41
+ * 2. Static DEBUG_MODE property (set via setDebugMode() or environment)
42
+ * Defaults to false if none are set.
36
43
  */
37
44
  static getDebugMode() {
38
45
  // Check if a global override has been set
39
46
  if (typeof window !== 'undefined' && window.__MJ_REACT_DEBUG_MODE__ !== undefined) {
40
47
  return window.__MJ_REACT_DEBUG_MODE__;
41
48
  }
42
- // Check if we're in development mode (common Angular pattern)
43
- // ngDevMode is truthy in dev mode, false in prod mode
44
- if (typeof window !== 'undefined' && window.ngDevMode) {
45
- return true;
46
- }
47
- // Fall back to static property
49
+ // Fall back to static property (defaults to false)
48
50
  return ReactDebugConfig.DEBUG_MODE;
49
51
  }
50
52
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"react-debug.config.js","sourceRoot":"","sources":["../../../src/lib/config/react-debug.config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,gBAAgB;IAC3B;;;;;OAKG;aACI,eAAU,GAAY,IAAI,CAAC;IAElC;;;;OAIG;IACH,MAAM,CAAC,YAAY;QACjB,0CAA0C;QAC1C,IAAI,OAAO,MAAM,KAAK,WAAW,IAAK,MAAc,CAAC,uBAAuB,KAAK,SAAS,EAAE,CAAC;YAC3F,OAAQ,MAAc,CAAC,uBAAuB,CAAC;QACjD,CAAC;QAED,8DAA8D;QAC9D,sDAAsD;QACtD,IAAI,OAAO,MAAM,KAAK,WAAW,IAAK,MAAc,CAAC,SAAS,EAAE,CAAC;YAC/D,OAAO,IAAI,CAAC;QACd,CAAC;QAED,+BAA+B;QAC/B,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,KAAc;QAChC,gBAAgB,CAAC,UAAU,GAAG,KAAK,CAAC;QACpC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YACjC,MAAc,CAAC,uBAAuB,GAAG,KAAK,CAAC;QAClD,CAAC;IACH,CAAC","sourcesContent":["/**\n * @fileoverview Project-level React debug configuration\n * Controls whether React development or production builds are loaded\n * @module @memberjunction/ng-react/config\n */\n\n/**\n * Global configuration for React library loading.\n * Set this to true in development environments to get detailed React error messages.\n * Set to false in production for smaller bundle sizes and better performance.\n * \n * This must be configured before any React components are loaded.\n * Typically set in your app.module.ts or main.ts file.\n * \n * @example\n * // In your app.module.ts or environment configuration:\n * import { REACT_DEBUG_MODE } from '@memberjunction/ng-react';\n * \n * // For development:\n * (window as any).__MJ_REACT_DEBUG_MODE__ = true;\n * \n * // Or use Angular environment:\n * (window as any).__MJ_REACT_DEBUG_MODE__ = !environment.production;\n */\nexport class ReactDebugConfig {\n /**\n * Static property that controls React debug mode globally.\n * Can be overridden at application startup before React loads.\n * Defaults to true for better development experience.\n * Should be explicitly set to false in production.\n */\n static DEBUG_MODE: boolean = true;\n\n /**\n * Get the current debug mode setting.\n * Checks window global first (for runtime configuration),\n * then falls back to static property.\n */\n static getDebugMode(): boolean {\n // Check if a global override has been set\n if (typeof window !== 'undefined' && (window as any).__MJ_REACT_DEBUG_MODE__ !== undefined) {\n return (window as any).__MJ_REACT_DEBUG_MODE__;\n }\n \n // Check if we're in development mode (common Angular pattern)\n // ngDevMode is truthy in dev mode, false in prod mode\n if (typeof window !== 'undefined' && (window as any).ngDevMode) {\n return true;\n }\n \n // Fall back to static property\n return ReactDebugConfig.DEBUG_MODE;\n }\n\n /**\n * Set the debug mode (must be called before React loads)\n */\n static setDebugMode(debug: boolean): void {\n ReactDebugConfig.DEBUG_MODE = debug;\n if (typeof window !== 'undefined') {\n (window as any).__MJ_REACT_DEBUG_MODE__ = debug;\n }\n }\n}"]}
1
+ {"version":3,"file":"react-debug.config.js","sourceRoot":"","sources":["../../../src/lib/config/react-debug.config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,gBAAgB;IAC3B;;;;;OAKG;aACI,eAAU,GAAY,KAAK,CAAC;IAEnC;;;;;;OAMG;IACH,MAAM,CAAC,YAAY;QACjB,0CAA0C;QAC1C,IAAI,OAAO,MAAM,KAAK,WAAW,IAAK,MAAc,CAAC,uBAAuB,KAAK,SAAS,EAAE,CAAC;YAC3F,OAAQ,MAAc,CAAC,uBAAuB,CAAC;QACjD,CAAC;QAED,mDAAmD;QACnD,OAAO,gBAAgB,CAAC,UAAU,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,KAAc;QAChC,gBAAgB,CAAC,UAAU,GAAG,KAAK,CAAC;QACpC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YACjC,MAAc,CAAC,uBAAuB,GAAG,KAAK,CAAC;QAClD,CAAC;IACH,CAAC","sourcesContent":["/**\n * @fileoverview Project-level React debug configuration\n * Controls whether React development or production builds are loaded\n * @module @memberjunction/ng-react/config\n */\n\n/**\n * Global configuration for React library loading.\n * Set this to true in development environments to get detailed React error messages.\n * Set to false in production for smaller bundle sizes and better performance.\n *\n * This must be configured before any React components are loaded.\n * Typically set in your app.module.ts or main.ts file.\n *\n * @example\n * // Option 1: Set via window global (for quick testing):\n * (window as any).__MJ_REACT_DEBUG_MODE__ = true;\n *\n * // Option 2: Use Angular environment (recommended):\n * import { environment } from './environments/environment';\n * import { ReactDebugConfig } from '@memberjunction/ng-react';\n * ReactDebugConfig.setDebugMode(environment.reactDebug || false);\n *\n * // In your environment.ts file:\n * export const environment = {\n * production: false,\n * reactDebug: true // Enable React debug logging\n * };\n */\nexport class ReactDebugConfig {\n /**\n * Static property that controls React debug mode globally.\n * Can be overridden at application startup before React loads.\n * Defaults to false to avoid verbose console logging.\n * Set to true via environment variable or setDebugMode() for debugging.\n */\n static DEBUG_MODE: boolean = false;\n\n /**\n * Get the current debug mode setting.\n * Priority order:\n * 1. Window global override (__MJ_REACT_DEBUG_MODE__)\n * 2. Static DEBUG_MODE property (set via setDebugMode() or environment)\n * Defaults to false if none are set.\n */\n static getDebugMode(): boolean {\n // Check if a global override has been set\n if (typeof window !== 'undefined' && (window as any).__MJ_REACT_DEBUG_MODE__ !== undefined) {\n return (window as any).__MJ_REACT_DEBUG_MODE__;\n }\n\n // Fall back to static property (defaults to false)\n return ReactDebugConfig.DEBUG_MODE;\n }\n\n /**\n * Set the debug mode (must be called before React loads)\n */\n static setDebugMode(debug: boolean): void {\n ReactDebugConfig.DEBUG_MODE = debug;\n if (typeof window !== 'undefined') {\n (window as any).__MJ_REACT_DEBUG_MODE__ = debug;\n }\n }\n}"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-react",
3
- "version": "2.102.0",
3
+ "version": "2.104.0",
4
4
  "description": "Angular components for hosting React components in MemberJunction applications",
5
5
  "scripts": {
6
6
  "build": "ngc -p tsconfig.json",
@@ -40,10 +40,10 @@
40
40
  "styles"
41
41
  ],
42
42
  "dependencies": {
43
- "@memberjunction/core": "2.102.0",
44
- "@memberjunction/react-runtime": "2.102.0",
45
- "@memberjunction/interactive-component-types": "2.102.0",
46
- "@memberjunction/ng-notifications": "2.102.0",
43
+ "@memberjunction/core": "2.100.3",
44
+ "@memberjunction/react-runtime": "2.104.0",
45
+ "@memberjunction/interactive-component-types": "2.104.0",
46
+ "@memberjunction/ng-notifications": "2.104.0",
47
47
  "@angular/common": ">=18.0.0",
48
48
  "@angular/core": ">=18.0.0",
49
49
  "@angular/platform-browser": ">=18.0.0",