@iframe-resizer/vue 5.5.6 → 5.5.7
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 +1 -1
- package/iframe-resizer.vue +19 -7
- package/index.cjs.js +22 -6
- package/index.esm.js +22 -6
- package/index.umd.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
package/iframe-resizer.vue
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
<script>
|
|
6
6
|
import connectResizer from '@iframe-resizer/core'
|
|
7
7
|
import acg from 'auto-console-group'
|
|
8
|
+
import { EXPAND, COLLAPSE } from '../common/consts'
|
|
8
9
|
|
|
9
10
|
const esModuleInterop = (mod) =>
|
|
10
11
|
// eslint-disable-next-line no-underscore-dangle
|
|
@@ -12,8 +13,6 @@
|
|
|
12
13
|
|
|
13
14
|
// Deal with UMD not converting default exports to named exports
|
|
14
15
|
const createAutoConsoleGroup = esModuleInterop(acg)
|
|
15
|
-
|
|
16
|
-
const EXPAND = 'expanded'
|
|
17
16
|
|
|
18
17
|
export default {
|
|
19
18
|
name: 'IframeResizer',
|
|
@@ -40,8 +39,20 @@
|
|
|
40
39
|
type: String,
|
|
41
40
|
},
|
|
42
41
|
log: {
|
|
43
|
-
type: [String, Boolean],
|
|
44
|
-
|
|
42
|
+
type: [String, Boolean, Number],
|
|
43
|
+
validator: (value) => {
|
|
44
|
+
switch (value) {
|
|
45
|
+
case COLLAPSE:
|
|
46
|
+
case EXPAND:
|
|
47
|
+
case false:
|
|
48
|
+
case true:
|
|
49
|
+
case -1:
|
|
50
|
+
return true
|
|
51
|
+
default:
|
|
52
|
+
return false
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
default: undefined,
|
|
45
56
|
},
|
|
46
57
|
inPageLinks: {
|
|
47
58
|
type: Boolean,
|
|
@@ -81,8 +92,6 @@
|
|
|
81
92
|
onResized: (...args) => self.$emit('onResized', ...args),
|
|
82
93
|
}
|
|
83
94
|
|
|
84
|
-
if (options.log === '') options.log = true
|
|
85
|
-
|
|
86
95
|
const connectWithOptions = connectResizer(options)
|
|
87
96
|
self.resizer = connectWithOptions(iframe)
|
|
88
97
|
|
|
@@ -93,7 +102,10 @@
|
|
|
93
102
|
|
|
94
103
|
const consoleGroup = createAutoConsoleGroup(consoleOptions)
|
|
95
104
|
consoleGroup.event('setup')
|
|
96
|
-
|
|
105
|
+
|
|
106
|
+
if ([COLLAPSE, EXPAND, true].includes(options.log)) {
|
|
107
|
+
consoleGroup.log('Created Vue component')
|
|
108
|
+
}
|
|
97
109
|
},
|
|
98
110
|
|
|
99
111
|
beforeUnmount() {
|
package/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/vue 5.5.
|
|
4
|
+
* @module iframe-resizer/vue 5.5.7 (cjs) - 2025-09-23
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 for non-commercial use only.
|
|
7
7
|
* For commercial use, you must purchase a license from
|
|
@@ -23,6 +23,9 @@ const connectResizer = require('@iframe-resizer/core');
|
|
|
23
23
|
const acg = require('auto-console-group');
|
|
24
24
|
const vue = require('vue');
|
|
25
25
|
|
|
26
|
+
const EXPAND = 'expanded';
|
|
27
|
+
const COLLAPSE = 'collapsed';
|
|
28
|
+
|
|
26
29
|
const esModuleInterop = (mod) =>
|
|
27
30
|
// eslint-disable-next-line no-underscore-dangle
|
|
28
31
|
mod?.__esModule ? mod.default : mod;
|
|
@@ -55,8 +58,20 @@ const esModuleInterop = (mod) =>
|
|
|
55
58
|
type: String,
|
|
56
59
|
},
|
|
57
60
|
log: {
|
|
58
|
-
type: [String, Boolean],
|
|
59
|
-
|
|
61
|
+
type: [String, Boolean, Number],
|
|
62
|
+
validator: (value) => {
|
|
63
|
+
switch (value) {
|
|
64
|
+
case COLLAPSE:
|
|
65
|
+
case EXPAND:
|
|
66
|
+
case false:
|
|
67
|
+
case true:
|
|
68
|
+
case -1:
|
|
69
|
+
return true
|
|
70
|
+
default:
|
|
71
|
+
return false
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
default: undefined,
|
|
60
75
|
},
|
|
61
76
|
inPageLinks: {
|
|
62
77
|
type: Boolean,
|
|
@@ -96,8 +111,6 @@ const esModuleInterop = (mod) =>
|
|
|
96
111
|
onResized: (...args) => self.$emit('onResized', ...args),
|
|
97
112
|
};
|
|
98
113
|
|
|
99
|
-
if (options.log === '') options.log = true;
|
|
100
|
-
|
|
101
114
|
const connectWithOptions = connectResizer(options);
|
|
102
115
|
self.resizer = connectWithOptions(iframe);
|
|
103
116
|
|
|
@@ -108,7 +121,10 @@ const esModuleInterop = (mod) =>
|
|
|
108
121
|
|
|
109
122
|
const consoleGroup = createAutoConsoleGroup(consoleOptions);
|
|
110
123
|
consoleGroup.event('setup');
|
|
111
|
-
|
|
124
|
+
|
|
125
|
+
if ([COLLAPSE, EXPAND, true].includes(options.log)) {
|
|
126
|
+
consoleGroup.log('Created Vue component');
|
|
127
|
+
}
|
|
112
128
|
},
|
|
113
129
|
|
|
114
130
|
beforeUnmount() {
|
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/vue 5.5.
|
|
4
|
+
* @module iframe-resizer/vue 5.5.7 (esm) - 2025-09-23
|
|
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,9 @@ import connectResizer from '@iframe-resizer/core';
|
|
|
21
21
|
import acg from 'auto-console-group';
|
|
22
22
|
import { createElementBlock, openBlock, mergeProps } from 'vue';
|
|
23
23
|
|
|
24
|
+
const EXPAND = 'expanded';
|
|
25
|
+
const COLLAPSE = 'collapsed';
|
|
26
|
+
|
|
24
27
|
const esModuleInterop = (mod) =>
|
|
25
28
|
// eslint-disable-next-line no-underscore-dangle
|
|
26
29
|
mod?.__esModule ? mod.default : mod;
|
|
@@ -53,8 +56,20 @@ const esModuleInterop = (mod) =>
|
|
|
53
56
|
type: String,
|
|
54
57
|
},
|
|
55
58
|
log: {
|
|
56
|
-
type: [String, Boolean],
|
|
57
|
-
|
|
59
|
+
type: [String, Boolean, Number],
|
|
60
|
+
validator: (value) => {
|
|
61
|
+
switch (value) {
|
|
62
|
+
case COLLAPSE:
|
|
63
|
+
case EXPAND:
|
|
64
|
+
case false:
|
|
65
|
+
case true:
|
|
66
|
+
case -1:
|
|
67
|
+
return true
|
|
68
|
+
default:
|
|
69
|
+
return false
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
default: undefined,
|
|
58
73
|
},
|
|
59
74
|
inPageLinks: {
|
|
60
75
|
type: Boolean,
|
|
@@ -94,8 +109,6 @@ const esModuleInterop = (mod) =>
|
|
|
94
109
|
onResized: (...args) => self.$emit('onResized', ...args),
|
|
95
110
|
};
|
|
96
111
|
|
|
97
|
-
if (options.log === '') options.log = true;
|
|
98
|
-
|
|
99
112
|
const connectWithOptions = connectResizer(options);
|
|
100
113
|
self.resizer = connectWithOptions(iframe);
|
|
101
114
|
|
|
@@ -106,7 +119,10 @@ const esModuleInterop = (mod) =>
|
|
|
106
119
|
|
|
107
120
|
const consoleGroup = createAutoConsoleGroup(consoleOptions);
|
|
108
121
|
consoleGroup.event('setup');
|
|
109
|
-
|
|
122
|
+
|
|
123
|
+
if ([COLLAPSE, EXPAND, true].includes(options.log)) {
|
|
124
|
+
consoleGroup.log('Created Vue component');
|
|
125
|
+
}
|
|
110
126
|
},
|
|
111
127
|
|
|
112
128
|
beforeUnmount() {
|
package/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/vue 5.5.
|
|
4
|
+
* @module iframe-resizer/vue 5.5.7 (umd) - 2025-09-23
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 for non-commercial use only.
|
|
7
7
|
* For commercial use, you must purchase a license from
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
!function(e,
|
|
20
|
+
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("@iframe-resizer/core"),require("auto-console-group"),require("vue")):"function"==typeof define&&define.amd?define(["@iframe-resizer/core","auto-console-group","vue"],r):(e="undefined"!=typeof globalThis?globalThis:e||self).IframeResizer=r(e.connectResizer,e.acg,e.Vue)}(this,function(e,r,o){"use strict";const t="expanded",n="collapsed",i=(s=r,s?.__esModule?s.default:s);var s;const a={name:"IframeResizer",props:{license:{type:String,required:!0},bodyBackground:{type:String},bodyMargin:{type:String},bodyPadding:{type:String},checkOrigin:{type:Boolean,default:!0},direction:{type:String},log:{type:[String,Boolean,Number],validator:e=>{switch(e){case n:case t:case!1:case!0:case-1:return!0;default:return!1}},default:void 0},inPageLinks:{type:Boolean},offset:{type:Number},scrolling:{type:Boolean},tolerance:{type:Number},warningTimeout:{type:Number}},mounted(){const r=this,{iframe:o}=this.$refs,s={...Object.fromEntries(Object.entries(this.$props).filter(([e,r])=>void 0!==r)),waitForLoad:!0,onBeforeClose:()=>(l.event("Blocked Close Event"),l.warn("Close method is disabled, use Vue to remove iframe"),!1),onReady:(...e)=>r.$emit("onReady",...e),onMessage:(...e)=>r.$emit("onMessage",...e),onResized:(...e)=>r.$emit("onResized",...e)},a=e(s);r.resizer=a(o);const d={label:`vue(${o.id})`,expand:s.logExpand},l=i(d);l.event("setup"),[n,t,!0].includes(s.log)&&l.log("Created Vue component")},beforeUnmount(){this.resizer?.disconnect()},methods:{moveToAnchor(e){this.resizer.moveToAnchor(e)},resize(){this.resizer.resize()},sendMessage(e,r){this.resizer.sendMessage(e,r)}}};a.render=function(e,r,t,n,i,s){return o.openBlock(),o.createElementBlock("iframe",o.mergeProps({ref:"iframe"},e.$attrs),null,16)},a.__file="./iframe-resizer.vue";return{install(e){e.component("IframeResizer",a)}}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iframe-resizer/vue",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.7",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"homepage": "https://iframe-resizer.com",
|
|
6
6
|
"author": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"vue"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@iframe-resizer/core": "5.5.
|
|
42
|
+
"@iframe-resizer/core": "5.5.7",
|
|
43
43
|
"auto-console-group": "1.2.11"
|
|
44
44
|
}
|
|
45
45
|
}
|