@iframe-resizer/react 5.4.3 → 5.4.4-beta.1

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/README.md CHANGED
@@ -22,4 +22,4 @@ yarn add @iframe-resizer/react
22
22
 
23
23
  ---
24
24
 
25
- _iframe-resizer version 5.4.3 2025-04-02 - 10:55:50.077Z_
25
+ _iframe-resizer version 5.4.4-beta.1 2025-04-07 - 11:06:10.265Z_
package/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/react 5.4.3 (cjs) - 2025-04-02
4
+ * @module iframe-resizer/react 5.4.4-beta.1 (cjs) - 2025-04-07
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -21,6 +21,7 @@
21
21
 
22
22
  const _extends = require('@babel/runtime/helpers/extends');
23
23
  const connectResizer = require('@iframe-resizer/core');
24
+ const createAutoConsoleGroup = require('auto-console-group');
24
25
  const React = require('react');
25
26
 
26
27
  const filterIframeAttribs = props => {
@@ -58,9 +59,10 @@ function IframeResizer(props) {
58
59
  } = props;
59
60
  const filteredProps = filterIframeAttribs(rest);
60
61
  const iframeRef = React.useRef(null);
62
+ const consoleGroup = createAutoConsoleGroup();
61
63
  const onClose = () => {
62
- // eslint-disable-next-line no-console
63
- console.warn(`[iframe-resizer/react][${iframeRef?.current?.id}] Close event ignored, to remove the iframe update your React component.`);
64
+ consoleGroup.event('onClose');
65
+ consoleGroup.warn(`Close event ignored, to remove the iframe update your React component.`);
64
66
  return false;
65
67
  };
66
68
 
@@ -72,6 +74,7 @@ function IframeResizer(props) {
72
74
  ...rest,
73
75
  onClose
74
76
  })(iframe);
77
+ consoleGroup.label(`react(${iframe.id})`);
75
78
  return () => resizer?.disconnect();
76
79
  }, []); // eslint-disable-line react-hooks/exhaustive-deps
77
80
 
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/react 5.4.3 (esm) - 2025-04-02
4
+ * @module iframe-resizer/react 5.4.4-beta.1 (esm) - 2025-04-07
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -19,6 +19,7 @@
19
19
 
20
20
  import _extends from '@babel/runtime/helpers/extends';
21
21
  import connectResizer from '@iframe-resizer/core';
22
+ import createAutoConsoleGroup from 'auto-console-group';
22
23
  import React, { useRef, useEffect, useImperativeHandle } from 'react';
23
24
 
24
25
  const filterIframeAttribs = props => {
@@ -56,9 +57,10 @@ function IframeResizer(props) {
56
57
  } = props;
57
58
  const filteredProps = filterIframeAttribs(rest);
58
59
  const iframeRef = useRef(null);
60
+ const consoleGroup = createAutoConsoleGroup();
59
61
  const onClose = () => {
60
- // eslint-disable-next-line no-console
61
- console.warn(`[iframe-resizer/react][${iframeRef?.current?.id}] Close event ignored, to remove the iframe update your React component.`);
62
+ consoleGroup.event('onClose');
63
+ consoleGroup.warn(`Close event ignored, to remove the iframe update your React component.`);
62
64
  return false;
63
65
  };
64
66
 
@@ -70,6 +72,7 @@ function IframeResizer(props) {
70
72
  ...rest,
71
73
  onClose
72
74
  })(iframe);
75
+ consoleGroup.label(`react(${iframe.id})`);
73
76
  return () => resizer?.disconnect();
74
77
  }, []); // eslint-disable-line react-hooks/exhaustive-deps
75
78
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iframe-resizer/react",
3
- "version": "5.4.3",
3
+ "version": "5.4.4-beta.1",
4
4
  "license": "GPL-3.0",
5
5
  "homepage": "https://iframe-resizer.com",
6
6
  "author": {
@@ -44,6 +44,7 @@
44
44
  ],
45
45
  "dependencies": {
46
46
  "@babel/runtime": "^7.27.0",
47
- "@iframe-resizer/core": "5.4.3"
47
+ "@iframe-resizer/core": "5.4.4-beta.1",
48
+ "auto-console-group": "1.2.5"
48
49
  }
49
50
  }