@iframe-resizer/react 5.5.7-beta.1 → 5.5.8-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/LICENSE +1 -1
- package/README.md +1 -1
- package/index.cjs.js +32 -37
- package/index.esm.js +32 -37
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Iframe Resizer Version 5
|
|
2
2
|
|
|
3
|
-
This JavaScript library is Copyright © 2013-2025 David J. Bradshaw and is
|
|
3
|
+
This JavaScript library is Copyright © 2013-2025 David J. Bradshaw and is dual-licensed, either under GPL V3, or a commercial license that is available for purchase upon request.
|
|
4
4
|
|
|
5
5
|
For more information on commercial licensing see https://iframe-resizer.com/pricing/
|
|
6
6
|
|
package/README.md
CHANGED
package/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/react 5.5.
|
|
4
|
+
* @module iframe-resizer/react 5.5.8-beta.1 (cjs) - 2026-01-22
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 for non-commercial use only.
|
|
7
7
|
* For commercial use, you must purchase a license from
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @see {@link https://iframe-resizer.com}
|
|
15
15
|
*
|
|
16
|
-
* @copyright (c) 2013 -
|
|
16
|
+
* @copyright (c) 2013 - 2026, David J. Bradshaw. All rights reserved.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
|
|
@@ -24,31 +24,28 @@ const connectResizer = require('@iframe-resizer/core');
|
|
|
24
24
|
const acg = require('auto-console-group');
|
|
25
25
|
const React = require('react');
|
|
26
26
|
|
|
27
|
-
const filterIframeAttribs =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
} = props;
|
|
50
|
-
return iframeProps;
|
|
51
|
-
};
|
|
27
|
+
const filterIframeAttribs = ({
|
|
28
|
+
license,
|
|
29
|
+
bodyBackground,
|
|
30
|
+
bodyMargin,
|
|
31
|
+
bodyPadding,
|
|
32
|
+
checkOrigin,
|
|
33
|
+
direction,
|
|
34
|
+
inPageLinks,
|
|
35
|
+
log,
|
|
36
|
+
offset,
|
|
37
|
+
offsetHeight,
|
|
38
|
+
offsetWidth,
|
|
39
|
+
scrolling,
|
|
40
|
+
tolerance,
|
|
41
|
+
warningTimeout,
|
|
42
|
+
waitForLoad,
|
|
43
|
+
onAfterClose,
|
|
44
|
+
onReady,
|
|
45
|
+
onMessage,
|
|
46
|
+
onResized,
|
|
47
|
+
...iframeProps
|
|
48
|
+
}) => iframeProps;
|
|
52
49
|
|
|
53
50
|
const esModuleInterop = mod =>
|
|
54
51
|
// eslint-disable-next-line no-underscore-dangle
|
|
@@ -58,17 +55,15 @@ mod?.__esModule ? mod.default : mod;
|
|
|
58
55
|
const createAutoConsoleGroup = esModuleInterop(acg);
|
|
59
56
|
|
|
60
57
|
// TODO: Add support for React.forwardRef() in next major version (Breaking change)
|
|
61
|
-
function IframeResizer(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
} = props;
|
|
67
|
-
const filteredProps = filterIframeAttribs(rest);
|
|
58
|
+
function IframeResizer({
|
|
59
|
+
forwardRef,
|
|
60
|
+
...props
|
|
61
|
+
}) {
|
|
62
|
+
const filteredProps = filterIframeAttribs(props);
|
|
68
63
|
const iframeRef = React.useRef(null);
|
|
69
64
|
const consoleGroup = createAutoConsoleGroup();
|
|
70
65
|
const onBeforeClose = () => {
|
|
71
|
-
consoleGroup.event('
|
|
66
|
+
consoleGroup.event('close');
|
|
72
67
|
consoleGroup.warn(`Close event ignored, to remove the iframe update your React component.`);
|
|
73
68
|
return false;
|
|
74
69
|
};
|
|
@@ -78,14 +73,14 @@ function IframeResizer(props) {
|
|
|
78
73
|
React.useEffect(() => {
|
|
79
74
|
const iframe = iframeRef.current;
|
|
80
75
|
const resizerOptions = {
|
|
81
|
-
...
|
|
76
|
+
...props,
|
|
82
77
|
onBeforeClose
|
|
83
78
|
};
|
|
84
79
|
consoleGroup.label(`react(${iframe.id})`);
|
|
85
80
|
consoleGroup.event('setup');
|
|
86
81
|
const resizer = connectResizer(resizerOptions)(iframe);
|
|
87
82
|
consoleGroup.expand(resizerOptions.logExpand);
|
|
88
|
-
if (
|
|
83
|
+
if (props.log) consoleGroup.log('Created React component');
|
|
89
84
|
return () => {
|
|
90
85
|
consoleGroup.endAutoGroup();
|
|
91
86
|
resizer?.disconnect();
|
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/react 5.5.
|
|
4
|
+
* @module iframe-resizer/react 5.5.8-beta.1 (esm) - 2026-01-22
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 for non-commercial use only.
|
|
7
7
|
* For commercial use, you must purchase a license from
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @see {@link https://iframe-resizer.com}
|
|
15
15
|
*
|
|
16
|
-
* @copyright (c) 2013 -
|
|
16
|
+
* @copyright (c) 2013 - 2026, David J. Bradshaw. All rights reserved.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
|
|
@@ -22,31 +22,28 @@ import connectResizer from '@iframe-resizer/core';
|
|
|
22
22
|
import acg from 'auto-console-group';
|
|
23
23
|
import React, { useRef, useEffect, useImperativeHandle } from 'react';
|
|
24
24
|
|
|
25
|
-
const filterIframeAttribs =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} = props;
|
|
48
|
-
return iframeProps;
|
|
49
|
-
};
|
|
25
|
+
const filterIframeAttribs = ({
|
|
26
|
+
license,
|
|
27
|
+
bodyBackground,
|
|
28
|
+
bodyMargin,
|
|
29
|
+
bodyPadding,
|
|
30
|
+
checkOrigin,
|
|
31
|
+
direction,
|
|
32
|
+
inPageLinks,
|
|
33
|
+
log,
|
|
34
|
+
offset,
|
|
35
|
+
offsetHeight,
|
|
36
|
+
offsetWidth,
|
|
37
|
+
scrolling,
|
|
38
|
+
tolerance,
|
|
39
|
+
warningTimeout,
|
|
40
|
+
waitForLoad,
|
|
41
|
+
onAfterClose,
|
|
42
|
+
onReady,
|
|
43
|
+
onMessage,
|
|
44
|
+
onResized,
|
|
45
|
+
...iframeProps
|
|
46
|
+
}) => iframeProps;
|
|
50
47
|
|
|
51
48
|
const esModuleInterop = mod =>
|
|
52
49
|
// eslint-disable-next-line no-underscore-dangle
|
|
@@ -56,17 +53,15 @@ mod?.__esModule ? mod.default : mod;
|
|
|
56
53
|
const createAutoConsoleGroup = esModuleInterop(acg);
|
|
57
54
|
|
|
58
55
|
// TODO: Add support for React.forwardRef() in next major version (Breaking change)
|
|
59
|
-
function IframeResizer(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
} = props;
|
|
65
|
-
const filteredProps = filterIframeAttribs(rest);
|
|
56
|
+
function IframeResizer({
|
|
57
|
+
forwardRef,
|
|
58
|
+
...props
|
|
59
|
+
}) {
|
|
60
|
+
const filteredProps = filterIframeAttribs(props);
|
|
66
61
|
const iframeRef = useRef(null);
|
|
67
62
|
const consoleGroup = createAutoConsoleGroup();
|
|
68
63
|
const onBeforeClose = () => {
|
|
69
|
-
consoleGroup.event('
|
|
64
|
+
consoleGroup.event('close');
|
|
70
65
|
consoleGroup.warn(`Close event ignored, to remove the iframe update your React component.`);
|
|
71
66
|
return false;
|
|
72
67
|
};
|
|
@@ -76,14 +71,14 @@ function IframeResizer(props) {
|
|
|
76
71
|
useEffect(() => {
|
|
77
72
|
const iframe = iframeRef.current;
|
|
78
73
|
const resizerOptions = {
|
|
79
|
-
...
|
|
74
|
+
...props,
|
|
80
75
|
onBeforeClose
|
|
81
76
|
};
|
|
82
77
|
consoleGroup.label(`react(${iframe.id})`);
|
|
83
78
|
consoleGroup.event('setup');
|
|
84
79
|
const resizer = connectResizer(resizerOptions)(iframe);
|
|
85
80
|
consoleGroup.expand(resizerOptions.logExpand);
|
|
86
|
-
if (
|
|
81
|
+
if (props.log) consoleGroup.log('Created React component');
|
|
87
82
|
return () => {
|
|
88
83
|
consoleGroup.endAutoGroup();
|
|
89
84
|
resizer?.disconnect();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iframe-resizer/react",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.8-beta.1",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"homepage": "https://iframe-resizer.com",
|
|
6
6
|
"author": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@babel/runtime": "^7.28.4",
|
|
42
|
-
"@iframe-resizer/core": "5.5.
|
|
42
|
+
"@iframe-resizer/core": "5.5.8-beta.1",
|
|
43
43
|
"auto-console-group": "1.2.11"
|
|
44
44
|
}
|
|
45
45
|
}
|