@iframe-resizer/vue 5.5.8-beta.2 → 5.5.8-beta.3
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 +5 -3
- package/index.cjs.js +5 -5
- package/index.esm.js +6 -6
- package/index.umd.js +1 -1
- package/index.umd.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
package/iframe-resizer.vue
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
<script>
|
|
6
6
|
import connectResizer from '@iframe-resizer/core'
|
|
7
7
|
import acg from 'auto-console-group'
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
export const EXPAND = 'expanded'
|
|
10
|
+
export const COLLAPSE = 'collapsed'
|
|
9
11
|
|
|
10
12
|
const esModuleInterop = (mod) =>
|
|
11
13
|
// eslint-disable-next-line no-underscore-dangle
|
|
@@ -70,7 +72,7 @@
|
|
|
70
72
|
type: Number,
|
|
71
73
|
},
|
|
72
74
|
},
|
|
73
|
-
|
|
75
|
+
|
|
74
76
|
mounted() {
|
|
75
77
|
const self = this
|
|
76
78
|
const { iframe } = this.$refs
|
|
@@ -107,7 +109,7 @@
|
|
|
107
109
|
consoleGroup.log('Created Vue component')
|
|
108
110
|
}
|
|
109
111
|
},
|
|
110
|
-
|
|
112
|
+
|
|
111
113
|
beforeUnmount() {
|
|
112
114
|
this.resizer?.disconnect()
|
|
113
115
|
},
|
package/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/vue 5.5.8-beta.
|
|
4
|
+
* @module iframe-resizer/vue 5.5.8-beta.3 (cjs) - 2026-01-24
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 for non-commercial use only.
|
|
7
7
|
* For commercial use, you must purchase a license from
|
|
@@ -24,9 +24,9 @@ const acg = require('auto-console-group');
|
|
|
24
24
|
const vue = require('vue');
|
|
25
25
|
|
|
26
26
|
const EXPAND = 'expanded';
|
|
27
|
-
const COLLAPSE = 'collapsed';
|
|
27
|
+
const COLLAPSE = 'collapsed';
|
|
28
28
|
|
|
29
|
-
const esModuleInterop = (mod) =>
|
|
29
|
+
const esModuleInterop = (mod) =>
|
|
30
30
|
// eslint-disable-next-line no-underscore-dangle
|
|
31
31
|
mod?.__esModule ? mod.default : mod;
|
|
32
32
|
|
|
@@ -89,7 +89,7 @@ const esModuleInterop = (mod) =>
|
|
|
89
89
|
type: Number,
|
|
90
90
|
},
|
|
91
91
|
},
|
|
92
|
-
|
|
92
|
+
|
|
93
93
|
mounted() {
|
|
94
94
|
const self = this;
|
|
95
95
|
const { iframe } = this.$refs;
|
|
@@ -126,7 +126,7 @@ const esModuleInterop = (mod) =>
|
|
|
126
126
|
consoleGroup.log('Created Vue component');
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
|
-
|
|
129
|
+
|
|
130
130
|
beforeUnmount() {
|
|
131
131
|
this.resizer?.disconnect();
|
|
132
132
|
},
|
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/vue 5.5.8-beta.
|
|
4
|
+
* @module iframe-resizer/vue 5.5.8-beta.3 (esm) - 2026-01-24
|
|
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,12 +19,12 @@
|
|
|
19
19
|
|
|
20
20
|
import connectResizer from '@iframe-resizer/core';
|
|
21
21
|
import acg from 'auto-console-group';
|
|
22
|
-
import {
|
|
22
|
+
import { openBlock, createElementBlock, mergeProps } from 'vue';
|
|
23
23
|
|
|
24
24
|
const EXPAND = 'expanded';
|
|
25
|
-
const COLLAPSE = 'collapsed';
|
|
25
|
+
const COLLAPSE = 'collapsed';
|
|
26
26
|
|
|
27
|
-
const esModuleInterop = (mod) =>
|
|
27
|
+
const esModuleInterop = (mod) =>
|
|
28
28
|
// eslint-disable-next-line no-underscore-dangle
|
|
29
29
|
mod?.__esModule ? mod.default : mod;
|
|
30
30
|
|
|
@@ -87,7 +87,7 @@ const esModuleInterop = (mod) =>
|
|
|
87
87
|
type: Number,
|
|
88
88
|
},
|
|
89
89
|
},
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
mounted() {
|
|
92
92
|
const self = this;
|
|
93
93
|
const { iframe } = this.$refs;
|
|
@@ -124,7 +124,7 @@ const esModuleInterop = (mod) =>
|
|
|
124
124
|
consoleGroup.log('Created Vue component');
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
|
-
|
|
127
|
+
|
|
128
128
|
beforeUnmount() {
|
|
129
129
|
this.resizer?.disconnect();
|
|
130
130
|
},
|
package/index.umd.js
CHANGED
package/index.umd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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'\nexport const NEW_LINE = '\\n'\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\nexport const REMOVED_NEXT_VERSION =\n 'Use of the old name will be removed in a future version of <i>iframe-resizer</>.'\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":";;;;;;;;;;;;;;;;;;;8YAuHO,MAAMA,EAAS,WACTC,EAAW,YC1GhBC,GALmBC,EAKsBC,EAH7CD,GAAKE,WAAaF,EAAIG,QAAUH,GAFV,IAACA,EAOzB,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,CACTR,KAAMC,QAERQ,IAAK,CACHT,KAAM,CAACC,OAAQM,QAASG,QACxBC,UAAYC,IACV,OAAQA,GACN,KAAKtB,EACL,KAAKD,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACH,OAAO,EACT,QACE,OAAO,IAGbM,aAASkB,GAEXC,YAAa,CACXd,KAAMO,SAERQ,OAAQ,CACNf,KAAMU,QAERM,UAAW,CACThB,KAAMO,SAERU,UAAW,CACTjB,KAAMU,QAERQ,eAAgB,CACdlB,KAAMU,SAIV,OAAAS,GACE,MAAMC,EAAOC,MACPC,OAAEA,GAAWD,KAAKE,MAClBC,EAAU,IACXC,OAAOC,YACRD,OACGE,QAAQN,KAAKO,QACbC,OAAO,EAAEC,EAAKlB,UAAqBC,IAAVD,IAE9BmB,aAAa,EAEbC,cAAe,KACbC,EAAaC,MAAM,uBACnBD,EAAaE,KAAK,uDACX,GAETC,QAAS,IAAIC,IAASjB,EAAKkB,MAAM,aAAcD,GAC/CE,UAAW,IAAIF,IAASjB,EAAKkB,MAAM,eAAgBD,GACnDG,UAAW,IAAIH,IAASjB,EAAKkB,MAAM,eAAgBD,IAG/CI,EAAqBC,EAAelB,GAC1CJ,EAAKuB,QAAUF,EAAmBnB,GAElC,MAAMsB,EAAiB,CACrBC,MAAO,OAAOvB,EAAOwB,MACrBC,OAAQvB,EAAQwB,WAGZf,EAAe1C,EAAuBqD,GAC5CX,EAAaC,MAAM,SAEf,CAAC5C,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"}
|
|
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 export const EXPAND = 'expanded'\n export const COLLAPSE = 'collapsed'\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\n export const EXPAND = 'expanded'\n export const COLLAPSE = 'collapsed'\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":";;;;;;;;;;;;;;;;;;;8YAQS,MAAMA,EAAS,WACTC,EAAW,YAOlBC,GALmBC,EAKsBC,EAH7CD,GAAKE,WAAaF,EAAIG,QAAUH,GAFV,IAACA,EAOzB,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,CACTR,KAAMC,QAERQ,IAAK,CACHT,KAAM,CAACC,OAAQM,QAASG,QACxBC,UAAYC,IACV,OAAQA,GACN,KAAKtB,EACL,KAAKD,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACH,OAAO,EACT,QACE,OAAO,IAGbM,aAASkB,GAEXC,YAAa,CACXd,KAAMO,SAERQ,OAAQ,CACNf,KAAMU,QAERM,UAAW,CACThB,KAAMO,SAERU,UAAW,CACTjB,KAAMU,QAERQ,eAAgB,CACdlB,KAAMU,SAIV,OAAAS,GACE,MAAMC,EAAOC,MACPC,OAAEA,GAAWD,KAAKE,MAClBC,EAAU,IACXC,OAAOC,YACRD,OACGE,QAAQN,KAAKO,QACbC,OAAO,EAAEC,EAAKlB,UAAqBC,IAAVD,IAE9BmB,aAAa,EAEbC,cAAe,KACbC,EAAaC,MAAM,uBACnBD,EAAaE,KAAK,uDACX,GAETC,QAAS,IAAIC,IAASjB,EAAKkB,MAAM,aAAcD,GAC/CE,UAAW,IAAIF,IAASjB,EAAKkB,MAAM,eAAgBD,GACnDG,UAAW,IAAIH,IAASjB,EAAKkB,MAAM,eAAgBD,IAG/CI,EAAqBC,EAAelB,GAC1CJ,EAAKuB,QAAUF,EAAmBnB,GAElC,MAAMsB,EAAiB,CACrBC,MAAO,OAAOvB,EAAOwB,MACrBC,OAAQvB,EAAQwB,WAGZf,EAAe1C,EAAuBqD,GAC5CX,EAAaC,MAAM,SAEf,CAAC5C,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,mCC5HJ,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.8-beta.
|
|
3
|
+
"version": "5.5.8-beta.3",
|
|
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.8-beta.
|
|
43
|
-
"auto-console-group": "1.
|
|
42
|
+
"@iframe-resizer/core": "5.5.8-beta.3",
|
|
43
|
+
"auto-console-group": "1.3.0"
|
|
44
44
|
}
|
|
45
45
|
}
|