@iframe-resizer/vue 5.5.6-beta.2 → 5.5.7-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 +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/index.umd.js.map +1 -1
- 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-beta.1 (cjs) - 2025-09-21
|
|
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-beta.1 (esm) - 2025-09-21
|
|
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-beta.1 (umd) - 2025-09-21
|
|
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,5 +17,5 @@
|
|
|
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)}}});
|
|
21
21
|
//# sourceMappingURL=index.umd.js.map
|
package/index.umd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../../packages/vue/iframe-resizer.vue","../../packages/vue/iframe-resizer.vue?vue&type=template&id=722fe402&lang.js","../../packages/vue/index.js"],"sourcesContent":["<template>\n <iframe ref=\"iframe\" v-bind=\"$attrs\"></iframe>\n</template>\n\n<script>\n import connectResizer from '@iframe-resizer/core'\n import acg from 'auto-console-group'\n\n const esModuleInterop = (mod) =>\n // eslint-disable-next-line no-underscore-dangle\n mod?.__esModule ? mod.default : mod\n\n // Deal with UMD not converting default exports to named exports\n const createAutoConsoleGroup = esModuleInterop(acg)\n \n const EXPAND = 'expanded'\n\n export default {\n name: 'IframeResizer',\n\n props: {\n license: {\n type: String,\n required: true\n },\n bodyBackground: {\n type: String,\n },\n bodyMargin: {\n type: String,\n },\n bodyPadding: {\n type: String,\n },\n checkOrigin: {\n type: Boolean,\n default: true,\n },\n direction: {\n type: String,\n },\n log: {\n type: [String, Boolean],\n default: false,\n },\n inPageLinks: {\n type: Boolean,\n },\n offset: {\n type: Number,\n },\n scrolling: {\n type: Boolean,\n },\n tolerance: {\n type: Number,\n },\n warningTimeout: {\n type: Number,\n },\n },\n \n mounted() {\n const self = this\n const { iframe } = this.$refs\n const options = {\n ...Object.fromEntries(\n Object\n .entries(this.$props)\n .filter(([key, value]) => value !== undefined)\n ),\n waitForLoad: true,\n\n onBeforeClose: () => {\n consoleGroup.event('Blocked Close Event')\n consoleGroup.warn('Close method is disabled, use Vue to remove iframe')\n return false\n },\n onReady: (...args) => self.$emit('onReady', ...args),\n onMessage: (...args) => self.$emit('onMessage', ...args),\n onResized: (...args) => self.$emit('onResized', ...args),\n }\n\n if (options.log === '') options.log = true\n\n const connectWithOptions = connectResizer(options)\n self.resizer = connectWithOptions(iframe)\n\n const consoleOptions = {\n label: `vue(${iframe.id})`,\n expand: options.logExpand, // set inside connectResizer\n }\n\n const consoleGroup = createAutoConsoleGroup(consoleOptions)\n consoleGroup.event('setup')\n if (options.log) consoleGroup.log('Created Vue competent')\n },\n \n beforeUnmount() {\n this.resizer?.disconnect()\n },\n\n methods: {\n moveToAnchor(anchor) {\n this.resizer.moveToAnchor(anchor)\n },\n resize() {\n this.resizer.resize()\n },\n sendMessage(msg, target) {\n this.resizer.sendMessage(msg, target)\n },\n },\n }\n\n</script>\n","<template>\n <iframe ref=\"iframe\" v-bind=\"$attrs\"></iframe>\n</template>\n\n<script>\n import connectResizer from '@iframe-resizer/core'\n import acg from 'auto-console-group'\n\n const esModuleInterop = (mod) =>\n // eslint-disable-next-line no-underscore-dangle\n mod?.__esModule ? mod.default : mod\n\n // Deal with UMD not converting default exports to named exports\n const createAutoConsoleGroup = esModuleInterop(acg)\n \n const EXPAND = 'expanded'\n\n export default {\n name: 'IframeResizer',\n\n props: {\n license: {\n type: String,\n required: true\n },\n bodyBackground: {\n type: String,\n },\n bodyMargin: {\n type: String,\n },\n bodyPadding: {\n type: String,\n },\n checkOrigin: {\n type: Boolean,\n default: true,\n },\n direction: {\n type: String,\n },\n log: {\n type: [String, Boolean],\n default: false,\n },\n inPageLinks: {\n type: Boolean,\n },\n offset: {\n type: Number,\n },\n scrolling: {\n type: Boolean,\n },\n tolerance: {\n type: Number,\n },\n warningTimeout: {\n type: Number,\n },\n },\n \n mounted() {\n const self = this\n const { iframe } = this.$refs\n const options = {\n ...Object.fromEntries(\n Object\n .entries(this.$props)\n .filter(([key, value]) => value !== undefined)\n ),\n waitForLoad: true,\n\n onBeforeClose: () => {\n consoleGroup.event('Blocked Close Event')\n consoleGroup.warn('Close method is disabled, use Vue to remove iframe')\n return false\n },\n onReady: (...args) => self.$emit('onReady', ...args),\n onMessage: (...args) => self.$emit('onMessage', ...args),\n onResized: (...args) => self.$emit('onResized', ...args),\n }\n\n if (options.log === '') options.log = true\n\n const connectWithOptions = connectResizer(options)\n self.resizer = connectWithOptions(iframe)\n\n const consoleOptions = {\n label: `vue(${iframe.id})`,\n expand: options.logExpand, // set inside connectResizer\n }\n\n const consoleGroup = createAutoConsoleGroup(consoleOptions)\n consoleGroup.event('setup')\n if (options.log) consoleGroup.log('Created Vue competent')\n },\n \n beforeUnmount() {\n this.resizer?.disconnect()\n },\n\n methods: {\n moveToAnchor(anchor) {\n this.resizer.moveToAnchor(anchor)\n },\n resize() {\n this.resizer.resize()\n },\n sendMessage(msg, target) {\n this.resizer.sendMessage(msg, target)\n },\n },\n }\n\n</script>\n","import IframeResizer from './iframe-resizer.vue'\n\nexport default {\n install(Vue) {\n Vue.component('IframeResizer', IframeResizer)\n },\n}\n"],"names":["createAutoConsoleGroup","mod","acg","__esModule","default","script","name","props","license","type","String","required","bodyBackground","bodyMargin","bodyPadding","checkOrigin","Boolean","direction","log","inPageLinks","offset","Number","scrolling","tolerance","warningTimeout","mounted","self","this","iframe","$refs","options","Object","fromEntries","entries","$props","filter","key","value","undefined","waitForLoad","onBeforeClose","consoleGroup","event","warn","onReady","args","$emit","onMessage","onResized","connectWithOptions","connectResizer","resizer","consoleOptions","label","id","expand","logExpand","beforeUnmount","disconnect","methods","moveToAnchor","anchor","resize","sendMessage","msg","target","_openBlock","_createElementBlock","_mergeProps","ref","_ctx","$attrs","install","Vue","component","IframeResizer"],"mappings":";;;;;;;;;;;;;;;;;;;8YAQE,MAKMA,GALmBC,EAKsBC,EAH7CD,GAAKE,WAAaF,EAAIG,QAAUH,GAFV,IAACA,EASzB,MAAAI,EAAe,CACbC,KAAM,gBAENC,MAAO,CACLC,QAAS,CACPC,KAAMC,OACNC,UAAU,GAEZC,eAAgB,CACdH,KAAMC,QAERG,WAAY,CACVJ,KAAMC,QAERI,YAAa,CACXL,KAAMC,QAERK,YAAa,CACXN,KAAMO,QACNZ,SAAS,GAEXa,UAAW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,gBAAiBC,EACjC"}
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../../packages/common/consts.js","../../packages/vue/iframe-resizer.vue","../../packages/vue/iframe-resizer.vue?vue&type=template&id=722fe402&lang.js","../../packages/vue/index.js"],"sourcesContent":["export const VERSION = '[VI]{version}[/VI]'\nexport const LABEL = 'iframeResizer'\nexport const SEPARATOR = ':'\nexport const CHILD_READY_MESSAGE = '[iFrameResizerChild]Ready'\n\nexport const AFTER_EVENT_STACK = 1\n\nexport const AUTO_RESIZE = 'autoResize'\nexport const BEFORE_UNLOAD = 'beforeUnload'\nexport const CLOSE = 'close'\nexport const IN_PAGE_LINK = 'inPageLink'\nexport const INIT = 'init'\nexport const INIT_FROM_IFRAME = 'iframeReady'\nexport const LAZY = 'lazy'\nexport const LOAD = 'load'\nexport const MESSAGE = 'message'\nexport const MOUSE_ENTER = 'mouseenter'\nexport const MOUSE_LEAVE = 'mouseleave'\nexport const ONLOAD = 'onload'\nexport const PAGE_HIDE = 'pageHide'\nexport const PAGE_INFO = 'pageInfo'\nexport const PARENT_INFO = 'parentInfo'\nexport const PAGE_INFO_STOP = 'pageInfoStop'\nexport const PARENT_INFO_STOP = 'parentInfoStop'\nexport const RESET = 'reset'\nexport const RESIZE = 'resize'\nexport const SCROLL_BY = 'scrollBy'\nexport const SCROLL_TO = 'scrollTo'\nexport const SCROLL_TO_OFFSET = 'scrollToOffset'\nexport const TITLE = 'title'\n\nexport const BASE = 10\nexport const SINGLE = 1\nexport const MIN_SIZE = 1\n\nexport const SIZE_ATTR = 'data-iframe-size'\nexport const OVERFLOW_ATTR = 'data-iframe-overflowed'\nexport const IGNORE_ATTR = 'data-iframe-ignore'\n\nexport const HEIGHT = 'height'\nexport const WIDTH = 'width'\nexport const OFFSET = 'offset'\nexport const OFFSET_HEIGHT = 'offsetHeight'\nexport const OFFSET_SIZE = 'offsetSize'\nexport const SCROLL = 'scroll'\n\nexport const HIDDEN = 'hidden'\nexport const VISIBLE = 'visible'\n\nexport const CHILD = 'child'\nexport const PARENT = 'parent'\n\nexport const STRING = 'string'\nexport const NUMBER = 'number'\nexport const BOOLEAN = 'boolean'\nexport const OBJECT = 'object'\nexport const FUNCTION = 'function'\nexport const SYMBOL = 'symbol'\nexport const UNDEFINED = 'undefined'\n\nexport const TRUE = 'true'\nexport const FALSE = 'false'\n\nexport const NULL = 'null'\nexport const AUTO = 'auto'\n\nexport const READY_STATE_CHANGE = 'readystatechange'\n\nexport const HEIGHT_EDGE = 'bottom'\nexport const WIDTH_EDGE = 'right'\n\nexport const ENABLE = 'autoResizeEnabled'\nexport const SIZE_CHANGE_DETECTED = Symbol('sizeChanged')\nexport const MANUAL_RESIZE_REQUEST = 'manualResize'\nexport const PARENT_RESIZE_REQUEST = 'parentResize'\nexport const IGNORE_DISABLE_RESIZE = {\n [MANUAL_RESIZE_REQUEST]: 1,\n [PARENT_RESIZE_REQUEST]: 1,\n}\n\nexport const SET_OFFSET_SIZE = 'setOffsetSize'\n\nexport const RESIZE_OBSERVER = 'resizeObserver'\nexport const OVERFLOW_OBSERVER = 'overflowObserver'\nexport const MUTATION_OBSERVER = 'mutationObserver'\nexport const VISIBILITY_OBSERVER = 'visibilityObserver'\n\nexport const BOLD = 'font-weight: bold;'\nexport const NORMAL = 'font-weight: normal;'\nexport const ITALIC = 'font-style: italic;'\nexport const BLUE = 'color: #135CD2;'\nexport const BLUE_LIGHT = 'color: #A9C7FB;'\nexport const BLACK = 'color: black;'\nexport const WHITE = 'color: #E3E3E3;'\n\nexport const NONE = 'none'\nexport const BOTH = 'both'\nexport const VERTICAL = 'vertical'\nexport const HORIZONTAL = 'horizontal'\n\nexport const NO_CHANGE = 'No change in content size detected'\n\nexport const MESSAGE_HEADER_LENGTH = MESSAGE.length\nexport const MESSAGE_ID = '[iFrameSizer]' // Must match iframe msg ID\nexport const MESSAGE_ID_LENGTH = MESSAGE_ID.length\nexport const RESET_REQUIRED_METHODS = Object.freeze({\n max: 1,\n scroll: 1,\n bodyScroll: 1,\n documentElementScroll: 1,\n})\n\nexport const INIT_EVENTS = Object.freeze({\n [ONLOAD]: 1,\n [INIT]: 1,\n [INIT_FROM_IFRAME]: 1,\n})\n\nexport const EXPAND = 'expanded'\nexport const COLLAPSE = 'collapsed'\n\nexport const LOG_OPTIONS = Object.freeze({\n [EXPAND]: 1,\n [COLLAPSE]: 1,\n})\n\nexport const IGNORE_TAGS = new Set([\n 'head',\n 'body',\n 'meta',\n 'base',\n 'title',\n 'script',\n 'link',\n 'style',\n 'map',\n 'area',\n 'option',\n 'optgroup',\n 'template',\n 'track',\n 'wbr',\n 'nobr',\n])\n","<template>\n <iframe ref=\"iframe\" v-bind=\"$attrs\"></iframe>\n</template>\n\n<script>\n import connectResizer from '@iframe-resizer/core'\n import acg from 'auto-console-group'\n import { EXPAND, COLLAPSE } from '../common/consts'\n\n const esModuleInterop = (mod) =>\n // eslint-disable-next-line no-underscore-dangle\n mod?.__esModule ? mod.default : mod\n\n // Deal with UMD not converting default exports to named exports\n const createAutoConsoleGroup = esModuleInterop(acg)\n\n export default {\n name: 'IframeResizer',\n\n props: {\n license: {\n type: String,\n required: true\n },\n bodyBackground: {\n type: String,\n },\n bodyMargin: {\n type: String,\n },\n bodyPadding: {\n type: String,\n },\n checkOrigin: {\n type: Boolean,\n default: true,\n },\n direction: {\n type: String,\n },\n log: {\n type: [String, Boolean, Number],\n validator: (value) => {\n switch (value) {\n case COLLAPSE:\n case EXPAND:\n case false:\n case true:\n case -1:\n return true\n default:\n return false\n }\n },\n default: undefined,\n },\n inPageLinks: {\n type: Boolean,\n },\n offset: {\n type: Number,\n },\n scrolling: {\n type: Boolean,\n },\n tolerance: {\n type: Number,\n },\n warningTimeout: {\n type: Number,\n },\n },\n \n mounted() {\n const self = this\n const { iframe } = this.$refs\n const options = {\n ...Object.fromEntries(\n Object\n .entries(this.$props)\n .filter(([key, value]) => value !== undefined)\n ),\n waitForLoad: true,\n\n onBeforeClose: () => {\n consoleGroup.event('Blocked Close Event')\n consoleGroup.warn('Close method is disabled, use Vue to remove iframe')\n return false\n },\n onReady: (...args) => self.$emit('onReady', ...args),\n onMessage: (...args) => self.$emit('onMessage', ...args),\n onResized: (...args) => self.$emit('onResized', ...args),\n }\n\n const connectWithOptions = connectResizer(options)\n self.resizer = connectWithOptions(iframe)\n\n const consoleOptions = {\n label: `vue(${iframe.id})`,\n expand: options.logExpand, // set inside connectResizer\n }\n\n const consoleGroup = createAutoConsoleGroup(consoleOptions)\n consoleGroup.event('setup')\n\n if ([COLLAPSE, EXPAND, true].includes(options.log)) {\n consoleGroup.log('Created Vue component')\n }\n },\n \n beforeUnmount() {\n this.resizer?.disconnect()\n },\n\n methods: {\n moveToAnchor(anchor) {\n this.resizer.moveToAnchor(anchor)\n },\n resize() {\n this.resizer.resize()\n },\n sendMessage(msg, target) {\n this.resizer.sendMessage(msg, target)\n },\n },\n }\n\n</script>\n","<template>\n <iframe ref=\"iframe\" v-bind=\"$attrs\"></iframe>\n</template>\n\n<script>\n import connectResizer from '@iframe-resizer/core'\n import acg from 'auto-console-group'\n import { EXPAND, COLLAPSE } from '../common/consts'\n\n const esModuleInterop = (mod) =>\n // eslint-disable-next-line no-underscore-dangle\n mod?.__esModule ? mod.default : mod\n\n // Deal with UMD not converting default exports to named exports\n const createAutoConsoleGroup = esModuleInterop(acg)\n\n export default {\n name: 'IframeResizer',\n\n props: {\n license: {\n type: String,\n required: true\n },\n bodyBackground: {\n type: String,\n },\n bodyMargin: {\n type: String,\n },\n bodyPadding: {\n type: String,\n },\n checkOrigin: {\n type: Boolean,\n default: true,\n },\n direction: {\n type: String,\n },\n log: {\n type: [String, Boolean, Number],\n validator: (value) => {\n switch (value) {\n case COLLAPSE:\n case EXPAND:\n case false:\n case true:\n case -1:\n return true\n default:\n return false\n }\n },\n default: undefined,\n },\n inPageLinks: {\n type: Boolean,\n },\n offset: {\n type: Number,\n },\n scrolling: {\n type: Boolean,\n },\n tolerance: {\n type: Number,\n },\n warningTimeout: {\n type: Number,\n },\n },\n \n mounted() {\n const self = this\n const { iframe } = this.$refs\n const options = {\n ...Object.fromEntries(\n Object\n .entries(this.$props)\n .filter(([key, value]) => value !== undefined)\n ),\n waitForLoad: true,\n\n onBeforeClose: () => {\n consoleGroup.event('Blocked Close Event')\n consoleGroup.warn('Close method is disabled, use Vue to remove iframe')\n return false\n },\n onReady: (...args) => self.$emit('onReady', ...args),\n onMessage: (...args) => self.$emit('onMessage', ...args),\n onResized: (...args) => self.$emit('onResized', ...args),\n }\n\n const connectWithOptions = connectResizer(options)\n self.resizer = connectWithOptions(iframe)\n\n const consoleOptions = {\n label: `vue(${iframe.id})`,\n expand: options.logExpand, // set inside connectResizer\n }\n\n const consoleGroup = createAutoConsoleGroup(consoleOptions)\n consoleGroup.event('setup')\n\n if ([COLLAPSE, EXPAND, true].includes(options.log)) {\n consoleGroup.log('Created Vue component')\n }\n },\n \n beforeUnmount() {\n this.resizer?.disconnect()\n },\n\n methods: {\n moveToAnchor(anchor) {\n this.resizer.moveToAnchor(anchor)\n },\n resize() {\n this.resizer.resize()\n },\n sendMessage(msg, target) {\n this.resizer.sendMessage(msg, target)\n },\n },\n }\n\n</script>\n","import IframeResizer from './iframe-resizer.vue'\n\nexport default {\n install(Vue) {\n Vue.component('IframeResizer', IframeResizer)\n },\n}\n"],"names":["EXPAND","COLLAPSE","createAutoConsoleGroup","mod","acg","__esModule","default","script","name","props","license","type","String","required","bodyBackground","bodyMargin","bodyPadding","checkOrigin","Boolean","direction","log","Number","validator","value","undefined","inPageLinks","offset","scrolling","tolerance","warningTimeout","mounted","self","this","iframe","$refs","options","Object","fromEntries","entries","$props","filter","key","waitForLoad","onBeforeClose","consoleGroup","event","warn","onReady","args","$emit","onMessage","onResized","connectWithOptions","connectResizer","resizer","consoleOptions","label","id","expand","logExpand","includes","beforeUnmount","disconnect","methods","moveToAnchor","anchor","resize","sendMessage","msg","target","_openBlock","_createElementBlock","_mergeProps","ref","_ctx","$attrs","install","Vue","component","IframeResizer"],"mappings":";;;;;;;;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EAAUD,GAAQ,GAAM4D,SAASzB,EAAQf,MAC5CwB,EAAaxB,IAAI,wBAErB,EAEA,aAAAyC,GACE7B,KAAKsB,SAASQ,YAChB,EAEAC,QAAS,CACP,YAAAC,CAAaC,GACXjC,KAAKsB,QAAQU,aAAaC,EAC5B,EACA,MAAAC,GACElC,KAAKsB,QAAQY,QACf,EACA,WAAAC,CAAYC,EAAKC,GACfrC,KAAKsB,QAAQa,YAAYC,EAAKC,EAChC,mCC1HJ,OAAAC,EAAAA,YAAAC,EAAAA,mBAA6C,SAA7CC,EAAAA,WAA6C,CAArCC,IAAI,UAAiBC,EAAAC,QAAM,KAAA,sDCCtB,CACb,OAAAC,CAAQC,GACNA,EAAIC,UAAU,gBAAiBC,EACjC"}
|
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-beta.1",
|
|
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-beta.1",
|
|
43
43
|
"auto-console-group": "1.2.11"
|
|
44
44
|
}
|
|
45
45
|
}
|